Class TLspShapeEditor
java.lang.Object
com.luciad.view.lightspeed.editor.TLspCompositeEditor
com.luciad.view.lightspeed.editor.TLspShapeEditor
- All Implemented Interfaces:
ILspEditor
This editor is a composite editor that delegates to all other editors in this package. It is
able to edit most default shapes available in LuciadLightspeed:
ILcd2DEditablePointILcd3DEditablePointILcd2DEditablePointListILcd3DEditablePointListILcd2DEditableBoundsILcd3DEditableBoundsILcd2DEditableArcBandILcd3DEditableArcBandILcd2DEditableCircularArcBy3PointsILcd2DEditableCircularArcByBulgeILcd2DEditableCircularArcByCenterPointILcd2DEditableArcILcd2DEditableCircleBy3PointsILcd2DEditableCircleILcd3DEditableDomeILcd3DEditableSphereILcd2DEditableEllipseILcd2DEditableGeoBufferILcd2DEditableVariableGeoBufferTLcdLonLatBufferTLcdLonLatHeightBufferILcdEditableSurfaceILcd2DEditableTextILcdEditableComplexPolygonILcdEditableCompositeCurveTLcdRoundedPolylineTLcdRoundedPolygonILcd2DEditableShape(only moves the entire shape)ILcdShapeList(containing at least one of the above shapes)ILcdEditableExtrudedShape(can edit the extrusion and the base shape if it is one of the above shapes)
Adding editors is equivalent to adding editors to the composite editor. In case
two editors in the list both return true for the canEdit method, the first editor will take precedence. Therefore,
an existing editor can be superseded by adding a new editor to the front of the list (i.e. at index 0):
TLspShapeEditor shapeEditor = new TLspShapeEditor(); shapeEditor.addEditor(new MyCustomEditor(), 0);
Any new editor that is added will automatically have support for shapelists and extruded shapes. These have been configured to have the shape editor as their delegate. In other words: Shapelists and extruded shapes will properly be unpacked and given back to the shape editor itself.
- Since:
- 2012.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intInitial minimal and maximal Z value of 10000 for creation of extruded shapes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEditor(ILspEditor aEditor, int aIndex) Adds the given editor to the list of editors.Gets the sub-shape create model to be used with composite curve creation.Returns how the default delegate editors behave during creation.doubleGets the initial minimal and maximal Z value for creation of extruded shapes.voidsetCompositeCurveCreateModel(ALspCreateEditorModel<ILcdCurve> aShapeCreateEditorModel) Sets the sub-shape create model to be used with composite shape creation.voidsetCreationMode(ELspCreationMode aCreationMode) Sets how the default delegate editors behaves during creation.voidsetInitialZValue(double aInitialZValue) Sets the initial minimal and maximal Z value for creation of extruded shapes.Methods inherited from class com.luciad.view.lightspeed.editor.TLspCompositeEditor
addEditor, canEdit, canPerformOperation, edit, getCreateHandle, getEditHandles, getEditors, removeEditor
-
Field Details
-
DEFAULT_INITIAL_Z
public static final int DEFAULT_INITIAL_ZInitial minimal and maximal Z value of 10000 for creation of extruded shapes.- See Also:
-
-
Constructor Details
-
TLspShapeEditor
public TLspShapeEditor()Creates a new shape editor.
-
-
Method Details
-
addEditor
Description copied from class:TLspCompositeEditorAdds the given editor to the list of editors. The editor is added at the given index. When an object is being edited by this editor, all editing related tasks are delegated to the first compatible editor found.- Overrides:
addEditorin classTLspCompositeEditor- Parameters:
aEditor- the editor to addaIndex- the index at which to add the editor.
-
getInitialZValue
public double getInitialZValue()Gets the initial minimal and maximal Z value for creation of extruded shapes.- Returns:
- the initial minimal and maximal Z value to which newly created extruded shapes are initialized
-
setInitialZValue
public void setInitialZValue(double aInitialZValue) Sets the initial minimal and maximal Z value for creation of extruded shapes.- Parameters:
aInitialZValue- the initial minimal and maximal Z value to which newly created extruded shapes are initialized
-
getCompositeCurveCreateModel
Gets the sub-shape create model to be used with composite curve creation. This create model is used when constructing composite curves. By default this will be aTLspCreateCurveEditorModel- Returns:
- the subshape create model
-
setCompositeCurveCreateModel
Sets the sub-shape create model to be used with composite shape creation. This create model is used when constructing composite curves. This model is called for each new composite sub shape that needs to be created.- Parameters:
aShapeCreateEditorModel- the subshape create model
-
getCreationMode
Returns how the default delegate editors behave during creation.- Returns:
- the creation mode of the default delegate editors
-
setCreationMode
Sets how the default delegate editors behaves during creation. Other editors added byTLspCompositeEditor.addEditor(ILspEditor)will not be affected.- Parameters:
aCreationMode- the creation mode to be set on the default delegate editors
-