Package javafx.scene.layout

Examples of javafx.scene.layout.StackPane


          }
        });
        c.setOnMouseExited( (event) -> {
          lastFocus.set( (Circle)event.getSource() );
        });
        StackPane lStackPane = new StackPane();
        lStackPane.setId("" + i);
        lStackPane.getChildren().add(c);
        lStackPane.getChildren().add(t);
        lCircularPane.add(lStackPane);
      }
     
      StackPane lStackPane = new StackPane();
      Circle c = new Circle(1, Color.WHITE);
      c.radiusProperty().bind(lCircularPane.widthProperty().divide(2.0));
      lStackPane.getChildren().add(c);
      lStackPane.getChildren().add(lCircularPane);
      Label l = new Label("H");
      l.getStyleClass().add("center");
      lStackPane.getChildren().add(l);
      lHBox.add(lStackPane);
    }
   
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setStartAngle(-360.0 / 12 / 2);
      lCircularPane.setDiameter(150.0);
      //lCircularPane.setStyle("-fx-border-color:black;");
      lCircularPane.setChildrenAreCircular(true);
      //lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      final List<Label> labels = new ArrayList<>();
      final List<Circle> circles = new ArrayList<>();
      for (int i = 0; i < 12; i++) {
        javafx.scene.shape.Circle c = new javafx.scene.shape.Circle(10, Color.TRANSPARENT);
        circles.add(c);
        javafx.scene.control.Label t = new javafx.scene.control.Label("" + (i * 5));
        t.getStyleClass().add("time");
        labels.add(t);
        StackPane lStackPane = new StackPane();
        lStackPane.getChildren().add(c);
        lStackPane.getChildren().add(t);
        lCircularPane.add(lStackPane);
      }
      StackPane lStackPane = new StackPane();
      Circle c = new Circle(1, Color.WHITE);
      c.radiusProperty().bind(lCircularPane.widthProperty().divide(2.0));
      lStackPane.getChildren().add(c);
      lStackPane.getChildren().add(lCircularPane);
      Label l = new Label("M");
      l.getStyleClass().add("center");
      lStackPane.getChildren().add(l);
      lHBox.add(lStackPane);
    }
   
    {
      CircularPane lCircularPane = new CircularPane();
      lCircularPane.setDiameter(90.0);
      //lCircularPane.setStyle("-fx-border-color:black;");
      //lCircularPane.setChildrenAreCircular(true);
      lCircularPane.setShowDebug(lShowDebug);
      lCircularPane.setAnimationInterpolation(CircularPane::animateOverTheArc);
      final List<Label> labels = new ArrayList<>();
      final List<Circle> circles = new ArrayList<>();
      final AtomicReference<Circle> lastFocus = new AtomicReference<>();
      final AtomicBoolean isPM = new AtomicBoolean(false);
      for (int i = 0; i < 12; i++) {
        javafx.scene.shape.Circle c = new javafx.scene.shape.Circle(10, Color.GRAY);
        circles.add(c);
        javafx.scene.control.Label t = new javafx.scene.control.Label("" + (i * 5));
        t.getStyleClass().add("time");
        labels.add(t);
        StackPane lStackPane = new StackPane();
        lStackPane.getChildren().add(c);
        lStackPane.getChildren().add(t);
        lCircularPane.add(lStackPane);
      }
      StackPane lStackPane = new StackPane();
      lStackPane.getChildren().add(lCircularPane);
      Label l = new Label("S");
      l.getStyleClass().add("center");
      lStackPane.getChildren().add(l);
      lHBox.add(lStackPane);
    }
   
    {
      CircularPane lCircularPane = new CircularPane().withId("XX");
View Full Code Here


public class CirclePopupMenuTest extends JFXtrasGuiTest {

  @Override
  protected Parent getRootNode() {
    // use a pane to force the scene large enough
    stackPane = new StackPane();
    stackPane.setMinSize(600, 600);
   
    // place label
    label = new Label();
    stackPane.getChildren().add(label);
View Full Code Here

public class CornerMenuTest extends JFXtrasGuiTest {

  @Override
  protected Parent getRootNode() {
    // use a pane to force the scene large enough
    stackPane = new StackPane();
    stackPane.setMinSize(600, 600);
   
    // place label
    label = new Label();
    stackPane.getChildren().add(label);
View Full Code Here

        init();
    }

    private void init() {
        getStyleClass().setAll(DEFAULT_STYLE_CLASS);
        setContentPane(new StackPane());

        closeTransitionProperty.addListener(new ChangeListener<Transition>() {
            @Override
            public void changed(ObservableValue<? extends Transition> ov, Transition t, Transition t1) {
                t1.statusProperty().addListener(new ChangeListener<Animation.Status>() {
View Full Code Here

        int i = url.lastIndexOf("/");
        if (i != -1) {
            url = url.substring(0, i);
        }
        webView.getEngine().load(url);
        StackPane root = new StackPane();
        root.getChildren().add(webView);
        Scene scene = new Scene(root, 900, 900);
        stage.setScene(scene);
        stage.show();

        // registers osx-native event handlers
View Full Code Here

            System.out.println("A L A R M");
        });
    }

    @Override public void start(Stage stage) {
        StackPane pane = new StackPane();
        pane.setPadding(new Insets(5, 5, 5, 5));
        pane.getChildren().addAll(clock);

        Scene scene = new Scene(pane);
        //scene.setFullScreen(true);

        stage.setTitle("RoundLcdClock");
View Full Code Here

        chart.setUnit("°C");
        chart.setSeries(series);
    }

    @Override public void start(Stage stage) throws Exception {
        StackPane pane = new StackPane();
        pane.setPadding(new Insets(5, 5, 5, 5));
        pane.getChildren().addAll(chart);

        Scene scene = new Scene(pane);
        //scene.setFullScreen(true);

        stage.setTitle("Demo SimpleLineChart");
View Full Code Here

            }
        };
    }

    @Override public void start(Stage stage) {
        StackPane pane = new StackPane();
        pane.setPadding(new Insets(5, 5, 5, 5));
        pane.setBackground(new Background(new BackgroundFill(Color.rgb(70, 70, 70), CornerRadii.EMPTY, Insets.EMPTY)));
        pane.getChildren().setAll(signalTower);

        Scene scene = new Scene(pane);

        stage.setTitle("SignalTower");
        stage.setScene(scene);
View Full Code Here

            }
        };
    }

    @Override public void start(Stage stage) {
        StackPane pane = new StackPane();
        pane.getChildren().add(control);

        Scene scene = new Scene(pane);

        stage.setTitle("Demo HeatControl");
        stage.setScene(scene);
View Full Code Here

            }
        });
    }

    @Override public void start(Stage stage) {
        StackPane pane = new StackPane();
        pane.setPadding(new Insets(10, 10, 10, 10));
        pane.getChildren().setAll(control);

        Scene scene = new Scene(pane, 200, 200);

        stage.setTitle("JavaFX TButton");
        stage.setScene(scene);
View Full Code Here

TOP

Related Classes of javafx.scene.layout.StackPane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.