Search in sources :

Example 1 with DockNode

use of com.kyj.fx.voeditor.visual.component.dock.pane.DockNode in project Gargoyle by callakrsos.

the class DockPaneExam method start.

/* (non-Javadoc)
	 * @see javafx.application.Application#start(javafx.stage.Stage)
	 */
@Override
public void start(Stage primaryStage) throws Exception {
    DockNode dockNode = new DockNode(new BorderPane(new Label("Master")), "hello m");
    DockNode dockNode2 = new DockNode(new BorderPane(new Label("Slave")), "hello s");
    //		SplitPane root = new SplitPane();
    DockPane dockPane = new DockPane();
    dockNode2.dock(dockPane, DockPos.CENTER);
    dockNode.dock(dockPane, DockPos.LEFT);
    //		root.getItems().add(dockPane);
    Application.setUserAgentStylesheet(Application.STYLESHEET_MODENA);
    DockPane.initializeDefaultUserAgentStylesheet();
    primaryStage.setScene(new Scene(dockPane));
    primaryStage.show();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) DockPane(com.kyj.fx.voeditor.visual.component.dock.pane.DockPane) Label(javafx.scene.control.Label) DockNode(com.kyj.fx.voeditor.visual.component.dock.pane.DockNode) Scene(javafx.scene.Scene)

Example 2 with DockNode

use of com.kyj.fx.voeditor.visual.component.dock.pane.DockNode 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();
}
Also used : CommonsSqllPan(com.kyj.fx.voeditor.visual.component.sql.view.CommonsSqllPan) DockNode(com.kyj.fx.voeditor.visual.component.dock.pane.DockNode) JSONObject(org.json.simple.JSONObject) NotYetSupportException(com.kyj.fx.voeditor.visual.exceptions.NotYetSupportException)

Aggregations

DockNode (com.kyj.fx.voeditor.visual.component.dock.pane.DockNode)2 DockPane (com.kyj.fx.voeditor.visual.component.dock.pane.DockPane)1 CommonsSqllPan (com.kyj.fx.voeditor.visual.component.sql.view.CommonsSqllPan)1 NotYetSupportException (com.kyj.fx.voeditor.visual.exceptions.NotYetSupportException)1 Scene (javafx.scene.Scene)1 Label (javafx.scene.control.Label)1 BorderPane (javafx.scene.layout.BorderPane)1 JSONObject (org.json.simple.JSONObject)1