- All Implemented Interfaces:
- Styleable,- EventTarget
- Direct Known Subclasses:
- Axis,- Chart,- Control,- Pane,- TableColumnHeader,- VirtualFlow
public class Region extends Parent
Every Region has its layout bounds, which are specified to be (0, 0, width, height). A Region might draw outside these bounds. The content area of a Region is the area which is occupied for the layout of its children. This area is, by default, the same as the layout bounds of the Region, but can be modified by either the properties of a border (either with BorderStrokes or BorderImages), and by padding. The padding can be negative, such that the content area of a Region might extend beyond the layout bounds of the Region, but does not affect the layout bounds.
A Region has a Background, and a Border, although either or both of these might be empty. The Background of a Region is made up of zero or more BackgroundFills, and zero or more BackgroundImages. Likewise, the border of a Region is defined by its Border, which is made up of zero or more BorderStrokes and zero or more BorderImages. All BackgroundFills are drawn first, followed by BackgroundImages, BorderStrokes, and finally BorderImages. The content is drawn above all backgrounds and borders. If a BorderImage is present (and loaded all images properly), then no BorderStrokes are actually drawn, although they are considered for computing the position of the content area (see the stroke width property of a BorderStroke). These semantics are in line with the CSS 3 specification. The purpose of these semantics are to allow an application to specify a fallback BorderStroke to be displayed in the case that an ImageStroke fails to download or load.
 By default a Region appears as a Rectangle. A BackgroundFill radii might cause the Rectangle to appear rounded.
 This affects not only making the visuals look like a rounded rectangle, but it also causes the picking behavior
 of the Region to act like a rounded rectangle, such that locations outside the corner radii are ignored. A
 Region can be made to use any shape, however, by specifying the shape property. If a shape is specified,
 then all BackgroundFills, BackgroundImages, and BorderStrokes will be applied to the shape. BorderImages are
 not used for Regions which have a shape specified.
 
 Although the layout bounds of a Region are not influenced by any Border or Background, the content area
 insets and the picking area of the Region are. The insets of the Region define the distance
 between the edge of the layout bounds and the edge of the content area. For example, if the Region
 layout bounds are (x=0, y=0, width=200, height=100), and the insets are (top=10, right=20, bottom=30, left=40),
 then the content area bounds will be (x=40, y=10, width=140, height=60). A Region subclass which is laying
 out its children should compute and honor these content area bounds.
 
 By default a Region inherits the layout behavior of its superclass, Parent,
 which means that it will resize any resizable child nodes to their preferred
 size, but will not reposition them.  If an application needs more specific
 layout behavior, then it should use one of the Region subclasses:
 StackPane, HBox, VBox, TilePane, FlowPane,
 BorderPane, GridPane, or AnchorPane.
 
 To implement a more custom layout, a Region subclass must override
 computePrefWidth, computePrefHeight, and
 layoutChildren. Note that layoutChildren is called automatically
 by the scene graph while executing a top-down layout pass and it should not be invoked directly by the
 region subclass.
 
 Region subclasses which layout their children will position nodes by setting
 layoutX/layoutY and do not alter
 translateX/translateY, which are reserved for
 adjustments and animation.
