Top Description Inners Fields Constructors Methods
javafx.scene.control

public Class PopupControl

extends PopupWindow
implements Skinnable, Styleable
Class Inheritance
All Implemented Interfaces
javafx.css.Styleable, javafx.scene.control.Skinnable
Known Direct Subclasses
javafx.scene.control.Tooltip, javafx.scene.control.ContextMenu
Imports
java.util.ArrayList, .Collections, .List, javafx.application.Application, javafx.beans.property.DoubleProperty, .DoublePropertyBase, .ObjectProperty, .ObjectPropertyBase, .StringProperty, javafx.collections.FXCollections, .ObservableList, .ObservableSet, javafx.css.CssParser, .CssMetaData, .PseudoClass, .Styleable, .StyleableStringProperty, .StyleableProperty, javafx.scene.Node, .Parent, .Scene, javafx.scene.layout.Pane, javafx.stage.PopupWindow, .Window, com.sun.javafx.application.PlatformImpl, com.sun.javafx.css.StyleManager, com.sun.javafx.scene.NodeHelper, .ParentHelper, javafx.css.converter.StringConverter, com.sun.javafx.scene.control.Logging, com.sun.javafx.scene.layout.PaneHelper, com.sun.javafx.stage.PopupWindowHelper, com.sun.javafx.logging.PlatformLogger, .PlatformLogger.Level

An extension of PopupWindow that allows for CSS styling.
Since
JavaFX 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
PopupControl.CSSBridge

The link between the popup window and the scenegraph.

pack-priv static class

Field Summary

Modifier and TypeField and Description
protected PopupControl.CSSBridge
bridge

We need a special root node, except we can't replace the special root node already in the PopupControl.

private String
currentSkinClassName

Keeps a reference to the name of the class currently acting as the skin.

private DoubleProperty
maxHeight

Property for overriding the control's computed maximum height.

private double
private DoubleProperty
maxWidth

Property for overriding the control's computed maximum width.

private double
private DoubleProperty
minHeight

Property for overriding the control's computed minimum height.

private double
private DoubleProperty
minWidth

Property for overriding the control's computed minimum width.

private double
private DoubleProperty
prefHeight

Property for overriding the control's computed preferred height.

private double
private DoubleProperty
prefWidth

Property for overriding the control's computed preferred width.

private double
prefWidthCache

Cached prefWidth, prefHeight, minWidth, minHeight.

private final ObjectProperty<Skin<?>>
private static final CssMetaData<PopupControl.CSSBridge, String>
private StringProperty
skinClassName

A property that acts as a proxy between the skin property and css.

private boolean
private static final List<CssMetaData<? extends Styleable, ?>>
public static final 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().

public static final 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.

Constructor Summary

AccessConstructor and Description
public
PopupControl()

Creates a new empty PopupControl.

Method Summary

Modifier and TypeMethod and Description
protected Skin<?>

Returns:

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.
createDefaultSkin
()

Create a new instance of the default skin for this control.

public static List<CssMetaData<? extends Styleable, ?>>

Returns:

the CssMetaData
getClassCssMetaData
()

Gets the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

public List<CssMetaData<? extends Styleable, ?>>
getCssMetaData()

Implements javafx.css.Styleable.getCssMetaData.

The CssMetaData of this Styleable.

public final String

Returns:

the id assigned to this PopupControl using the setId method or null, if no id has been assigned.
getId
()

Implements javafx.css.Styleable.getId.

The id of this PopupControl.

public final double

Returns:

the maximum height
getMaxHeight
()

Property for overriding the control's computed maximum height.

public final double

Returns:

the maximum width
getMaxWidth
()

Property for overriding the control's computed maximum width.

public final double

Returns:

the minimum height
getMinHeight
()

Property for overriding the control's computed minimum height.

public final double

Returns:

the minimum width
getMinWidth
()

Property for overriding the control's computed minimum width.

public final double

Returns:

the preferred height
getPrefHeight
()

Property for overriding the control's computed preferred height.

