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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidrestoreState(ILcdShape aShapeSFCT, ILcdModel aTargetModel, Map aMap) Restores the state of anILcdShapeto the state it was when thestoreStatemethod was called with the shape.abstract voidstoreState(ILcdShape aShape, ILcdModel aSourceModel, Map aMapSFCT) Encodes the state of anILcdShapeinto 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 anILcdShapeinto 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 anILcdShapeto the state it was when thestoreStatemethod was called with the shape.- Parameters:
aShapeSFCT- the shape which state should be restored.aTargetModel- the model which containsaShapeaMap- the map in which all the properties of the shape were stored during thestoreStatemethod.- Throws:
IllegalArgumentException- when the codec could not handleaShapeTLcdOutOfBoundsException- when restoring the state for the target model failed because the coordinates could not be properly converted from the sourceILcdModelReferenceto the targetILcdModelReference.
-