Class ALspDynamicCreateHandle
java.lang.Object
com.luciad.view.lightspeed.editor.handle.ALspHandle
com.luciad.view.lightspeed.editor.handle.ALspEditHandle
com.luciad.view.lightspeed.editor.handle.ALspCreateHandle
com.luciad.view.lightspeed.editor.handle.ALspDynamicCreateHandle
A create handle that dynamically adds handles. This is useful when the list of handles is not known
a-priori. An example of an
editor that uses a dynamic create handle is the
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().
- Since:
- 2012.0
-
Field Summary
Fields inherited from class com.luciad.view.lightspeed.editor.handle.ALspHandle
PRIORITY_2D_CONTOUR, PRIORITY_2D_POINT, PRIORITY_2D_SHAPE, PRIORITY_3D_CONTOUR, PRIORITY_3D_POINT, PRIORITY_3D_SHAPE, PRIORITY_MULTIPLE_SHAPES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedALspDynamicCreateHandle(Object aDomainObject) Creates a new dynamic create handle for the given object. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ALspEditHandlecreateNewEditHandle(AWTEvent aEvent, TLspEditContext aEditContext) This method creates the next handle that should be used by this create handle.protected ALspEditHandlecreateNewEditHandle(Event aEvent, TLspEditContext aEditContext) JavaFX equivalent ofcreateNewEditHandle(AWTEvent, TLspEditContext).protected booleanhasNext(AWTEvent aEvent, TLspEditContext aEditContext) Checks whether there is a next handle to be used in the creation process.protected booleanhasNext(Event aEvent, TLspEditContext aEditContext) JavaFX equivalent ofALspCreateHandle.hasNext(AWTEvent, TLspEditContext).next(AWTEvent aEvent, TLspEditContext aEditContext) Creates a new handle by callingcreateNewEditHandle, and sets the appropriate properties.next(Event aEvent, TLspEditContext aEditContext) JavaFX equivalent ofALspCreateHandle.next(AWTEvent, TLspEditContext).Methods inherited from class com.luciad.view.lightspeed.editor.handle.ALspCreateHandle
deactivate, deactivate, getActiveHandle, getCursor, getPreviousHandles, getStyleTargetProviders, handleAWTEvent, handleFXEvent, hasPrevious, hasPrevious, isActive, previous, previous, removePreviousHandle, requestsDeactivation, requestsDeactivation, requestsFocus, requestsFocusMethods inherited from class com.luciad.view.lightspeed.editor.handle.ALspEditHandle
getGeometryMethods inherited from class com.luciad.view.lightspeed.editor.handle.ALspHandle
getCursorFX, getPriority, getProperties, setCursor, setCursorFX, setPriority
-
Constructor Details
-
ALspDynamicCreateHandle
Creates a new dynamic create handle for the given object.- Parameters:
aDomainObject- the object to create.
-
-
Method Details
-
createNewEditHandle
protected abstract ALspEditHandle createNewEditHandle(AWTEvent aEvent, TLspEditContext aEditContext) This method creates the next handle that should be used by this create handle. This method is called fromnext.- Parameters:
aEvent- the eventaEditContext- the edit context.- Returns:
- a new handle, should never be
null.
-
createNewEditHandle
JavaFX equivalent ofcreateNewEditHandle(AWTEvent, TLspEditContext).- Parameters:
aEvent- the eventaEditContext- the edit context.- Since:
- 2020.0
-
hasNext
Checks whether there is a next handle to be used in the creation process. By default this method always returnstrue. In order to stop the creation process, this method can be overridden, or more conveniently,requestsDeactivationcan be implemented to end the creation process when needed.- Specified by:
hasNextin classALspCreateHandle- Parameters:
aEvent- the eventaEditContext- the edit context- Returns:
trueif another handle is available,falseotherwise.
-
hasNext
Description copied from class:ALspCreateHandleJavaFX equivalent ofALspCreateHandle.hasNext(AWTEvent, TLspEditContext).- Overrides:
hasNextin classALspCreateHandle- Parameters:
aEvent- the eventaEditContext- the edit context- Returns:
trueif another handle is available,falseotherwise.
-
next
Creates a new handle by callingcreateNewEditHandle, and sets the appropriate properties.- Specified by:
nextin classALspCreateHandle- Parameters:
aEvent- event that initiated a transition to the next handleaEditContext- the edit context- Returns:
- the next handle.
- See Also:
-
next
Description copied from class:ALspCreateHandleJavaFX equivalent ofALspCreateHandle.next(AWTEvent, TLspEditContext).- Overrides:
nextin classALspCreateHandle- Parameters:
aEvent- the eventaEditContext- the edit context- Returns:
- the next handle.
-