- Since:
- JavaFX 2.0
- 
Property SummaryProperties Type Property Description ObjectProperty<Background>backgroundThe background of the Region, which is made up of zero or more BackgroundFills, and zero or more BackgroundImages.ObjectProperty<Border>borderThe border of the Region, which is made up of zero or more BorderStrokes, and zero or more BorderImages.BooleanPropertycacheShapeDefines a hint to the system indicating that the Shape used to define the region's background is stable and would benefit from caching.BooleanPropertycenterShapeDefines whether the shape is centered within the Region's width or height.ReadOnlyDoublePropertyheightThe height of this resizable node.ReadOnlyObjectProperty<Insets>insetsThe insets of the Region define the distance from the edge of the region (its layout bounds, or (0, 0, width, height)) to the edge of the content area.DoublePropertymaxHeightProperty for overriding the region's computed maximum height.DoublePropertymaxWidthProperty for overriding the region's computed maximum width.DoublePropertyminHeightProperty for overriding the region's computed minimum height.DoublePropertyminWidthProperty for overriding the region's computed minimum width.ObjectProperty<Insets>opaqueInsetsDefines the area of the region within which completely opaque pixels are drawn.ObjectProperty<Insets>paddingThe top, right, bottom, and left padding around the region's content.DoublePropertyprefHeightProperty for overriding the region's computed preferred height.DoublePropertyprefWidthProperty for overriding the region's computed preferred width.BooleanPropertyscaleShapeSpecifies whether the shape, if defined, is scaled to match the size of the Region.ObjectProperty<Shape>shapeWhen specified, theShapewill cause the region to be rendered as the specified shape rather than as a rounded rectangle.BooleanPropertysnapToPixelDefines whether this region adjusts position, spacing, and size values of its children to pixel boundaries.ReadOnlyDoublePropertywidthThe width of this resizable node.Properties declared in class javafx.scene.ParentneedsLayoutProperties declared in class javafx.scene.NodeaccessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
- 
Field SummaryFields Modifier and Type Field Description static doubleUSE_COMPUTED_SIZESentinel value which can be passed to a region'ssetMinWidth,setMinHeight,setPrefWidth,setPrefHeight,setMaxWidth,setMaxHeightmethods to reset the region's size constraint back to it's intrinsic size returned bycomputeMinWidth,computeMinHeight,computePrefWidth,computePrefHeight,computeMaxWidth, orcomputeMaxHeight.static doubleUSE_PREF_SIZESentinel value which can be passed to a region'ssetMinWidth,setMinHeight,setMaxWidthorsetMaxHeightmethods to indicate that the preferred dimension should be used for that max and/or min constraint.Fields declared in class javafx.scene.NodeBASELINE_OFFSET_SAME_AS_HEIGHT
- 
Constructor SummaryConstructors Constructor Description Region()Creates a new Region with an empty Background and and empty Border.
- 
Method SummaryModifier and Type Method Description ObjectProperty<Background>backgroundProperty()The background of the Region, which is made up of zero or more BackgroundFills, and zero or more BackgroundImages.ObjectProperty<Border>borderProperty()The border of the Region, which is made up of zero or more BorderStrokes, and zero or more BorderImages.BooleanPropertycacheShapeProperty()Defines a hint to the system indicating that the Shape used to define the region's background is stable and would benefit from caching.BooleanPropertycenterShapeProperty()Defines whether the shape is centered within the Region's width or height.protected doublecomputeMaxHeight(double width)Computes the maximum height of this region.protected doublecomputeMaxWidth(double height)Computes the maximum width for this region.protected doublecomputeMinHeight(double width)Computes the minimum height of this region.protected doublecomputeMinWidth(double height)Computes the minimum width of this region.protected doublecomputePrefHeight(double width)Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy.protected doublecomputePrefWidth(double height)Computes the preferred width of this region for the given height.BackgroundgetBackground()Gets the value of the property background.BordergetBorder()Gets the value of the property border.static List<CssMetaData<? extends Styleable,?>>getClassCssMetaData()List<CssMetaData<? extends Styleable,?>>getCssMetaData()This method should delegate toNode.getClassCssMetaData()so that a Node's CssMetaData can be accessed without the need for reflection.doublegetHeight()Gets the value of the property height.InsetsgetInsets()Gets the value of the property insets.doublegetMaxHeight()Gets the value of the property maxHeight.doublegetMaxWidth()Gets the value of the property maxWidth.doublegetMinHeight()Gets the value of the property minHeight.doublegetMinWidth()Gets the value of the property minWidth.InsetsgetOpaqueInsets()Gets the value of the property opaqueInsets.InsetsgetPadding()Gets the value of the property padding.doublegetPrefHeight()Gets the value of the property prefHeight.doublegetPrefWidth()Gets the value of the property prefWidth.ShapegetShape()Gets the value of the property shape.StringgetUserAgentStylesheet()An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method.doublegetWidth()Gets the value of the property width.ReadOnlyDoublePropertyheightProperty()The height of this resizable node.ReadOnlyObjectProperty<Insets>insetsProperty()The insets of the Region define the distance from the edge of the region (its layout bounds, or (0, 0, width, height)) to the edge of the content area.booleanisCacheShape()Gets the value of the property cacheShape.booleanisCenterShape()Gets the value of the property centerShape.booleanisResizable()Returnstruesince all Regions are resizable.booleanisScaleShape()Gets the value of the property scaleShape.booleanisSnapToPixel()Gets the value of the property snapToPixel.protected voidlayoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, HPos halignment, VPos valignment)Utility method which lays out the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.protected voidlayoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, boolean fillWidth, boolean fillHeight, HPos halignment, VPos valignment)Utility method which lays out the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.static voidlayoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, boolean fillWidth, boolean fillHeight, HPos halignment, VPos valignment, boolean isSnapToPixel)Utility method which lays out the child within an area of it's parent defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.protected voidlayoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, HPos halignment, VPos valignment)Utility method which lays out the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.doublemaxHeight(double width)Called during layout to determine the maximum height for this node.DoublePropertymaxHeightProperty()Property for overriding the region's computed maximum height.doublemaxWidth(double height)Called during layout to determine the maximum width for this node.DoublePropertymaxWidthProperty()Property for overriding the region's computed maximum width.doubleminHeight(double width)Called during layout to determine the minimum height for this node.DoublePropertyminHeightProperty()Property for overriding the region's computed minimum height.doubleminWidth(double height)Called during layout to determine the minimum width for this node.DoublePropertyminWidthProperty()Property for overriding the region's computed minimum width.ObjectProperty<Insets>opaqueInsetsProperty()Defines the area of the region within which completely opaque pixels are drawn.ObjectProperty<Insets>paddingProperty()The top, right, bottom, and left padding around the region's content.protected voidpositionInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, HPos halignment, VPos valignment)Utility method which positions the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.static voidpositionInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, HPos halignment, VPos valignment, boolean isSnapToPixel)Utility method which positions the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.doubleprefHeight(double width)Called during layout to determine the preferred height for this node.DoublePropertyprefHeightProperty()Property for overriding the region's computed preferred height.doubleprefWidth(double height)Called during layout to determine the preferred width for this node.DoublePropertyprefWidthProperty()Property for overriding the region's computed preferred width.voidresize(double width, double height)Invoked by the region's parent during layout to set the region's width and height.BooleanPropertyscaleShapeProperty()Specifies whether the shape, if defined, is scaled to match the size of the Region.voidsetBackground(Background value)Sets the value of the property background.voidsetBorder(Border value)Sets the value of the property border.voidsetCacheShape(boolean value)Sets the value of the property cacheShape.voidsetCenterShape(boolean value)Sets the value of the property centerShape.protected voidsetHeight(double value)Sets the value of the property height.voidsetMaxHeight(double value)Sets the value of the property maxHeight.voidsetMaxSize(double maxWidth, double maxHeight)Convenience method for overriding the region's computed maximum width and height.voidsetMaxWidth(double value)Sets the value of the property maxWidth.voidsetMinHeight(double value)Sets the value of the property minHeight.voidsetMinSize(double minWidth, double minHeight)Convenience method for overriding the region's computed minimum width and height.voidsetMinWidth(double value)Sets the value of the property minWidth.voidsetOpaqueInsets(Insets value)Sets the value of the property opaqueInsets.voidsetPadding(Insets value)Sets the value of the property padding.voidsetPrefHeight(double value)Sets the value of the property prefHeight.voidsetPrefSize(double prefWidth, double prefHeight)Convenience method for overriding the region's computed preferred width and height.voidsetPrefWidth(double value)Sets the value of the property prefWidth.voidsetScaleShape(boolean value)Sets the value of the property scaleShape.voidsetShape(Shape value)Sets the value of the property shape.voidsetSnapToPixel(boolean value)Sets the value of the property snapToPixel.protected voidsetWidth(double value)Sets the value of the property width.ObjectProperty<Shape>shapeProperty()When specified, theShapewill cause the region to be rendered as the specified shape rather than as a rounded rectangle.doublesnappedBottomInset()Utility method to get the bottom inset which includes padding and border inset.doublesnappedLeftInset()Utility method to get the left inset which includes padding and border inset.doublesnappedRightInset()Utility method to get the right inset which includes padding and border inset.doublesnappedTopInset()Utility method to get the top inset which includes padding and border inset.protected doublesnapPosition(double value)Deprecated.doublesnapPositionX(double value)If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.doublesnapPositionY(double value)If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.protected doublesnapSize(double value)Deprecated.replaced bysnapSizeX()andsnapSizeY()doublesnapSizeX(double value)If this region's snapToPixel property is true, returns a value ceiled to the nearest pixel in the horizontal direction, else returns the same value.doublesnapSizeY(double value)If this region's snapToPixel property is true, returns a value ceiled to the nearest pixel in the vertical direction, else returns the same value.protected doublesnapSpace(double value)Deprecated.replaced bysnapSpaceX()andsnapSpaceY()doublesnapSpaceX(double value)If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.doublesnapSpaceY(double value)If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.BooleanPropertysnapToPixelProperty()Defines whether this region adjusts position, spacing, and size values of its children to pixel boundaries.ReadOnlyDoublePropertywidthProperty()The width of this resizable node.Methods declared in class javafx.scene.ParentgetBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods declared in class javafx.scene.NodeaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visiblePropertyMethods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods declared in interface javafx.css.StyleablegetStyleableNode, getStyleClass
- 
Property Details- 
snapToPixelDefines whether this region adjusts position, spacing, and size values of its children to pixel boundaries. This defaults to true, which is generally the expected behavior in order to have crisp user interfaces. A value of false will allow for fractional alignment, which may lead to "fuzzy" looking borders.- See Also:
- isSnapToPixel(),- setSnapToPixel(boolean)
 
- 
paddingThe top, right, bottom, and left padding around the region's content. This space will be included in the calculation of the region's minimum and preferred sizes. By default, padding isInsets.EMPTY. Setting the value tonullshould be avoided.- See Also:
- getPadding(),- setPadding(Insets)
 
- 
backgroundThe background of the Region, which is made up of zero or more BackgroundFills, and zero or more BackgroundImages. It is possible for a Background to be empty, where it has neither fills nor images, and is semantically equivalent to null.- Since:
- JavaFX 8.0
- See Also:
- getBackground(),- setBackground(Background)
 
- 
borderThe border of the Region, which is made up of zero or more BorderStrokes, and zero or more BorderImages. It is possible for a Border to be empty, where it has neither strokes nor images, and is semantically equivalent to null.- Since:
- JavaFX 8.0
- See Also:
- getBorder(),- setBorder(Border)
 
- 
opaqueInsetsDefines the area of the region within which completely opaque pixels are drawn. This is used for various performance optimizations. The pixels within this area MUST BE fully opaque, or rendering artifacts will result. It is the responsibility of the application, either via code or via CSS, to ensure that the opaqueInsets is correct for a Region based on the backgrounds and borders of that region. The values for each of the insets must be real numbers, not NaN or Infinity. If no known insets exist, then the opaqueInsets should be set to null.- Since:
- JavaFX 8.0
- See Also:
- getOpaqueInsets(),- setOpaqueInsets(Insets)
 
