Search in sources :

Example 1 with SplitPane

use of javafx.scene.control.SplitPane in project Gargoyle by callakrsos.

the class DAOLoaderController method menuHistoryOnAction.

/**
	 * 히스토리 이력을 살펴보는경우 사용
	 *
	 * @작성자 : KYJ
	 * @작성일 : 2015. 11. 6.
	 * @param event
	 */
public void menuHistoryOnAction(ActionEvent event) {
    Map<String, Object> selectedItem = tbSrchDao.getSelectionModel().getSelectedItem();
    if (selectedItem == null)
        return;
    String packageName = ValueUtil.emptyThan(selectedItem.get("PACKAGE_NAME"), "").toString();
    String className = ValueUtil.emptyThan(selectedItem.get("CLASS_NAME"), "").toString();
    // Stage primaryStage = SharedMemory.getPrimaryStage();
    Map<String, Object> paramMap = new HashMap<>();
    paramMap.put("packageName", packageName);
    paramMap.put("className", className);
    try {
        List<TbmSysDaoMethodsHDVO> select = listHistoryItems(paramMap);
        CommonsBaseGridView<TbmSysDaoMethodsHDVO> commonsBaseGridView = new CommonsBaseGridView<>(TbmSysDaoMethodsHDVO.class, select);
        TableViewSelectionModel<TbmSysDaoMethodsHDVO> selectionModel = commonsBaseGridView.getSelectionModel();
        selectionModel.setSelectionMode(SelectionMode.MULTIPLE);
        BorderPane borderPane = new BorderPane();
        Label value = new Label("History");
        value.setStyle("-fx-font-size:75px");
        borderPane.setTop(value);
        SqlKeywords sqlKeyword = new SqlKeywords();
        borderPane.setBottom(sqlKeyword);
        SplitPane splitPane = new SplitPane(commonsBaseGridView, sqlKeyword);
        splitPane.setOrientation(Orientation.VERTICAL);
        borderPane.setCenter(splitPane);
        commonsBaseGridView.setOnMouseClicked(ev -> {
            if (ev.getClickCount() == 2) {
                try {
                    TbmSysDaoMethodsHDVO selectedItem2 = commonsBaseGridView.getSelectionModel().getSelectedItem();
                    String histTsp = selectedItem2.getHistTsp();
                    String sqlBody = getSqlBody(histTsp);
                    sqlKeyword.setContent(sqlBody);
                } catch (Exception e) {
                    LOGGER.error(ValueUtil.toString(e));
                }
            }
        });
        MenuItem compare = new MenuItem("Compare.");
        compare.setDisable(true);
        compare.setOnAction(ev -> {
            ObservableList<TbmSysDaoMethodsHDVO> selectedItems = commonsBaseGridView.getSelectionModel().getSelectedItems();
            if (selectedItems.size() == 2) {
                compare(selectedItems.get(0), selectedItems.get(1));
            }
        });
        ContextMenu historyContextMenu = new ContextMenu(compare);
        historyContextMenu.setOnShowing(ev -> {
            if (selectionModel.getSelectedItems().size() == 2) {
                compare.setDisable(false);
            } else {
                compare.setDisable(true);
            }
        });
        commonsBaseGridView.setContextMenu(historyContextMenu);
        Scene scene = new Scene(borderPane);
        Stage stage = new Stage();
        stage.initOwner(SharedMemory.getPrimaryStage());
        stage.setScene(scene);
        stage.show();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : SqlKeywords(com.kyj.fx.voeditor.visual.component.text.SqlKeywords) BorderPane(javafx.scene.layout.BorderPane) HashMap(java.util.HashMap) Label(javafx.scene.control.Label) TbmSysDaoMethodsHDVO(com.kyj.fx.voeditor.visual.main.model.vo.TbmSysDaoMethodsHDVO) MenuItem(javafx.scene.control.MenuItem) ContextMenu(javafx.scene.control.ContextMenu) SplitPane(javafx.scene.control.SplitPane) Scene(javafx.scene.Scene) CommonsBaseGridView(com.kyj.fx.voeditor.visual.component.grid.CommonsBaseGridView) Stage(javafx.stage.Stage)

Example 2 with SplitPane

use of javafx.scene.control.SplitPane in project Gargoyle by callakrsos.

the class FxControlsTreeViewExam method start.

@Override
public void start(Stage primaryStage) throws Exception {
    CheckBoxFxControlTreeView checkedNodeTreeView = new CheckBoxFxControlTreeView(getTestNod());
    checkedNodeTreeView.setOnMouseClicked(event -> {
        System.out.println(checkedNodeTreeView.getCheckModel().getCheckedItems());
    });
    FxControlTreeView simpleNodeTreeView = new FxControlTreeView(getTestNod());
    simpleNodeTreeView.setOnMouseClicked(event -> {
        System.out.println(simpleNodeTreeView.getSelectionModel().getSelectedItems());
    });
    Scene scene = new Scene(new SplitPane(simpleNodeTreeView, checkedNodeTreeView));
    primaryStage.setScene(scene);
    primaryStage.show();
}
Also used : CheckBoxFxControlTreeView(com.kyj.fx.voeditor.visual.component.CheckBoxFxControlTreeView) FxControlTreeView(com.kyj.fx.voeditor.visual.component.FxControlTreeView) SplitPane(javafx.scene.control.SplitPane) CheckBoxFxControlTreeView(com.kyj.fx.voeditor.visual.component.CheckBoxFxControlTreeView) Scene(javafx.scene.Scene)

Example 3 with SplitPane

use of javafx.scene.control.SplitPane in project intellij-community by JetBrains.

the class SceneBuilderImpl method create.

private void create() {
    if (myProject.isDisposed()) {
        return;
    }
    myEditorController = new EditorController();
    updateCustomLibrary();
    HierarchyTreeViewController componentTree = new HierarchyTreeViewController(myEditorController);
    ContentPanelController canvas = new ContentPanelController(myEditorController);
    InspectorPanelController propertyTable = new InspectorPanelController(myEditorController);
    LibraryPanelController palette = new LibraryPanelController(myEditorController);
    SplitPane leftPane = new SplitPane();
    leftPane.setOrientation(Orientation.VERTICAL);
    leftPane.getItems().addAll(palette.getPanelRoot(), componentTree.getPanelRoot());
    leftPane.setDividerPositions(0.5, 0.5);
    SplitPane.setResizableWithParent(leftPane, Boolean.FALSE);
    SplitPane.setResizableWithParent(propertyTable.getPanelRoot(), Boolean.FALSE);
    SplitPane mainPane = new SplitPane();
    mainPane.getItems().addAll(leftPane, canvas.getPanelRoot(), propertyTable.getPanelRoot());
    mainPane.setDividerPositions(0.11036789297658862, 0.8963210702341137);
    myPanel.setScene(new Scene(mainPane, myPanel.getWidth(), myPanel.getHeight(), true, SceneAntialiasing.BALANCED));
    loadFile();
    startChangeListener();
    if (myProject.isDisposed()) {
        return;
    }
    UsageTrigger.trigger("scene-builder.open");
}
Also used : EditorController(com.oracle.javafx.scenebuilder.kit.editor.EditorController) InspectorPanelController(com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController) ContentPanelController(com.oracle.javafx.scenebuilder.kit.editor.panel.content.ContentPanelController) SplitPane(javafx.scene.control.SplitPane) Scene(javafx.scene.Scene) HierarchyTreeViewController(com.oracle.javafx.scenebuilder.kit.editor.panel.hierarchy.treeview.HierarchyTreeViewController) LibraryPanelController(com.oracle.javafx.scenebuilder.kit.editor.panel.library.LibraryPanelController)

Example 4 with SplitPane

use of javafx.scene.control.SplitPane in project Gargoyle by callakrsos.

the class VelocityDocumentExam method start.

/* (non-Javadoc)
	 * @see javafx.application.Application#start(javafx.stage.Stage)
	 */
@Override
public void start(Stage primaryStage) throws Exception {
    BorderPane pane = new BorderPane();
    TextArea root = new TextArea();
    TextArea btm = new TextArea();
    SplitPane splitPane = new SplitPane(root, btm);
    splitPane.setDividerPosition(0, 0.6d);
    splitPane.setOrientation(Orientation.VERTICAL);
    pane.setCenter(splitPane);
    Button value = new Button("Excute");
    pane.setBottom(value);
    value.setOnAction(ev -> {
        String velocityToText = ValueUtil.getVelocityToText(root.getText(), new HashMap<String, Object>(), false);
        btm.setText(velocityToText);
    });
    primaryStage.setScene(new Scene(pane));
    primaryStage.show();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) TextArea(javafx.scene.control.TextArea) Button(javafx.scene.control.Button) SplitPane(javafx.scene.control.SplitPane) Scene(javafx.scene.Scene)

Example 5 with SplitPane

use of javafx.scene.control.SplitPane in project Gargoyle by callakrsos.

the class SliderLineChartExam method start.

@Override
public void start(Stage primaryStage) throws Exception {
    SliderLineChartComposite<Person> loadRoot1 = null;
    RangeSliderLineChartComposite<Person> loadRoot2 = null;
    try {
        List<Person> arrayList = new ArrayList<>();
        for (int i = 0; i < 30; i++) {
            arrayList.add(new Person(i + "", i));
        }
        loadRoot1 = new SliderLineChartComposite<Person>() {

            @Override
            public Data<String, Number> converter(Person t) {
                return new Data<>(t.name, t.age);
            }
        };
        loadRoot1.getItems().addAll(arrayList);
        loadRoot2 = new RangeSliderLineChartComposite<Person>() {

            @Override
            public Data<String, Number> converter(Person t) {
                return new Data<>(t.name, t.age);
            }
        };
        loadRoot2.getItems().addAll(arrayList);
        primaryStage.setScene(new Scene(new SplitPane(loadRoot1, loadRoot2)));
        primaryStage.show();
    } catch (Exception e) {
        e.printStackTrace();
    }
//		System.out.println(loadRoot1 == loadRoot2);
}
Also used : ArrayList(java.util.ArrayList) Data(javafx.scene.chart.XYChart.Data) SplitPane(javafx.scene.control.SplitPane) Scene(javafx.scene.Scene)

Aggregations

SplitPane (javafx.scene.control.SplitPane)8 Scene (javafx.scene.Scene)5 Stack (java.util.Stack)2 Node (javafx.scene.Node)2 Parent (javafx.scene.Parent)2 Button (javafx.scene.control.Button)2 TextArea (javafx.scene.control.TextArea)2 BorderPane (javafx.scene.layout.BorderPane)2 CheckBoxFxControlTreeView (com.kyj.fx.voeditor.visual.component.CheckBoxFxControlTreeView)1 FxControlTreeView (com.kyj.fx.voeditor.visual.component.FxControlTreeView)1 CommonsBaseGridView (com.kyj.fx.voeditor.visual.component.grid.CommonsBaseGridView)1 SqlKeywords (com.kyj.fx.voeditor.visual.component.text.SqlKeywords)1 TbmSysDaoMethodsHDVO (com.kyj.fx.voeditor.visual.main.model.vo.TbmSysDaoMethodsHDVO)1 EditorController (com.oracle.javafx.scenebuilder.kit.editor.EditorController)1 ContentPanelController (com.oracle.javafx.scenebuilder.kit.editor.panel.content.ContentPanelController)1 HierarchyTreeViewController (com.oracle.javafx.scenebuilder.kit.editor.panel.hierarchy.treeview.HierarchyTreeViewController)1 InspectorPanelController (com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController)1 LibraryPanelController (com.oracle.javafx.scenebuilder.kit.editor.panel.library.LibraryPanelController)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1