public final double

Returns:

the preferred width
getPrefWidth
()

Property for overriding the control's computed preferred width.

public final ObservableSet<PseudoClass>
getPseudoClassStates()

Implements javafx.css.Styleable.getPseudoClassStates.

Return the pseudo-class state of this Styleable.

public final Skin<?>
private Node

Returns:

The Skin's node, or null.
getSkinNode
()

Gets the Skin's node, or returns null if there is no Skin.

public final String
getStyle()

Implements javafx.css.Styleable.getStyle.

A string representation of the CSS style associated with this specific Node.

public Node
getStyleableNode()

Overrides default javafx.css.Styleable.getStyleableNode.

Returns the Node that represents this Styleable object.

public Styleable
getStyleableParent()

Implements javafx.css.Styleable.getStyleableParent.

Return the parent of this Styleable, or null if there is no parent.

public final ObservableList<String>
getStyleClass()

Implements javafx.css.Styleable.getStyleClass.

Returns the list of String identifiers that make up the styleClass for this PopupControl.

public String

Returns:

"PopupControl"
getTypeSelector
()

Implements javafx.css.Styleable.getTypeSelector.

The type of this Styleable that is to be used in selector matching.

public final StringProperty

Returns:

the id property
idProperty
()

The id of this PopupControl.

public final double

Returns:

the maximum height that this node should be resized to during layout
maxHeight
(double
the width
width
)

Called during layout to determine the maximum height for this node.

public final DoubleProperty
public final double

Returns:

the maximum width that this node should be resized to during layout
maxWidth
(double
the height
height
)

Called during layout to determine the maximum width for this node.

public final DoubleProperty
public final double

Returns:

the minimum height that this node should be resized to during layout
minHeight
(double
The width
width
)

Called during layout to determine the minimum height for this node.

public final DoubleProperty
public final double

Returns:

the minimum width that this node should be resized to during layout
minWidth
(double
the height
height
)

Called during layout to determine the minimum width for this node.

public final DoubleProperty
public final double

Returns:

the preferred height that this node should be resized to during layout
prefHeight
(double
the width
width
)

Called during layout to determine the preferred height for this node.

public final DoubleProperty
public final double

Returns:

the preferred width that this node should be resized to during layout
prefWidth
(double
the height
height
)

Called during layout to determine the preferred width for this node.

public final DoubleProperty
public final void
pseudoClassStateChanged(PseudoClass
the pseudo class
pseudoClass
,
boolean
the active state
active
)

Used to specify that a pseudo-class of this node has changed.

private double
recalculateMaxHeight(double width)

private double
recalculateMaxWidth(double height)

private double
recalculateMinHeight(double width)

private double
recalculateMinWidth(double height)

private double
recalculatePrefHeight(double width)

private double
recalculatePrefWidth(double height)

private void
public final void
setId(String
the id assigned to this PopupControl using the setId method or null, if no id has been assigned.
value
)

Sets the id of this PopupControl.

public final void
setMaxHeight(double
the maximum height
value
)

Property for overriding the control's computed maximum height.

public void
setMaxSize(double
the override value for maximum width
maxWidth
,
double
the override value for maximum height
maxHeight
)

Convenience method for overriding the control's computed maximum width and height.

public final void
setMaxWidth(double
the maximum width
value
)

Property for overriding the control's computed maximum width.

public final void
setMinHeight(double
the minimum height
value
)

Property for overriding the control's computed minimum height.

public void
setMinSize(double
the override value for minimum width
minWidth
,
double
the override value for minimum height
minHeight
)

Convenience method for overriding the control's computed minimum width and height.

public final void
setMinWidth(double
the minimum width
value
)

Property for overriding the control's computed minimum width.

public final void
setPrefHeight(double
the preferred height
value
)

Property for overriding the control's computed preferred height.

public void
setPrefSize(double
the override value for preferred width
prefWidth
,
double
the override value for preferred height
prefHeight
)

Convenience method for overriding the control's computed preferred width and height.

