Search in sources :

Example 41 with Background

use of javafx.scene.layout.Background in project Board-Instrumentation-Framework by intel.

the class PushButtonSkin method handleControlPropertyChanged.

// ******************** Methods *******************************************
protected void handleControlPropertyChanged(final String PROPERTY) {
    if ("RESIZE".equals(PROPERTY)) {
        resize();
    } else if ("STATUS".equals(PROPERTY)) {
        updateStatus();
    } else if ("COLOR".equals(PROPERTY)) {
        icon.setBackground(new Background(new BackgroundFill(getSkinnable().getColor(), null, null)));
        resize();
    }
}
Also used : Background(javafx.scene.layout.Background) BackgroundFill(javafx.scene.layout.BackgroundFill)

Example 42 with Background

use of javafx.scene.layout.Background in project Board-Instrumentation-Framework by intel.

the class DemoFlatGauge method start.

@Override
public void start(Stage stage) throws Exception {
    HBox pane = new HBox();
    pane.setPadding(new Insets(10, 10, 10, 10));
    pane.setSpacing(10);
    pane.getChildren().addAll(gauge);
    pane.setBackground(new Background(new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY)));
    final Scene scene = new Scene(pane, Color.WHITE);
    // scene.setFullScreen(true);
    stage.setTitle("FlatGauge");
    stage.setScene(scene);
    stage.show();
    timer.start();
    calcNoOfNodes(scene.getRoot());
    System.out.println(noOfNodes + " Nodes in SceneGraph");
}
Also used : HBox(javafx.scene.layout.HBox) Insets(javafx.geometry.Insets) Background(javafx.scene.layout.Background) BackgroundFill(javafx.scene.layout.BackgroundFill) Scene(javafx.scene.Scene)

Example 43 with Background

use of javafx.scene.layout.Background in project Board-Instrumentation-Framework by intel.

the class DemoLcd method start.

@Override
public void start(Stage stage) {
    StackPane pane = new StackPane();
    pane.setPadding(new Insets(10, 10, 10, 10));
    pane.getChildren().setAll(control);
    pane.setBackground(new Background(new BackgroundFill(Color.DARKGRAY, CornerRadii.EMPTY, Insets.EMPTY)));
    Scene scene = new Scene(pane);
    stage.setTitle("Lcd demo");
    stage.centerOnScreen();
    // stage.initStyle(StageStyle.UNDECORATED);
    stage.setScene(scene);
    stage.show();
    timer.start();
    calcNoOfNodes(scene.getRoot());
    System.out.println(noOfNodes + " Nodes in SceneGraph");
}
Also used : Insets(javafx.geometry.Insets) Background(javafx.scene.layout.Background) BackgroundFill(javafx.scene.layout.BackgroundFill) Scene(javafx.scene.Scene) StackPane(javafx.scene.layout.StackPane)

Example 44 with Background

use of javafx.scene.layout.Background in project Board-Instrumentation-Framework by intel.

the class Demo method start.

@Override
public void start(Stage stage) {
    VBox pane = new VBox();
    pane.setPadding(new Insets(10, 10, 10, 10));
    pane.setBackground(new Background(new BackgroundFill(Color.web("#34495e"), CornerRadii.EMPTY, Insets.EMPTY)));
    pane.setSpacing(20);
    pane.setAlignment(Pos.CENTER);
    pane.getChildren().addAll(onOffSwitch, iconSwitchSymbol, iconSwitchText, iconSwitchSymbol1);
    Scene scene = new Scene(pane, 100, 150);
    stage.setTitle("OnOffSwitch");
    stage.setScene(scene);
    stage.show();
}
Also used : Insets(javafx.geometry.Insets) Background(javafx.scene.layout.Background) BackgroundFill(javafx.scene.layout.BackgroundFill) Scene(javafx.scene.Scene) VBox(javafx.scene.layout.VBox)

Example 45 with Background

use of javafx.scene.layout.Background in project Board-Instrumentation-Framework by intel.

the class Demo method start.

@Override
public void start(Stage stage) {
    StackPane pane = new StackPane();
    pane.setBackground(new Background(new BackgroundFill(Color.DARKGRAY, CornerRadii.EMPTY, Insets.EMPTY)));
    pane.setPadding(new Insets(10, 10, 10, 10));
    pane.getChildren().add(control);
    Scene scene = new Scene(pane);
    stage.setTitle("VuMeter Demo");
    stage.setScene(scene);
    stage.show();
    timer.start();
    calcNoOfNodes(scene.getRoot());
    System.out.println(noOfNodes + " Nodes in SceneGraph");
}
Also used : Insets(javafx.geometry.Insets) Background(javafx.scene.layout.Background) BackgroundFill(javafx.scene.layout.BackgroundFill) Scene(javafx.scene.Scene) StackPane(javafx.scene.layout.StackPane)

Aggregations

Background (javafx.scene.layout.Background)86 BackgroundFill (javafx.scene.layout.BackgroundFill)82 Insets (javafx.geometry.Insets)30 CornerRadii (javafx.scene.layout.CornerRadii)24 Scene (javafx.scene.Scene)18 StackPane (javafx.scene.layout.StackPane)15 Color (javafx.scene.paint.Color)15 Label (javafx.scene.control.Label)14 Border (javafx.scene.layout.Border)14 BorderStroke (javafx.scene.layout.BorderStroke)14 BorderWidths (javafx.scene.layout.BorderWidths)12 Pane (javafx.scene.layout.Pane)12 Text (javafx.scene.text.Text)9 BorderPane (javafx.scene.layout.BorderPane)8 Region (javafx.scene.layout.Region)8 HBox (javafx.scene.layout.HBox)7 ArrayList (java.util.ArrayList)6 MouseEvent (javafx.scene.input.MouseEvent)6 VBox (javafx.scene.layout.VBox)6 Rectangle (javafx.scene.shape.Rectangle)5