Class ALcyShapeCodec
java.lang.Object
com.luciad.lucy.addons.drawing.format.ALcyShapeCodec
Provides an ALcyShapeSupplier
with a codec which is used to implement undo/redo
in the customizers, to clone shapes and to implement shape conversion during drag and drop.
Typically, a shape codec can only be used on a specific shape and therefore it is registered
to an ALcyShapeSupplier.
- Since:
- 8.2
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
restoreState
(ILcdShape aShapeSFCT, ILcdModel aTargetModel, Map aMap) Restores the state of anILcdShape
to the state it was when thestoreState
method was called with the shape.abstract void
storeState
(ILcdShape aShape, ILcdModel aSourceModel, Map aMapSFCT) Encodes the state of anILcdShape
into aMap
.
-
Constructor Details
-
ALcyShapeCodec
public ALcyShapeCodec()
-
-
Method Details
-
storeState
public abstract void storeState(ILcdShape aShape, ILcdModel aSourceModel, Map aMapSFCT) throws IllegalArgumentException Encodes the state of anILcdShape
into aMap
.- Parameters:
aShape
- the shape which state needs to be encoded.aSourceModel
- the model which contains theILcdShape
.aMapSFCT
- The map to store the state of the object in.- Throws:
IllegalArgumentException
- when the codec could not handleaShape
-
restoreState
public abstract void restoreState(ILcdShape aShapeSFCT, ILcdModel aTargetModel, Map aMap) throws IllegalArgumentException, TLcdOutOfBoundsException Restores the state of anILcdShape
to the state it was when thestoreState
method was called with the shape.- Parameters:
aShapeSFCT
- the shape which state should be restored.aTargetModel
- the model which containsaShape
aMap
- the map in which all the properties of the shape were stored during thestoreState
method.- Throws:
IllegalArgumentException
- when the codec could not handleaShape
TLcdOutOfBoundsException
- when restoring the state for the target model failed because the coordinates could not be properly converted from the sourceILcdModelReference
to the targetILcdModelReference
.
-