Class PieceDefiner

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

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

  • Constructor Details

    • PieceDefiner

      public PieceDefiner()
      Creates new form test
    • PieceDefiner

      public PieceDefiner(String id, GpIdSupport s)
    • PieceDefiner

      public PieceDefiner(GpIdSupport s)
  • Method Details

    • isPrototype

      public boolean isPrototype()
    • setPrototypeName

      public void setPrototypeName(String prototypeName)
    • getInUseSelectedIndex

      protected int getInUseSelectedIndex()
    • 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)
    • refresh

      protected void refresh()
      The piece defined has been changed. It may have changed size, or image
    • getPiece

      public GamePiece getPiece()
    • setChanged

      public void setChanged(boolean b)
    • isChanged

      public boolean isChanged()
    • initCustomControls

      public void initCustomControls(JDialog d, Configurable target)
    • isSplitDragInProgress

      public boolean isSplitDragInProgress()
    • setSplitDragInProgress

      public void setSplitDragInProgress(boolean splitDragInProgress)
    • copy

      protected void copy(int index)
    • 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)
    • getTraitList

      public List<GamePiece> getTraitList()
      Export a List of all the allowable traits
      Returns: