Class Embellishment

java.lang.Object
VASSAL.counters.Decorator
VASSAL.counters.Embellishment
All Implemented Interfaces:
PropertyNameSource, PropertySource, EditablePiece, GamePiece, PropertyExporter, StateMergeable, TranslatablePiece, PersistentPropertyContainer

public class Embellishment
extends Decorator
implements TranslatablePiece
The "Layer" trait. Contains a list of images that the user may cycle through. The current image is superimposed over the inner piece. The entire layer may be activated or deactivated. Changes to support NamedKeyStrokes: - Random and reset command changed directly to Name Key Strokes. - Disentangle alwaysActive flag from length of activateKey field. Make a separate field and save in type - Add a Version field to type to enable conversion of Activate/Increase/Decrease commands. Note commands with more than 1 target keycode cannot be converted - Simplify code. Removed Version 0 (3.1) code to a separate class Embellishment0. The BasicCommandEncoder replaces this class with an Embellishment0 if Embellishment(type, inner) returns a version 0 Embellishment trait.
  • Field Details

    • OLD_ID

      public static final String OLD_ID
      See Also:
      Constant Field Values
    • ID

      public static final String ID
      See Also:
      Constant Field Values
    • IMAGE

      public static final String IMAGE
      See Also:
      Constant Field Values
    • NAME

      public static final String NAME
      See Also:
      Constant Field Values
    • LEVEL

      public static final String LEVEL
      See Also:
      Constant Field Values
    • ACTIVE

      public static final String ACTIVE
      See Also:
      Constant Field Values
    • activateKey

      protected String activateKey
    • upKey

      protected String upKey
    • downKey

      protected String downKey
    • activateModifiers

      protected int activateModifiers
    • upModifiers

      protected int upModifiers
    • downModifiers

      protected int downModifiers
    • upCommand

      protected String upCommand
    • downCommand

      protected String downCommand
    • activateCommand

      protected String activateCommand
    • resetCommand

      protected String resetCommand
    • resetLevel

      protected FormattedString resetLevel
    • loopLevels

      protected boolean loopLevels
    • resetKey

      protected NamedKeyStroke resetKey
    • followProperty

      protected boolean followProperty
    • propertyName

      protected String propertyName
    • followPropertyExpression

      protected Expression followPropertyExpression
    • firstLevelValue

      protected int firstLevelValue
    • rndKey

      protected NamedKeyStroke rndKey
    • value

      protected int value
    • nValues

      protected int nValues
    • xOff

      protected int xOff
    • yOff

      protected int yOff
    • imageName

      protected String[] imageName
    • commonName

      protected String[] commonName
    • size

      protected Rectangle[] size
    • imagePainter

      protected ScaledImagePainter[] imagePainter
    • drawUnderneathWhenSelected

      protected boolean drawUnderneathWhenSelected
    • name

      protected String name
    • commands

      protected KeyCommand[] commands
    • up

      protected KeyCommand up
    • down

      protected KeyCommand down
    • lastBounds

      protected Rectangle lastBounds
    • lastShape

      protected Area lastShape
    • BASE_VERSION

      public static final int BASE_VERSION
      See Also:
      Constant Field Values
    • CURRENT_VERSION

      public static final int CURRENT_VERSION
      See Also:
      Constant Field Values
    • version

      protected int version
    • alwaysActive

      protected boolean alwaysActive
    • activateKeyStroke

      protected NamedKeyStroke activateKeyStroke
    • increaseKeyStroke

      protected NamedKeyStroke increaseKeyStroke
    • decreaseKeyStroke

      protected NamedKeyStroke decreaseKeyStroke
  • Constructor Details

    • Embellishment

      public Embellishment()
    • Embellishment

      public Embellishment​(String type, GamePiece d)
  • Method Details