- 
insetsThe insets of the Region define the distance from the edge of the region (its layout bounds, or (0, 0, width, height)) to the edge of the content area. All child nodes should be laid out within the content area. The insets are computed based on the Border which has been specified, if any, and also the padding.- Since:
- JavaFX 8.0
- See Also:
- getInsets()
 
- 
widthThe width of this resizable node. This property is set by the region's parent during layout and may not be set by the application. If an application needs to explicitly control the size of a region, it should override its preferred size range by setting theminWidth,prefWidth, andmaxWidthproperties.- See Also:
- getWidth(),- setWidth(double)
 
- 
heightThe height of this resizable node. This property is set by the region's parent during layout and may not be set by the application. If an application needs to explicitly control the size of a region, it should override its preferred size range by setting theminHeight,prefHeight, andmaxHeightproperties.- See Also:
- getHeight(),- setHeight(double)
 
- 
minWidthProperty for overriding the region's computed minimum width. This should only be set if the region's internally computed minimum width doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatminWidth(forHeight)will return the region's internally computed minimum width.Setting this value to the USE_PREF_SIZEflag will causeminWidth(forHeight)to return the region's preferred width, enabling applications to easily restrict the resizability of the region.- See Also:
- getMinWidth(),- setMinWidth(double)
 
- 
minHeightProperty for overriding the region's computed minimum height. This should only be set if the region's internally computed minimum height doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatminHeight(forWidth)will return the region's internally computed minimum height.Setting this value to the USE_PREF_SIZEflag will causeminHeight(forWidth)to return the region's preferred height, enabling applications to easily restrict the resizability of the region.- See Also:
- getMinHeight(),- setMinHeight(double)
 
- 
prefWidthProperty for overriding the region's computed preferred width. This should only be set if the region's internally computed preferred width doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatgetPrefWidth(forHeight)will return the region's internally computed preferred width.- See Also:
- getPrefWidth(),- setPrefWidth(double)
 
- 
prefHeightProperty for overriding the region's computed preferred height. This should only be set if the region's internally computed preferred height doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatgetPrefHeight(forWidth)will return the region's internally computed preferred width.- See Also:
- getPrefHeight(),- setPrefHeight(double)
 
- 
maxWidthProperty for overriding the region's computed maximum width. This should only be set if the region's internally computed maximum width doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatgetMaxWidth(forHeight)will return the region's internally computed maximum width.Setting this value to the USE_PREF_SIZEflag will causegetMaxWidth(forHeight)to return the region's preferred width, enabling applications to easily restrict the resizability of the region.- See Also:
- getMaxWidth(),- setMaxWidth(double)
 
- 
maxHeightProperty for overriding the region's computed maximum height. This should only be set if the region's internally computed maximum height doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatgetMaxHeight(forWidth)will return the region's internally computed maximum height.Setting this value to the USE_PREF_SIZEflag will causegetMaxHeight(forWidth)to return the region's preferred height, enabling applications to easily restrict the resizability of the region.- See Also:
- getMaxHeight(),- setMaxHeight(double)
 
- 
shapeWhen specified, theShapewill cause the region to be rendered as the specified shape rather than as a rounded rectangle. When null, the Region is rendered as a rounded rectangle. When rendered as a Shape, any Background is used to fill the shape, although any background insets are ignored as are background radii. Any BorderStrokes defined are used for stroking the shape. Any BorderImages are ignored.- Default value:
- null
- Since:
- JavaFX 8.0
- See Also:
- getShape(),- setShape(Shape)
 
- 
scaleShapeSpecifies whether the shape, if defined, is scaled to match the size of the Region.truemeans the shape is scaled to fit the size of the Region,falsemeans the shape is at its source size, its positioning depends on the value ofcenterShape.- Default value:
- true
- Since:
- JavaFX 8.0
- See Also:
- isScaleShape(),- setScaleShape(boolean)
 
- 
centerShapeDefines whether the shape is centered within the Region's width or height.truemeans the shape centered within the Region's width and height,falsemeans the shape is positioned at its source position.- Default value:
- true
- Since:
- JavaFX 8.0
- See Also:
- isCenterShape(),- setCenterShape(boolean)
 
- 
cacheShapeDefines a hint to the system indicating that the Shape used to define the region's background is stable and would benefit from caching.- Default value:
- true
- Since:
- JavaFX 8.0
- See Also:
- isCacheShape(),- setCacheShape(boolean)
 
 
- 
- 
Field Details- 
USE_PREF_SIZEpublic static final double USE_PREF_SIZESentinel value which can be passed to a region'ssetMinWidth,setMinHeight,setMaxWidthorsetMaxHeightmethods to indicate that the preferred dimension should be used for that max and/or min constraint.- See Also:
- Constant Field Values
 
- 
USE_COMPUTED_SIZEpublic static final double USE_COMPUTED_SIZESentinel value which can be passed to a region'ssetMinWidth,setMinHeight,setPrefWidth,setPrefHeight,setMaxWidth,setMaxHeightmethods to reset the region's size constraint back to it's intrinsic size returned bycomputeMinWidth,computeMinHeight,computePrefWidth,computePrefHeight,computeMaxWidth, orcomputeMaxHeight.- See Also:
- Constant Field Values
 
 
- 
- 
Constructor Details- 
Regionpublic Region()Creates a new Region with an empty Background and and empty Border. The Region defaults to having pickOnBounds set to true, meaning that any pick (mouse picking or touch picking etc) that occurs within the bounds in local of the Region will return true, regardless of whether the Region is filled or transparent.
 
- 
- 
Method Details- 
isSnapToPixelpublic final boolean isSnapToPixel()Gets the value of the property snapToPixel.- Property description:
- Defines whether this region adjusts position, spacing, and size values of its children to pixel boundaries. This defaults to true, which is generally the expected behavior in order to have crisp user interfaces. A value of false will allow for fractional alignment, which may lead to "fuzzy" looking borders.
 
- 
setSnapToPixelpublic final void setSnapToPixel(boolean value)Sets the value of the property snapToPixel.- Property description:
- Defines whether this region adjusts position, spacing, and size values of its children to pixel boundaries. This defaults to true, which is generally the expected behavior in order to have crisp user interfaces. A value of false will allow for fractional alignment, which may lead to "fuzzy" looking borders.
 
- 
snapToPixelPropertyDefines whether this region adjusts position, spacing, and size values of its children to pixel boundaries. This defaults to true, which is generally the expected behavior in order to have crisp user interfaces. A value of false will allow for fractional alignment, which may lead to "fuzzy" looking borders.- See Also:
- isSnapToPixel(),- setSnapToPixel(boolean)
 
- 
setPaddingSets the value of the property padding.- Property description:
- The top, right, bottom, and left padding around the region's content.
 This space will be included in the calculation of the region's
 minimum and preferred sizes. By default, padding is Insets.EMPTY. Setting the value tonullshould be avoided.
 
- 
getPaddingGets the value of the property padding.- Property description:
- The top, right, bottom, and left padding around the region's content.
 This space will be included in the calculation of the region's
 minimum and preferred sizes. By default, padding is Insets.EMPTY. Setting the value tonullshould be avoided.
 
- 
paddingPropertyThe top, right, bottom, and left padding around the region's content. This space will be included in the calculation of the region's minimum and preferred sizes. By default, padding isInsets.EMPTY. Setting the value tonullshould be avoided.- See Also:
- getPadding(),- setPadding(Insets)
 
- 
setBackgroundSets the value of the property background.- Property description:
- The background of the Region, which is made up of zero or more BackgroundFills, and zero or more BackgroundImages. It is possible for a Background to be empty, where it has neither fills nor images, and is semantically equivalent to null.
- Since:
- JavaFX 8.0
 
