Class InternetDiceButton

All Implemented Interfaces:
AutoConfigurable, Buildable, Configurable, GameComponent, PropertyNameSource, CommandEncoder, ValidityChecker, Translatable

public class InternetDiceButton
extends DiceButton
implements GameComponent, CommandEncoder
This component places a button into the controls window toolbar. Pressing the button generates random numbers and displays the result in the Chatter
  • Field Details

  • Constructor Details

    • InternetDiceButton

      public InternetDiceButton()
  • Method Details

    • getConfigureTypeName

      public static String getConfigureTypeName()
    • getAttributeTypes

      public Class<?>[] getAttributeTypes()
      Description copied from class: AbstractConfigurable
      Return the Class for the buildFile (XML) attributes of this component. Valid classes include: String, Integer, Double, Boolean, Image, Color, and KeyStroke, along with any class for which a Configurer exists in VASSAL.configure. The class determines, among other things, which type of AutoConfigurer will be used to configure the attribute when the object is configured in the Editor. The order of classes should be the same as the order of names in AbstractBuildable.getAttributeNames()
      Specified by:
      getAttributeTypes in interface AutoConfigurable
      Overrides:
      getAttributeTypes in class DiceButton
    • DR

      protected void DR()
      Ask the die manager to do our roll!
      Overrides:
      DR in class DiceButton
    • addTo

      public void addTo​(Buildable parent)
      Expects to be added to the DieManager.
      Specified by:
      addTo in interface Buildable
      Overrides:
      addTo in class DiceButton
    • initDieManager

      protected void initDieManager()
    • removeFrom

      public void removeFrom​(Buildable b)
      Description copied from interface: Configurable
      Remove this component from its parent
      Specified by:
      removeFrom in interface Configurable
      Overrides:
      removeFrom in class DiceButton
    • setup

      public void setup​(boolean gameStarting)
      Description copied from interface: GameComponent
      Notify the GameComponent that a game has started/ended
      Specified by:
      setup in interface GameComponent
      Parameters:
      gameStarting - if true, a game is starting. If false, then a game is ending
    • getRestoreCommand

      public Command getRestoreCommand()
      Description copied from interface: GameComponent
      When saving a game, each GameComponent should return a Command that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null
      Specified by:
      getRestoreCommand in interface GameComponent
    • decode

      public Command decode​(String command)
      Description copied from interface: CommandEncoder
      Translate a String into a Command
      Specified by:
      decode in interface CommandEncoder
    • encode

      public String encode​(Command c)
      Description copied from interface: CommandEncoder
      Translate a Command into a String
      Specified by:
      encode in interface CommandEncoder
    • getHelpFile

      public HelpFile getHelpFile()
      Specified by:
      getHelpFile in interface Configurable
      Overrides:
      getHelpFile in class DiceButton
      Returns:
      a HelpFilte describing how to use and configure this component