public class TLspStaticCreateHandle extends ALspCreateHandle
TLspCircleEditor
.
For instance when creating a TLcdLonLatCircle
, the number and type of handles
is fixed and known a-priori.
The handle delegates input events to a list of other handles from which always one is active.
When this active handle in the list becomes inactive, the next handle is automatically activated.
If the last handle in the list becomes inactive, the create handle itself becomes inactive as
well.PRIORITY_2D_CONTOUR, PRIORITY_2D_POINT, PRIORITY_2D_SHAPE, PRIORITY_3D_CONTOUR, PRIORITY_3D_POINT, PRIORITY_3D_SHAPE, PRIORITY_MULTIPLE_SHAPES
Constructor and Description |
---|
TLspStaticCreateHandle(Object aDomainObject,
Collection<ALspEditHandle> aHandles)
Creates a new static creation handle for the given object, delegating to the given collection
of handles.
|
Modifier and Type | Method and Description |
---|---|
List<ALspEditHandle> |
getHandles()
Returns the handles to which this create handle delegates.
|
int |
getNextHandleIndex()
Returns the index of the next handle.
|
List<ALspStyleTargetProvider> |
getStyleTargetProviders(TLspHandleGeometryType aType)
Returns all style target providers components of the currently active handle and previously
used handles.
|
protected boolean |
hasNext(AWTEvent aEvent,
TLspEditContext aEditContext)
Checks whether there is a next handle to be used in the creation process.
|
protected boolean |
hasNext(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
hasNext(AWTEvent, TLspEditContext) . |
ALspEditHandle |
next(AWTEvent aEvent,
TLspEditContext aEditContext)
Makes the next handle the active handle.
|
ALspEditHandle |
next(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
next(AWTEvent, TLspEditContext) . |
protected boolean |
requestsDeactivation(AWTEvent aEvent,
TLspEditContext aEditContext)
Checks whether the create handle should be deactivated.
|
protected boolean |
requestsDeactivation(javafx.event.Event aEvent,
TLspEditContext aEditContext)
JavaFX equivalent of
requestsDeactivation(AWTEvent, TLspEditContext) . |
void |
setNextHandleIndex(int aIndex)
Sets the next handle index.
|
deactivate, deactivate, getActiveHandle, getCursor, getPreviousHandles, handleAWTEvent, handleFXEvent, hasPrevious, hasPrevious, isActive, previous, previous, removePreviousHandle, requestsFocus, requestsFocus
getGeometry
getCursorFX, getPriority, getProperties, setCursor, setCursorFX, setPriority
public TLspStaticCreateHandle(Object aDomainObject, Collection<ALspEditHandle> aHandles)
aDomainObject
- the domain object.aHandles
- a collection of delegate handles.public List<ALspEditHandle> getHandles()
public void setNextHandleIndex(int aIndex)
next
is called. By default the
first handle (with index 0) is the next handle. However, in some
cases a number of handles is not used during creation but are still
added to the create handle to be painted to yield a consistent
number of handles during creation and editing.aIndex
- the index of the handle that will be active next. Must be
in the [0,handles size
[
interval.public int getNextHandleIndex()
setNextHandleIndex(int)
protected boolean hasNext(AWTEvent aEvent, TLspEditContext aEditContext)
true
if the next handle index <
the number of handles.hasNext
in class ALspCreateHandle
aEvent
- the eventaEditContext
- the edit contexttrue
if another handle is available, false
otherwise.protected boolean hasNext(javafx.event.Event aEvent, TLspEditContext aEditContext)
hasNext(AWTEvent, TLspEditContext)
.hasNext
in class ALspCreateHandle
aEvent
- the eventaEditContext
- the edit contexttrue
if another handle is available, false
otherwise.public ALspEditHandle next(AWTEvent aEvent, TLspEditContext aEditContext)
next
in class ALspCreateHandle
aEvent
- the eventaEditContext
- the edit contextpublic ALspEditHandle next(javafx.event.Event aEvent, TLspEditContext aEditContext)
next(AWTEvent, TLspEditContext)
.next
in class ALspCreateHandle
aEvent
- the eventaEditContext
- the edit contextprotected boolean requestsDeactivation(AWTEvent aEvent, TLspEditContext aEditContext)
hasNext
returns false
, regardless of this method. This method should be considered
an "early-out".
By default, this method returns false
.requestsDeactivation
in class ALspCreateHandle
aEvent
- the eventaEditContext
- the edit context for this requestprotected boolean requestsDeactivation(javafx.event.Event aEvent, TLspEditContext aEditContext)
requestsDeactivation(AWTEvent, TLspEditContext)
.requestsDeactivation
in class ALspCreateHandle
aEvent
- the eventaEditContext
- the edit context for this requestpublic List<ALspStyleTargetProvider> getStyleTargetProviders(TLspHandleGeometryType aType)
ALspCreateHandle
getStyleTargetProviders
in class ALspCreateHandle
aType
- the handle component type for which the visual representations are to be
retrieved