public class TLspLonLatHeightBufferEditor extends TLsp3DPointListEditor
TLcdLonLatHeightBufferobjects 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
TLspGeoBufferEditorwith 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
TLspLLHBufferEditoris an extension of the
TLsp3DPointListEditorand 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
MOVEoperations, with a
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):
TLspEditOperation, 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:
|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|
|Modifier and Type||Class and Description|
Describes the type of an edit handle created by the enclosing editor implementation.
Defines keys used by the enclosing editor implementation to store properties in its edit handles.
Enumeration listing possible locations for the buffer's resize handles.
|Constructor and Description|
Creates a new
|Modifier and Type||Method and Description|
Creates an edit handle on the given location that allows the user to resize the given buffer's width and height.
Returns a handle that is used to create the given object.
Returns a set of handles for editing the given object.
createInsertPointHandle, createObjectTranslationHandle, createPointHeightTranslationHandle, createPointPositionHandle, createRemovePointHandle
canCopyGeometry, canPerformOperation, copyGeometrySFCT, edit, fireUndoableHappened
TLspLonLatHeightBufferEditor. This constructor does not initialize any state.
public boolean canEdit(TLspEditContext aContext)
trueand the given object is an instance of
protected TLspEditOperationResult editImpl(TLspEditOperation aOperation, ELspInteractionStatus aInteractionStatus, TLspEditContext aContext)
editmethod to edit the given object based on the given
edit operation. Note that this method does not need to lock the model of the object, this already happens in the
editmethod. By default, this editor can handle the following operations:
POINT_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 the
HANDLE_IDENTIFIERproperty, with a
HandleIdentifieras value, and this identifier is
RESIZE, then the buffer with and height are modified.
aOperation- the event that contains the information on how to edit the object
aInteractionStatus- the interaction status
aContext- the edit context
SUCCESSif the above conditions are met,
FAILEDotherwise. The invalidation hint will be set if a point was added or removed.
public List<ALspEditHandle> getEditHandles(TLspEditContext aContext)
editmethod. 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:
aContext- provides context information such as the layer for which the object is being edited
protected ALspEditHandle createBufferResizeHandle(TLcdLonLatHeightBuffer aBuffer, TLspEditContext aContext, TLspLonLatHeightBufferEditor.ResizeHandleLocation aHandleLocation)
aBuffer- the buffer for which the handle is created
aContext- the current context
aHandleLocation- the handle location
nullif no handle is needed
public ALspEditHandle getCreateHandle(TLspEditContext aContext)
ALspCreateHandlewhich is a specialized handle implementation used for creating an object. By default, this method returns an
ALspCreateHandlecapable of creating an
ILcd3DEditablePointList, as described in the class javadoc.
aContext- provides context information such as the layer for which the object is being created
nullif creation should not be allowed.