public final void
setPrefWidth(double
the preferred width
value
)

Property for overriding the control's computed preferred width.

public final void
public final void
private StringProperty
public final ObjectProperty<Skin<?>>
skinProperty()

Implements javafx.scene.control.Skinnable.skinProperty.

Skin is responsible for rendering this PopupControl.

public final StringProperty

Returns:

the style property
styleProperty
()

A string representation of the CSS style associated with this specific PopupControl.

Inherited from javafx.stage.PopupWindow:
anchorLocationPropertyanchorXPropertyanchorYPropertyautoFixPropertyautoHidePropertyconsumeAutoHidingEventsPropertygetAnchorLocationgetAnchorXgetAnchorYgetConsumeAutoHidingEventsgetOnAutoHidegetOwnerNodegetOwnerWindowhidehideOnEscapePropertyisAutoFixisAutoHideisHideOnEscapeonAutoHidePropertyownerNodePropertyownerWindowPropertysetAnchorLocationsetAnchorXsetAnchorYsetAutoFixsetAutoHidesetConsumeAutoHidingEventssetHideOnEscapesetOnAutoHidesetSceneshowshowshow

Field Detail

bridgeback to summary
protected PopupControl.CSSBridge bridge

We need a special root node, except we can't replace the special root node already in the PopupControl. So we'll set our own special almost-root node that is a child of the root. This special root node is responsible for mapping the id, styleClass, and style defined on the PopupControl such that CSS will read the values from the PopupControl, and then apply CSS state to that special node. The node will then be able to pass cssSet calls along, such that any subclass of PopupControl will be able to use the Styleable properties and we'll be able to style it from CSS, in such a way that it participates and applies to the skin, exactly the way that normal Skin's work for normal Controls.

Since
JavaFX 2.1
currentSkinClassNameback to summary
private String currentSkinClassName

Keeps a reference to the name of the class currently acting as the skin.

maxHeightback to summary
private DoubleProperty maxHeight

Property for overriding the control's computed maximum height. This should only be set if the control's internally computed maximum height doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that maxHeight(forWidth) will return the control's internally computed maximum height.

Setting this value to the USE_PREF_SIZE flag will cause maxHeight(forWidth) to return the control's preferred height, enabling applications to easily restrict the resizability of the control.

maxHeightCacheback to summary
private double maxHeightCache
maxWidthback to summary
private DoubleProperty maxWidth

Property for overriding the control's computed maximum width. This should only be set if the control's internally computed maximum width doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that maxWidth(forHeight) will return the control's internally computed maximum width.

Setting this value to the USE_PREF_SIZE flag will cause maxWidth(forHeight) to return the control's preferred width, enabling applications to easily restrict the resizability of the control.

maxWidthCacheback to summary
private double maxWidthCache
minHeightback to summary
private DoubleProperty minHeight

Property for overriding the control's computed minimum height. This should only be set if the control's internally computed minimum height doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that minHeight(forWidth) will return the control's internally computed minimum height.

Setting this value to the USE_PREF_SIZE flag will cause minHeight(forWidth) to return the control's preferred height, enabling applications to easily restrict the resizability of the control.

minHeightCacheback to summary
private double minHeightCache
minWidthback to summary
private DoubleProperty minWidth

Property for overriding the control's computed minimum width. This should only be set if the control's internally computed minimum width doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that minWidth(forHeight) will return the control's internally computed minimum width.

Setting this value to the USE_PREF_SIZE flag will cause minWidth(forHeight) to return the control's preferred width, enabling applications to easily restrict the resizability of the control.

minWidthCacheback to summary
private double minWidthCache
prefHeightback to summary
private DoubleProperty prefHeight

Property for overriding the control's computed preferred height. This should only be set if the control's internally computed preferred height doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that prefHeight(forWidth) will return the control's internally computed preferred width.

prefHeightCacheback to summary
private double prefHeightCache
prefWidthback to summary
private DoubleProperty prefWidth

