public class PopupControl extends PopupWindow implements Skinnable
Type | Property and Description |
---|---|
StringProperty |
id
The id of this
PopupControl . |
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.
|
<any> |
skin
Skin is responsible for rendering this
PopupControl . |
StringProperty |
style |
Modifier and Type | Class and Description |
---|---|
protected class |
PopupControl.CSSBridge
The link between the popup window and the scenegraph.
|
(package private) static class |
PopupControl.CSSBridgeHelper |
Modifier and Type | Field 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 java.lang.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 |
maxHeightCache |
private DoubleProperty |
maxWidth
Property for overriding the control's computed maximum width.
|
private double |
maxWidthCache |
private DoubleProperty |
minHeight
Property for overriding the control's computed minimum height.
|
private double |
minHeightCache |
private DoubleProperty |
minWidth
Property for overriding the control's computed minimum width.
|
private double |
minWidthCache |
private DoubleProperty |
prefHeight
Property for overriding the control's computed preferred height.
|
private double |
prefHeightCache |
private DoubleProperty |
prefWidth
Property for overriding the control's computed preferred width.
|
private double |
prefWidthCache
Cached prefWidth, prefHeight, minWidth, minHeight.
|
private <any> |
skin |
private static <any> |
SKIN
*
StyleSheet Handling *
*
|
private StringProperty |
skinClassName
A property that acts as a proxy between the skin property and css.
|
private boolean |
skinSizeComputed |
private static java.util.List<<any>> |
STYLEABLES |
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.
|
Constructor and Description |
---|
PopupControl()
Create a new empty PopupControl.
|
Modifier and Type | Method and Description |
---|---|
protected Skin<?> |
createDefaultSkin()
Create a new instance of the default skin for this control.
|
static java.util.List<<any>> |
getClassCssMetaData() |
java.util.List<<any>> |
getCssMetaData() |
java.lang.String |
getId()
The id of this
PopupControl . |
double |
getMaxHeight()
Property for overriding the control's computed maximum height.
|
double |
getMaxWidth()
Property for overriding the control's computed maximum width.
|
double |
getMinHeight()
Property for overriding the control's computed minimum height.
|
double |
getMinWidth()
Property for overriding the control's computed minimum width.
|
double |
getPrefHeight()
Property for overriding the control's computed preferred height.
|
double |
getPrefWidth()
Property for overriding the control's computed preferred width.
|
<any> |
getPseudoClassStates() |
Skin<?> |
getSkin()
Gets the value of the property skin.
|
private Node |
getSkinNode()
Gets the Skin's node, or returns null if there is no Skin.
|
java.lang.String |
getStyle()
A string representation of the CSS style associated with this
specific
PopupControl . |
Node |
getStyleableNode() |
Styleable |
getStyleableParent()
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. |
<any> |
getStyleClass()
Returns the list of String identifiers that make up the styleClass
for this PopupControl.
|
java.lang.String |
getTypeSelector() |
StringProperty |
idProperty()
The id of this
PopupControl . |
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 |
pseudoClassStateChanged(PseudoClass pseudoClass,
boolean active) |
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 |
recomputeSkinSize() |
void |
setId(java.lang.String value)
Sets the id of this
PopupControl . |
void |
setMaxHeight(double value)
Property for overriding the control's computed maximum height.
|
void |
setMaxSize(double maxWidth,
double maxHeight)
Convenience method for overriding the control's computed maximum width and height.
|
void |
setMaxWidth(double value)
Property for overriding the control's computed maximum width.
|
void |
setMinHeight(double value)
Property for overriding the control's computed minimum height.
|
void |
setMinSize(double minWidth,
double minHeight)
Convenience method for overriding the control's computed minimum width and height.
|
void |
setMinWidth(double value)
Property for overriding the control's computed minimum width.
|
void |
setPrefHeight(double value)
Property for overriding the control's computed preferred height.
|
void |
setPrefSize(double prefWidth,
double prefHeight)
Convenience method for overriding the control's computed preferred width and height.
|
void |
setPrefWidth(double value)
Property for overriding the control's computed preferred width.
|
void |
setSkin(Skin<?> value)
Sets the value of the property skin.
|
void |
setStyle(java.lang.String value)
A string representation of the CSS style associated with this
specific
PopupControl . |
private StringProperty |
skinClassNameProperty() |
<any> |
skinProperty()
Skin is responsible for rendering this
PopupControl . |
StringProperty |
styleProperty() |
public final StringProperty idProperty
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).getId()
,
setId(String)
public final StringProperty styleProperty
getStyle()
,
setStyle(String)
public final <any> skinProperty
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.
skinProperty
in interface Skinnable
getSkin()
,
setSkin(Skin)
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)
public static final double USE_PREF_SIZE
public static final double USE_COMPUTED_SIZE
protected PopupControl.CSSBridge bridge
private final <any> skin
private java.lang.String currentSkinClassName
private StringProperty skinClassName
private DoubleProperty minWidth
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.
private DoubleProperty minHeight
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.
private DoubleProperty prefWidth
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefWidth(forHeight)
will return the control's internally
computed preferred width.
private DoubleProperty prefHeight
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefHeight(forWidth)
will return the control's internally
computed preferred width.
private DoubleProperty maxWidth
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.
private DoubleProperty maxHeight
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.
private double prefWidthCache
private double prefHeightCache
private double minWidthCache
private double minHeightCache
private double maxWidthCache
private double maxHeightCache
private boolean skinSizeComputed
private static final <any> SKIN
private static final java.util.List<<any>> STYLEABLES
public final StringProperty idProperty()
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).getId()
,
setId(String)
public final void setId(java.lang.String value)
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).value
- the id assigned to this PopupControl
using the setId
method or null
, if no id has been assigned.public final java.lang.String getId()
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).PopupControl
using the setId
method or null
, if no id has been assigned.public final <any> getStyleClass()
public final void setStyle(java.lang.String value)
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.value
- The inline CSS style to use for this PopupControl
.
null
is implicitly converted to an empty String.public final java.lang.String getStyle()
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.PopupControl
.
If this PopupControl
does not have an inline style,
an empty String is returned.public final StringProperty styleProperty()
getStyle()
,
setStyle(String)
public final <any> skinProperty()
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.
skinProperty
in interface Skinnable
getSkin()
,
setSkin(Skin)
public final void setSkin(Skin<?> value)
public final Skin<?> getSkin()
private StringProperty skinClassNameProperty()
private Node getSkinNode()
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.
value
- the minimum widthpublic 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 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 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.
value
- the minimum heightpublic 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 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 void setMinSize(double minWidth, double minHeight)
minWidth
- the override value for minimum widthminHeight
- the override value for minimum heightsetMinWidth(double)
,
setMinHeight(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.
value
- the preferred widthpublic 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 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 setPrefHeight(double value)
Defaults to the USE_COMPUTED_SIZE
flag, which means that
getPrefHeight(forWidth)
will return the control's internally
computed preferred width.
value
- the preferred heightpublic 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 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 void setPrefSize(double prefWidth, double prefHeight)
prefWidth
- the override value for preferred widthprefHeight
- the override value for preferred heightsetPrefWidth(double)
,
setPrefHeight(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.
value
- the maximum widthpublic 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 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 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.
value
- the maximum heightpublic 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 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 void setMaxSize(double maxWidth, double maxHeight)
maxWidth
- the override value for maximum widthmaxHeight
- the override value for maximum heightsetMaxWidth(double)
,
setMaxHeight(double)
public final double minWidth(double height)
minWidth(forHeight)
unless
the application overrode the minimum width by setting the minWidth property.height
- the heightsetMinWidth(double)
public final double minHeight(double width)
minHeight(forWidth)
unless
the application overrode the minimum height by setting the minHeight property.width
- The widthsetMinHeight(double)
public final double prefWidth(double height)
prefWidth(forHeight)
unless
the application overrode the preferred width by setting the prefWidth property.height
- the heightsetPrefWidth(double)
public final double prefHeight(double width)
prefHeight(forWidth)
unless
the application overrode the preferred height by setting the prefHeight property.width
- the widthsetPrefHeight(double)
public final double maxWidth(double height)
maxWidth(forHeight)
unless
the application overrode the maximum width by setting the maxWidth property.height
- the heightsetMaxWidth(double)
public final double maxHeight(double width)
maxHeight(forWidth)
unless
the application overrode the maximum height by setting the maxHeight property.width
- the widthsetMaxHeight(double)
private double recalculateMinWidth(double height)
private double recalculateMinHeight(double width)
private double recalculateMaxWidth(double height)
private double recalculateMaxHeight(double width)
private double recalculatePrefWidth(double height)
private double recalculatePrefHeight(double width)
private void recomputeSkinSize()
protected Skin<?> createDefaultSkin()
-fx-skin
or set explicitly in a sub-class with setSkin(...)
.public static java.util.List<<any>> getClassCssMetaData()
public java.util.List<<any>> getCssMetaData()
public final void pseudoClassStateChanged(PseudoClass pseudoClass, boolean active)
pseudoClass
- the pseudo classactive
- the active stateNode#pseudoClassStateChanged(javafx.css.PseudoClass, boolean)
public java.lang.String getTypeSelector()
public Styleable getStyleableParent()
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.javafx.stage.PopupWindow#getOwnerNode()
, javafx.stage.PopupWindow#getOwnerWindow()
,
or null.public final <any> getPseudoClassStates()
public Node getStyleableNode()