Class ALspMultiObjectHandle
java.lang.Object
com.luciad.view.lightspeed.editor.handle.ALspHandle
com.luciad.view.lightspeed.editor.handle.ALspMultiObjectHandle
- Direct Known Subclasses:
TLspMultiObjectTranslationHandle
An abstract base class for handles that can work on a collection of objects.
Multi object handles are used by the
edit controller
when more than one object is being edited simultaneously. Apart from that, the
API and the responsibilities of a multi object handle are identical to those of a
regular ALspEditHandle
.
The typical use case for multi object handles is allowing multiple selected objects to
be dragged around as a group. This behavior is implemented by
TLspMultiObjectTranslationHandle
.- Since:
- 2012.0
- See Also:
-
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
ModifierConstructorDescriptionprotected
ALspMultiObjectHandle
(Collection<TLspDomainObjectContext> aDomainObjectContexts) Creates a new handle for the given collection of domain objects. -
Method Summary
Modifier and TypeMethodDescriptionReturns the collection of domain objects handled by this handle.abstract TLspEditHandleResult
handleAWTEvent
(AWTEvent aEvent, TLspMultiObjectEditContext aEditContext) Handle the given input event for the given view.handleFXEvent
(Event aEvent, TLspMultiObjectEditContext aEditContext) JavaFX equivalent ofhandleAWTEvent(AWTEvent, TLspMultiObjectEditContext)
.boolean
requestsFocus
(AWTEvent aEvent, TLspMultiObjectEditContext aEditContext) Indicates whether this handle requests focus for the given event.boolean
requestsFocus
(Event aEvent, TLspMultiObjectEditContext aEditContext) JavaFX equivalent ofrequestsFocus(AWTEvent, TLspMultiObjectEditContext)
.Methods inherited from class com.luciad.view.lightspeed.editor.handle.ALspHandle
getCursor, getCursorFX, getPriority, getProperties, getStyleTargetProviders, isActive, setCursor, setCursorFX, setPriority
-
Constructor Details
-
ALspMultiObjectHandle
Creates a new handle for the given collection of domain objects.- Parameters:
aDomainObjectContexts
- a collection of domain objects.
-
-
Method Details
-
getObjects
Returns the collection of domain objects handled by this handle.- Returns:
- the collection of domain objects handled by this handle.
-
handleAWTEvent
public abstract TLspEditHandleResult handleAWTEvent(AWTEvent aEvent, TLspMultiObjectEditContext aEditContext) Handle the given input event for the given view. The edit handle can choose the action to perform based on the type and state of the input event. As a side effect, a handle is allowed to activate or deactivate itself as a result of processing an input event. When the handle has processed the input event, the edit handle result might contain an AWTEvent that is null, indicating that the given event has been fully 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 altered version of the given input event.- Parameters:
aEvent
- the input eventaEditContext
- the edit context, containing, among others, the objects being edited, its layers, the view, the geometries that are being edited, the paint representations in which the geometries exist, and the sensitivity with which the event should be handled.- Returns:
- An edit handle result containing some edit operations and the processed AWTEvent that is potentially partially consumed.
- See Also:
-
handleFXEvent
JavaFX equivalent ofhandleAWTEvent(AWTEvent, TLspMultiObjectEditContext)
.- Parameters:
aEvent
- the input eventaEditContext
- the edit context, containing, among others, the objects being edited, its layers, the view, the geometries that are being edited, the paint representations in which the geometries exist, and the sensitivity with which the event should be handled.- Returns:
- An edit handle result containing some edit operations and the processed AWTEvent that is potentially partially consumed.
- Since:
- 2020.0
-
requestsFocus
Indicates whether this handle requests focus for the given event. The edit controller can respond to this by forwarding event objects to this handle, however, this is not ensured, since another handle, which might have precedence over this handle might also request focus. Precedence is primarily determined byhandle priority
).The default implementation returns
true
if the handle is active. Subclasses can override this method however to also request focus when the focus point hovers over a visual handle component for example.- Parameters:
aEvent
- the AWTEvent that might result in a focus requestaEditContext
- the edit context, containing, among others, the objects being edited, its layers, the view, the geometries that are being edited, the paint representations in which the geometries exist, and the sensitivity with which the event should be handled.- Returns:
- true if this handle requests focus, false otherwise. The base implementation
checks if
the handle is active
- See Also:
-
requestsFocus
JavaFX equivalent ofrequestsFocus(AWTEvent, TLspMultiObjectEditContext)
.- Parameters:
aEvent
- the event that might result in a focus requestaEditContext
- the edit context, containing, among others, the objects being edited, its layers, the view, the geometries that are being edited, the paint representations in which the geometries exist, and the sensitivity with which the event should be handled.- Returns:
- true if this handle requests focus, false otherwise. The base implementation
checks if
the handle is active
- Since:
- 2020.0
-