Class PieceDefiner

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, HelpWindowExtension
Direct Known Subclasses:
MassPieceDefiner, PrototypeDefinition.Config.Definer

public class PieceDefiner extends JPanel implements HelpWindowExtension
This is the GamePiece designer dialog. It appears when you edit the properties of a "Single Piece" in the Configuration window.
See Also:
Serialized Form
  • Field Details

    • availableModel

      protected static DefaultListModel<GamePiece> availableModel
    • inUseModel

      protected DefaultListModel<GamePiece> inUseModel
    • r

      protected ListCellRenderer<? super GamePiece> r
    • slot

      protected VASSAL.counters.PieceDefiner.ScaleablePieceSlot slot
    • clipBoard

      protected static VASSAL.counters.PieceDefiner.TraitClipboard clipBoard
    • pieceId

      protected String pieceId
    • pieceIdLabel

      protected JLabel pieceIdLabel
    • gpidSupport

      protected GpIdSupport gpidSupport
    • changed

      protected boolean changed
    • availableList

      protected JList<GamePiece> availableList
    • copyButton

      protected JButton copyButton
    • pasteButton

      protected JButton pasteButton
  • Constructor Details

    • PieceDefiner

      public PieceDefiner()
      Creates new form test
    • PieceDefiner

      public PieceDefiner(String id, GpIdSupport s)
    • PieceDefiner

      public PieceDefiner(GpIdSupport s)
  • Method Details

    • addElement

      protected static void addElement(GamePiece piece)
    • initDefinitions

      protected static void initDefinitions()
    • addDefinition

      public static void addDefinition(GamePiece definition)
      Plugins can add additional GamePiece definitions
      Parameters:
      definition - GamePiece definition to add
    • getSorted

      public static Boolean getSorted()
    • setSorted

      public static void setSorted(Boolean sorted)
    • setPiece

      public void setPiece(GamePiece piece)
    • setBaseWindow

      @Deprecated(since="2020-09-12", forRemoval=true) public void setBaseWindow(HelpWindow w)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setBaseWindow in interface HelpWindowExtension
    • getPiece

      public GamePiece getPiece()
    • setChanged

      public void setChanged(boolean b)
    • isChanged

      public boolean isChanged()
    • isSplitDragInProgress

      public boolean isSplitDragInProgress()
    • setSplitDragInProgress

      public void setSplitDragInProgress(boolean splitDragInProgress)
    • paste

      protected void paste()
    • moveDecoratorDown

      protected void moveDecoratorDown(int index)
    • moveDecoratorUp

      protected void moveDecoratorUp(int index)
    • moveDecoratorTop

      protected void moveDecoratorTop(int index)
    • moveDecoratorBottom

      protected void moveDecoratorBottom(int index)
    • moveDecorator

      protected void moveDecorator(int fromIndex, int toIndex)
      Move a Decorator to a new position in the list
      Parameters:
      fromIndex - Old Position
      toIndex - New Position
    • removeDecorator

      protected GamePiece removeDecorator(int index)
      Remove the Decorator at a given position in the list
      Parameters:
      index - Position of Decorator to remove
      Returns:
      Removed Decorator
    • insertDecorator

      protected void insertDecorator(int index, GamePiece piece)
      Insert a Decorator into the list at a given position
      Parameters:
      index - Position to insert Decorator
      piece - Decorator to insert
    • importPiece

      protected void importPiece(String className)
    • edit

      protected boolean edit(int index)
    • removeTrait

      protected void removeTrait(int index)
    • addTrait

      protected void addTrait(Decorator c)
    • addTrait

      protected void addTrait(Decorator c, int insertIndex)