List of usage examples for javafx.scene.layout StackPane getProperties
public final ObservableMap<Object, Object> getProperties()
From source file:gov.va.isaac.gui.util.ErrorMarkerUtils.java
/** * Useful when taking a node already placed by a fxml file, for example, and wrapping it * in a stack pane//from w w w . ja v a 2 s .c o m * WARNING - the mechanism of moving the properties isn't currently very smart - it should only target * VBox properties, but it takes everything. * @return replacementNode */ public static StackPane swapVBoxComponents(Node placedNode, StackPane replacementNode, VBox vb) { int index = vb.getChildren().indexOf(placedNode); if (index < 0) { throw new RuntimeException("Placed Node is not in the vbox"); } vb.getChildren().remove(index); vb.getChildren().add(index, replacementNode); //this transfers the node specific constraints replacementNode.getProperties().putAll(placedNode.getProperties()); return replacementNode; }
From source file:gov.va.isaac.gui.util.ErrorMarkerUtils.java
/** * Useful when taking a node already placed by a fxml file, for example, and wrapping it * in a stack pane/*from ww w . j a v a2 s . c o m*/ * WARNING - the mechanism of moving the properties isn't currently very smart - it should only target * HBox properties, but it takes everything. * @return replacementNode */ public static StackPane swapHBoxComponents(Node placedNode, StackPane replacementNode, HBox hb) { int index = hb.getChildren().indexOf(placedNode); if (index < 0) { throw new RuntimeException("Placed Node is not in the vbox"); } hb.getChildren().remove(index); hb.getChildren().add(index, replacementNode); //this transfers the node specific constraints replacementNode.getProperties().putAll(placedNode.getProperties()); return replacementNode; }