Property for overriding the control's computed preferred width. This should only be set if the control's internally computed preferred width doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that prefWidth(forHeight) will return the control's internally computed preferred width.

prefWidthCacheback to summary
private double prefWidthCache

Cached prefWidth, prefHeight, minWidth, minHeight. These results are repeatedly sought during the layout pass, and caching the results leads to a significant decrease in overhead.

skinback to summary
private final ObjectProperty<Skin<?>> skin
SKINback to summary
private static final CssMetaData<PopupControl.CSSBridge, String> SKIN
skinClassNameback to summary
private StringProperty skinClassName

A property that acts as a proxy between the skin property and css.

skinSizeComputedback to summary
private boolean skinSizeComputed
STYLEABLESback to summary
private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES
USE_COMPUTED_SIZEback to summary
public static final 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().

USE_PREF_SIZEback to summary
public static final 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.

Constructor Detail

PopupControlback to summary
public PopupControl()

Creates a new empty PopupControl.

Method Detail

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Returns:Skin<?>

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Since
JavaFX 8.0
getClassCssMetaDataback to summary
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData()

Gets the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

Returns:List<CssMetaData<? extends Styleable, ?>>

the CssMetaData

Since
JavaFX 8.0
getCssMetaDataback to summary
public List<CssMetaData<? extends Styleable, ?>> getCssMetaData()

Implements javafx.css.Styleable.getCssMetaData.

Doc from javafx.css.Styleable.getCssMetaData.

The CssMetaData of this Styleable. This may be returned as an unmodifiable list.

Annotations
@Override
Since
JavaFX 8.0
getIdback to summary
public final String getId()

Implements javafx.css.Styleable.getId.

The id of this PopupControl. This simple string identifier is useful for finding a specific Node within the scene graph. While the id of a Node should be unique within the scene graph, this uniqueness is not enforced. This is analogous to the "id" attribute on an HTML element (CSS ID Specification).

Returns:String

the id assigned to this PopupControl using the setId method or null, if no id has been assigned.

Annotations
@Override
Default Value
null
getMaxHeightback to summary
public final double getMaxHeight()

Property for overriding the control's computed maximum height. This should only be set if the control's internally computed maximum height doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that maxHeight(forWidth) will return the control's internally computed maximum height.

Setting this value to the USE_PREF_SIZE flag will cause maxHeight(forWidth) to return the control's preferred height, enabling applications to easily restrict the resizability of the control.

Returns:double

the maximum height

getMaxWidthback to summary
public final double getMaxWidth()

Property for overriding the control's computed maximum width. This should only be set if the control's internally computed maximum width doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that maxWidth(forHeight) will return the control's internally computed maximum width.

Setting this value to the USE_PREF_SIZE flag will cause maxWidth(forHeight) to return the control's preferred width, enabling applications to easily restrict the resizability of the control.

Returns:double

the maximum width

getMinHeightback to summary
public final double getMinHeight()

Property for overriding the control's computed minimum height. This should only be set if the control's internally computed minimum height doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that minHeight(forWidth) will return the control's internally computed minimum height.

Setting this value to the USE_PREF_SIZE flag will cause minHeight(forWidth) to return the control's preferred height, enabling applications to easily restrict the resizability of the control.

Returns:double

the minimum height

getMinWidthback to summary
public final double getMinWidth()

Property for overriding the control's computed minimum width. This should only be set if the control's internally computed minimum width doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that minWidth(forHeight) will return the control's internally computed minimum width.

Setting this value to the USE_PREF_SIZE flag will cause minWidth(forHeight) to return the control's preferred width, enabling applications to easily restrict the resizability of the control.

Returns:double

the minimum width

getPrefHeightback to summary
public final double getPrefHeight()

Property for overriding the control's computed preferred height. This should only be set if the control's internally computed preferred height doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that prefHeight(forWidth) will return the control's internally computed preferred width.

Returns:double

the preferred height

getPrefWidthback to summary
public final double getPrefWidth()

