public abstract class ALspMultiObjectHandle extends ALspHandle
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
.TLspEditController.getMultiObjectHandles(java.util.Collection)
PRIORITY_2D_CONTOUR, PRIORITY_2D_POINT, PRIORITY_2D_SHAPE, PRIORITY_3D_CONTOUR, PRIORITY_3D_POINT, PRIORITY_3D_SHAPE, PRIORITY_MULTIPLE_SHAPES
Modifier | Constructor and Description |
---|---|
protected |
ALspMultiObjectHandle(Collection<TLspDomainObjectContext> aDomainObjectContexts)
Creates a new handle for the given collection of domain objects.
|
Modifier and Type | Method and Description |
---|---|
Collection<TLspDomainObjectContext> |
getObjects()
Returns 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.
|
TLspEditHandleResultFX |
handleFXEvent(javafx.event.Event aEvent,
TLspMultiObjectEditContext aEditContext)
JavaFX equivalent of
handleAWTEvent(AWTEvent, TLspMultiObjectEditContext) . |
boolean |
requestsFocus(AWTEvent aEvent,
TLspMultiObjectEditContext aEditContext)
Indicates whether this handle requests focus for the given event.
|
boolean |
requestsFocus(javafx.event.Event aEvent,
TLspMultiObjectEditContext aEditContext)
JavaFX equivalent of
requestsFocus(AWTEvent, TLspMultiObjectEditContext) . |
getCursor, getCursorFX, getPriority, getProperties, getStyleTargetProviders, isActive, setCursor, setCursorFX, setPriority
protected ALspMultiObjectHandle(Collection<TLspDomainObjectContext> aDomainObjectContexts)
aDomainObjectContexts
- a collection of domain objects.public Collection<TLspDomainObjectContext> getObjects()
public abstract TLspEditHandleResult handleAWTEvent(AWTEvent aEvent, TLspMultiObjectEditContext aEditContext)
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.ALspHandle.isActive()
public TLspEditHandleResultFX handleFXEvent(javafx.event.Event aEvent, TLspMultiObjectEditContext aEditContext)
handleAWTEvent(AWTEvent, TLspMultiObjectEditContext)
.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.public boolean requestsFocus(AWTEvent aEvent, TLspMultiObjectEditContext aEditContext)
handle 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.
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.the handle is active
ALspHandle.isActive()
public boolean requestsFocus(javafx.event.Event aEvent, TLspMultiObjectEditContext aEditContext)
requestsFocus(AWTEvent, TLspMultiObjectEditContext)
.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.the handle is active