Class TLspCircleBy3PointsEditor
java.lang.Object
com.luciad.view.lightspeed.editor.ALspEditor
com.luciad.view.lightspeed.editor.TLspCircleBy3PointsEditor
- All Implemented Interfaces:
ILspEditor
Enables visual editing of
ILcd2DEditableCircleBy3Points
objects in an ILspView.
Handles
The circle-by-3-points editor defines the following edit handles for a circle object:- Circle point handles: allows the user to edit the circle. When a circle point is
translated, the circle will make sure it includes that point. The user can change the location
if the points by dragging the handle. This handle generates
MOVEoperations, with aHANDLE_IDENTIFIERproperty andSTART_POINT,INTERMEDIATE_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 circle 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 circle 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:
-
Circle point handles: the editor adjusts the circle so that it contains all three
circle points of the circle-by-3-points. The figure below illustrates this behaviour.

-
Center point handle: translates the entire circle

-
Object translation handle: the editor translates the entire circle. 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 initialization process of a circle-by-3-points object consists of following steps:- the first step sets the first intermediate point of the circle-by-3-points
- the second step sets the second intermediate point of the circle-by-3-points
- the third step sets the start point of the circle-by-3-points
![]() |
![]() |
![]() |
||
| Setting the first intermediate point | Setting the second intermediate point | Setting the start point |
- Since:
- 2012.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes a control point of a circle-by-3-points shape.static enumDefines keys used by the enclosing editor implementation to store user properties in its edit handles. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanEdit(TLspEditContext aContext) Returnstrueifsuperreturnstrueand the given object is an instance ofILcd2DEditableCircleBy3Points.protected ALspEditHandlecreateCenterHandle(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given circle by translating its center point.protected ALspEditHandlecreateFirstIntermediateHandle(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to edit the given arc by translating its first intermediate point.protected ALspEditHandlecreateObjectTranslationHandle(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape.protected ALspEditHandlecreateSecondIntermediateHandle(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to edit the given circle by translating its second intermediate point.protected ALspEditHandlecreateStartPointHandle(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to edit the given circle 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
-
TLspCircleBy3PointsEditor
public TLspCircleBy3PointsEditor()Creates a newTLspCircleBy3PointsEditor. This constructor does not initialize any state.
-
-
Method Details
-
canEdit
Returnstrueifsuperreturnstrueand the given object is an instance ofILcd2DEditableCircleBy3Points.- 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.
-
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 anILcd2DEditableCircleBy3Points, 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:
-
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(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape. By default this is aTLspObjectTranslationHandle.- Parameters:
aCircle- the shape for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullif no handle is needed
-
createCenterHandle
protected ALspEditHandle createCenterHandle(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given circle by translating its center point. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withCENTER_POINTas value.- Parameters:
aCircle- the circle for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullif no handle is needed
-
createStartPointHandle
protected ALspEditHandle createStartPointHandle(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to edit the given circle by translating its start point. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withSTART_POINTas value.- Parameters:
aCircle- the circle for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullif no handle is needed
-
createSecondIntermediateHandle
protected ALspEditHandle createSecondIntermediateHandle(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to edit the given circle by translating its second intermediate point. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withEND_POINTas value.- Parameters:
aCircle- the circle for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullif no handle is needed
-
createFirstIntermediateHandle
protected ALspEditHandle createFirstIntermediateHandle(ILcd2DEditableCircleBy3Points aCircle, TLspEditContext aContext) Creates an edit handle that allows the user to edit the given arc by translating its first intermediate point. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withINTERMEDIATE_POINTas value.- Parameters:
aCircle- the circle for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullif no handle is needed
-


