Top Description Fields Constructors Methods
com.dlsc.workbenchfx.model

public final Class WorkbenchOverlay

extends Object
Class Inheritance
Imports
com.dlsc.workbenchfx.Workbench, com.dlsc.workbenchfx.view.controls.GlassPane, java.util.Objects, javafx.animation.TranslateTransition, javafx.beans.property.ObjectProperty, .SimpleObjectProperty, javafx.event.Event, .EventHandler, javafx.geometry.Side, javafx.scene.layout.Region

Represents the model class of an overlay.

An overlay can be shown using:
Workbench#showOverlay(Region, boolean)
Workbench#showDialog(WorkbenchDialog)
Workbench#showDrawer(Region, Side)

Authors
François Martin, Marco Sanfratello

Field Summary

Modifier and TypeField and Description
private final TranslateTransition
private final TranslateTransition
private final GlassPane
private boolean
private final ObjectProperty<EventHandler<Event>>
private final Region

Constructor Summary

AccessConstructor and Description
public
WorkbenchOverlay(Region
to be shown as the main content node
overlay
,
GlassPane
to be shown in the background of the overlay
glassPane
)

Initializes a new non-animated overlay.

public
WorkbenchOverlay(Region
to be shown as the main content node
overlay
,
GlassPane
to be shown in the background of the overlay
glassPane
,
TranslateTransition
animation that should be played when the overlay is being shown
animationStart
,
TranslateTransition
animation that should be played when the overlay is being hidden
animationEnd
)

Initializes a new animated overlay.

Method Summary

Modifier and TypeMethod and Description
public final TranslateTransition
public final TranslateTransition
public final GlassPane
public final EventHandler<Event>
public final Region
private void
initialize(Region overlay)

public final boolean

Returns:

whether or not this overlay is animated.
isAnimated
()

Returns whether or not this overlay is animated.

public final boolean
public final ObjectProperty<EventHandler<Event>>

Returns:

the ObjectProperty of the EventHandler which will be triggered upon initialization
onInitializedProperty
()

Enables to define actions that should be performed when an overlay is initialized.

private void
setInitialized(boolean initialized)

public final void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

animationEndback to summary
private final TranslateTransition animationEnd
animationStartback to summary
private final TranslateTransition animationStart
glassPaneback to summary
private final GlassPane glassPane
initializedback to summary
private boolean initialized
onInitializedback to summary
private final ObjectProperty<EventHandler<Event>> onInitialized
overlayback to summary
private final Region overlay

Constructor Detail

WorkbenchOverlayback to summary
public WorkbenchOverlay(Region overlay, GlassPane glassPane)

Initializes a new non-animated overlay.

Parameters
overlay:Region

to be shown as the main content node

glassPane:GlassPane

to be shown in the background of the overlay

WorkbenchOverlayback to summary
public WorkbenchOverlay(Region overlay, GlassPane glassPane, TranslateTransition animationStart, TranslateTransition animationEnd)

Initializes a new animated overlay.

Parameters
overlay:Region

to be shown as the main content node

glassPane:GlassPane

to be shown in the background of the overlay

animationStart:TranslateTransition

animation that should be played when the overlay is being shown

animationEnd:TranslateTransition

animation that should be played when the overlay is being hidden

Method Detail

getAnimationEndback to summary
public final TranslateTransition getAnimationEnd()
getAnimationStartback to summary
public final TranslateTransition getAnimationStart()
getGlassPaneback to summary
public final GlassPane getGlassPane()
getOnInitializedback to summary
public final EventHandler<Event> getOnInitialized()
getOverlayback to summary
public final Region getOverlay()
initializeback to summary
private void initialize(Region overlay)
isAnimatedback to summary
public final boolean isAnimated()

Returns whether or not this overlay is animated.

Implementation Note

An overlay is being considered as animated when animationStart and animationEnd are not null. The defined animation will then be played when the overlay is being shown or hidden.

Returns:boolean

whether or not this overlay is animated.

isInitializedback to summary
public final boolean isInitialized()
onInitializedPropertyback to summary
public final ObjectProperty<EventHandler<Event>> onInitializedProperty()

Enables to define actions that should be performed when an overlay is initialized.

Implementation Note

an overlay is being considered as initialized, when the overlay node has been added to the scene graph and a layout pass has been performed, which means the values of Region#widthProperty() and Region#heightProperty() are defined. This enables to initially set the position of an overlay using its size dynamically, for example before an animation is being performed for the first time.
This event will only be fired once!

Returns:ObjectProperty<EventHandler<Event>>

the ObjectProperty of the EventHandler which will be triggered upon initialization

setInitializedback to summary
private void setInitialized(boolean initialized)
setOnInitializedback to summary
public final void setOnInitialized(EventHandler<Event> value)
setupInitializedListenersback to summary
private void setupInitializedListeners(Region overlay)