public class TLsp2DEditableShapeEditor extends ALspEditor
ILcd2DEditableShapeobjects in an
ILspView. This editor acts as a very basic editor for any shape that doesn't implement anything more descriptive than
MOVEoperations, with a xy constraint, without any additional properties.
TLspEditOperation, generated by an edit handle (see description of handles above), this editor performs different edit operations on the associated shape. 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:
|Constructor and Description|
Creates a new
|Modifier and Type||Method and Description|
Creates an edit handle that allows the user to translate the given shape.
Returns a handle that is used to create the given object.
Returns a set of handles for editing the given object.
canCopyGeometry, canPerformOperation, copyGeometrySFCT, edit, fireUndoableHappened
TLsp2DEditableShapeEditor. 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:
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
createObjectTranslationHandlemethod. It is added for convenience, so it can easily be overridden. This method returns either a list with a single handle, or an empty list.
aContext- provides context information such as the layer for which the object is being edited
protected ALspEditHandle createObjectTranslationHandle(ILcd2DEditableShape aShape, TLspEditContext aContext)
aShape- the point list for which the handle is created
aContext- the current context
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