Class ALspHandle
java.lang.Object
com.luciad.view.lightspeed.editor.handle.ALspHandle
- Direct Known Subclasses:
ALspEditHandle
,ALspMultiObjectHandle
The base class for all handles related to editing. Contains various properties general
to handles. A handle has properties, a
priority and a cursor. It can be
active or inactive, and can be visualized using a
style target provider.
- Since:
- 2012.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Predefined priority level for handles that respond when touching the contour of a 2D shape or a 3D shape's projected footprint on the ground.static final int
Predefined priority level for handles that respond when touching the control points of a 2D shape or a 3D shape's projected footprint on the ground.static final int
Predefined priority level for handles that respond when touching the interior of a filled 2D shape or a 3D shape's projected footprint on the ground.static final int
Predefined priority level for handles that respond when touching the contour of a 3D shape.static final int
Predefined priority level for handles that respond when touching the control points of a 3D shape.static final int
Predefined priority level for handles that respond when touching the interior of a filled 3D shape.static final int
Predefined priority level for handles that operate on multiple shapes simultaneously. -
Method Summary
Modifier and TypeMethodDescriptionReturns the cursor for this handle.JavaFX equivalent ofgetCursor()
, used when this handle is active in aJavaFX view
.int
Gets the priority of a handle.Returns a map containing all properties in this handle.abstract List
<ALspStyleTargetProvider> Returns a style target provider that can generate geometry for the given visual editing component type, or an empty list if no geometry can be generated for the given type.abstract boolean
isActive()
Checks whether this handle is active.void
Sets the cursor for this handle.void
setCursorFX
(Cursor aCursor) JavaFX equivalent ofsetCursor(Cursor)
.void
setPriority
(int aPriority) Sets the priority of this handle.
-
Field Details
-
PRIORITY_MULTIPLE_SHAPES
public static final int PRIORITY_MULTIPLE_SHAPESPredefined priority level for handles that operate on multiple shapes simultaneously.- See Also:
-
PRIORITY_3D_SHAPE
public static final int PRIORITY_3D_SHAPEPredefined priority level for handles that respond when touching the interior of a filled 3D shape.- See Also:
-
PRIORITY_3D_CONTOUR
public static final int PRIORITY_3D_CONTOURPredefined priority level for handles that respond when touching the contour of a 3D shape.- See Also:
-
PRIORITY_2D_SHAPE
public static final int PRIORITY_2D_SHAPEPredefined priority level for handles that respond when touching the interior of a filled 2D shape or a 3D shape's projected footprint on the ground.- See Also:
-
PRIORITY_2D_CONTOUR
public static final int PRIORITY_2D_CONTOURPredefined priority level for handles that respond when touching the contour of a 2D shape or a 3D shape's projected footprint on the ground.- See Also:
-
PRIORITY_3D_POINT
public static final int PRIORITY_3D_POINTPredefined priority level for handles that respond when touching the control points of a 3D shape.- See Also:
-
PRIORITY_2D_POINT
public static final int PRIORITY_2D_POINTPredefined priority level for handles that respond when touching the control points of a 2D shape or a 3D shape's projected footprint on the ground.- See Also:
-
-
Method Details
-
getProperties
Returns a map containing all properties in this handle. Properties allow the editor to freely attach any kind of semantic information to a handle. When the handle creates aTLspEditOperation
object, the latter will contain a copy of these properties. This allows the editor to recover this semantic information in itsedit
method.- Returns:
- a map containing all properties of this handle
-
getCursor
Returns the cursor for this handle. In practice, this cursor is used when this handle is active, or when it has focus.- Returns:
- the cursor for this handle.
-
getCursorFX
JavaFX equivalent ofgetCursor()
, used when this handle is active in aJavaFX view
. If no JavaFX cursor has been set, this method will attempt to create a JavaFX counterpart of theAWT cursor
. This will work for the built-in cursors, but any custom cursors will be replaced with the default cursor instead.- Returns:
- the JavaFX cursor for this handle
- Since:
- 2020.0
- See Also:
-
setCursor
Sets the cursor for this handle.- Parameters:
aCursor
- the cursor to be used by this handle.
-
setCursorFX
JavaFX equivalent ofsetCursor(Cursor)
. Sets the cursor to be used by this handle if it is active in aJavaFX view
.- Parameters:
aCursor
- the JavaFX cursor to be used by this handle- Since:
- 2020.0
- See Also:
-
getPriority
public int getPriority()Gets the priority of a handle. Higher priority indicates that this handle should request focus before focus is requested for handles with lower priority.- Returns:
- the priority of this handle.
-
setPriority
public void setPriority(int aPriority) Sets the priority of this handle.- Parameters:
aPriority
- the handle's new priority- See Also:
-
isActive
public abstract boolean isActive()Checks whether this handle is active. When a handle is active, it will be the first candidate to receive events. If a handle is inactive, it might still receive events (possibly making it active) if all other active handles didn't process an event.- Returns:
- true if active, false otherwise
-
getStyleTargetProviders
Returns a style target provider that can generate geometry for the given visual editing component type, or an empty list if no geometry can be generated for the given type.TLspEditHandleStyler
allows you to register different styles for each visual component type.- Parameters:
aType
- avisual editing component type
- Returns:
- a list of style target providers, or an empty list if no style targets can be created for the given
visual editing component type
-