/** * creates empty drawers stack */ public JFXDrawersStack() { final Rectangle clip = new Rectangle(); clip.widthProperty().bind(this.widthProperty()); clip.heightProperty().bind(this.heightProperty()); this.setClip(clip); }
clip.widthProperty().bind(calendarPlaceHolder.widthProperty()); clip.heightProperty().bind(calendarPlaceHolder.heightProperty()); calendarPlaceHolder.setClip(clip);
clip.widthProperty().bind(((Region) node).widthProperty()); clip.heightProperty().bind(((Region) node).heightProperty()); node.setClip(clip);
clip.widthProperty().bind(this.widthProperty()); clip.heightProperty().bind(this.heightProperty());
clip.widthProperty().bind(promptContainer.widthProperty()); promptContainer.setClip(clip);
linesWrapper.clip.widthProperty().bind(linesWrapper.promptContainer.widthProperty().subtract(arrowButton.widthProperty()));
clip.widthProperty().bind(calendarPlaceHolder.widthProperty()); clip.heightProperty().bind(calendarPlaceHolder.heightProperty()); calendarPlaceHolder.setClip(clip);
// create rectangle with sizes of pane, // dont need to set x and y explictly // as positions of clip node are relative to parent node // (to pane in our case) Rectangle clipRect = new Rectangle(pane.getWidth(), pane.getHeight()); // bind properties so height and width of rect // changes according pane's width and height clipRect.heightProperty().bind(pane.heightProperty()); clipRect.widthProperty().bind(pane.widthProperty()); // set rect as clip rect pane.setClip(clipRect);
/** * Binds the position and size of {@link #unselectedArea} to {@link #selectedArea}. */ private void bindAreaCoordinatesTogether() { unselectedArea.xProperty().bind(selectedArea.xProperty()); unselectedArea.yProperty().bind(selectedArea.yProperty()); unselectedArea.widthProperty().bind(selectedArea.widthProperty()); unselectedArea.heightProperty().bind(selectedArea.heightProperty()); }
/** * Creates a default ColorGridCell instance. */ public ColorGridCell() { getStyleClass().add("color-grid-cell"); //$NON-NLS-1$ colorRect = new Rectangle(); colorRect.setStroke(Color.BLACK); colorRect.heightProperty().bind(heightProperty()); colorRect.widthProperty().bind(widthProperty()); setGraphic(colorRect); if (debug) { setContentDisplay(ContentDisplay.TEXT_ONLY); } }
public ViewStatus() { setManaged(false); getStylesheets().add(getClass().getResource(getClass().getSimpleName() + ".css").toExternalForm()); city = new SimpleStringProperty(this, "city", ""); width = new SimpleDoubleProperty(this, "controlWidth", 0); cityName = new Text(); cityName.setFill(Color.WHITE); cityName.getStyleClass().add("cityName"); cityName.textProperty().bind(city); cityName.setOnMouseReleased(createHistoryDisplayHandler()); // handler to close any open dialog and open a history dialog Rectangle placeholder = new Rectangle(width.doubleValue(), 50); placeholder.setFill(Color.TRANSPARENT); placeholder.widthProperty().bind(width); StackPane centering = new StackPane(); centering.prefWidthProperty().bind(width); centering.getChildren().add(cityName); getChildren().addAll(placeholder, centering); } @PostConstruct
/** * creates empty drawers stack */ public JFXDrawersStack() { final Rectangle clip = new Rectangle(); clip.widthProperty().bind(this.widthProperty()); clip.heightProperty().bind(this.heightProperty()); this.setClip(clip); }
/** * Stop managing zoom management by removing all event handlers and bindings, and hiding the * rectangle. */ public void stop() { handlerManager.removeAllHandlers(); selecting.set( false ); selectRect.widthProperty().unbind(); selectRect.heightProperty().unbind(); selectRect.visibleProperty().unbind(); }
/** * Start managing zoom management by adding event handlers and bindings as appropriate. */ public void start() { handlerManager.addAllHandlers(); selectRect.widthProperty().bind( rectX.subtract( selectRect.translateXProperty() ) ); selectRect.heightProperty().bind( rectY.subtract( selectRect.translateYProperty() ) ); selectRect.visibleProperty().bind( selecting ); }
public PlaceHolderSkin(PlaceHolder control) { super(control); Rectangle area = new Rectangle(control.getX(), control.getY(), control.getLocalWidth(), control.getLocalHeight()); area.setFill(Color.TRANSPARENT); area.xProperty().bind(control.xProperty()); area.yProperty().bind(control.yProperty()); area.widthProperty().bind(control.widthLocalProperty()); area.heightProperty().bind(control.heightLocalProperty()); Group g = new Group(area); getChildren().add(g); }
public OpenPatricianDialogInputSkin(OpenPatricianDialogInput input) { super(input); textField = new TextField(input.getText()); calculateDimensions(input); input.fontProperty().addListener((observable, oldValue, newValue) -> calculateDimensions(input)); textField.textProperty().bindBidirectional(input.textProperty()); textField.getStyleClass().add("openPatricianDialogInput"); Rectangle background = new Rectangle(); background.setHeight(height.doubleValue()); background.setWidth(width.doubleValue()); background.setFill(Color.rgb(150, 150, 150)); background.heightProperty().bind(height); background.widthProperty().bind(width); StackPane stack = new StackPane(); stack.getChildren().addAll(background, textField); Group group = new Group(stack); group.setManaged(false); getChildren().add(group); }
/** * Creates the node which will be used to capture mouse events. Events are handed over to * {@link #handleMouseEvent(MouseEvent) handleMouseEvent}. * * @return a {@link Node} */ private Node createMouseNode() { Rectangle mouseNode = new Rectangle(); // make the node transparent and make sure its size does not affect the control's size mouseNode.setFill(Color.TRANSPARENT); mouseNode.setManaged(false); // bind width and height to the control mouseNode.widthProperty().bind(getSkinnable().widthProperty()); mouseNode.heightProperty().bind(getSkinnable().heightProperty()); // let it handle the mouse events if allowed by the user mouseNode.addEventHandler(MouseEvent.ANY, this::handleMouseEvent); mouseNode.mouseTransparentProperty().bind(getSkinnable().selectionMouseTransparentProperty()); return mouseNode; }
AnchorPane.setRightAnchor(paperScroll, 0.0); final Rectangle ph = new Rectangle(root.getWidth(), root.getHeight(), Color.TRANSPARENT); ph.widthProperty().bind(root.widthProperty()); ph.heightProperty().bind(root.heightProperty()); ap.getChildren().addAll(ph);
public static void startValueSetAnimation(final Pane parent) { final javafx.scene.shape.Rectangle rectangle = new javafx.scene.shape.Rectangle(); Insets margin = BorderPane.getMargin(parent); if (margin == null) { margin = new Insets(0); } rectangle.widthProperty().bind(parent.widthProperty().subtract(margin.getLeft() + margin.getRight())); rectangle.heightProperty().bind(parent.heightProperty().subtract(margin.getTop() + margin.getBottom())); rectangle.setFill(Color.rgb(0, 150, 201)); parent.getChildren().add(rectangle); BoxBlur bb = new BoxBlur(); bb.setWidth(5); bb.setHeight(5); bb.setIterations(3); rectangle.setEffect(bb); FadeTransition ft = new FadeTransition(Duration.millis(250), rectangle); ft.setFromValue(0.2); ft.setToValue(0.8); ft.setCycleCount(2); ft.setAutoReverse(true); ft.play(); ft.setOnFinished(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { parent.getChildren().remove(rectangle); } }); }
linesWrapper.clip.widthProperty().bind(linesWrapper.promptContainer.widthProperty().subtract(arrowButton.widthProperty()));