Search in sources :

Example 6 with ResourceLoader

use of com.kyj.fx.voeditor.visual.momory.ResourceLoader in project Gargoyle by callakrsos.

the class DatabaseConfigView method btnSaveOnMouseClick.

@FXML
public void btnSaveOnMouseClick(MouseEvent event) {
    try {
        ResourceLoader instance = ResourceLoader.getInstance();
        Map<String, Object> bufMap = new HashMap<>();
        tbDatabase.getItems().forEach(item -> {
            Object key = item.get("key");
            Object value = item.get("value");
            if (key == null)
                return;
            bufMap.put(key.toString(), value.toString());
        });
        instance.putAll(bufMap);
        initDatabaseConfig();
        DialogUtil.showMessageDialog("Save Complete...");
    } catch (Exception e) {
        DialogUtil.showExceptionDailog(e);
    }
}
Also used : ResourceLoader(com.kyj.fx.voeditor.visual.momory.ResourceLoader) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) SQLException(java.sql.SQLException) RuntimeException(com.sun.star.uno.RuntimeException) FXML(javafx.fxml.FXML)

Example 7 with ResourceLoader

use of com.kyj.fx.voeditor.visual.momory.ResourceLoader in project Gargoyle by callakrsos.

the class DatabaseConfigView method loadResource.

/**
	 * 화면에 리소스를 읽어들인다.
	 *
	 * @return
	 *
	 * @작성자 : KYJ
	 * @작성일 : 2015. 11. 4.
	 */
public ObservableList<Map<String, Object>> loadResource() {
    ResourceLoader instance = ResourceLoader.getInstance();
    Set<Entry<Object, Object>> entry = instance.getEntry();
    return load(entry);
}
Also used : ResourceLoader(com.kyj.fx.voeditor.visual.momory.ResourceLoader) Entry(java.util.Map.Entry)

Aggregations

ResourceLoader (com.kyj.fx.voeditor.visual.momory.ResourceLoader)7 ConfigResourceLoader (com.kyj.fx.voeditor.visual.momory.ConfigResourceLoader)5 HashMap (java.util.HashMap)5 FXML (javafx.fxml.FXML)4 RuntimeException (com.sun.star.uno.RuntimeException)2 SQLException (java.sql.SQLException)2 Entry (java.util.Map.Entry)2 JSONObject (org.json.simple.JSONObject)2 NotYetSupportException (com.kyj.fx.voeditor.visual.exceptions.NotYetSupportException)1 ClassTypeResourceLoader (com.kyj.fx.voeditor.visual.momory.ClassTypeResourceLoader)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 DatabaseTypeMappingResourceLoader (kyj.Fx.dao.wizard.memory.DatabaseTypeMappingResourceLoader)1