Search in sources :

Example 16 with ScrollPane

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

the class FxControlsTreeViewExam method getTestNod.

Node getTestNod() {
    /* [시작] 분석하고자하는 UI구조 */
    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));
    /* [끝] 분석하고자하는 UI구조 */
    return borderPane;
}
Also used : BorderPane(javafx.scene.layout.BorderPane) HBox(javafx.scene.layout.HBox) TextArea(javafx.scene.control.TextArea) Button(javafx.scene.control.Button) ScrollPane(javafx.scene.control.ScrollPane) HTMLEditor(javafx.scene.web.HTMLEditor)

Example 17 with ScrollPane

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

the class PolygonEx method start.

@Override
public void start(Stage stage) {
    Pane g = new Pane();
    ScrollPane convert = XY.convert(g);
    {
        //한 점의 좌표가 주어진경우
        double x = 150;
        double y = 150;
        //빗변의 길이
        double r = 100;
        double degree = Math.atan2(y, x);
        double x1 = x + (r / Math.tan(degree));
        double y1 = y;
        double x2 = x1;
        double y2 = y + y - r;
        Polygon polygon = new Polygon();
        polygon.setLayoutX(x);
        polygon.setLayoutY(x);
        polygon.getPoints().addAll(new Double[] { x, y, x1, y1, x2, y2 });
        g.getChildren().add(polygon);
        g.getChildren().add(new Line(1, 1, 10, 10));
    }
    {
        //한 점의 좌표가 주어진경우
        double x = 150;
        double y = 150;
        //빗변의 길이
        double r = 100;
        double degree = Math.atan2(y, x);
        double x1 = x + (r / Math.tan(degree));
        double y1 = y;
        double x2 = x1;
        double y2 = y + r;
        Polygon polygon = new Polygon();
        polygon.getPoints().addAll(new Double[] { x, y, x1, y1, x2, y2 });
        g.getChildren().add(polygon);
    }
    //		Line line = new Line();
    //		line.setStartX(x);
    //		line.setStartY(y);
    //		line.setEndX(x2);
    //		line.setEndY(y2);
    //
    //		Text text = new Text("x : " + x + " y : " + y);
    //		text.setX(x);
    //		text.setY(y - 20);
    //
    //		Text text1 = new Text("x1 : " + x1 + " y1 : " + y1);
    //		text1.setX(x1);
    //		text1.setY(y1 - 20);
    //
    //		Text text2 = new Text("x2 : " + x2 + " y2 : " + y2);
    //		text2.setX(x2);
    //		text2.setY(y2 - 20);
    //		g.getChildren().addAll(polygon, text, text1, text2);
    Scene scene = new Scene(convert, 1800, 900);
    stage.setScene(scene);
    stage.show();
}
Also used : Line(javafx.scene.shape.Line) ScrollPane(javafx.scene.control.ScrollPane) Polygon(javafx.scene.shape.Polygon) Scene(javafx.scene.Scene) ScrollPane(javafx.scene.control.ScrollPane) Pane(javafx.scene.layout.Pane)

Example 18 with ScrollPane

use of javafx.scene.control.ScrollPane in project bitsquare by bitsquare.

the class SettingsView method loadView.

private void loadView(Class<? extends View> viewClass) {
    final Tab tab;
    View view = viewLoader.load(viewClass);
    if (view instanceof PreferencesView)
        tab = preferencesTab;
    else if (view instanceof NetworkSettingsView)
        tab = networkSettingsTab;
    else if (view instanceof AboutView)
        tab = aboutTab;
    else
        throw new IllegalArgumentException("Navigation to " + viewClass + " is not supported");
    if (tab.getContent() != null && tab.getContent() instanceof ScrollPane) {
        ((ScrollPane) tab.getContent()).setContent(view.getRoot());
    } else {
        tab.setContent(view.getRoot());
    }
    root.getSelectionModel().select(tab);
}
Also used : PreferencesView(io.bitsquare.gui.main.settings.preferences.PreferencesView) Tab(javafx.scene.control.Tab) ScrollPane(javafx.scene.control.ScrollPane) NetworkSettingsView(io.bitsquare.gui.main.settings.network.NetworkSettingsView) AboutView(io.bitsquare.gui.main.settings.about.AboutView) MainView(io.bitsquare.gui.main.MainView) NetworkSettingsView(io.bitsquare.gui.main.settings.network.NetworkSettingsView) AboutView(io.bitsquare.gui.main.settings.about.AboutView) PreferencesView(io.bitsquare.gui.main.settings.preferences.PreferencesView)

Aggregations

ScrollPane (javafx.scene.control.ScrollPane)18 Button (javafx.scene.control.Button)6 Insets (javafx.geometry.Insets)5 Scene (javafx.scene.Scene)5 Node (javafx.scene.Node)4 BorderPane (javafx.scene.layout.BorderPane)4 VBox (javafx.scene.layout.VBox)4 HTMLEditor (javafx.scene.web.HTMLEditor)4 JFXButton (com.jfoenix.controls.JFXButton)3 MaterialDesignIconView (de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView)3 DefaultProperty (javafx.beans.DefaultProperty)3 FXCollections (javafx.collections.FXCollections)3 Parent (javafx.scene.Parent)3 Control (javafx.scene.control.Control)3 Label (javafx.scene.control.Label)3 TextArea (javafx.scene.control.TextArea)3 GridPane (javafx.scene.layout.GridPane)3 HBox (javafx.scene.layout.HBox)3 Paint (javafx.scene.paint.Paint)3 Stage (javafx.stage.Stage)3