Spec-Zone .ru
спецификации, руководства, описания, API
|
public abstract class Control extends Parent implements Skinnable
Additionally, controls support explicit skinning to make it easy to leverage the functionality of a control while customizing its appearance.
See specific Control subclasses for information on how to use individual types of controls.
Most controls have their focusTraversable property set to true by default, however
read-only controls such as Label
and ProgressIndicator
, and some
controls that are containers ScrollPane
and ToolBar
do not.
Consult individual control documentation for details.
Type | Property and Description |
---|---|
ObjectProperty<ContextMenu> |
contextMenu
The ContextMenu to show for this control.
|
ReadOnlyDoubleProperty |
height
The height of this control.
|
DoubleProperty |
maxHeight
Property for overriding the control's computed maximum height.
|
DoubleProperty |
maxWidth
Property for overriding the control's computed maximum width.
|
DoubleProperty |
minHeight
Property for overriding the control's computed minimum height.
|
DoubleProperty |
minWidth
Property for overriding the control's computed minimum width.
|
DoubleProperty |
prefHeight
Property for overriding the control's computed preferred height.
|
DoubleProperty |
prefWidth
Property for overriding the control's computed preferred width.
|
protected StringProperty |
skinClassName |
ObjectProperty<Skin<?>> |
skin
Skin is responsible for rendering this
Control . |
ObjectProperty<Tooltip> |
tooltip
The ToolTip for this control.
|
ReadOnlyDoubleProperty |
width
The width of this control.
|
needsLayout
blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, 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, visible
Modifier and Type | Field and Description |
---|---|
static double |
USE_COMPUTED_SIZE
Sentinel value which can be passed to a control's setMinWidth(), setMinHeight(),
setPrefWidth(), setPrefHeight(), setMaxWidth(), setMaxHeight() methods
to reset the control's size constraint back to it's intrinsic size returned
by computeMinWidth(), computeMinHeight(), computePrefWidth(), computePrefHeight(),
computeMaxWidth(), or computeMaxHeight().
|
static double |
USE_PREF_SIZE
Sentinel value which can be passed to a control's setMinWidth(), setMinHeight(),
setMaxWidth() or setMaxHeight() methods to indicate that the preferred dimension
should be used for that max and/or min constraint.
|
Modifier | Constructor and Description |
---|---|
protected |
Control()
Create a new Control.
|
Modifier and Type | Method and Description |
---|---|
protected double |
computeMaxHeight(double width)
Computes the maximum allowable height of the Control, based on the provided
width.
|
protected double |
computeMaxWidth(double height)
Computes the maximum allowable width of the Control, based on the provided
height.
|
protected double |
computeMinHeight(double width)
Computes the minimum allowable height of the Control, based on the provided
width.
|
protected double |
computeMinWidth(double height)
Computes the minimum allowable width of the Control, based on the provided
height.
|
protected double |
computePrefHeight(double width)
Calculates the preferred height of this
Parent . |
protected double |
computePrefWidth(double height)
Calculates the preferred width of this
Parent . |
ObjectProperty<ContextMenu> |
contextMenuProperty()
The ContextMenu to show for this control.
|
double |
getBaselineOffset()
Calculates the baseline offset based on the first managed child.
|
ContextMenu |
getContextMenu()
Gets the value of the property contextMenu.
|
double |
getHeight()
Gets the value of the property height.
|
double |
getMaxHeight()
Gets the value of the property maxHeight.
|
double |
getMaxWidth()
Gets the value of the property maxWidth.
|
double |
getMinHeight()
Gets the value of the property minHeight.
|
double |
getMinWidth()
Gets the value of the property minWidth.
|
double |
getPrefHeight()
Gets the value of the property prefHeight.
|
double |
getPrefWidth()
Gets the value of the property prefWidth.
|
Skin<?> |
getSkin()
Gets the value of the property skin.
|
Tooltip |
getTooltip()
Gets the value of the property tooltip.
|
protected java.lang.String |
getUserAgentStylesheet()
Implementors may specify their own user-agent stylesheet.
|
double |
getWidth()
Gets the value of the property width.
|
ReadOnlyDoubleProperty |
heightProperty()
The height of this control.
|
boolean |
intersects(double localX,
double localY,
double localWidth,
double localHeight)
Returns
true if the given rectangle (specified in the local
coordinate space of this Node ) intersects the shape of this
Node . |
boolean |
isResizable()
Returns
true since all Controls are resizable. |
protected void |
layoutChildren()
Invoked during the layout pass to layout the children in this
Parent . |
double |
maxHeight(double width)
Called during layout to determine the maximum height for this node.
|
DoubleProperty |
maxHeightProperty()
Property for overriding the control's computed maximum height.
|
double |
maxWidth(double height)
Called during layout to determine the maximum width for this node.
|
DoubleProperty |
maxWidthProperty()
Property for overriding the control's computed maximum width.
|
double |
minHeight(double width)
Called during layout to determine the minimum height for this node.
|
DoubleProperty |
minHeightProperty()
Property for overriding the control's computed minimum height.
|
double |
minWidth(double height)
Called during layout to determine the minimum width for this node.
|
DoubleProperty |
minWidthProperty()
Property for overriding the control's computed minimum width.
|
double |
prefHeight(double width)
Called during layout to determine the preferred height for this node.
|
DoubleProperty |
prefHeightProperty()
Property for overriding the control's computed preferred height.
|
double |
prefWidth(double height)
Called during layout to determine the preferred width for this node.
|
DoubleProperty |
prefWidthProperty()
Property for overriding the control's computed preferred width.
|
void |
resize(double width,
double height)
Invoked by the control's parent during layout to set the control's
width and height.
|
void |
setContextMenu(ContextMenu value)
Sets the value of the property contextMenu.
|
protected void |
setHeight(double value)
Sets the value of the property height.
|
void |
setMaxHeight(double value)
Sets the value of the property maxHeight.
|
void |
setMaxSize(double maxWidth,
double maxHeight)
Convenience method for overriding the control's computed maximum width and height.
|
void |
setMaxWidth(double value)
Sets the value of the property maxWidth.
|
void |
setMinHeight(double value)
Sets the value of the property minHeight.
|
void |
setMinSize(double minWidth,
double minHeight)
Convenience method for overriding the control's computed minimum width and height.
|
void |
setMinWidth(double value)
Sets the value of the property minWidth.
|
void |
setPrefHeight(double value)
Sets the value of the property prefHeight.
|
void |
setPrefSize(double prefWidth,
double prefHeight)
Convenience method for overriding the control's computed preferred width and height.
|
void |
setPrefWidth(double value)
Sets the value of the property prefWidth.
|
void |
setSkin(Skin<?> value)
Sets the value of the property skin.
|
protected void |
setSkinClassName(java.lang.String skinClassName)
Sets the value of the property skinClassName.
|
void |
setTooltip(Tooltip value)
Sets the value of the property tooltip.
|
protected void |
setWidth(double value)
Sets the value of the property width.
|
protected StringProperty |
skinClassNameProperty() |
ObjectProperty<Skin<?>> |
skinProperty()
Skin is responsible for rendering this
Control . |
ObjectProperty<Tooltip> |
tooltipProperty()
The ToolTip for this control.
|
ReadOnlyDoubleProperty |
widthProperty()
The width of this control.
|
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, setNeedsLayout
addEventFilter, addEventHandler, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, 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, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getUserData, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToSceneTransformProperty, lookupAll, managedProperty, mouseTransparentProperty, 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, pickOnBoundsProperty, pressedProperty, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, 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, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, visibleProperty
public final ObjectProperty<Skin<?>> skinProperty
Control
. From the
perspective of the Control
, the Skin
is a black box.
It listens and responds to changes in state in a Control
.
There is a one-to-one relationship between a Control
and its
Skin
. Every Skin
maintains a back reference to the
Control
via the Skin.getSkinnable()
method.
A skin may be null.
skinProperty
in interface Skinnable
getSkin()
,
setSkin(Skin)
public final ObjectProperty<Tooltip> tooltipProperty
getTooltip()
,
setTooltip(Tooltip)
public final ObjectProperty<ContextMenu> contextMenuProperty
getContextMenu()
,
setContextMenu(ContextMenu)
public final ReadOnlyDoubleProperty widthProperty
getWidth()
,
setWidth(double)
public final ReadOnlyDoubleProperty heightProperty
getHeight()
,
setHeight(double)
public final DoubleProperty minWidthProperty
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMinWidth(forHeight)
will return the control's internally
computed minimum width.
Setting this value to the USE_PREF_SIZE
flag will cause
getMinWidth(forHeight)
to return the control's preferred width,
enabling applications to easily restrict the resizability of the control.
getMinWidth()
,
setMinWidth(double)
public final DoubleProperty minHeightProperty
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMinHeight(forWidth)
will return the control's internally
computed minimum height.
Setting this value to the USE_PREF_SIZE
flag will cause
getMinHeight(forWidth)
to return the control's preferred height,
enabling applications to easily restrict the resizability of the control.
getMinHeight()
,
setMinHeight(double)
public final DoubleProperty prefWidthProperty
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefWidth(forHeight)
will return the control's internally
computed preferred width.
getPrefWidth()
,
setPrefWidth(double)
public final DoubleProperty prefHeightProperty
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefHeight(forWidth)
will return the control's internally
computed preferred width.
getPrefHeight()
,
setPrefHeight(double)
public final DoubleProperty maxWidthProperty
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMaxWidth(forHeight)
will return the control's internally
computed maximum width.
Setting this value to the USE_PREF_SIZE
flag will cause
getMaxWidth(forHeight)
to return the control's preferred width,
enabling applications to easily restrict the resizability of the control.
getMaxWidth()
,
setMaxWidth(double)
public final DoubleProperty maxHeightProperty
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMaxHeight(forWidth)
will return the control's internally
computed maximum height.
Setting this value to the USE_PREF_SIZE
flag will cause
getMaxHeight(forWidth)
to return the control's preferred height,
enabling applications to easily restrict the resizability of the control.
getMaxHeight()
,
setMaxHeight(double)
protected StringProperty skinClassNameProperty
setSkinClassName(String)
public static final double USE_PREF_SIZE
public static final double USE_COMPUTED_SIZE
public final ObjectProperty<Skin<?>> skinProperty()
Control
. From the
perspective of the Control
, the Skin
is a black box.
It listens and responds to changes in state in a Control
.
There is a one-to-one relationship between a Control
and its
Skin
. Every Skin
maintains a back reference to the
Control
via the Skin.getSkinnable()
method.
A skin may be null.
skinProperty
in interface Skinnable
getSkin()
,
setSkin(Skin)
public final void setSkin(Skin<?> value)
setSkin
in interface Skinnable
Control
. From the
perspective of the Control
, the Skin
is a black box.
It listens and responds to changes in state in a Control
.
There is a one-to-one relationship between a Control
and its
Skin
. Every Skin
maintains a back reference to the
Control
via the Skin.getSkinnable()
method.
A skin may be null.
public final Skin<?> getSkin()
getSkin
in interface Skinnable
Control
. From the
perspective of the Control
, the Skin
is a black box.
It listens and responds to changes in state in a Control
.
There is a one-to-one relationship between a Control
and its
Skin
. Every Skin
maintains a back reference to the
Control
via the Skin.getSkinnable()
method.
A skin may be null.
public final ObjectProperty<Tooltip> tooltipProperty()
getTooltip()
,
setTooltip(Tooltip)
public final void setTooltip(Tooltip value)
public final Tooltip getTooltip()
public final ObjectProperty<ContextMenu> contextMenuProperty()
getContextMenu()
,
setContextMenu(ContextMenu)
public final void setContextMenu(ContextMenu value)
public final ContextMenu getContextMenu()
public final ReadOnlyDoubleProperty widthProperty()
getWidth()
,
setWidth(double)
protected final void setWidth(double value)
public final double getWidth()
public final ReadOnlyDoubleProperty heightProperty()
getHeight()
,
setHeight(double)
protected final void setHeight(double value)
public final double getHeight()
public final DoubleProperty minWidthProperty()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMinWidth(forHeight)
will return the control's internally
computed minimum width.
Setting this value to the USE_PREF_SIZE
flag will cause
getMinWidth(forHeight)
to return the control's preferred width,
enabling applications to easily restrict the resizability of the control.
getMinWidth()
,
setMinWidth(double)
public final void setMinWidth(double value)
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMinWidth(forHeight)
will return the control's internally
computed minimum width.
Setting this value to the USE_PREF_SIZE
flag will cause
getMinWidth(forHeight)
to return the control's preferred width,
enabling applications to easily restrict the resizability of the control.
public final double getMinWidth()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMinWidth(forHeight)
will return the control's internally
computed minimum width.
Setting this value to the USE_PREF_SIZE
flag will cause
getMinWidth(forHeight)
to return the control's preferred width,
enabling applications to easily restrict the resizability of the control.
public final DoubleProperty minHeightProperty()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMinHeight(forWidth)
will return the control's internally
computed minimum height.
Setting this value to the USE_PREF_SIZE
flag will cause
getMinHeight(forWidth)
to return the control's preferred height,
enabling applications to easily restrict the resizability of the control.
getMinHeight()
,
setMinHeight(double)
public final void setMinHeight(double value)
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMinHeight(forWidth)
will return the control's internally
computed minimum height.
Setting this value to the USE_PREF_SIZE
flag will cause
getMinHeight(forWidth)
to return the control's preferred height,
enabling applications to easily restrict the resizability of the control.
public final double getMinHeight()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMinHeight(forWidth)
will return the control's internally
computed minimum height.
Setting this value to the USE_PREF_SIZE
flag will cause
getMinHeight(forWidth)
to return the control's preferred height,
enabling applications to easily restrict the resizability of the control.
public void setMinSize(double minWidth, double minHeight)
minWidth
- the override value for minimum widthminHeight
- the override value for minimum heightsetMinWidth(double)
,
setMinHeight(double)
public final DoubleProperty prefWidthProperty()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefWidth(forHeight)
will return the control's internally
computed preferred width.
getPrefWidth()
,
setPrefWidth(double)
public final void setPrefWidth(double value)
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefWidth(forHeight)
will return the control's internally
computed preferred width.
public final double getPrefWidth()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefWidth(forHeight)
will return the control's internally
computed preferred width.
public final DoubleProperty prefHeightProperty()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefHeight(forWidth)
will return the control's internally
computed preferred width.
getPrefHeight()
,
setPrefHeight(double)
public final void setPrefHeight(double value)
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefHeight(forWidth)
will return the control's internally
computed preferred width.
public final double getPrefHeight()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefHeight(forWidth)
will return the control's internally
computed preferred width.
public void setPrefSize(double prefWidth, double prefHeight)
prefWidth
- the override value for preferred widthprefHeight
- the override value for preferred heightsetPrefWidth(double)
,
setPrefHeight(double)
public final DoubleProperty maxWidthProperty()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMaxWidth(forHeight)
will return the control's internally
computed maximum width.
Setting this value to the USE_PREF_SIZE
flag will cause
getMaxWidth(forHeight)
to return the control's preferred width,
enabling applications to easily restrict the resizability of the control.
getMaxWidth()
,
setMaxWidth(double)
public final void setMaxWidth(double value)
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMaxWidth(forHeight)
will return the control's internally
computed maximum width.
Setting this value to the USE_PREF_SIZE
flag will cause
getMaxWidth(forHeight)
to return the control's preferred width,
enabling applications to easily restrict the resizability of the control.
public final double getMaxWidth()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMaxWidth(forHeight)
will return the control's internally
computed maximum width.
Setting this value to the USE_PREF_SIZE
flag will cause
getMaxWidth(forHeight)
to return the control's preferred width,
enabling applications to easily restrict the resizability of the control.
public final DoubleProperty maxHeightProperty()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMaxHeight(forWidth)
will return the control's internally
computed maximum height.
Setting this value to the USE_PREF_SIZE
flag will cause
getMaxHeight(forWidth)
to return the control's preferred height,
enabling applications to easily restrict the resizability of the control.
getMaxHeight()
,
setMaxHeight(double)
public final void setMaxHeight(double value)
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMaxHeight(forWidth)
will return the control's internally
computed maximum height.
Setting this value to the USE_PREF_SIZE
flag will cause
getMaxHeight(forWidth)
to return the control's preferred height,
enabling applications to easily restrict the resizability of the control.
public final double getMaxHeight()
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getMaxHeight(forWidth)
will return the control's internally
computed maximum height.
Setting this value to the USE_PREF_SIZE
flag will cause
getMaxHeight(forWidth)
to return the control's preferred height,
enabling applications to easily restrict the resizability of the control.
public boolean isResizable()
true
since all Controls are resizable.isResizable
in class Node
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()
public void resize(double width, double height)
setMinSize()
,
setPrefSize()
, or setMaxSize()
and it's parent
will honor those overrides during layout.resize
in class Node
width
- the target layout bounds widthheight
- the target layout bounds heightNode.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()
public final double minWidth(double height)
computeMinWidth(forHeight)
unless
the application overrode the minimum width by setting the minWidth property.minWidth
in class Parent
height
- the height that should be used if minimum width depends on itsetMinWidth(double)
public final double minHeight(double width)
computeMinHeight(forWidth)
unless
the application overrode the minimum height by setting the minHeight property.minHeight
in class Parent
width
- the width that should be used if minimum height depends on itsetMinHeight(double)
public final double prefWidth(double height)
computePrefWidth(forHeight)
unless
the application overrode the preferred width by setting the prefWidth property.prefWidth
in class Parent
height
- the height that should be used if preferred width depends on itsetPrefWidth(double)
public final double prefHeight(double width)
computePrefHeight(forWidth)
unless
the application overrode the preferred height by setting the prefHeight property.prefHeight
in class Parent
width
- the width that should be used if preferred height depends on itsetPrefHeight(double)
public final double maxWidth(double height)
computeMaxWidth(forHeight)
unless
the application overrode the maximum width by setting the maxWidth property.maxWidth
in class Node
height
- the height that should be used if maximum width depends on itsetMaxWidth(double)
public final double maxHeight(double width)
computeMaxHeight(forWidth)
unless
the application overrode the maximum height by setting the maxHeight property.maxHeight
in class Node
width
- the width that should be used if maximum height depends on itsetMaxHeight(double)
public void setMaxSize(double maxWidth, double maxHeight)
maxWidth
- the override value for maximum widthmaxHeight
- the override value for maximum heightsetMaxWidth(double)
,
setMaxHeight(double)
protected double computeMinWidth(double height)
Node.minWidth(double)
method
of the Skin
. If the Skin is null, the returned value is 0.computeMinWidth
in class Parent
height
- The height of the Control, in case this value might dictate
the minimum width.protected double computeMinHeight(double width)
Node.minHeight(double)
method
of the Skin
. If the Skin is null, the returned value is 0.computeMinHeight
in class Parent
width
- The width of the Control, in case this value might dictate
the minimum height.protected double computeMaxWidth(double height)
Node.maxWidth(double)
method
of the Skin
. If the Skin is null, the returned value is 0.height
- The height of the Control, in case this value might dictate
the maximum width.protected double computeMaxHeight(double width)
Node.maxHeight(double)
method
of the Skin
. If the Skin is null, the returned value is 0.width
- The width of the Control, in case this value might dictate
the maximum height.protected double computePrefWidth(double height)
Parent
. The default
implementation calculates this width as the width of the area occupied
by its managed children when they are positioned at their
current positions at their preferred widths.computePrefWidth
in class Parent
height
- the height that should be used if preferred width depends
on itprotected double computePrefHeight(double width)
Parent
. The default
implementation calculates this height as the height of the area occupied
by its managed children when they are positioned at their current
positions at their preferred heights.computePrefHeight
in class Parent
width
- the width that should be used if preferred height depends
on itpublic double getBaselineOffset()
Node.getBaselineOffset()
.getBaselineOffset
in class Parent
protected void layoutChildren()
Parent
. By default it will only set the size of managed,
resizable content to their preferred sizes and does not do any node
positioning.
Subclasses should override this function to layout content as needed.
layoutChildren
in class Parent
public boolean intersects(double localX, double localY, double localWidth, double localHeight)
true
if the given rectangle (specified in the local
coordinate space of this Node
) intersects the shape of this
Node
. Note that this method does not take visibility into
account; the test is based on the geometry of this Node
only.
The default behavior of this function is simply to check if the
given coordinates intersect with the local bounds.intersects
in class Node
protected StringProperty skinClassNameProperty()
setSkinClassName(String)
protected void setSkinClassName(java.lang.String skinClassName)
protected java.lang.String getUserAgentStylesheet()
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to