- 
getBackgroundGets the value of the property background.- Property description:
- The background of the Region, which is made up of zero or more BackgroundFills, and zero or more BackgroundImages. It is possible for a Background to be empty, where it has neither fills nor images, and is semantically equivalent to null.
- Since:
- JavaFX 8.0
 
- 
backgroundPropertyThe background of the Region, which is made up of zero or more BackgroundFills, and zero or more BackgroundImages. It is possible for a Background to be empty, where it has neither fills nor images, and is semantically equivalent to null.- Since:
- JavaFX 8.0
- See Also:
- getBackground(),- setBackground(Background)
 
- 
setBorderSets the value of the property border.- Property description:
- The border of the Region, which is made up of zero or more BorderStrokes, and zero or more BorderImages. It is possible for a Border to be empty, where it has neither strokes nor images, and is semantically equivalent to null.
- Since:
- JavaFX 8.0
 
- 
getBorderGets the value of the property border.- Property description:
- The border of the Region, which is made up of zero or more BorderStrokes, and zero or more BorderImages. It is possible for a Border to be empty, where it has neither strokes nor images, and is semantically equivalent to null.
- Since:
- JavaFX 8.0
 
- 
borderPropertyThe border of the Region, which is made up of zero or more BorderStrokes, and zero or more BorderImages. It is possible for a Border to be empty, where it has neither strokes nor images, and is semantically equivalent to null.- Since:
- JavaFX 8.0
- See Also:
- getBorder(),- setBorder(Border)
 
- 
opaqueInsetsPropertyDefines the area of the region within which completely opaque pixels are drawn. This is used for various performance optimizations. The pixels within this area MUST BE fully opaque, or rendering artifacts will result. It is the responsibility of the application, either via code or via CSS, to ensure that the opaqueInsets is correct for a Region based on the backgrounds and borders of that region. The values for each of the insets must be real numbers, not NaN or Infinity. If no known insets exist, then the opaqueInsets should be set to null.- Since:
- JavaFX 8.0
- See Also:
- getOpaqueInsets(),- setOpaqueInsets(Insets)
 
- 
setOpaqueInsetsSets the value of the property opaqueInsets.- Property description:
- Defines the area of the region within which completely opaque pixels are drawn. This is used for various performance optimizations. The pixels within this area MUST BE fully opaque, or rendering artifacts will result. It is the responsibility of the application, either via code or via CSS, to ensure that the opaqueInsets is correct for a Region based on the backgrounds and borders of that region. The values for each of the insets must be real numbers, not NaN or Infinity. If no known insets exist, then the opaqueInsets should be set to null.
- Since:
- JavaFX 8.0
 
- 
getOpaqueInsetsGets the value of the property opaqueInsets.- Property description:
- Defines the area of the region within which completely opaque pixels are drawn. This is used for various performance optimizations. The pixels within this area MUST BE fully opaque, or rendering artifacts will result. It is the responsibility of the application, either via code or via CSS, to ensure that the opaqueInsets is correct for a Region based on the backgrounds and borders of that region. The values for each of the insets must be real numbers, not NaN or Infinity. If no known insets exist, then the opaqueInsets should be set to null.
- Since:
- JavaFX 8.0
 
- 
getInsetsGets the value of the property insets.- Property description:
- The insets of the Region define the distance from the edge of the region (its layout bounds, or (0, 0, width, height)) to the edge of the content area. All child nodes should be laid out within the content area. The insets are computed based on the Border which has been specified, if any, and also the padding.
- Since:
- JavaFX 8.0
 
- 
insetsPropertyThe insets of the Region define the distance from the edge of the region (its layout bounds, or (0, 0, width, height)) to the edge of the content area. All child nodes should be laid out within the content area. The insets are computed based on the Border which has been specified, if any, and also the padding.- Since:
- JavaFX 8.0
- See Also:
- getInsets()
 
- 
setWidthprotected void setWidth(double value)Sets the value of the property width.- Property description:
- The width of this resizable node.  This property is set by the region's parent
 during layout and may not be set by the application.  If an application
 needs to explicitly control the size of a region, it should override its
 preferred size range by setting the minWidth,prefWidth, andmaxWidthproperties.
 
- 
getWidthpublic final double getWidth()Gets the value of the property width.- Property description:
- The width of this resizable node.  This property is set by the region's parent
 during layout and may not be set by the application.  If an application
 needs to explicitly control the size of a region, it should override its
 preferred size range by setting the minWidth,prefWidth, andmaxWidthproperties.
 
- 
widthPropertyThe width of this resizable node. This property is set by the region's parent during layout and may not be set by the application. If an application needs to explicitly control the size of a region, it should override its preferred size range by setting theminWidth,prefWidth, andmaxWidthproperties.- See Also:
- getWidth(),- setWidth(double)
 
- 
setHeightprotected void setHeight(double value)Sets the value of the property height.- Property description:
- The height of this resizable node.  This property is set by the region's parent
 during layout and may not be set by the application.  If an application
 needs to explicitly control the size of a region, it should override its
 preferred size range by setting the minHeight,prefHeight, andmaxHeightproperties.
 
- 
getHeightpublic final double getHeight()Gets the value of the property height.- Property description:
- The height of this resizable node.  This property is set by the region's parent
 during layout and may not be set by the application.  If an application
 needs to explicitly control the size of a region, it should override its
 preferred size range by setting the minHeight,prefHeight, andmaxHeightproperties.
 
- 
heightPropertyThe height of this resizable node. This property is set by the region's parent during layout and may not be set by the application. If an application needs to explicitly control the size of a region, it should override its preferred size range by setting theminHeight,prefHeight, andmaxHeightproperties.- See Also:
- getHeight(),- setHeight(double)
 
- 
setMinWidthpublic final void setMinWidth(double value)Sets the value of the property minWidth.- Property description:
- Property for overriding the region's computed minimum width.
 This should only be set if the region's internally computed minimum width
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatminWidth(forHeight)will return the region's internally computed minimum width.Setting this value to the USE_PREF_SIZEflag will causeminWidth(forHeight)to return the region's preferred width, enabling applications to easily restrict the resizability of the region.
 
- 
getMinWidthpublic final double getMinWidth()Gets the value of the property minWidth.- Property description:
- Property for overriding the region's computed minimum width.
 This should only be set if the region's internally computed minimum width
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatminWidth(forHeight)will return the region's internally computed minimum width.Setting this value to the USE_PREF_SIZEflag will causeminWidth(forHeight)to return the region's preferred width, enabling applications to easily restrict the resizability of the region.
 
- 
minWidthPropertyProperty for overriding the region's computed minimum width. This should only be set if the region's internally computed minimum width doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatminWidth(forHeight)will return the region's internally computed minimum width.Setting this value to the USE_PREF_SIZEflag will causeminWidth(forHeight)to return the region's preferred width, enabling applications to easily restrict the resizability of the region.- See Also:
- getMinWidth(),- setMinWidth(double)
 
- 
setMinHeightpublic final void setMinHeight(double value)Sets the value of the property minHeight.- Property description:
- Property for overriding the region's computed minimum height.
 This should only be set if the region's internally computed minimum height
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatminHeight(forWidth)will return the region's internally computed minimum height.Setting this value to the USE_PREF_SIZEflag will causeminHeight(forWidth)to return the region's preferred height, enabling applications to easily restrict the resizability of the region.
 
- 
getMinHeightpublic final double getMinHeight()Gets the value of the property minHeight.- Property description:
- Property for overriding the region's computed minimum height.
 This should only be set if the region's internally computed minimum height
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatminHeight(forWidth)will return the region's internally computed minimum height.Setting this value to the USE_PREF_SIZEflag will causeminHeight(forWidth)to return the region's preferred height, enabling applications to easily restrict the resizability of the region.
 
