Class TLspMultiObjectTranslationHandle
java.lang.Object
com.luciad.view.lightspeed.editor.handle.ALspHandle
com.luciad.view.lightspeed.editor.handle.ALspMultiObjectHandle
com.luciad.view.lightspeed.editor.handle.TLspMultiObjectTranslationHandle
A multi object translation handle works on multiple objects.
It generates a single editing operation for a group of objects.
- 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
ConstructorDescriptionTLspMultiObjectTranslationHandle
(Collection<TLspDomainObjectContext> aDomainObjectContextList) Creates a translation handle to move the given editor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the cursor for 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.handleAWTEvent
(AWTEvent aEvent, TLspMultiObjectEditContext aEditContext) Handle the given input event for the given view.handleFXEvent
(Event aEvent, TLspMultiObjectEditContext aEditContext) JavaFX equivalent ofALspMultiObjectHandle.handleAWTEvent(AWTEvent, TLspMultiObjectEditContext)
.boolean
isActive()
Checks whether this handle is active.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.ALspMultiObjectHandle
getObjects
Methods inherited from class com.luciad.view.lightspeed.editor.handle.ALspHandle
getCursorFX, getPriority, getProperties, setCursor, setCursorFX, setPriority
-
Constructor Details
-
TLspMultiObjectTranslationHandle
public TLspMultiObjectTranslationHandle(Collection<TLspDomainObjectContext> aDomainObjectContextList) Creates a translation handle to move the given editor. Translating the object is performed by pressing/clicking the left mouse button and dragging/moving.- Parameters:
aDomainObjectContextList
- the list of domain objects to translate
-
-
Method Details
-
isActive
public boolean isActive()Description copied from class:ALspHandle
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.- Specified by:
isActive
in classALspHandle
- 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. By default, this method returns an empty list.- Specified by:
getStyleTargetProviders
in classALspHandle
- 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
-
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
By default, this method returnstrue
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.true
when this handle is active or when one of the objects (passed in the edit context) is touched.- Overrides:
requestsFocus
in classALspMultiObjectHandle
- 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)
.- Overrides:
requestsFocus
in classALspMultiObjectHandle
- 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
-
getCursor
Description copied from class:ALspHandle
Returns the cursor for this handle. In practice, this cursor is used when this handle is active, or when it has focus.- Overrides:
getCursor
in classALspHandle
- Returns:
- the cursor for this handle.
-
handleAWTEvent
public 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. By default, this method returns an edit handle result containing aMOVE
operation, or without operation, if for instance the mouse isn't moved.- Specified by:
handleAWTEvent
in classALspMultiObjectHandle
- 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
Description copied from class:ALspMultiObjectHandle
JavaFX equivalent ofALspMultiObjectHandle.handleAWTEvent(AWTEvent, TLspMultiObjectEditContext)
.- Overrides:
handleFXEvent
in classALspMultiObjectHandle
- 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.
-