Property for overriding the control's computed preferred width. This should only be set if the control's internally computed preferred width doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that prefWidth(forHeight) will return the control's internally computed preferred width.

Returns:double

the preferred width

getPseudoClassStatesback to summary
public final ObservableSet<PseudoClass> getPseudoClassStates()

Implements javafx.css.Styleable.getPseudoClassStates.

Doc from javafx.css.Styleable.getPseudoClassStates.

Return the pseudo-class state of this Styleable. CSS assumes this set is read-only.

Annotations
@Override
Since
JavaFX 8.0
getSkinback to summary
public final Skin<?> getSkin()

Implements javafx.scene.control.Skinnable.getSkin.

Annotations
@Override
getSkinNodeback to summary
private Node getSkinNode()

Gets the Skin's node, or returns null if there is no Skin. Convenience method for getting the node of the skin. This is null-safe, meaning if skin is null then it will return null instead of throwing a NullPointerException.

Returns:Node

The Skin's node, or null.

getStyleback to summary
public final String getStyle()

Implements javafx.css.Styleable.getStyle.

Doc from javafx.css.Styleable.getStyle.

A string representation of the CSS style associated with this specific Node. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.

Annotations
@Override
getStyleableNodeback to summary
public Node getStyleableNode()

Overrides default javafx.css.Styleable.getStyleableNode.

Doc from javafx.css.Styleable.getStyleableNode.

Returns the Node that represents this Styleable object. This method should be overridden in cases where the Styleable is not itself a Node, so that it may optionally return the relevant root node representation of itself. By default this method returns null, which can mean that either the Styleable itself is a Node, or if that is not the case, that the Styleable does not have a node representation available at the time of request.

Annotations
@Override
getStyleableParentback to summary
public Styleable getStyleableParent()

Implements javafx.css.Styleable.getStyleableParent.

Doc from javafx.css.Styleable.getStyleableParent.

Return the parent of this Styleable, or null if there is no parent. A PopupControl's styles are based on the popup "owner" which is the ownerNode or, if the ownerNode is not set, the root of the ownerWindow's scene. If the popup has not been shown, both ownerNode and ownerWindow will be null and null will be returned. Note that the PopupWindow's scene root is not returned because there is no way to guarantee that the PopupWindow's scene root would properly return the ownerNode or ownerWindow.

Returns:Styleable

javafx.stage.PopupWindow#getOwnerNode(), javafx.stage.PopupWindow#getOwnerWindow(), or null.

Annotations
@Override
Since
JavaFX 8.0
getStyleClassback to summary
public final ObservableList<String> getStyleClass()

Implements javafx.css.Styleable.getStyleClass.

Returns the list of String identifiers that make up the styleClass for this PopupControl.

Annotations
@Override
getTypeSelectorback to summary
public String getTypeSelector()

Implements javafx.css.Styleable.getTypeSelector.

Doc from javafx.css.Styleable.getTypeSelector.

The type of this Styleable that is to be used in selector matching. This is analogous to an "element" in HTML. (CSS Type Selector).

Returns:String

"PopupControl"

Annotations
@Override
Since
JavaFX 8.0
idPropertyback to summary
public final StringProperty idProperty()

The id of this PopupControl. This simple string identifier is useful for finding a specific Node within the scene graph. While the id of a Node should be unique within the scene graph, this uniqueness is not enforced. This is analogous to the "id" attribute on an HTML element (CSS ID Specification).

Returns:StringProperty

the id property

Default Value
null
maxHeightback to summary
public final double maxHeight(double width)

Called during layout to determine the maximum height for this node. Returns the value from maxHeight(forWidth) unless the application overrode the maximum height by setting the maxHeight property.

Parameters
width:double

the width

Returns:double

the maximum height that this node should be resized to during layout

See Also
setMaxHeight
maxHeightPropertyback to summary
public final DoubleProperty maxHeightProperty()
maxWidthback to summary
public final double maxWidth(double height)