- 
minHeightPropertyProperty for overriding the region's computed minimum height. This should only be set if the region's internally computed minimum height doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatminHeight(forWidth)will return the region's internally computed minimum height.Setting this value to the USE_PREF_SIZEflag will causeminHeight(forWidth)to return the region's preferred height, enabling applications to easily restrict the resizability of the region.- See Also:
- getMinHeight(),- setMinHeight(double)
 
- 
setMinSizepublic void setMinSize(double minWidth, double minHeight)Convenience method for overriding the region's computed minimum width and height. This should only be called if the region's internally computed minimum size doesn't meet the application's layout needs.- Parameters:
- minWidth- the override value for minimum width
- minHeight- the override value for minimum height
- See Also:
- setMinWidth(double),- setMinHeight(double)
 
- 
setPrefWidthpublic final void setPrefWidth(double value)Sets the value of the property prefWidth.- Property description:
- Property for overriding the region's computed preferred width.
 This should only be set if the region's internally computed preferred width
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatgetPrefWidth(forHeight)will return the region's internally computed preferred width.
 
- 
getPrefWidthpublic final double getPrefWidth()Gets the value of the property prefWidth.- Property description:
- Property for overriding the region's computed preferred width.
 This should only be set if the region's internally computed preferred width
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatgetPrefWidth(forHeight)will return the region's internally computed preferred width.
 
- 
prefWidthPropertyProperty for overriding the region's computed preferred width. This should only be set if the region's internally computed preferred width doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatgetPrefWidth(forHeight)will return the region's internally computed preferred width.- See Also:
- getPrefWidth(),- setPrefWidth(double)
 
- 
setPrefHeightpublic final void setPrefHeight(double value)Sets the value of the property prefHeight.- Property description:
- Property for overriding the region's computed preferred height.
 This should only be set if the region's internally computed preferred height
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatgetPrefHeight(forWidth)will return the region's internally computed preferred width.
 
- 
getPrefHeightpublic final double getPrefHeight()Gets the value of the property prefHeight.- Property description:
- Property for overriding the region's computed preferred height.
 This should only be set if the region's internally computed preferred height
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatgetPrefHeight(forWidth)will return the region's internally computed preferred width.
 
- 
prefHeightPropertyProperty for overriding the region's computed preferred height. This should only be set if the region's internally computed preferred height doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatgetPrefHeight(forWidth)will return the region's internally computed preferred width.- See Also:
- getPrefHeight(),- setPrefHeight(double)
 
- 
setPrefSizepublic void setPrefSize(double prefWidth, double prefHeight)Convenience method for overriding the region's computed preferred width and height. This should only be called if the region's internally computed preferred size doesn't meet the application's layout needs.- Parameters:
- prefWidth- the override value for preferred width
- prefHeight- the override value for preferred height
- See Also:
- setPrefWidth(double),- setPrefHeight(double)
 
- 
setMaxWidthpublic final void setMaxWidth(double value)Sets the value of the property maxWidth.- Property description:
- Property for overriding the region's computed maximum width.
 This should only be set if the region's internally computed maximum width
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatgetMaxWidth(forHeight)will return the region's internally computed maximum width.Setting this value to the USE_PREF_SIZEflag will causegetMaxWidth(forHeight)to return the region's preferred width, enabling applications to easily restrict the resizability of the region.
 
- 
getMaxWidthpublic final double getMaxWidth()Gets the value of the property maxWidth.- Property description:
- Property for overriding the region's computed maximum width.
 This should only be set if the region's internally computed maximum width
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatgetMaxWidth(forHeight)will return the region's internally computed maximum width.Setting this value to the USE_PREF_SIZEflag will causegetMaxWidth(forHeight)to return the region's preferred width, enabling applications to easily restrict the resizability of the region.
 
- 
maxWidthPropertyProperty for overriding the region's computed maximum width. This should only be set if the region's internally computed maximum width doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatgetMaxWidth(forHeight)will return the region's internally computed maximum width.Setting this value to the USE_PREF_SIZEflag will causegetMaxWidth(forHeight)to return the region's preferred width, enabling applications to easily restrict the resizability of the region.- See Also:
- getMaxWidth(),- setMaxWidth(double)
 
- 
setMaxHeightpublic final void setMaxHeight(double value)Sets the value of the property maxHeight.- Property description:
- Property for overriding the region's computed maximum height.
 This should only be set if the region's internally computed maximum height
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatgetMaxHeight(forWidth)will return the region's internally computed maximum height.Setting this value to the USE_PREF_SIZEflag will causegetMaxHeight(forWidth)to return the region's preferred height, enabling applications to easily restrict the resizability of the region.
 
- 
getMaxHeightpublic final double getMaxHeight()Gets the value of the property maxHeight.- Property description:
- Property for overriding the region's computed maximum height.
 This should only be set if the region's internally computed maximum height
 doesn't meet the application's layout needs.
 Defaults to the USE_COMPUTED_SIZEflag, which means thatgetMaxHeight(forWidth)will return the region's internally computed maximum height.Setting this value to the USE_PREF_SIZEflag will causegetMaxHeight(forWidth)to return the region's preferred height, enabling applications to easily restrict the resizability of the region.
 
- 
maxHeightPropertyProperty for overriding the region's computed maximum height. This should only be set if the region's internally computed maximum height doesn't meet the application's layout needs.Defaults to the USE_COMPUTED_SIZEflag, which means thatgetMaxHeight(forWidth)will return the region's internally computed maximum height.Setting this value to the USE_PREF_SIZEflag will causegetMaxHeight(forWidth)to return the region's preferred height, enabling applications to easily restrict the resizability of the region.- See Also:
- getMaxHeight(),- setMaxHeight(double)
 
- 
setMaxSizepublic void setMaxSize(double maxWidth, double maxHeight)Convenience method for overriding the region's computed maximum width and height. This should only be called if the region's internally computed maximum size doesn't meet the application's layout needs.- Parameters:
- maxWidth- the override value for maximum width
- maxHeight- the override value for maximum height
- See Also:
- setMaxWidth(double),- setMaxHeight(double)
 
- 
getShapeGets the value of the property shape.- Property description:
- When specified, the Shapewill cause the region to be rendered as the specified shape rather than as a rounded rectangle. When null, the Region is rendered as a rounded rectangle. When rendered as a Shape, any Background is used to fill the shape, although any background insets are ignored as are background radii. Any BorderStrokes defined are used for stroking the shape. Any BorderImages are ignored.
- Default value:
- null
- Since:
- JavaFX 8.0
 
- 
setShapeSets the value of the property shape.- Property description:
- When specified, the Shapewill cause the region to be rendered as the specified shape rather than as a rounded rectangle. When null, the Region is rendered as a rounded rectangle. When rendered as a Shape, any Background is used to fill the shape, although any background insets are ignored as are background radii. Any BorderStrokes defined are used for stroking the shape. Any BorderImages are ignored.
- Default value:
- null
- Since:
- JavaFX 8.0
 
- 
shapePropertyWhen specified, theShapewill cause the region to be rendered as the specified shape rather than as a rounded rectangle. When null, the Region is rendered as a rounded rectangle. When rendered as a Shape, any Background is used to fill the shape, although any background insets are ignored as are background radii. Any BorderStrokes defined are used for stroking the shape. Any BorderImages are ignored.- Default value:
- null
- Since:
- JavaFX 8.0
- See Also:
- getShape(),- setShape(Shape)
 
- 
setScaleShapepublic final void setScaleShape(boolean value)Sets the value of the property scaleShape.- Property description:
- Specifies whether the shape, if defined, is scaled to match the size of the Region.
 truemeans the shape is scaled to fit the size of the Region,falsemeans the shape is at its source size, its positioning depends on the value ofcenterShape.
