public class TLspPointEditor extends ALspEditor
ILcd2DEditablePoint
and
ILcd3DEditablePoint
objects in an
ILspView
.
MOVE
operations,
with an XY constraint, and without properties.MOVE
operations,
with a Z constraint, and without properties.TLspEditOperation
, generated by an edit handle (see description
of handles above), this editor performs different edit operations on the associated point 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 point. | (only for 3D points in a 3D view) Initializing the height of a 3D point. |
Constructor and Description |
---|
TLspPointEditor()
Creates a new
TLspPointEditor . |
Modifier and Type | Method and Description |
---|---|
boolean |
canEdit(TLspEditContext aContext)
|
protected ALspEditHandle |
createHeightHandle(ILcd3DEditablePoint aPoint,
TLspEditContext aContext)
Creates a handle to modify the point's height.
|
protected ALspEditHandle |
createLocationHandle(ILcd2DEditablePoint aPoint,
TLspEditContext aContext)
Creates a handle to modify the point's location.
|
protected TLspEditOperationResult |
editImpl(TLspEditOperation aOperation,
ELspInteractionStatus aInteractionStatus,
TLspEditContext aContext)
Called by the
edit method to edit the given object based on the given
edit operation . |
ALspEditHandle |
getCreateHandle(TLspEditContext aContext)
Returns a handle that is used to create the given object.
|
List<ALspEditHandle> |
getEditHandles(TLspEditContext aContext)
Returns a set of handles for editing the given object.
|
canCopyGeometry, canPerformOperation, copyGeometrySFCT, edit, fireUndoableHappened
public TLspPointEditor()
TLspPointEditor
. This constructor does not initialize any state.public boolean canEdit(TLspEditContext aContext)
canEdit
in interface ILspEditor
canEdit
in class ALspEditor
aContext
- provides context information to the editortrue
if the above conditions are met, false
otherwise.protected ALspEditHandle createLocationHandle(ILcd2DEditablePoint aPoint, TLspEditContext aContext)
MOVE
operations,
with an XY constraint, and without properties.
By default this method returns a TLspPointTranslationHandle
for 3D
points, when visualized in a 3D view. Otherwise a TLspObjectTranslationHandle
is returned.aPoint
- the point to be editedaContext
- the given contextnull
if no handle is neededprotected ALspEditHandle createHeightHandle(ILcd3DEditablePoint aPoint, TLspEditContext aContext)
MOVE
operations,
with an XY constraint, and without properties.aPoint
- the point to be editedaContext
- the given contextnull
if no handle is neededprotected TLspEditOperationResult editImpl(TLspEditOperation aOperation, ELspInteractionStatus aInteractionStatus, TLspEditContext aContext)
edit
method 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
edit
method.
By default, this editor can handle the following operations:
editImpl
in class ALspEditor
aOperation
- the event that contains the information on how to edit the objectaInteractionStatus
- the interaction statusaContext
- the edit contextpublic List<ALspEditHandle> getEditHandles(TLspEditContext aContext)
edit
method. 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.aContext
- provides context information such as the layer for which the object
is being editedTLspEditController
public ALspEditHandle getCreateHandle(TLspEditContext aContext)
ALspCreateHandle
which is a specialized handle implementation used for creating an object.
By default, this method returns an ALspCreateHandle
capable of creating an ILcd2DEditablePoint
, as described in the class javadoc.aContext
- provides context information such as the layer for which the object
is being creatednull
if creation should not be allowed.ALspCreateHandle
,
TLspCreateController