Class TLspArcEditor
java.lang.Object
com.luciad.view.lightspeed.editor.ALspEditor
com.luciad.view.lightspeed.editor.TLspArcEditor
- All Implemented Interfaces:
ILspEditor
Enables visual editing of
ILcd2DEditableArc objects in an
ILspView.
Handles
The arc editor defines the following edit handles for an arc object:- Corner point handles: allows the user to edit the corner points of the arc. The
user can change the location of these corner points by dragging the corresponding handle.
These handles generate
MOVEoperations, with aHANDLE_IDENTIFIERproperty andMAJOR_AXIS,MAJOR_AXIS_OPPOSITE,MINOR_AXISorMINOR_AXIS_OPPOSITEas value. - Start and end point handles: allows the user to edit the start and end point of the
arc segment. The user can change the location of these points by dragging the corresponding
handle. These handles generate
MOVEoperations, with aHANDLE_IDENTIFIERproperty andSTART_POINTorEND_POINTas value. - Center point handle: allows the user to translate the center of the arc. The
user can change the position of the center point by dragging the handle. This handle
generates
MOVEoperations, with aHANDLE_IDENTIFIERproperty withCENTERas value. - Object translation handle: allows the user to translate the arc object. This handle
generates
MOVEoperations, without any additional properties.
Editing
Based on theTLspEditOperation, generated by an edit handle (see description
of handles above), this editor performs different edit operations on the associated arc object.
The images below illustrate the effect of the different handles. In each image the
gray color represents the previous state of the object and the red color represents the edited object:
-
Corner point handles: the editor adjusts the corresponding corner point of the arc,
based on the new location of the point handle. The figure below illustrates this behaviour
when the start point of the arc is moved (indicated by the arrow)

- Start and end point handles: the editor adjusts the start of end point of the arc, based on the new location of the point handle.
-
Center point handle: the editor translates the entire arc. The figure below illustrates
this behaviour when moving the center point.

