public class PopupControl extends PopupWindow implements Skinnable, Styleable
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.
|
ObjectProperty<Skin<?>> |
skin
Skin is responsible for rendering this
PopupControl . |
StringProperty |
style |
anchorLocation, anchorX, anchorY, autoFix, autoHide, consumeAutoHidingEvents, hideOnEscape, onAutoHide, ownerNode, ownerWindow
Modifier and Type | Class and Description |
---|---|
protected class |
PopupControl.CSSBridge
The link between the popup window and the scenegraph.
|
PopupWindow.AnchorLocation
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.
|
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 List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
List<CssMetaData<? extends Styleable,?>> |
getCssMetaData()
The CssMetaData of this Styleable.
|
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.
|
ObservableSet<PseudoClass> |
getPseudoClassStates()
Return the pseudo-class state of this Styleable.
|
Skin<?> |
getSkin()
Gets the value of the property skin.
|
String |
getStyle()
A string representation of the CSS style associated with this
specific
PopupControl . |
Styleable |
getStyleableParent()
Return the parent of this Styleable, or null if there is no parent.
|
ObservableList<String> |
getStyleClass()
Returns the list of String identifiers that make up the styleClass
for this PopupControl.
|
String |
getTypeSelector()
The type of this
Styleable that is to be used in selector matching. |
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) |
void |
setId(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(String value)
A string representation of the CSS style associated with this
specific
PopupControl . |
ObjectProperty<Skin<?>> |
skinProperty()
Skin is responsible for rendering this
PopupControl . |
StringProperty |
styleProperty() |
anchorLocationProperty, anchorXProperty, anchorYProperty, autoFixProperty, autoHideProperty, consumeAutoHidingEventsProperty, getAnchorLocation, getAnchorX, getAnchorY, getConsumeAutoHidingEvents, getOnAutoHide, getOwnerNode, getOwnerWindow, hide, hideOnEscapeProperty, isAutoFix, isAutoHide, isHideOnEscape, onAutoHideProperty, ownerNodeProperty, ownerWindowProperty, setAnchorLocation, setAnchorX, setAnchorY, setAutoFix, setAutoHide, setConsumeAutoHidingEvents, setHideOnEscape, setOnAutoHide, setScene, show, show, show
addEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getProperties, getScene, getUserData, getWidth, getX, getY, hasProperties, heightProperty, isFocused, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, removeEventFilter, removeEventHandler, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setUserData, setWidth, setX, setY, show, showingProperty, sizeToScene, widthProperty, xProperty, yProperty
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 ObjectProperty<Skin<?>> 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
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(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 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).public final ObservableList<String> getStyleClass()
getStyleClass
in interface Styleable
public final void setStyle(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 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.public final StringProperty styleProperty()
getStyle()
,
setStyle(String)
public final ObjectProperty<Skin<?>> 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)
setSkin
in interface Skinnable
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.
public final Skin<?> getSkin()
getSkin
in interface Skinnable
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.
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 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.
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 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.
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 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.
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 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.
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 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.
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 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)
protected Skin<?> createDefaultSkin()
-fx-skin
or set explicitly in a sub-class with setSkin(...)
.public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
getCssMetaData
in interface Styleable
public final void pseudoClassStateChanged(PseudoClass pseudoClass, boolean active)
Node.pseudoClassStateChanged(javafx.css.PseudoClass, boolean)
public String getTypeSelector()
Styleable
that is to be used in selector matching.
This is analogous to an "element" in HTML.
(CSS Type Selector).getTypeSelector
in interface Styleable
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.getStyleableParent
in interface Styleable
PopupWindow.getOwnerNode()
, PopupWindow.getOwnerWindow()
,
or null.public final ObservableSet<PseudoClass> getPseudoClassStates()
getPseudoClassStates
in interface Styleable
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.