Java Code Examples for javafx.scene.layout.StackPane#setNodeOrientation()
The following examples show how to use
javafx.scene.layout.StackPane#setNodeOrientation() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MedusaTempGauge.java From mars-sim with GNU General Public License v3.0 | 5 votes |
@Override public void start(Stage stage) { StackPane pane = new StackPane(gauge); pane.setPadding(new Insets(20)); pane.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); LinearGradient gradient = new LinearGradient(0, 0, 0, pane.getLayoutBounds().getHeight(), false, CycleMethod.NO_CYCLE, new Stop(0.0, Color.rgb(38, 38, 38)), new Stop(1.0, Color.rgb(15, 15, 15))); //pane.setBackground(new Background(new BackgroundFill(gradient, CornerRadii.EMPTY, Insets.EMPTY))); //pane.setBackground(new Background(new BackgroundFill(Color.rgb(39,44,50), CornerRadii.EMPTY, Insets.EMPTY))); //pane.setBackground(new Background(new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY))); //pane.setBackground(new Background(new BackgroundFill(Gauge.DARK_COLOR, CornerRadii.EMPTY, Insets.EMPTY))); Scene scene = new Scene(pane); scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); stage.setTitle("mars-sim"); stage.setScene(scene); stage.show(); //gauge.setValue(50); // Calculate number of nodes calcNoOfNodes(pane); System.out.println(noOfNodes + " Nodes in SceneGraph"); timer.start(); //gauge.getSections().get(0).setStart(10); //gauge.getSections().get(0).setStop(90); }