Called during layout to determine the maximum width for this node. Returns the value from maxWidth(forHeight) unless the application overrode the maximum width by setting the maxWidth property.

Parameters
height:double

the height

Returns:double

the maximum width that this node should be resized to during layout

See Also
setMaxWidth
maxWidthPropertyback to summary
public final DoubleProperty maxWidthProperty()
minHeightback to summary
public final double minHeight(double width)

Called during layout to determine the minimum height for this node. Returns the value from minHeight(forWidth) unless the application overrode the minimum height by setting the minHeight property.

Parameters
width:double

The width

Returns:double

the minimum height that this node should be resized to during layout

See Also
setMinHeight
minHeightPropertyback to summary
public final DoubleProperty minHeightProperty()
minWidthback to summary
public final double minWidth(double height)

Called during layout to determine the minimum width for this node. Returns the value from minWidth(forHeight) unless the application overrode the minimum width by setting the minWidth property.

Parameters
height:double

the height

Returns:double

the minimum width that this node should be resized to during layout

See Also
setMinWidth
minWidthPropertyback to summary
public final DoubleProperty minWidthProperty()
prefHeightback to summary
public final double prefHeight(double width)

Called during layout to determine the preferred height for this node. Returns the value from prefHeight(forWidth) unless the application overrode the preferred height by setting the prefHeight property.

Parameters
width:double

the width

Returns:double

the preferred height that this node should be resized to during layout

See Also
setPrefHeight
prefHeightPropertyback to summary
public final DoubleProperty prefHeightProperty()
prefWidthback to summary
public final double prefWidth(double height)

Called during layout to determine the preferred width for this node. Returns the value from prefWidth(forHeight) unless the application overrode the preferred width by setting the prefWidth property.

Parameters
height:double

the height

Returns:double

the preferred width that this node should be resized to during layout

See Also
setPrefWidth
prefWidthPropertyback to summary
public final DoubleProperty prefWidthProperty()
pseudoClassStateChangedback to summary
public final void pseudoClassStateChanged(PseudoClass pseudoClass, boolean active)

Used to specify that a pseudo-class of this node has changed.

Parameters
pseudoClass:PseudoClass

the pseudo class

active:boolean

the active state

Since
JavaFX 8.0
See Also
Node#pseudoClassStateChanged(javafx.css.PseudoClass, boolean)
recalculateMaxHeightback to summary
private double recalculateMaxHeight(double width)
recalculateMaxWidthback to summary
private double recalculateMaxWidth(double height)
recalculateMinHeightback to summary
private double recalculateMinHeight(double width)
recalculateMinWidthback to summary
private double recalculateMinWidth(double height)
recalculatePrefHeightback to summary
private double recalculatePrefHeight(double width)
recalculatePrefWidthback to summary
private double recalculatePrefWidth(double height)
recomputeSkinSizeback to summary
private void recomputeSkinSize()
setIdback to summary
public final void setId(String value)

Sets the id of this PopupControl. This simple string identifier is useful for finding a specific Node within the scene graph. While the id of a Node should be unique within the scene graph, this uniqueness is not enforced. This is analogous to the "id" attribute on an HTML element (CSS ID Specification).

Parameters
value:String

the id assigned to this PopupControl using the setId method or null, if no id has been assigned.

Default Value
null
setMaxHeightback to summary
public final void setMaxHeight(double value)

Property for overriding the control's computed maximum height. This should only be set if the control's internally computed maximum height doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that maxHeight(forWidth) will return the control's internally computed maximum height.

Setting this value to the USE_PREF_SIZE flag will cause maxHeight(forWidth) to return the control's preferred height, enabling applications to easily restrict the resizability of the control.

Parameters
value:double

the maximum height

setMaxSizeback to summary
public void setMaxSize(double maxWidth, double maxHeight)

Convenience method for overriding the control's computed maximum width and height. This should only be called if the control's internally computed maximum size doesn't meet the application's layout needs.

Parameters
maxWidth:double

the override value for maximum width

maxHeight:double

the override value for maximum height

