Class TLspArcBandEditor
java.lang.Object
com.luciad.view.lightspeed.editor.ALspEditor
com.luciad.view.lightspeed.editor.TLspArcBandEditor
- All Implemented Interfaces:
ILspEditor
Enables visual editing of
ILcd2DEditableArcBand objects in an
ILspView.
Handles
The arc band editor defines the following edit handles for an arc band object:- Min radius start corner handle: allows the user to edit the
min radius start corner of the arc band.
This handle generates
MOVEoperations, with aHANDLE_IDENTIFIERuser property withMIN_RADIUS_START_CORNERas value. - Max radius start corner handle: allows the user to edit the
max radius start corner of the arc band.
This handle generates
MOVEoperations, with aHANDLE_IDENTIFIERuser property withMAX_RADIUS_START_CORNERas value. - Min radius end corner handle: allows the user to edit the
min radius end corner of the arc band.
This handle generates
MOVEoperations, with aHANDLE_IDENTIFIERuser property withMIN_RADIUS_END_CORNERas value. - Max radius end corner handle: allows the user to edit the
max radius end corner of the arc band.
This handle generates
MOVEoperations, with aHANDLE_IDENTIFIERuser property withMAX_RADIUS_END_CORNERas value. - Max radius handle: allows the user to edit the max radius of the arc band. This handle generates
PROPERTY_CHANGEoperations, with""maxRadius""as property name, and aDoubleas value. - Min radius handle: allows the user to edit the min radius of the arc band. This handle generates
PROPERTY_CHANGEoperations, with""minRadius""as property name, and aDoubleas value. - Center point handle: allows the user to translate the center of the arcband. The
user can change the position of the center point by dragging the handle. This handle
generates
MOVEoperations, with aHANDLE_IDENTIFIERproperty withCENTER_POINTas value. - Object translation handle: allows the user to translate the object. This handle generates
MOVEoperations.
Editing
Based on theTLspEditOperation, generated by an edit handle (see description
of handles above), this editor performs different edit operations on the associated arc band 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 handle: the editor adjusts the corresponding point of the arc band. The
figure below illustrates this behaviour if the max point of the starting axis is moved (the
movement is depicted by the the black arrow).

-
Min/max radius handle: the editor adjusts the corresponding radius of the arc band.
The figure below illustrates the behaviour if the max radius is modified.

-
Center point handle: the editor translates the entire arc band. The figure below
illustrates this behaviour.

- Object translation handle: the editor translates the entire arc band. 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 (see the Handles section above).
Creation
The initialization process of an arc band consists of three distinct steps:- The first step sets the center of the arc band
- The second step initializes the minimum radius and the start angle of the arc band
- The third step initializes the maximum radius and the arc angle
![]() |
![]() |
![]() |
||
| Setting the center point | Initializing minimum radius and start angle | Initializing maximum radius and arc angle |
- Since:
- 2012.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes a control point of an arc-by-3-points shape.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(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given arc by translating its center point.protected ALspEditHandlecreateMaxRadiusEndCornerHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the arc band by translating itsMAX_RADIUS_END_CORNERpoint.protected ALspEditHandlecreateMaxRadiusHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allow the user to edit the max radius property of the arc band.protected ALspEditHandlecreateMaxRadiusStartCornerHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the arc band by translating itsMAX_RADIUS_START_CORNERpoint.protected ALspEditHandlecreateMinRadiusEndCornerHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the arc band by translating itsMIN_RADIUS_END_CORNERpoint.protected ALspEditHandlecreateMinRadiusHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allow the user to edit the min radius property of the arc band.protected ALspEditHandlecreateMinRadiusStartCornerHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the arc band by translating itsMIN_RADIUS_START_CORNERpoint.protected ALspEditHandlecreateObjectTranslationHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape.editImpl(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
-
TLspArcBandEditor
public TLspArcBandEditor()Creates a newTLspArcBandEditor. 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.
-
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(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape. By default this is aTLspObjectTranslationHandle.- Parameters:
aArcBand- 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(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) 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:
aArcBand- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createMinRadiusStartCornerHandle
protected ALspEditHandle createMinRadiusStartCornerHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the arc band by translating itsMIN_RADIUS_START_CORNERpoint. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withMIN_RADIUS_START_CORNERas value.- Parameters:
aArcBand- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createMaxRadiusStartCornerHandle
protected ALspEditHandle createMaxRadiusStartCornerHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the arc band by translating itsMAX_RADIUS_START_CORNERpoint. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withMAX_RADIUS_START_CORNERas value.- Parameters:
aArcBand- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createMinRadiusEndCornerHandle
protected ALspEditHandle createMinRadiusEndCornerHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the arc band by translating itsMIN_RADIUS_END_CORNERpoint. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withMIN_RADIUS_END_CORNERas value.- Parameters:
aArcBand- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createMaxRadiusEndCornerHandle
protected ALspEditHandle createMaxRadiusEndCornerHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the arc band by translating itsMAX_RADIUS_END_CORNERpoint. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERuser property withMAX_RADIUS_END_CORNERas value.- Parameters:
aArcBand- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createMaxRadiusHandle
protected ALspEditHandle createMaxRadiusHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allow the user to edit the max radius property of the arc band. By default, this method returns anALspOutlineResizeHandlethat represents the outer arc of the arcband.- Parameters:
aArcBand- the arc for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullwhen no handle is needed
-
createMinRadiusHandle
protected ALspEditHandle createMinRadiusHandle(ILcd2DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allow the user to edit the min radius property of the arc band. By default, this method returns anALspOutlineResizeHandlethat represents the inner arc of the arcband.- Parameters:
aArcBand- 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 anILcd2DEditableArcBand, 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:
-
editImpl
public 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 move operations contains theHANDLE_IDENTIFIERproperty, then this editor will only perform the operation on the respective corner point, otherwise it will perform it on the entire arc. If the operation type isPROPERTY_CHANGE, and the name of the changed property is""maxRadius"", the max radius of the arcband is modified. If the name is""minRadius"", the min radius of the arcband is modified.- 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.
-


