Class TLspLonLatHeightBufferEditor
java.lang.Object
com.luciad.view.lightspeed.editor.ALspEditor
com.luciad.view.lightspeed.editor.TLsp3DPointListEditor
com.luciad.view.lightspeed.editor.TLspLonLatHeightBufferEditor
- All Implemented Interfaces:
ILspEditor
Enables visual editing of
TLcdLonLatHeightBuffer objects in an
ILspView.
Note that the discussion of the editing behaviour below focuses on how a LLH buffer is edited in
a 3D view. In a 2D view, editing a LLH buffer works essentially the same as when using a
TLspGeoBufferEditor with the exception of how the buffer
width is changed. For the LLH buffer editor, in 2D the width is changed by using the buffer
resize handles (instead of the buffer's outline). Note that when doing this, the height of the
LLH buffer is also changed in such a way that the width/height ratio stays constant.
Note also that the TLspLLHBufferEditor is an extension of the TLsp3DPointListEditor
and that it uses all of the handles generated by the parent class. Therefore, these handles are
left out in the discussion above and the reader is referred to the class documentation of
Handles
The LLH buffer editor defines the following edit handles for a LLH buffer object in addition to the 3D point list handles:- Buffer resize handle: allows the user to change the width and height of a LLH
buffer object. This handle is drawn on the front face of the LLH buffer. This handle
generates
MOVEoperations, with aHANDLE_IDENTIFIERproperty, withRESIZEas value.
TLsp3DPointListEditor), the blue dots represent
the buffer resize handles and the green buffer shape (drawn on the terrain) represents the
object translation handle (in the case of a 3D view):
Editing
Based on theTLspEditOperation, generated by an edit handle (see description
of handles above), this editor performs different edit operations on the associated LLH buffer
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:
-
3D point handle

NOTE: only part of the new state (red) is drawn to avoid cluttering the image.
-
Buffer resize handle: Allows to edit the width of the buffer by dragging its outline.

NOTE: only part of the new state (red) is drawn to avoid cluttering the image.
-
Object translation handle: This handle translates the entire LLH buffer object.

Creation
The creation process of a LLH buffer object consists of a series of two distinct steps:- the first step initializes the XY location of the next axis point
- the second step initializes the height of that point
![]() |
![]() |
![]() |
![]() |
|||
| Setting the XY location of the buffer's first axis point | Setting the height of the buffer's first axis point | Setting the XY location of the buffer's second axis point | Setting the height of the buffer's second axis point |
- 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.static enumEnumeration listing possible locations for the buffer's resize handles. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanEdit(TLspEditContext aContext) protected ALspEditHandlecreateBufferResizeHandle(TLcdLonLatHeightBuffer aBuffer, TLspEditContext aContext, TLspLonLatHeightBufferEditor.ResizeHandleLocation aHandleLocation) Creates an edit handle on the given location that allows the user to resize the given buffer's width and height.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.TLsp3DPointListEditor
createInsertPointHandle, createObjectTranslationHandle, createPointHeightTranslationHandle, createPointPositionHandle, createRemovePointHandleMethods inherited from class com.luciad.view.lightspeed.editor.ALspEditor
canCopyGeometry, canPerformOperation, copyGeometrySFCT, edit, fireUndoableHappened
-
Constructor Details
-
TLspLonLatHeightBufferEditor
public TLspLonLatHeightBufferEditor()Creates a newTLspLonLatHeightBufferEditor. This constructor does not initialize any state.
-
-
Method Details
-
canEdit
- Specified by:
canEditin interfaceILspEditor- Overrides:
canEditin classTLsp3DPointListEditor- 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 thePOINT_INDEXproperty, with an integer value, then this editor will only perform the operation on that particular point, otherwise it will perform it on the entire point list. If any of the operations contains theHANDLE_IDENTIFIERproperty, with aHandleIdentifieras value, and this identifier isRESIZE, then the buffer with and height are modified.- Overrides:
editImplin classTLsp3DPointListEditor- Parameters:
aOperation- the event that contains the information on how to edit the objectaInteractionStatus-aContext- the edit context- Returns:
SUCCESSif the above conditions are met,FAILEDotherwise. The invalidation hint will be set if a point was added or removed.
-
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. Note that for the point handles, it delegates multiple times to those methods with different indices. By default this method returns a list that is twice the size, plus one, of the size of the pointlist. Additionally This method creates returns resize handles on all four corners of the front face of the buffer.- Specified by:
getEditHandlesin interfaceILspEditor- Overrides:
getEditHandlesin classTLsp3DPointListEditor- 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:
-
createBufferResizeHandle
protected ALspEditHandle createBufferResizeHandle(TLcdLonLatHeightBuffer aBuffer, TLspEditContext aContext, TLspLonLatHeightBufferEditor.ResizeHandleLocation aHandleLocation) Creates an edit handle on the given location that allows the user to resize the given buffer's width and height.- Parameters:
aBuffer- the buffer for which the handle is createdaContext- the current contextaHandleLocation- the handle location- Returns:
- an edit handle or
nullif no handle is needed
-
getCreateHandle
Description copied from class:TLsp3DPointListEditorReturns 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 anILcd3DEditablePointList, as described in the class javadoc.- Specified by:
getCreateHandlein interfaceILspEditor- Overrides:
getCreateHandlein classTLsp3DPointListEditor- 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:
-



