public abstract class ALspDynamicCreateHandle extends ALspCreateHandle
TLsp2DPointListEditor
,
where a new handle is constructed whenever a new point is added to the point list under
creation. Since the number of points in the list is unknown beforehand, a static
create handle cannot be used.
This class can be extended by implementing createNewEditHandle
. Since hasNext
always returns true
by
default, requestsDeactivation
can be used to end the creation.
Implementations of this class typically respond to TLspNextCreateStepEvent
that is used to programmatically end a dynamic creation step (see also
TLspCreateController.finish()
.
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 |
ALspDynamicCreateHandle(Object aDomainObject)
Creates a new dynamic create handle for the given object.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ALspEditHandle |
createNewEditHandle(AWTEvent aEvent,
TLspEditContext aEditContext)
This method creates the next handle that should be used by this create handle.
|
protected ALspEditHandle |
createNewEditHandle(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
createNewEditHandle(AWTEvent, TLspEditContext) . |
protected boolean |
hasNext(AWTEvent aEvent,
TLspEditContext aEditContext)
Checks whether there is a next handle to be used in the creation process.
|
protected boolean |
hasNext(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
ALspCreateHandle.hasNext(AWTEvent, TLspEditContext) . |
ALspEditHandle |
next(AWTEvent aEvent,
TLspEditContext aEditContext)
Creates a new handle by calling
createNewEditHandle , and sets
the appropriate properties. |
ALspEditHandle |
next(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
ALspCreateHandle.next(AWTEvent, TLspEditContext) . |
deactivate, deactivate, getActiveHandle, getCursor, getPreviousHandles, getStyleTargetProviders, handleAWTEvent, handleFXEvent, hasPrevious, hasPrevious, isActive, previous, previous, removePreviousHandle, requestsDeactivation, requestsDeactivation, requestsFocus, requestsFocus
getGeometry
getCursorFX, getPriority, getProperties, setCursor, setCursorFX, setPriority
protected ALspDynamicCreateHandle(Object aDomainObject)
aDomainObject
- the object to create.protected abstract ALspEditHandle createNewEditHandle(AWTEvent aEvent, TLspEditContext aEditContext)
next
.aEvent
- the eventaEditContext
- the edit context.null
.protected ALspEditHandle createNewEditHandle(javafx.event.Event aEvent, TLspEditContext aEditContext)
createNewEditHandle(AWTEvent, TLspEditContext)
.aEvent
- the eventaEditContext
- the edit context.protected boolean hasNext(AWTEvent aEvent, TLspEditContext aEditContext)
true
. In order to stop the creation process,
this method can be overridden, or more conveniently, requestsDeactivation
can be implemented to end the creation process when needed.hasNext
in class ALspCreateHandle
aEvent
- the eventaEditContext
- the edit contexttrue
if another handle is available, false
otherwise.protected boolean hasNext(javafx.event.Event aEvent, TLspEditContext aEditContext)
ALspCreateHandle
ALspCreateHandle.hasNext(AWTEvent, TLspEditContext)
.hasNext
in class ALspCreateHandle
aEvent
- the eventaEditContext
- the edit contexttrue
if another handle is available, false
otherwise.public ALspEditHandle next(AWTEvent aEvent, TLspEditContext aEditContext)
createNewEditHandle
, and sets
the appropriate properties.next
in class ALspCreateHandle
aEvent
- event that initiated a transition to the next handleaEditContext
- the edit contextcreateNewEditHandle(java.awt.AWTEvent, com.luciad.view.lightspeed.editor.TLspEditContext)
public ALspEditHandle next(javafx.event.Event aEvent, TLspEditContext aEditContext)
ALspCreateHandle
ALspCreateHandle.next(AWTEvent, TLspEditContext)
.next
in class ALspCreateHandle
aEvent
- the eventaEditContext
- the edit context