public class TLsp3DArcBandEditor extends ALspEditor
ILcd3DEditableArcBand
objects in an
ILspView
.
MOVE
operations, with a
HANDLE_IDENTIFIER
user property with START_ANGLE_LOW_PITCH_CORNER
as value.MOVE
operations, with a
HANDLE_IDENTIFIER
user property with START_ANGLE_HIGH_PITCH_CORNER
as value.MOVE
operations, with a
HANDLE_IDENTIFIER
user property with END_ANGLE_LOW_PITCH_CORNER
as value.MOVE
operations, with a
HANDLE_IDENTIFIER
user property with END_ANGLE_HIGH_PITCH_CORNER
as value.MOVE
operations, with a
HANDLE_IDENTIFIER
user property with HEIGHT
as value.TLspArcBandEditor
. These allow the user to edit the 2D position,
the min and max radius and the start and arc angle. For details, see its javadoc.
TLspArcBandEditor
,
as previously mentioned.
Note that the center of the 3D arc band is not a handle.TLspEditOperation
, generated by an edit handle (see description
of handles above), this editor performs different edit operations on the associated 3d arc band object.
The image below illustrates this. The
gray color represents the previous state of the object and the red color represents the edited object.
The editor adjusts the corresponding point of the 3d arc band. The figure below illustrates this behavior
for the point located at (max radius, start angle, pitch end angle).
The movement is depicted by the black arrow.![]() |
![]() |
![]() |
![]() |
|||
Setting the center point | Initializing minimum radius and start angle | Initializing maximum radius and arc angle | Initializing the height |
Modifier and Type | Class and Description |
---|---|
static class |
TLsp3DArcBandEditor.HandleIdentifier
Identifies a handle used by the enclosing editor implementation.
|
static class |
TLsp3DArcBandEditor.PropertyKeys
Defines keys used by the enclosing editor implementation to store properties in its
edit handles.
|
Constructor and Description |
---|
TLsp3DArcBandEditor()
Creates a new
TLspArcBandEditor . |
TLsp3DArcBandEditor(TLspArcBandEditor aCustomArcBandEditorDelegate)
Creates a new
TLspArcBandEditor . |
Modifier and Type | Method and Description |
---|---|
boolean |
canEdit(TLspEditContext aContext)
|
protected ALspEditHandle |
createHeightTranslationHandle(ILcd3DEditableArcBand aArcBand,
TLspEditContext aContext)
Creates an edit handle that allows the user to alter the height above the terrain of the
given shape by dragging it up/down.
|
protected ALspEditHandle |
createHighPitchHandleAtEndAngle(ILcd3DEditableArcBand aArcBand,
TLspEditContext aContext)
Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating
the corner point located at (max radius, end angle, pitch end angle).
|
protected ALspEditHandle |
createHighPitchHandleAtStartAngle(ILcd3DEditableArcBand aArcBand,
TLspEditContext aContext)
Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating
the corner point located at (max radius, start angle, pitch end angle).
|
protected ALspEditHandle |
createLowPitchHandleAtEndAngle(ILcd3DEditableArcBand aArcBand,
TLspEditContext aContext)
Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating
the corner point located at (max radius, end angle, pitch start angle).
|
protected ALspEditHandle |
createLowPitchHandleAtStartAngle(ILcd3DEditableArcBand aArcBand,
TLspEditContext aContext)
Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating
the corner point located at (max radius, start angle, pitch start angle).
|
protected ALspEditHandle |
createObjectTranslationHandle(ILcd3DEditableArcBand aArcBand,
TLspEditContext aContext)
Creates an edit handle that allows the user to translate the given shape.
|
protected List<ALspEditHandle> |
createProjectedArcBandHandles(TLspEditContext aContext)
Creates edit handles that allows the user to edit the 3D arc band by using the edit handles of
a 2D arc band.
|
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 TLsp3DArcBandEditor()
TLspArcBandEditor
. This constructor initializes a default
TLspArcBandEditor
to be used as a delegate when editing arc angles.public TLsp3DArcBandEditor(TLspArcBandEditor aCustomArcBandEditorDelegate)
TLspArcBandEditor
. This constructor uses the given
TLspArcBandEditor
as a delegate when editing arc angles.aCustomArcBandEditorDelegate
- the delegate arc band editor to be used for
editing arc angles.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.public 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
protected List<ALspEditHandle> createProjectedArcBandHandles(TLspEditContext aContext)
aContext
- the current context with a 2D arc band as the given shape.protected ALspEditHandle createObjectTranslationHandle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext)
By default, in a 3D view, this handle is visualized as a 2D arc band.
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
.
aArcBand
- the shape for which the handle is createdaContext
- the current contextnull
if no handle is neededprotected ALspEditHandle createHeightTranslationHandle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext)
By default this method returns a TLspObjectHeightTranslationHandle
with a HANDLE_IDENTIFIER
property with
HEIGHT
as value.
Note that by default this method only returns a height translation handle when the current view
is a 3D view and the model reference is not view-space based.
If this is not the case, this method returns null
because then
the height translation handle is not useful.
aArcBand
- the arc band for which the handle is createdaContext
- the current contextnull
if no handle is neededprotected ALspEditHandle createLowPitchHandleAtStartAngle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext)
TLspPointTranslationHandle
with a
HANDLE_IDENTIFIER
user property with
START_ANGLE_LOW_PITCH_CORNER
as value.aArcBand
- the arc for which the handle is createdaContext
- the current contextnull
when no handle is neededprotected ALspEditHandle createHighPitchHandleAtStartAngle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext)
TLspPointTranslationHandle
with a
HANDLE_IDENTIFIER
user property with
START_ANGLE_HIGH_PITCH_CORNER
as value.aArcBand
- the arc for which the handle is createdaContext
- the current contextnull
when no handle is neededprotected ALspEditHandle createLowPitchHandleAtEndAngle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext)
TLspPointTranslationHandle
with a
HANDLE_IDENTIFIER
user property with
END_ANGLE_LOW_PITCH_CORNER
as value.aArcBand
- the arc for which the handle is createdaContext
- the current contextnull
when no handle is neededprotected ALspEditHandle createHighPitchHandleAtEndAngle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext)
TLspPointTranslationHandle
with a
HANDLE_IDENTIFIER
user property with
END_ANGLE_HIGH_PITCH_CORNER
as value.aArcBand
- the arc for which the handle is createdaContext
- the current contextnull
when no handle is neededpublic 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 ILcd3DEditableArcBand
, 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
public 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.
Because this editor employs a TLspArcBandEditor
and associated handles,
this method delegates to said editor when necessary.editImpl
in class ALspEditor
aOperation
- the event that contains the information on how to edit the objectaInteractionStatus
- the interaction statusaContext
- the edit context