- Default value:
- true
- Since:
- JavaFX 8.0
 
- 
isScaleShapepublic final boolean isScaleShape()Gets the value of the property scaleShape.- Property description:
- Specifies whether the shape, if defined, is scaled to match the size of the Region.
 truemeans the shape is scaled to fit the size of the Region,falsemeans the shape is at its source size, its positioning depends on the value ofcenterShape.
- Default value:
- true
- Since:
- JavaFX 8.0
 
- 
scaleShapePropertySpecifies whether the shape, if defined, is scaled to match the size of the Region.truemeans the shape is scaled to fit the size of the Region,falsemeans the shape is at its source size, its positioning depends on the value ofcenterShape.- Default value:
- true
- Since:
- JavaFX 8.0
- See Also:
- isScaleShape(),- setScaleShape(boolean)
 
- 
setCenterShapepublic final void setCenterShape(boolean value)Sets the value of the property centerShape.- Property description:
- Defines whether the shape is centered within the Region's width or height.
 truemeans the shape centered within the Region's width and height,falsemeans the shape is positioned at its source position.
- Default value:
- true
- Since:
- JavaFX 8.0
 
- 
isCenterShapepublic final boolean isCenterShape()Gets the value of the property centerShape.- Property description:
- Defines whether the shape is centered within the Region's width or height.
 truemeans the shape centered within the Region's width and height,falsemeans the shape is positioned at its source position.
- Default value:
- true
- Since:
- JavaFX 8.0
 
- 
centerShapePropertyDefines whether the shape is centered within the Region's width or height.truemeans the shape centered within the Region's width and height,falsemeans the shape is positioned at its source position.- Default value:
- true
- Since:
- JavaFX 8.0
- See Also:
- isCenterShape(),- setCenterShape(boolean)
 
- 
setCacheShapepublic final void setCacheShape(boolean value)Sets the value of the property cacheShape.- Property description:
- Defines a hint to the system indicating that the Shape used to define the region's background is stable and would benefit from caching.
- Default value:
- true
- Since:
- JavaFX 8.0
 
- 
isCacheShapepublic final boolean isCacheShape()Gets the value of the property cacheShape.- Property description:
- Defines a hint to the system indicating that the Shape used to define the region's background is stable and would benefit from caching.
- Default value:
- true
- Since:
- JavaFX 8.0
 
- 
cacheShapePropertyDefines a hint to the system indicating that the Shape used to define the region's background is stable and would benefit from caching.- Default value:
- true
- Since:
- JavaFX 8.0
- See Also:
- isCacheShape(),- setCacheShape(boolean)
 
- 
isResizablepublic boolean isResizable()Returnstruesince all Regions are resizable.- Overrides:
- isResizablein class- Node
- Returns:
- whether this node can be resized by its parent during layout
- See Also:
- Node.getContentBias(),- Node.minWidth(double),- Node.minHeight(double),- Node.prefWidth(double),- Node.prefHeight(double),- Node.maxWidth(double),- Node.maxHeight(double),- Node.resize(double, double),- Node.getLayoutBounds()
 
- 
resizepublic void resize(double width, double height)Invoked by the region's parent during layout to set the region's width and height. Applications should not invoke this method directly. If an application needs to directly set the size of the region, it should override its size constraints by callingsetMinSize(),setPrefSize(), orsetMaxSize()and it's parent will honor those overrides during layout.- Overrides:
- resizein class- Node
- Parameters:
- width- the target layout bounds width
- height- the target layout bounds height
- See Also:
- Node.isResizable(),- Node.getContentBias(),- Node.autosize(),- Node.minWidth(double),- Node.minHeight(double),- Node.prefWidth(double),- Node.prefHeight(double),- Node.maxWidth(double),- Node.maxHeight(double),- Node.getLayoutBounds()
 
- 
minWidthpublic final double minWidth(double height)Called during layout to determine the minimum width for this node. Returns the value fromcomputeMinWidth(forHeight)unless the application overrode the minimum width by setting the minWidth property.- Overrides:
- minWidthin class- Node
- Parameters:
- height- the height that should be used if minimum width depends on it
- Returns:
- the minimum width that this node should be resized to during layout
- See Also:
- setMinWidth(double)
 
- 
minHeightpublic final double minHeight(double width)Called during layout to determine the minimum height for this node. Returns the value fromcomputeMinHeight(forWidth)unless the application overrode the minimum height by setting the minHeight property.- Overrides:
- minHeightin class- Node
- Parameters:
- width- the width that should be used if minimum height depends on it
- Returns:
- the minimum height that this node should be resized to during layout
- See Also:
- setMinHeight(double)
 
- 
prefWidthpublic final double prefWidth(double height)Called during layout to determine the preferred width for this node. Returns the value fromcomputePrefWidth(forHeight)unless the application overrode the preferred width by setting the prefWidth property.- Overrides:
- prefWidthin class- Node
- Parameters:
- height- the height that should be used if preferred width depends on it
- Returns:
- the preferred width that this node should be resized to during layout
- See Also:
- setPrefWidth(double)
 
- 
prefHeightpublic final double prefHeight(double width)Called during layout to determine the preferred height for this node. Returns the value fromcomputePrefHeight(forWidth)unless the application overrode the preferred height by setting the prefHeight property.- Overrides:
- prefHeightin class- Node
- Parameters:
- width- the width that should be used if preferred height depends on it
- Returns:
- the preferred height that this node should be resized to during layout
- See Also:
- setPrefHeight(double)
 
- 
maxWidthpublic final double maxWidth(double height)Called during layout to determine the maximum width for this node. Returns the value fromcomputeMaxWidth(forHeight)unless the application overrode the maximum width by setting the maxWidth property.- Overrides:
- maxWidthin class- Node
- Parameters:
- height- the height that should be used if maximum width depends on it
- Returns:
- the maximum width that this node should be resized to during layout
- See Also:
- setMaxWidth(double)
 
- 
maxHeightpublic final double maxHeight(double width)Called during layout to determine the maximum height for this node. Returns the value fromcomputeMaxHeight(forWidth)unless the application overrode the maximum height by setting the maxHeight property.- Overrides:
- maxHeightin class- Node
- Parameters:
- width- the width that should be used if maximum height depends on it
- Returns:
- the maximum height that this node should be resized to during layout
- See Also:
- setMaxHeight(double)
 
- 
computeMinWidthprotected double computeMinWidth(double height)Computes the minimum width of this region. Returns the sum of the left and right insets by default. region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.- Overrides:
- computeMinWidthin class- Parent
- Parameters:
- height- the height that should be used if min width depends on it
- Returns:
- the computed minimum width of this region
 
- 
computeMinHeightprotected double computeMinHeight(double width)Computes the minimum height of this region. Returns the sum of the top and bottom insets by default. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.- Overrides:
- computeMinHeightin class- Parent
- Parameters:
- width- the width that should be used if min height depends on it
- Returns:
- the computed minimum height for this region
 
- 
computePrefWidthprotected double computePrefWidth(double height)Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.- Overrides:
- computePrefWidthin class- Parent
- Parameters:
- height- the height that should be used if preferred width depends on it
- Returns:
- the computed preferred width for this region
 
- 
computePrefHeightprotected double computePrefHeight(double width)Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.- Overrides:
- computePrefHeightin class- Parent
- Parameters:
- width- the width that should be used if preferred height depends on it
- Returns:
- the computed preferred height for this region
 
- 
computeMaxWidthprotected double computeMaxWidth(double height)Computes the maximum width for this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return an different value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.- Parameters:
- height- The height of the Region, in case this value might dictate the maximum width
- Returns:
- the computed maximum width for this region
 
