Top Description Inners Fields Constructors Methods
com.dlsc.gemsfx

public Class PopOver

extends PopupControl
Class Inheritance
Known Direct Subclasses
com.dlsc.gemsfx.PopOver.CalendarPopOver
Imports
com.dlsc.gemsfx.skins.PopOverSkin, javafx.animation.FadeTransition, javafx.beans.property.BooleanProperty, .DoubleProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleObjectProperty, javafx.css.CssMetaData, .PseudoClass, .Styleable, .StyleableDoubleProperty, .StyleableProperty, javafx.css.converter.SizeConverter, javafx.geometry.Bounds, .Pos, javafx.scene.Node, javafx.scene.control.Label, .PopupControl, .Skin, javafx.scene.layout.StackPane, javafx.util.Duration, java.util.ArrayList, .Collections, .List

A control that is intended to provide detailed information about an owning node in a popup window. The popup window has a lightweight appearance (no default window decorations) and an arrow pointing at the owner. Due to the nature of popup windows, the popover will move around with the parent window when the user drags it.

The Popover can be detached from the owning node by dragging it away from the owner.

Example

var textFlow = new TextFlow(new Text("Some content"));
textFlow.setPrefWidth(300);

var popover = new Popover(textFlow);
var ownerLink = new Hyperlink("Show popover");
ownerLink.setOnAction(e -> popover.show(ownerLink));

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
PopOver.ArrowLocation

Locations where the arrow of the popover can be placed.

public static class
PopOver.CalendarPopOver

A specialized popover to let the user select a date or a date range.

private static class

Field Summary

Modifier and TypeField and Description
private final SimpleBooleanProperty
private final ObjectProperty<PopOver.ArrowLocation>
private final ObjectProperty<Node>
private static final double
private static final double
private static final double
private static final Duration
private static final String
private final BooleanProperty
private final BooleanProperty
private static final PseudoClass
private final ObjectProperty<Duration>
private final ObjectProperty<Duration>
private final PopOver.PopOverRoot
private double
private double
Inherited from javafx.scene.control.PopupControl:
bridgeUSE_COMPUTED_SIZEUSE_PREF_SIZE

Constructor Summary

AccessConstructor and Description
public
PopOver()

Creates a popover with a label as the content node.

public
PopOver(Node
The content shown by the popover
content
)

Creates a popover with the given node as the content node.

Method Summary

Modifier and TypeMethod and Description
public final BooleanProperty

Returns:

the "animated" property
animatedProperty
()

Stores the "animated" flag.

public final DoubleProperty

Returns:

the arrow indent property
arrowIndentProperty
()

Controls the distance between the arrow and the corners of the popover.

public final ObjectProperty<PopOver.ArrowLocation>

Returns:

the arrow location property
arrowLocationProperty
()

Stores the preferred arrow location.

public final DoubleProperty

Returns:

the arrow size property
arrowSizeProperty
()

Controls the size of the arrow.

private double
private double
public final ObjectProperty<Node>

Returns:

the content node property
contentNodeProperty
()

Returns the content shown by the popover.

public final DoubleProperty

Returns:

the corner radius property (default is 6)
cornerRadiusProperty
()

Returns the corner radius property for the popover.

protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.PopupControl.createDefaultSkin.

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

public final void
detach()

Detaches the popover from the owning node.

public final BooleanProperty
detachableProperty()

Determines if the popover is detachable at all.

public final BooleanProperty

Returns:

the detached property
detachedProperty
()

Determines whether the popover is detached from the owning node or not.

public final ObjectProperty<Duration>

Returns:

the fade-in duration property
fadeInDurationProperty
()

Stores the fade-in duration.

public final ObjectProperty<Duration>

Returns:

the fade-out duration property
fadeOutDurationProperty
()

Stores the fade-out duration.

public final double

Returns:

the arrow indent value
getArrowIndent
()

Returns the value of the arrow indent property.

public final PopOver.ArrowLocation

Returns:

the preferred arrow location
getArrowLocation
()

Returns the value of the arrow location property.

public final double

Returns:

the arrow size property value
getArrowSize
()

Returns the value of the arrow size property.

public final Node

Returns:

the content node
getContentNode
()

