use of com.kyj.fx.voeditor.visual.exceptions.NotYetSupportException in project Gargoyle by callakrsos.
the class DatabaseUrlManagementView method showSqlPane.
public void showSqlPane(int nRow) throws Exception {
Map<String, Object> map = tbDatabase.getItems().get(nRow);
Object object = map.get("dbms");
if (object == null)
return;
String dbms = object.toString();
if (dbms == null || dbms == "") {
String msg = "not yet supported..." + dbms;
LOGGER.error(msg);
throw new NotYetSupportException(msg);
}
String jdbcDriver = ConfigResourceLoader.getInstance().get("dbms." + dbms);
map.put("driver", jdbcDriver);
CommonsSqllPan sqlPane = CommonsSqllPan.getSqlPane(dbms);
sqlPane.initialize(map);
// Scene scene = new Scene(root, 1100, 700);
sqlPane.setPrefSize(1100, 900);
String title = String.format("Database[%s]", sqlPane.getClass().getSimpleName());
DockNode dockNode = new DockNode(sqlPane, title);
// Platform.runLater(() -> {
// dockNode.setMaximized(true);
// });
// dockNode.setFloating(true, new Point2D(0,0));
// dockNode.getStage().centerOnScreen();
FxUtil.createDockStageAndShow(null, dockNode);
// FxUtil.createStageAndShow(title, dockNode, stage -> {
// stage.getScene().getStylesheets().add(SkinManager.getInstance().getSkin());
// dockNode.floatingProperty().addListener((oba, o, n) -> {
// if (n)
// stage.close();
// });
// });
// Stage stage = new Stage();
// sqlPane.setStage(stage);
// scene.getStylesheets().add(SkinManager.getInstance().getSkin());
// stage.setScene(scene);
// stage.setTitle(dbms);
//
//
//
// stage.show();
}
use of com.kyj.fx.voeditor.visual.exceptions.NotYetSupportException in project Gargoyle by callakrsos.
the class CommonsSqllPan method getSqlPane.
/**
* 설정에 정의된 BASE_KEY_JDBC_DRIVER에 맞는 jdbc Driver의 SQL 패널을 반환
*
* @return
* @throws NotYetSupportException
*/
public static CommonsSqllPan getSqlPane(String dbms) throws Exception {
CommonsSqllPan sqlPane = null;
String classLocation = ResourceLoader.getInstance().get("dbms." + dbms + ".pane");
try {
Class<?> forName = Class.forName(classLocation);
Constructor<?> constructor = forName.getConstructor(String.class);
constructor.setAccessible(true);
sqlPane = (CommonsSqllPan) constructor.newInstance(dbms);
// 특화된 스타일적용처리 -> 트리에서 기본키이면 붉은색으로 색칠.
sqlPane.getSchemaTree().setCellFactory(new DatabaseTreeCallback<>());
} catch (Exception e) {
// e.printStackTrace();
String msg = "not yet supported..." + e.getMessage();
LOGGER.error(msg);
throw new NotYetSupportException(msg);
}
return sqlPane;
}
Aggregations