- 
computeMaxHeightprotected double computeMaxHeight(double width)Computes the maximum height of this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return a different value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.- Parameters:
- width- The width of the Region, in case this value might dictate the maximum height
- Returns:
- the computed maximum height for this region
 
- 
snapSpaceDeprecated.replaced bysnapSpaceX()andsnapSpaceY()If this region's snapToPixel property is false, this method returns the same value, else it tries to return a value rounded to the nearest pixel, but since there is no indication if the value is a vertical or horizontal measurement then it may be snapped to the wrong pixel size metric on screens with different horizontal and vertical scales.- Parameters:
- value- the space value to be snapped
- Returns:
- value rounded to nearest pixel
 
- 
snapSpaceXpublic double snapSpaceX(double value)If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.- Parameters:
- value- the space value to be snapped
- Returns:
- value rounded to nearest pixel
- Since:
- 9
 
- 
snapSpaceYpublic double snapSpaceY(double value)If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.- Parameters:
- value- the space value to be snapped
- Returns:
- value rounded to nearest pixel
- Since:
- 9
 
- 
snapSizeDeprecated.replaced bysnapSizeX()andsnapSizeY()If this region's snapToPixel property is false, this method returns the same value, else it tries to return a value ceiled to the nearest pixel, but since there is no indication if the value is a vertical or horizontal measurement then it may be snapped to the wrong pixel size metric on screens with different horizontal and vertical scales.- Parameters:
- value- the size value to be snapped
- Returns:
- value ceiled to nearest pixel
 
- 
snapSizeXpublic double snapSizeX(double value)If this region's snapToPixel property is true, returns a value ceiled to the nearest pixel in the horizontal direction, else returns the same value.- Parameters:
- value- the size value to be snapped
- Returns:
- value ceiled to nearest pixel
- Since:
- 9
 
- 
snapSizeYpublic double snapSizeY(double value)If this region's snapToPixel property is true, returns a value ceiled to the nearest pixel in the vertical direction, else returns the same value.- Parameters:
- value- the size value to be snapped
- Returns:
- value ceiled to nearest pixel
- Since:
- 9
 
- 
snapPositionDeprecated.replaced bysnapPositionX()andsnapPositionY()If this region's snapToPixel property is false, this method returns the same value, else it tries to return a value rounded to the nearest pixel, but since there is no indication if the value is a vertical or horizontal measurement then it may be snapped to the wrong pixel size metric on screens with different horizontal and vertical scales.- Parameters:
- value- the position value to be snapped
- Returns:
- value rounded to nearest pixel
 
- 
snapPositionXpublic double snapPositionX(double value)If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.- Parameters:
- value- the position value to be snapped
- Returns:
- value rounded to nearest pixel
- Since:
- 9
 
- 
snapPositionYpublic double snapPositionY(double value)If this region's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.- Parameters:
- value- the position value to be snapped
- Returns:
- value rounded to nearest pixel
- Since:
- 9
 
- 
snappedTopInsetpublic final double snappedTopInset()Utility method to get the top inset which includes padding and border inset. Then snapped to whole pixels if isSnapToPixel() is true.- Returns:
- Rounded up insets top
- Since:
- JavaFX 8.0
 
- 
snappedBottomInsetpublic final double snappedBottomInset()Utility method to get the bottom inset which includes padding and border inset. Then snapped to whole pixels if isSnapToPixel() is true.- Returns:
- Rounded up insets bottom
- Since:
- JavaFX 8.0
 
- 
snappedLeftInsetpublic final double snappedLeftInset()Utility method to get the left inset which includes padding and border inset. Then snapped to whole pixels if isSnapToPixel() is true.- Returns:
- Rounded up insets left
- Since:
- JavaFX 8.0
 
- 
snappedRightInsetpublic final double snappedRightInset()Utility method to get the right inset which includes padding and border inset. Then snapped to whole pixels if isSnapToPixel() is true.- Returns:
- Rounded up insets right
- Since:
- JavaFX 8.0
 
- 
positionInAreaprotected void positionInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, HPos halignment, VPos valignment)Utility method which positions the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.This function does not resize the node and uses the node's layout bounds width and height to determine how it should be positioned within the area. If the vertical alignment is VPos.BASELINEthen it will position the node so that its own baseline aligns with the passed inbaselineOffset, otherwise the baseline parameter is ignored.If snapToPixelistruefor this region, then the x/y position values will be rounded to their nearest pixel boundaries.- Parameters:
- child- the child being positioned within this region
- areaX- the horizontal offset of the layout area relative to this region
- areaY- the vertical offset of the layout area relative to this region
- areaWidth- the width of the layout area
- areaHeight- the height of the layout area
- areaBaselineOffset- the baseline offset to be used if VPos is BASELINE
- halignment- the horizontal alignment for the child within the area
- valignment- the vertical alignment for the child within the area
 
- 
positionInAreapublic static void positionInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, HPos halignment, VPos valignment, boolean isSnapToPixel)Utility method which positions the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.This function does not resize the node and uses the node's layout bounds width and height to determine how it should be positioned within the area. If the vertical alignment is VPos.BASELINEthen it will position the node so that its own baseline aligns with the passed inbaselineOffset, otherwise the baseline parameter is ignored.If snapToPixelistruefor this region, then the x/y position values will be rounded to their nearest pixel boundaries.If marginis non-null, then that space will be allocated around the child within the layout area. margin may be null.- Parameters:
- child- the child being positioned within this region
- areaX- the horizontal offset of the layout area relative to this region
- areaY- the vertical offset of the layout area relative to this region
- areaWidth- the width of the layout area
- areaHeight- the height of the layout area
- areaBaselineOffset- the baseline offset to be used if VPos is BASELINE
- margin- the margin of space to be allocated around the child
- halignment- the horizontal alignment for the child within the area
- valignment- the vertical alignment for the child within the area
- isSnapToPixel- whether to snap size and position to pixels
- Since:
- JavaFX 8.0
 
- 
layoutInAreaprotected void layoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, HPos halignment, VPos valignment)Utility method which lays out the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.If the child is resizable, this method will resize it to fill the specified area unless the node's maximum size prevents it. If the node's maximum size preference is less than the area size, the maximum size will be used. If node's maximum is greater than the area size, then the node will be resized to fit within the area, unless its minimum size prevents it. If the child has a non-null contentBias, then this method will use it when resizing the child. If the contentBias is horizontal, it will set its width first to the area's width (up to the child's max width limit) and then pass that value to compute the child's height. If child's contentBias is vertical, then it will set its height to the area height (up to child's max height limit) and pass that height to compute the child's width. If the child's contentBias is null, then it's width and height have no dependencies on each other. If the child is not resizable (Shape, Group, etc) then it will only be positioned and not resized. If the child's resulting size differs from the area's size (either because it was not resizable or it's sizing preferences prevented it), then this function will align the node relative to the area using horizontal and vertical alignment values. If valignment is VPos.BASELINEthen the node's baseline will be aligned with the area baseline offset parameter, otherwise the baseline parameter is ignored.If snapToPixelistruefor this region, then the resulting x,y values will be rounded to their nearest pixel boundaries and the width/height values will be ceiled to the next pixel boundary.- Parameters:
- child- the child being positioned within this region
- areaX- the horizontal offset of the layout area relative to this region
- areaY- the vertical offset of the layout area relative to this region
- areaWidth- the width of the layout area
- areaHeight- the height of the layout area
- areaBaselineOffset- the baseline offset to be used if VPos is BASELINE
- halignment- the horizontal alignment for the child within the area
- valignment- the vertical alignment for the child within the area
 
