Class ALspHandle

java.lang.Object
com.luciad.view.lightspeed.editor.handle.ALspHandle
Direct Known Subclasses:
ALspEditHandle, ALspMultiObjectHandle

public abstract class ALspHandle extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    static 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 Type
    Method
    Description
    Returns the cursor for this handle.
    JavaFX equivalent of getCursor(), used when this handle is active in a JavaFX view.
    int
    Gets the priority of a handle.
    Returns a map containing all properties in this handle.
    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
    Checks whether this handle is active.
    void
    setCursor(Cursor aCursor)
    Sets the cursor for this handle.
    void
    JavaFX equivalent of setCursor(Cursor).
    void
    setPriority(int aPriority)
    Sets the priority of this handle.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PRIORITY_MULTIPLE_SHAPES

      public static final int PRIORITY_MULTIPLE_SHAPES
      Predefined priority level for handles that operate on multiple shapes simultaneously.
      See Also:
    • PRIORITY_3D_SHAPE

      public static final int PRIORITY_3D_SHAPE
      Predefined 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_CONTOUR
      Predefined 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_SHAPE
      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.
      See Also:
    • PRIORITY_2D_CONTOUR

      public static final int PRIORITY_2D_CONTOUR
      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.
      See Also:
    • PRIORITY_3D_POINT

      public static final int PRIORITY_3D_POINT
      Predefined 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_POINT
      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.
      See Also:
  • Method Details

    • getProperties

      public Map<Object,Object> 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 a TLspEditOperation object, the latter will contain a copy of these properties. This allows the editor to recover this semantic information in its edit method.
      Returns:
      a map containing all properties of this handle
    • getCursor

      public Cursor 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

      public Cursor getCursorFX()
      JavaFX equivalent of getCursor(), used when this handle is active in a JavaFX view. If no JavaFX cursor has been set, this method will attempt to create a JavaFX counterpart of the AWT 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

      public void setCursor(Cursor aCursor)
      Sets the cursor for this handle.
      Parameters:
      aCursor - the cursor to be used by this handle.
    • setCursorFX

      public void setCursorFX(Cursor aCursor)
      JavaFX equivalent of setCursor(Cursor). Sets the cursor to be used by this handle if it is active in a JavaFX 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

      public abstract List<ALspStyleTargetProvider> getStyleTargetProviders(TLspHandleGeometryType aType)
      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 - a visual 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