Class TLspDomeEditor
- All Implemented Interfaces:
ILspEditor
ILcd3DEditableDome objects in an
ILspView.
Handles
The dome editor defines the following edit handles for a dome object:- Radius handle: allows the user to edit the radius of the dome. The
user can change the radius by dragging the outline of the dome. This handle
generates
PROPERTY_CHANGEoperations, with ""radius"" as property and aDoubleas 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 withCENTER_POINTas value. - Object translation handle: allows the user to translate the dome object. This handle
generates
MOVEoperations, without any additional properties. - Height translation handle: only for domes in a 3D view, allows the user to edit the
height of the dome. The user can change the height by translating this handle. This handle generates
MOVEoperations, with a Z constraint, and aHANDLE_IDENTIFIERproperty withHEIGHT_POINTas value.
Editing
Based on theTLspEditOperation, generated by an edit handle (see description
of handles above), this editor performs different edit operations on the associated dome 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:
-
Radius handle: the editor modifies the radius of the dome. The figure below illustrates
this behavior.

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

- Object translation handle: the editor translates the entire dome. 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).
-
Height translation handle: 3D only, the editor modifies the height of the dome. The
figure below illustrates this behavior.

Creation
The creation process of a dome consists of two distinct steps:- the first step initializes the XY position of the dome's center point, putting it at ground level
- the second step initializes the radius of the dome
- the third step initializes the height of the dome's center point above the terrain
![]() |
![]() |
![]() |
||
| Setting the center point. | Initializing the radius. | (3D only) Initializing the height. |
- Since:
- 2012.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes the type of an edit handle created by the enclosing editor implementation.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(ILcd3DEditableDome aDome, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given dome in 2D by dragging it.protected ALspEditHandlecreateHeightTranslationHandle(ILcd3DEditableDome aDome, TLspEditContext aContext) Creates an edit handle that allows the user to alter the height above the terrain of the given dome by dragging it up/down.protected ALspEditHandlecreateObjectTranslationHandle(ILcd3DEditableDome aDome, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape.protected ALspEditHandlecreateRadiusHandle(ILcd3DEditableDome aDome, TLspEditContext aContext) Creates an edit handle that allows the user to edit the radius of the given dome by dragging it.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
-
TLspDomeEditor
public TLspDomeEditor()Creates a newTLspDomeEditor. 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 property, and this identifier isRADIUS, then the radius of the dome will be 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.
-
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 anILcd3DEditableDome, 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:
-
createRadiusHandle
Creates an edit handle that allows the user to edit the radius of the given dome by dragging it.By default this method returns a handle with a
HANDLE_IDENTIFIERproperty withHEIGHT_POINTas value.- Parameters:
aDome- the dome 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 dome in 2D by dragging it. By default this method returns aTLspPointTranslationHandlewith aHANDLE_IDENTIFIERproperty withCENTER_POINTas value.- Parameters:
aDome- the dome for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullif no handle is needed
-
createHeightTranslationHandle
protected ALspEditHandle createHeightTranslationHandle(ILcd3DEditableDome aDome, TLspEditContext aContext) Creates an edit handle that allows the user to alter the height above the terrain of the given dome by dragging it up/down.By default this method returns a
TLspObjectHeightTranslationHandlewith aHANDLE_IDENTIFIERproperty withHEIGHT_POINTas value.Note that by default this method only returns a height translation handle when the current view is a 3D view. If this is not the case, this method returns
nullsince in a 2D view, the height translation handle is not useful.- Parameters:
aDome- the dome for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullif no handle is needed
-
createObjectTranslationHandle
protected ALspEditHandle createObjectTranslationHandle(ILcd3DEditableDome aDome, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape.By default, in a 3D view, this handle is visualized as a circle (i.e. a projected version of the dome) on the terrain. The returned handle is a
TLspProjectedObjectTranslationHandle.By default, in a 2D view, the handle becomes a regular object translation handle. The returned handle is a
TLspObjectTranslationHandle.- Parameters:
aDome- the shape for which the handle is createdaContext- the current context- Returns:
- an edit handle or
nullif no handle is needed
-


