Class ALcyShapeCodec

java.lang.Object
com.luciad.lucy.addons.drawing.format.ALcyShapeCodec

public abstract class ALcyShapeCodec extends Object

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 Details

    • ALcyShapeCodec

      public ALcyShapeCodec()
  • Method Details

    • storeState

      public abstract void storeState(ILcdShape aShape, ILcdModel aSourceModel, Map aMapSFCT) throws IllegalArgumentException
      Encodes the state of an ILcdShape into a Map.
      Parameters:
      aShape - the shape which state needs to be encoded.
      aSourceModel - the model which contains the ILcdShape.
      aMapSFCT - The map to store the state of the object in.
      Throws:
      IllegalArgumentException - when the codec could not handle aShape
    • restoreState

      public abstract void restoreState(ILcdShape aShapeSFCT, ILcdModel aTargetModel, Map aMap) throws IllegalArgumentException, TLcdOutOfBoundsException
      Restores the state of an ILcdShape to the state it was when the storeState method was called with the shape.
      Parameters:
      aShapeSFCT - the shape which state should be restored.
      aTargetModel - the model which contains aShape
      aMap - the map in which all the properties of the shape were stored during the storeState method.
      Throws:
      IllegalArgumentException - when the codec could not handle aShape
      TLcdOutOfBoundsException - when restoring the state for the target model failed because the coordinates could not be properly converted from the source ILcdModelReference to the target ILcdModelReference.