Search in sources :

Example 1 with FxControlTreeView

use of com.kyj.fx.voeditor.visual.component.FxControlTreeView 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 2 with FxControlTreeView

use of com.kyj.fx.voeditor.visual.component.FxControlTreeView in project Gargoyle by callakrsos.

the class ComponentClassifier method start.

@Override
public void start(Stage primaryStage) throws Exception {
    FXMLLoader loader = new FXMLLoader();
    loader.setLocation(SystemLayoutViewController.class.getResource("VoEditorView.fxml"));
    try {
        Node node = loader.load();
        // {
        //
        // ObservableList<Node> recursive = recursive(node);
        // print(recursive);
        //
        // }
        // {
        // Group group = new Group();
        //
        // // Text는 Shape클래스의 하위클래스
        // group.getChildren().add(new Text());
        // group.getChildren().add(new Button());
        // group.getChildren().add(new Button());
        // group.getChildren().add(new Label());
        // ObservableList<Node> recursive = recursive(group);
        // print(recursive);
        //
        // }
        // {
        // ScrollPane scrollPane = new ScrollPane();
        // ScrollPane scrollPane2 = new ScrollPane();
        // scrollPane2.setContent(new TextArea());
        // scrollPane.setContent(new BorderPane(scrollPane2));
        // ObservableList<Node> recursive = recursive(scrollPane);
        // print(recursive);
        // }
        {
            BorderPane borderPane = new BorderPane();
            ScrollPane scrollPane2 = new ScrollPane();
            scrollPane2.setContent(new TextArea());
            borderPane.setTop(new HBox(new Button(), new Button(), new HTMLEditor()));
            borderPane.setCenter(new BorderPane(scrollPane2));
            FxControlTreeView tv = new FxControlTreeView(borderPane);
            tv.setOnMouseClicked(event -> {
                System.out.println(tv.getSelectionModel().getSelectedItem());
            });
            Scene scene = new Scene(tv);
            primaryStage.setScene(scene);
            primaryStage.show();
        // List<Node> recursive = recursive(borderPane);
        // print(recursive);
        }
    //
    // Scene scene = new Scene((Parent) node);
    // primaryStage.setScene(scene);
    // primaryStage.show();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
Also used : Button(javafx.scene.control.Button) SystemLayoutViewController(com.kyj.fx.voeditor.visual.main.layout.SystemLayoutViewController) Scene(javafx.scene.Scene) TextArea(javafx.scene.control.TextArea) Control(javafx.scene.control.Control) FXCollections(javafx.collections.FXCollections) Skin(javafx.scene.control.Skin) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Application(javafx.application.Application) Parent(javafx.scene.Parent) ScrollPane(javafx.scene.control.ScrollPane) FXMLLoader(javafx.fxml.FXMLLoader) ReadOnlyProperty(javafx.beans.property.ReadOnlyProperty) Method(java.lang.reflect.Method) HBox(javafx.scene.layout.HBox) Node(javafx.scene.Node) IOException(java.io.IOException) List(java.util.List) Stream(java.util.stream.Stream) Stage(javafx.stage.Stage) FxControlTreeView(com.kyj.fx.voeditor.visual.component.FxControlTreeView) DefaultProperty(javafx.beans.DefaultProperty) HTMLEditor(javafx.scene.web.HTMLEditor) ObservableList(javafx.collections.ObservableList) BorderPane(javafx.scene.layout.BorderPane) SystemLayoutViewController(com.kyj.fx.voeditor.visual.main.layout.SystemLayoutViewController) BorderPane(javafx.scene.layout.BorderPane) HBox(javafx.scene.layout.HBox) TextArea(javafx.scene.control.TextArea) Node(javafx.scene.Node) IOException(java.io.IOException) Scene(javafx.scene.Scene) FXMLLoader(javafx.fxml.FXMLLoader) FxControlTreeView(com.kyj.fx.voeditor.visual.component.FxControlTreeView) Button(javafx.scene.control.Button) ScrollPane(javafx.scene.control.ScrollPane) HTMLEditor(javafx.scene.web.HTMLEditor)

Aggregations

FxControlTreeView (com.kyj.fx.voeditor.visual.component.FxControlTreeView)2 Scene (javafx.scene.Scene)2 CheckBoxFxControlTreeView (com.kyj.fx.voeditor.visual.component.CheckBoxFxControlTreeView)1 SystemLayoutViewController (com.kyj.fx.voeditor.visual.main.layout.SystemLayoutViewController)1 IOException (java.io.IOException)1 Method (java.lang.reflect.Method)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Function (java.util.function.Function)1 Stream (java.util.stream.Stream)1 Application (javafx.application.Application)1 DefaultProperty (javafx.beans.DefaultProperty)1 ReadOnlyProperty (javafx.beans.property.ReadOnlyProperty)1 FXCollections (javafx.collections.FXCollections)1 ObservableList (javafx.collections.ObservableList)1 FXMLLoader (javafx.fxml.FXMLLoader)1 Node (javafx.scene.Node)1 Parent (javafx.scene.Parent)1 Button (javafx.scene.control.Button)1 Control (javafx.scene.control.Control)1