private void updateDisclosureNode() { Node disclosureNode = ((JFXTreeTableCell<S, T>) getSkinnable()).getDisclosureNode(); if (disclosureNode != null) { TreeItem<S> item = getSkinnable().getTreeTableRow().getTreeItem(); final S value = item == null ? null : item.getValue(); boolean disclosureVisible = value != null && !item.isLeaf() && value instanceof RecursiveTreeObject && ((RecursiveTreeObject) value).getGroupedColumn() == getSkinnable().getTableColumn(); disclosureNode.setVisible(disclosureVisible); if (!disclosureVisible) { getChildren().remove(disclosureNode); } else if (disclosureNode.getParent() == null) { getChildren().add(disclosureNode); disclosureNode.toFront(); } else { disclosureNode.toBack(); } if (disclosureNode.getScene() != null) { disclosureNode.applyCss(); } } }
@Override public void layoutChildren() { double caretOffset = getCharLocation(this.insertionIndex); this.insertionMarker.setLayoutX(caretOffset); this.insertionMarker.setLayoutY(0); this.insertionMarker.toFront(); } }
private void init() { stage.getChildren().add(currentScene.getSceneNode()); stage.getChildren().add(nextScene().getSceneNode()); currentScene.getSceneNode().toFront(); configureTransitions(); }
@Override protected void dataItemAdded(Series<DateTime, CalendarNode> series, int itemIndex, Data<DateTime, CalendarNode> item) { Node bar = getBar(getData().indexOf(series), item, itemIndex); getPlotChildren().add(bar); if (series.getNode() != null) { series.getNode().toFront(); } }
private void connectorsToFront() { // move connectors to front FXFlowNodeSkin skin = nodeSkinProperty().get(); for (List<ConnectorShape> shapeList : skin.shapeLists) { for (ConnectorShape cs : shapeList) { cs.getNode().toFront(); } } List<Connection> connections = new ArrayList<>(); for (Connector connector : skin.connectors.keySet()) { for (Connections connectionsI : skin.controller.getAllConnections().values()) { connections.addAll(connectionsI.getAllWith(connector)); } } for (Connection conn : connections) { ConnectionSkin skinI = skin.controller.getNodeSkinLookup(). getById(skin.getSkinFactory(), conn); if (skinI instanceof FXConnectionSkin) { FXConnectionSkin fxSkin = (FXConnectionSkin) skinI; fxSkin.receiverToFront(); } } }
public void toNextScene() { currentScene.stop(); stage.getChildren().remove(currentScene.getSceneNode()); onSceneSwitch(currentScene.getSceneNode(), nextScene().getSceneNode()); currentScene = nextScene(); stage.getChildren().add(nextScene().getSceneNode()); currentScene.getSceneNode().toFront(); configureTransitions(); }
private void configureTransitions() { sceneOnScreenTimer = new TimerTransition(currentScene.getOnScreen()); sceneOnScreenTimer.setOnFinished(e -> { nextScene().play(); transitionToNextScene = new DurationBasedTransition(transitionDuration) { @Override protected void interpolate(double frac) { transition(frac, currentScene.getSceneNode(), nextScene().getSceneNode()); } }; transitionToNextScene.setOnFinished(event -> toNextScene()); transitionToNextScene.play(); state = SlideshowState.PLAYING_IN_TRANSITION; }); sceneOnScreenTimer.play(); currentScene.getSceneNode().toFront(); state = SlideshowState.PLAYING_IN_SCENE; }
private void updateDisclosureNode() { Node disclosureNode = ((JFXTreeTableCell<S, T>) getSkinnable()).getDisclosureNode(); if (disclosureNode != null) { TreeItem<S> item = getSkinnable().getTreeTableRow().getTreeItem(); final S value = item == null ? null : item.getValue(); boolean disclosureVisible = value != null && !item.isLeaf() && value instanceof RecursiveTreeObject && ((RecursiveTreeObject) value).getGroupedColumn() == getSkinnable().getTableColumn(); disclosureNode.setVisible(disclosureVisible); if (!disclosureVisible) { getChildren().remove(disclosureNode); } else if (disclosureNode.getParent() == null) { getChildren().add(disclosureNode); disclosureNode.toFront(); } else { disclosureNode.toBack(); } if (disclosureNode.getScene() != null) { disclosureNode.applyCss(); } } }
public void performDragBegin( Node n, MouseEvent event) { final double parentScaleX = n.getParent(). localToSceneTransformProperty().getValue().getMxx(); final double parentScaleY = n.getParent(). localToSceneTransformProperty().getValue().getMyy(); // record the current mouse X and Y position on Node mouseX = event.getSceneX(); mouseY = event.getSceneY(); if (centerNode) { Point2D p2d = n.getParent().sceneToLocal(mouseX, mouseY); nodeX = p2d.getX(); nodeY = p2d.getY(); } else { nodeX = n.getLayoutX() * parentScaleX; nodeY = n.getLayoutY() * parentScaleY; } n.toFront(); } }
connectorNode.toFront(); });