- 
layoutInAreaprotected void layoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, HPos halignment, VPos valignment)Utility method which lays out the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.If the child is resizable, this method will resize it to fill the specified area unless the node's maximum size prevents it. If the node's maximum size preference is less than the area size, the maximum size will be used. If node's maximum is greater than the area size, then the node will be resized to fit within the area, unless its minimum size prevents it. If the child has a non-null contentBias, then this method will use it when resizing the child. If the contentBias is horizontal, it will set its width first to the area's width (up to the child's max width limit) and then pass that value to compute the child's height. If child's contentBias is vertical, then it will set its height to the area height (up to child's max height limit) and pass that height to compute the child's width. If the child's contentBias is null, then it's width and height have no dependencies on each other. If the child is not resizable (Shape, Group, etc) then it will only be positioned and not resized. If the child's resulting size differs from the area's size (either because it was not resizable or it's sizing preferences prevented it), then this function will align the node relative to the area using horizontal and vertical alignment values. If valignment is VPos.BASELINEthen the node's baseline will be aligned with the area baseline offset parameter, otherwise the baseline parameter is ignored.If marginis non-null, then that space will be allocated around the child within the layout area. margin may be null.If snapToPixelistruefor this region, then the resulting x,y values will be rounded to their nearest pixel boundaries and the width/height values will be ceiled to the next pixel boundary.- Parameters:
- child- the child being positioned within this region
- areaX- the horizontal offset of the layout area relative to this region
- areaY- the vertical offset of the layout area relative to this region
- areaWidth- the width of the layout area
- areaHeight- the height of the layout area
- areaBaselineOffset- the baseline offset to be used if VPos is BASELINE
- margin- the margin of space to be allocated around the child
- halignment- the horizontal alignment for the child within the area
- valignment- the vertical alignment for the child within the area
 
- 
layoutInAreaprotected void layoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, boolean fillWidth, boolean fillHeight, HPos halignment, VPos valignment)Utility method which lays out the child within an area of this region defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.If the child is resizable, this method will use fillWidthandfillHeightto determine whether to resize it to fill the area or keep the child at its preferred dimension. If fillWidth/fillHeight are true, then this method will only resize the child up to its max size limits. If the node's maximum size preference is less than the area size, the maximum size will be used. If node's maximum is greater than the area size, then the node will be resized to fit within the area, unless its minimum size prevents it.If the child has a non-null contentBias, then this method will use it when resizing the child. If the contentBias is horizontal, it will set its width first and then pass that value to compute the child's height. If child's contentBias is vertical, then it will set its height first and pass that value to compute the child's width. If the child's contentBias is null, then it's width and height have no dependencies on each other. If the child is not resizable (Shape, Group, etc) then it will only be positioned and not resized. If the child's resulting size differs from the area's size (either because it was not resizable or it's sizing preferences prevented it), then this function will align the node relative to the area using horizontal and vertical alignment values. If valignment is VPos.BASELINEthen the node's baseline will be aligned with the area baseline offset parameter, otherwise the baseline parameter is ignored.If marginis non-null, then that space will be allocated around the child within the layout area. margin may be null.If snapToPixelistruefor this region, then the resulting x,y values will be rounded to their nearest pixel boundaries and the width/height values will be ceiled to the next pixel boundary.- Parameters:
- child- the child being positioned within this region
- areaX- the horizontal offset of the layout area relative to this region
- areaY- the vertical offset of the layout area relative to this region
- areaWidth- the width of the layout area
- areaHeight- the height of the layout area
- areaBaselineOffset- the baseline offset to be used if VPos is BASELINE
- margin- the margin of space to be allocated around the child
- fillWidth- whether or not the child should be resized to fill the area width or kept to its preferred width
- fillHeight- whether or not the child should e resized to fill the area height or kept to its preferred height
- halignment- the horizontal alignment for the child within the area
- valignment- the vertical alignment for the child within the area
 
- 
layoutInAreapublic static void layoutInArea(Node child, double areaX, double areaY, double areaWidth, double areaHeight, double areaBaselineOffset, Insets margin, boolean fillWidth, boolean fillHeight, HPos halignment, VPos valignment, boolean isSnapToPixel)Utility method which lays out the child within an area of it's parent defined byareaX,areaY,areaWidthxareaHeight, with a baseline offset relative to that area.If the child is resizable, this method will use fillWidthandfillHeightto determine whether to resize it to fill the area or keep the child at its preferred dimension. If fillWidth/fillHeight are true, then this method will only resize the child up to its max size limits. If the node's maximum size preference is less than the area size, the maximum size will be used. If node's maximum is greater than the area size, then the node will be resized to fit within the area, unless its minimum size prevents it.If the child has a non-null contentBias, then this method will use it when resizing the child. If the contentBias is horizontal, it will set its width first and then pass that value to compute the child's height. If child's contentBias is vertical, then it will set its height first and pass that value to compute the child's width. If the child's contentBias is null, then it's width and height have no dependencies on each other. If the child is not resizable (Shape, Group, etc) then it will only be positioned and not resized. If the child's resulting size differs from the area's size (either because it was not resizable or it's sizing preferences prevented it), then this function will align the node relative to the area using horizontal and vertical alignment values. If valignment is VPos.BASELINEthen the node's baseline will be aligned with the area baseline offset parameter, otherwise the baseline parameter is ignored.If marginis non-null, then that space will be allocated around the child within the layout area. margin may be null.If snapToPixelistruefor this region, then the resulting x,y values will be rounded to their nearest pixel boundaries and the width/height values will be ceiled to the next pixel boundary.- Parameters:
- child- the child being positioned within this region
- areaX- the horizontal offset of the layout area relative to this region
- areaY- the vertical offset of the layout area relative to this region
- areaWidth- the width of the layout area
- areaHeight- the height of the layout area
- areaBaselineOffset- the baseline offset to be used if VPos is BASELINE
- margin- the margin of space to be allocated around the child
- fillWidth- whether or not the child should be resized to fill the area width or kept to its preferred width
- fillHeight- whether or not the child should e resized to fill the area height or kept to its preferred height
- halignment- the horizontal alignment for the child within the area
- valignment- the vertical alignment for the child within the area
- isSnapToPixel- whether to snap size and position to pixels
- Since:
- JavaFX 8.0
 
- 
getUserAgentStylesheetAn implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. These styles are used in addition to whatever user-agent stylesheets are in use. This provides a mechanism for third parties to introduce styles for custom controls.The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath. Subclasses overriding this method should not assume any particular implementation approach as to the number and frequency with which it is called. For this reason, attempting any kind of dynamic implementation (i.e. returning different user agent stylesheet values) based on some state change is highly discouraged, as there is no guarantee when, or even if, this method will be called. Some JavaFX CSS implementations may choose to cache this response for an indefinite period of time, and therefore there should be no expectation around when this method is called. 
 For additional information about using CSS with the scene graph, see the CSS Reference Guide.package com.example.javafx.app; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.stage.Stage; public class MyApp extends Application { @Override public void start(Stage stage) { Scene scene = new Scene(new Group()); scene.getStylesheets().add("/com/example/javafx/app/mystyles.css"); stage.setScene(scene); stage.show(); } public static void main(String[] args) { launch(args); } }- Returns:
- A string URL
- Since:
- JavaFX 8u40
 
- 
getClassCssMetaData- Returns:
- The CssMetaData associated with this class, which may include the CssMetaData of its superclasses.
- Since:
- JavaFX 8.0
 
- 
getCssMetaDataThis method should delegate toNode.getClassCssMetaData()so that a Node's CssMetaData can be accessed without the need for reflection.- Specified by:
- getCssMetaDatain interface- Styleable
- Overrides:
- getCssMetaDatain class- Node
- Returns:
- The CssMetaData associated with this node, which may include the CssMetaData of its superclasses.
- Since:
- JavaFX 8.0
 
 
- 
snapPositionX()andsnapPositionY()