public abstract class AbstractGesture
extends java.lang.Object
AbstractGesture
is the base class for all gestures defined
within GEF4 FX. It manages the (un-)registration of event listeners based on
the availability of a JavaFX Scene
.Constructor and Description |
---|
AbstractGesture() |
Modifier and Type | Method and Description |
---|---|
javafx.scene.Scene |
getScene()
The
Scene on which this gesture is registered. |
protected abstract void |
register()
Called when a
Scene is provided. |
void |
setScene(javafx.scene.Scene scene)
Sets the
Scene for this gesture to the given value. |
protected abstract void |
unregister()
Called when the
Scene is removed. |
public javafx.scene.Scene getScene()
Scene
on which this gesture is registered.Scene
on which this gesture is registered.protected abstract void register()
Scene
is provided. The new Scene
can be
obtained via getScene()
. Event handlers are registered here.public void setScene(javafx.scene.Scene scene)
Scene
for this gesture to the given value.
Unregisters
previously registered event listeners
and registers
event listeners for this gesture on the
new Scene
when the given Scene
is not null
.scene
- The new Scene
for this gesture.protected abstract void unregister()
Scene
is removed. You can obtain the old
Scene
via getScene()
so that event handlers can be
unregistered.Copyright (c) 2014 itemis AG and others. All rights reserved.