See Also
setMaxWidth, setMaxHeight
setMaxWidthback to summary
public final void setMaxWidth(double value)

Property for overriding the control's computed maximum width. This should only be set if the control's internally computed maximum width doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that maxWidth(forHeight) will return the control's internally computed maximum width.

Setting this value to the USE_PREF_SIZE flag will cause maxWidth(forHeight) to return the control's preferred width, enabling applications to easily restrict the resizability of the control.

Parameters
value:double

the maximum width

setMinHeightback to summary
public final void setMinHeight(double value)

Property for overriding the control's computed minimum height. This should only be set if the control's internally computed minimum height doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that minHeight(forWidth) will return the control's internally computed minimum height.

Setting this value to the USE_PREF_SIZE flag will cause minHeight(forWidth) to return the control's preferred height, enabling applications to easily restrict the resizability of the control.

Parameters
value:double

the minimum height

setMinSizeback to summary
public void setMinSize(double minWidth, double minHeight)

Convenience method for overriding the control's computed minimum width and height. This should only be called if the control's internally computed minimum size doesn't meet the application's layout needs.

Parameters
minWidth:double

the override value for minimum width

minHeight:double

the override value for minimum height

See Also
setMinWidth, setMinHeight
setMinWidthback to summary
public final void setMinWidth(double value)

Property for overriding the control's computed minimum width. This should only be set if the control's internally computed minimum width doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that minWidth(forHeight) will return the control's internally computed minimum width.

Setting this value to the USE_PREF_SIZE flag will cause minWidth(forHeight) to return the control's preferred width, enabling applications to easily restrict the resizability of the control.

Parameters
value:double

the minimum width

setPrefHeightback to summary
public final void setPrefHeight(double value)

Property for overriding the control's computed preferred height. This should only be set if the control's internally computed preferred height doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that prefHeight(forWidth) will return the control's internally computed preferred width.

Parameters
value:double

the preferred height

setPrefSizeback to summary
public void setPrefSize(double prefWidth, double prefHeight)

Convenience method for overriding the control's computed preferred width and height. This should only be called if the control's internally computed preferred size doesn't meet the application's layout needs.

Parameters
prefWidth:double

the override value for preferred width

prefHeight:double

the override value for preferred height

See Also
setPrefWidth, setPrefHeight
setPrefWidthback to summary
public final void setPrefWidth(double value)

Property for overriding the control's computed preferred width. This should only be set if the control's internally computed preferred width doesn't meet the application's layout needs.

Defaults to the USE_COMPUTED_SIZE flag, which means that prefWidth(forHeight) will return the control's internally computed preferred width.

Parameters
value:double

the preferred width

setSkinback to summary
public final void setSkin(Skin<?> value)

Implements javafx.scene.control.Skinnable.setSkin.

Annotations
@Override
setStyleback to summary
public final void setStyle(String value)
skinClassNamePropertyback to summary
private StringProperty skinClassNameProperty()
skinPropertyback to summary
public final ObjectProperty<Skin<?>> skinProperty()

Implements javafx.scene.control.Skinnable.skinProperty.

Skin is responsible for rendering this PopupControl. From the perspective of the PopupControl, the Skin is a black box. It listens and responds to changes in state in a PopupControl.

There is a one-to-one relationship between a PopupControl and its Skin. Every Skin maintains a back reference to the PopupControl.

A skin may be null.

Annotations
@Override
stylePropertyback to summary
public final StringProperty styleProperty()

A string representation of the CSS style associated with this specific PopupControl. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.

A value of null is implicitly converted to an empty String.

Returns:StringProperty

the style property

Default Value
null
javafx.scene.control back to summary

protected Class PopupControl.CSSBridge

extends Pane
Class Inheritance
Known Direct Subclasses
javafx.scene.control.Tooltip.CSSBridge

The link between the popup window and the scenegraph.
Since
JavaFX 2.1

Field Summary

Modifier and TypeField and Description
private final PopupControl

Constructor Summary

