public abstract class ALsp3StepEditHandle extends ALspEditHandle
onActivate
is called. When a handle is active, the subsequent events
will be passed to it. A handle remains active until it is deactivated by onDeactivate
.process
is called. This step is typically
performed for multiple events. When an event is processed, it returns a
TLspEditHandleResult
, which contains the partially processed
event, and a list of edit operations to perform.onDeactivate
is called, and the handle becomes
inactive (isActive
returns false
).PRIORITY_2D_CONTOUR, PRIORITY_2D_POINT, PRIORITY_2D_SHAPE, PRIORITY_3D_CONTOUR, PRIORITY_3D_POINT, PRIORITY_3D_SHAPE, PRIORITY_MULTIPLE_SHAPES
Modifier | Constructor and Description |
---|---|
protected |
ALsp3StepEditHandle(Object aGeometry)
Creates a new
ALsp3StepEditHandle for the given object. |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
canActivate(AWTEvent aEvent,
TLspEditContext aEditContext)
Checks whether the handle can be activated.
|
protected boolean |
canActivate(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
canActivate(AWTEvent, TLspEditContext) . |
protected abstract boolean |
canDeactivate(AWTEvent aEvent,
TLspEditContext aEditContext)
Checks whether the handle can be deactivated.
|
protected boolean |
canDeactivate(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
canDeactivate(AWTEvent, TLspEditContext) . |
protected abstract boolean |
canProcess(AWTEvent aEvent,
TLspEditContext aEditContext)
Checks whether the given event should be processed.
|
protected boolean |
canProcess(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
canProcess(AWTEvent, TLspEditContext) . |
TLspEditHandleResult |
handleAWTEvent(AWTEvent aEvent,
TLspEditContext aEditContext)
Handle the given input event for the given edit context.
|
TLspEditHandleResultFX |
handleFXEvent(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
handleAWTEvent(AWTEvent, TLspEditContext) . |
boolean |
isActive()
Checks whether this handle is active.
|
protected abstract TLspEditHandleResult |
onActivate(AWTEvent aEvent,
TLspEditContext aEditContext)
Called when this handle is activated (after
canActivate has returned
true . |
protected TLspEditHandleResultFX |
onActivate(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
onActivate(AWTEvent, TLspEditContext) . |
protected abstract TLspEditHandleResult |
onDeactivate(AWTEvent aEvent,
TLspEditContext aEditContext)
Performs some action with the event after the handle is deactivated.
|
protected TLspEditHandleResultFX |
onDeactivate(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
onDeactivate(AWTEvent, TLspEditContext) . |
protected abstract TLspEditHandleResult |
process(AWTEvent aEvent,
TLspEditContext aEditContext)
Process the given event.
|
protected TLspEditHandleResultFX |
process(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
process(AWTEvent, TLspEditContext) . |
getGeometry, requestsFocus, requestsFocus
getCursor, getCursorFX, getPriority, getProperties, getStyleTargetProviders, setCursor, setCursorFX, setPriority
protected ALsp3StepEditHandle(Object aGeometry)
ALsp3StepEditHandle
for the given object.aGeometry
- the geometry that is edited by this handle. Null is allowed, for instance
if editing doesn't involve geometry directly.public final boolean isActive()
true
in between canActivate
returning
true
, and onDeactivate
being called. Otherwise this method
returns false
.isActive
in class ALspHandle
public TLspEditHandleResult handleAWTEvent(AWTEvent aEvent, TLspEditContext aEditContext)
null
event to indicate that the event has been consumed. Note that sometimes an event might be
partially consumed (which is often the case with touch events), in which case this method
will return an edit handle result with an altered version of the given input event.
If incoming event should be ignored, this method should return a TLspEditHandleResult
without any edit operations, and an unconsumed AWTEvent
. An unconsumed AWTEvent
means that it should contain the original, unmodified aEvent
parameter passed to this
method. This result indicates that the event was not consumed, and that some other object needs to
consume the event instead.
As a side effect, a handle is allowed to activate or deactivate itself as a result
of processing an input event.
This method performs the handling of AWT events into 3 steps.
onActivate
is called.process
is called. This step is typically
performed for multiple events.onDeactivate
is called, and the handle becomes
inactive (isActive
returns false
).handleAWTEvent
in class ALspEditHandle
aEvent
- the input eventaEditContext
- the edit context, containing, amongst others, information about the layer
for which this handle is operating, the view, the object for which this
handle was created, the geometry that this handle was created for, the paint
representation in which geometry exists, and the sensitivity with which the
event should be handlednull
.ALspHandle.isActive()
public TLspEditHandleResultFX handleFXEvent(javafx.event.Event aEvent, TLspEditContext aEditContext)
handleAWTEvent(AWTEvent, TLspEditContext)
.handleFXEvent
in class ALspEditHandle
aEvent
- the input eventaEditContext
- the edit context, containing, amongst others, information about the layer
for which this handle is operating, the view, the object for which this
handle was created, the geometry that this handle was created for, the paint
representation in which geometry exists, and the sensitivity with which the
event should be handlednull
.protected abstract TLspEditHandleResult onActivate(AWTEvent aEvent, TLspEditContext aEditContext)
canActivate
has returned
true
.aEvent
- the event that caused the handle to be activatedaEditContext
- the edit contextnull
.ALspEditHandle.handleAWTEvent(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
,
canActivate(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
protected TLspEditHandleResultFX onActivate(javafx.event.Event aEvent, TLspEditContext aEditContext)
onActivate(AWTEvent, TLspEditContext)
.aEvent
- the event that caused the handle to be activatedaEditContext
- the edit contextnull
.protected abstract TLspEditHandleResult onDeactivate(AWTEvent aEvent, TLspEditContext aEditContext)
aEvent
- the event that caused the handle to be deactivatedaEditContext
- the edit contextnull
.ALspEditHandle.handleAWTEvent(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
,
canDeactivate(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
protected TLspEditHandleResultFX onDeactivate(javafx.event.Event aEvent, TLspEditContext aEditContext)
onDeactivate(AWTEvent, TLspEditContext)
.aEvent
- the event that caused the handle to be deactivatedaEditContext
- the edit contextnull
.protected abstract TLspEditHandleResult process(AWTEvent aEvent, TLspEditContext aEditContext)
aEvent
- the event that was processedaEditContext
- the edit contextnull
.ALspEditHandle.handleAWTEvent(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
protected TLspEditHandleResultFX process(javafx.event.Event aEvent, TLspEditContext aEditContext)
process(AWTEvent, TLspEditContext)
.aEvent
- the event that was processedaEditContext
- the edit contextnull
.protected abstract boolean canActivate(AWTEvent aEvent, TLspEditContext aEditContext)
true
, isActive
will return true
and onActivate
is called next.aEvent
- the event that should be handledaEditContext
- the edit contexttrue
if the handle should be activated as a result of the given event,
false
otherwiseALspEditHandle.handleAWTEvent(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
,
onActivate(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
protected boolean canActivate(javafx.event.Event aEvent, TLspEditContext aEditContext)
canActivate(AWTEvent, TLspEditContext)
.aEvent
- the event that should be handledaEditContext
- the edit contexttrue
if the handle should be activated as a result of the given event,
false
otherwiseprotected abstract boolean canDeactivate(AWTEvent aEvent, TLspEditContext aEditContext)
true
,
isActive
will return false
and onDeactivate
is called next.aEvent
- the event that should be handledaEditContext
- the edit contexttrue
if the handle should be deactivated as a result of the given event,
false
otherwiseALspEditHandle.handleAWTEvent(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
,
onDeactivate(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
protected boolean canDeactivate(javafx.event.Event aEvent, TLspEditContext aEditContext)
canDeactivate(AWTEvent, TLspEditContext)
.aEvent
- the event that should be handledaEditContext
- the edit contexttrue
if the handle should be deactivated as a result of the given event,
false
otherwiseprotected abstract boolean canProcess(AWTEvent aEvent, TLspEditContext aEditContext)
true
,
process
is called next.aEvent
- the event that should be handledaEditContext
- the edit contexttrue
if the handle should process this event, false
otherwise.ALspEditHandle.handleAWTEvent(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
,
process(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
protected boolean canProcess(javafx.event.Event aEvent, TLspEditContext aEditContext)
canProcess(AWTEvent, TLspEditContext)
.aEvent
- the event that should be handledaEditContext
- the edit contexttrue
if the handle should process this event, false
otherwise.