-
Object translation handle: the editor translates the entire arc. Note that the behaviour
for this handle is identical to the behaviour of the center point handle, with the exception of
how the handle is activated
Creation
The creation process of an arc object consists of the following steps:- the first step sets the center of the arc
- the second step initializes the major axis of the arc
- the third step initializes the minor axis of the arc
- the fourth step sets the start point of the arc
- the fifth step sets the end point of the arc
![]() |
![]() |
![]() |
![]() |
![]() |
||||
| Setting the center point | Initializing the major axis | Initializing the minor axis | Setting the start point | Setting the end point |
- Since:
- 2012.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes a control point of an arc.static enumDefines keys used by the enclosing editor implementation to store properties in its edit handles. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanEdit(TLspEditContext aContext) protected ALspEditHandlecreateCenterHandle(ILcd2DEditableArc aArc, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given arc by translating its center point.protected ALspEditHandlecreateEndPointHandle(ILcd2DEditableArc aArc, TLspEditContext aContext) Creates an edit handle that allows the user to edit the given arc by translating its end point.protected ALspEditHandlecreateMajorAxisHandle(ILcd2DEditableArc aArc, TLspEditContext aContext) Creates an edit handle that allows the user to edit the major axis of the given arc.protected ALspEditHandlecreateMinorAxisHandle(ILcd2DEditableArc aArc, TLspEditContext aContext) Creates an edit handle that allows the user to edit the minor axis of the given arc.protected ALspEditHandlecreateObjectTranslationHandle(ILcd2DEditableArc aArc, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape.protected ALspEditHandlecreateStartPointHandle(ILcd2DEditableArc aArc, TLspEditContext aContext) Creates an edit handle that allows the user to edit the given arc by translating its start point.protected TLspEditOperationResulteditImpl(TLspEditOperation aOperation, ELspInteractionStatus aInteractionStatus, TLspEditContext aContext) Called by theeditmethod to edit the given object based on the givenedit operation.getCreateHandle(TLspEditContext aContext) Returns a handle that is used to create the given object.getEditHandles(TLspEditContext aContext) Returns a set of handles for editing the given object.Methods inherited from class com.luciad.view.lightspeed.editor.ALspEditor
canCopyGeometry, canPerformOperation, copyGeometrySFCT, edit, fireUndoableHappened
-
Constructor Details
-
TLspArcEditor
public TLspArcEditor()Creates a newTLspArcEditor. This constructor does not initialize any state.
-
-
Method Details
-
canEdit
- Specified by:
canEditin interfaceILspEditor- Overrides:
canEditin classALspEditor- Parameters:
aContext- provides context information to the editor- Returns:
trueif the above conditions are met,falseotherwise.
-
editImpl
protected TLspEditOperationResult editImpl(TLspEditOperation aOperation, ELspInteractionStatus aInteractionStatus, TLspEditContext aContext) Called by theeditmethod to edit the given object based on the givenedit operation. Note that this method does not need to lock the model of the object, this already happens in theeditmethod. By default, this editor can handle the following operations: If any of the operations contains theHANDLE_IDENTIFIERproperty, with aHandleIdentifieras value, then this editor will only perform the operation on that particular point, otherwise it will perform it on the entire object.- Specified by:
editImplin classALspEditor- Parameters:
aOperation- the event that contains the information on how to edit the objectaInteractionStatus- the interaction statusaContext- the edit context- Returns:
- The result of the operation: Whether or not there was success, and whether or not the current handles of the object should be invalidated.
-
getEditHandles
Returns a set of handles for editing the given object. These handles will be able to generate edit operations, that are passed to theeditmethod. As a way to communicate with this method, handles will copy their properties to the edit operation properties. By default this method delegates to the following methods: It returns a list containing the handles returned by those methods. These methods are added for convenience, so they can easily be overridden.- Parameters:
aContext- provides context information such as the layer for which the object is being edited- Returns:
- the edit handles to edit the given object, or an empty list if it should not be possible to edit the given object.
- See Also:
-
createObjectTranslationHandle
protected ALspEditHandle createObjectTranslationHandle(ILcd2DEditableArc aArc, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape. By default this is aTLspObjectTranslationHandle.- Parameters:
aArc- the shape for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullif no handle is needed
-
createCenterHandle
Creates an edit handle that allows the user to translate the given arc by translating its center point. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withCENTER_POINTas value.- Parameters:
aArc- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createMinorAxisHandle
Creates an edit handle that allows the user to edit the minor axis of the given arc.By default this method returns a handle composed of two
TLspPointTranslationHandle"sub-handles" that allow the user to edit the two points that form the arc's minor axis. These points are theILcdArc.MINOR_RADIUS_CORNERandILcdArc.MINOR_RADIUS_OPPOSITE_CORNER.- Parameters:
aArc- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createMajorAxisHandle
Creates an edit handle that allows the user to edit the major axis of the given arc.By default this method returns a handle composed of two
TLspPointTranslationHandle"sub-handles" that allow the user to edit the two points that form the arc's major axis. These points are theILcdArc.MAJOR_RADIUS_CORNERandILcdArc.MAJOR_RADIUS_OPPOSITE_CORNER.- Parameters:
aArc- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createEndPointHandle
Creates an edit handle that allows the user to edit the given arc by translating its end point. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withEND_POINTas value.- Parameters:
aArc- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createStartPointHandle
Creates an edit handle that allows the user to edit the given arc by translating its start point. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withSTART_POINTas value.- Parameters:
aArc- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
getCreateHandle
Returns a handle that is used to create the given object. The returned handle is used by the controller to initialize the other of the object. Typically the returned handle is an instance ofALspCreateHandlewhich is a specialized handle implementation used for creating an object. By default, this method returns anALspCreateHandlecapable of creating anILcd2DEditableArc, as described in the class javadoc.- Parameters:
aContext- provides context information such as the layer for which the object is being created- Returns:
- an edit handle, or
nullif creation should not be allowed. - See Also:
-




