Java Code Examples for javafx.scene.layout.Region#setManaged()
The following examples show how to use
javafx.scene.layout.Region#setManaged() .
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: FxIconBuilder.java From FxDock with Apache License 2.0 | 5 votes |
/** creates a rectangle filled with the current fill color */ public void fill(double x, double y, double w, double h) { Region r = new Region(); r.setManaged(false); r.resizeRelocate(x + xorigin, y + yorigin, w, h); r.setBackground(FX.background(fill)); elements.add(r); }
Example 2
Source File: PanningWindow.java From graph-editor with Eclipse Public License 1.0 | 3 votes |
/** * Sets the content of the panning window. * * <p> * Note that the content's {@code managed} attribute will be set to false. Its size must therefore be set manually * using the {@code resize()} method of the {@link Node} class. * </p> * * @param content the {@link Region} to be displayed inside the panning window */ protected void setContent(final Region content) { // Remove children and release bindings from old content, if any exists. if (this.content != null) { removeMouseHandlersFromContent(); getChildren().remove(this.content); this.content.layoutXProperty().unbind(); this.content.layoutYProperty().unbind(); } this.content = content; if (content != null) { content.setManaged(false); content.cacheHintProperty().set(CacheHint.SPEED); getChildren().add(content); content.layoutXProperty().bind(windowXProperty.multiply(-1)); content.layoutYProperty().bind(windowYProperty.multiply(-1)); addMouseHandlersToContent(); } }