AccessConstructor and Description
protected
CSSBridge()

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
private List<String>
private void
public List<CssMetaData<? extends Styleable, ?>>
getCssMetaData()

Overrides javafx.scene.layout.Region.getCssMetaData.

Implements javafx.css.Styleable.getCssMetaData.

This method should delegate to Node#getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.

public Styleable

Returns:

the styleable parent
getStyleableParent
()

Overrides javafx.scene.Node.getStyleableParent.

Implements javafx.css.Styleable.getStyleableParent.

This method should be treated as final and should not be overridden by any subclasses of CSSBridge.

public void
requestLayout()

Overrides javafx.scene.Parent.requestLayout.

Requests a layout pass to be performed before the next scene is rendered.

Inherited from javafx.scene.layout.Pane:
getChildren

Field Detail

popupControlback to summary
private final PopupControl popupControl

Constructor Detail

CSSBridgeback to summary
protected CSSBridge()

Constructor for subclasses to call.

Method Detail

doGetAllParentStylesheetsback to summary
private List<String> doGetAllParentStylesheets()

Hides javafx.scene.Parent.doGetAllParentStylesheets.

doProcessCSSback to summary
private void doProcessCSS()

Hides javafx.scene.Parent.doProcessCSS.

getCssMetaDataback to summary
public List<CssMetaData<? extends Styleable, ?>> getCssMetaData()

Overrides javafx.scene.layout.Region.getCssMetaData.

Implements javafx.css.Styleable.getCssMetaData.

Doc from javafx.scene.layout.Region.getCssMetaData.

This method should delegate to Node#getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.

Annotations
@Override
getStyleableParentback to summary
public Styleable getStyleableParent()

Overrides javafx.scene.Node.getStyleableParent.

Implements javafx.css.Styleable.getStyleableParent.

This method should be treated as final and should not be overridden by any subclasses of CSSBridge.

Returns:Styleable

the styleable parent

Annotations
@Override
requestLayoutback to summary
public void requestLayout()

Overrides javafx.scene.Parent.requestLayout.

Requests a layout pass to be performed before the next scene is rendered. This is batched up asynchronously to happen once per "pulse", or frame of animation.

If this parent is either a layout root or unmanaged, then it will be added directly to the scene's dirty layout list, otherwise requestLayout will be invoked on its parent.

Annotations
@Override
javafx.scene.control back to summary

pack-priv final Class PopupControl.CSSBridgeHelper

extends PaneHelper
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final PopupControl.CSSBridgeHelper

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected List<String>
private static PopupControl.CSSBridgeHelper
public static void
protected void
public static void
pack-priv void
Inherited from com.sun.javafx.scene.layout.PaneHelper:
initHelpersetPaneAccessor

Field Detail

theInstanceback to summary
private static final PopupControl.CSSBridgeHelper theInstance

Hides com.sun.javafx.scene.layout.PaneHelper.theInstance.

Constructor Detail

CSSBridgeHelperback to summary
pack-priv CSSBridgeHelper()

Method Detail

getAllParentStylesheetsImplback to summary
protected List<String> getAllParentStylesheetsImpl(Parent parent)

Overrides com.sun.javafx.scene.ParentHelper.getAllParentStylesheetsImpl.

Annotations
@Override
getInstanceback to summary
private static PopupControl.CSSBridgeHelper getInstance()

Hides com.sun.javafx.scene.layout.PaneHelper.getInstance.

initHelperback to summary
public static void initHelper(PopupControl.CSSBridge cssBridge)
processCSSImplback to summary
protected void processCSSImpl(Node node)

Overrides com.sun.javafx.scene.ParentHelper.processCSSImpl.

Annotations
@Override
superProcessCSSback to summary
public static void superProcessCSS(Node node)

Hides com.sun.javafx.scene.ParentHelper.superProcessCSS.

superProcessCSSImplback to summary
pack-priv void superProcessCSSImpl(Node node)

Hides com.sun.javafx.scene.ParentHelper.superProcessCSSImpl.