Returns the value of the content property

public final double

Returns:

the corner radius
getCornerRadius
()

Returns the value of the corner radius property.

public final Duration

Returns:

the fade-in duration
getFadeInDuration
()

Returns the value of the fade-in duration property.

public final Duration

Returns:

the fade-out duration
getFadeOutDuration
()

Returns the value of the fade-out duration property.

public final StackPane

Returns:

the root pane
getRoot
()

The root pane stores the content node of the popover.

public final void
hide()

Overrides javafx.stage.PopupWindow.hide.

Hides the popover by quickly changing its opacity to 0.

public final void
hide(Duration
the duration of the fade transition that is being used to change the opacity of the popover
fadeOutDuration
)

Hides the popover by quickly changing its opacity to 0.

public final boolean

Returns:

true if the PopOver will be shown and hidden with a short fade animation
isAnimated
()

Returns the value of the "animated" property.

public final boolean

Returns:

true if the user is allowed to detach / tear off the popover
isDetachable
()

Returns the value of the detachable property.

public final boolean

Returns:

true if the popover is currently detached.
isDetached
()

Returns the value of the detached property.

public final void
setAnimated(boolean
if true, the PopOver will be shown and hidden with a short fade animation
animated
)

Sets the value of the "animated" property.

public final void
setArrowIndent(double
the arrow indent value
size
)

Sets the value of the arrow indent property.

public final void
setArrowLocation(PopOver.ArrowLocation
the requested location
location
)

Sets the value of the arrow location property.

public final void
setArrowSize(double
the new value of the arrow size property
size
)

Sets the value of the arrow size property.

public final void
setContentNode(Node
the new content node value
content
)

Sets the value of the content property.

public final void
setCornerRadius(double
the corner radius
radius
)

Sets the value of the corner radius property.

public final void
setDetachable(boolean
if true, then the user can detach / tear off the popover
detachable
)

Sets the value of the detachable property.

public final void
setDetached(boolean
if true, the popover will change its appearance to "detached" mode
detached
)

Sets the value of the detached property.

public final void
setFadeInDuration(Duration
the requested fade-in duration
duration
)

Sets the value of the fade-in duration property.

public final void
setFadeOutDuration(Duration
the requested fade-out duration
duration
)

Sets the value of the fade-out duration property.

public final void
show(Node
the owner of the popover
owner
)

Shows the popover in a position relative to the edges of the given owner node.

public final void
show(Node
the owner of the popover
owner
,
double
if negative specifies the distance to the owner node, or when positive specifies the number of pixels that the arrow will overlap with the owner node (positive values are recommended)
offset
)

Shows the popover in a position relative to the edges of the given owner node.

public final void
show(Node
the owning node
owner
,
double
the x coordinate for the popover arrow tip
x
,
double
the y coordinate for the popover arrow tip
y
)

Overrides javafx.stage.PopupWindow.show.

Makes the popover visible at the give location and associates it with the given owner node.

public final void
show(Node
the owning node
owner
,
double
the x coordinate for the popover arrow tip
x
,
double
the y coordinate for the popover arrow tip
y
,
Duration
the time it takes for the popover to be fully visible. This duration takes precedence over the fade-in property without setting.
fadeInDuration
)

Makes the popover visible at the give location and associates it with the given owner node.

private void
showFadeInAnimation(Duration fadeInDuration)

Inherited from javafx.scene.control.PopupControl:
getClassCssMetaDatagetCssMetaDatagetIdgetMaxHeightgetMaxWidthgetMinHeightgetMinWidthgetPrefHeightgetPrefWidthgetPseudoClassStatesgetSkingetStylegetStyleableNodegetStyleableParentgetStyleClassgetTypeSelectoridPropertymaxHeightmaxHeightPropertymaxWidthmaxWidthPropertyminHeightminHeightPropertyminWidthminWidthPropertyprefHeightprefHeightPropertyprefWidthprefWidthPropertypseudoClassStateChangedsetIdsetMaxHeightsetMaxSizesetMaxWidthsetMinHeightsetMinSizesetMinWidthsetPrefHeightsetPrefSizesetPrefWidthsetSkinsetStyleskinPropertystyleProperty