VASSAL.build.module
Class InternetDiceButton

java.lang.Object
  |
  +--VASSAL.build.AbstractBuildable
        |
        +--VASSAL.build.AbstractConfigurable
              |
              +--VASSAL.build.module.DiceButton
                    |
                    +--VASSAL.build.module.InternetDiceButton
All Implemented Interfaces:
AutoConfigurable, Buildable, CommandEncoder, Configurable, GameComponent, ValidityChecker

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


Inner Class Summary
static class InternetDiceButton.InternetReportFormatConfig
           
 
Inner classes inherited from class VASSAL.build.module.DiceButton
DiceButton.IconConfig, DiceButton.ReportFormatConfig
 
Inner classes inherited from class VASSAL.build.AutoConfigurable
AutoConfigurable.Util
 
Field Summary
static java.lang.String DETAILS
          Report format variale
protected static DieManager dieManager
           
 
Fields inherited from class VASSAL.build.module.DiceButton
BUTTON_TEXT, DEPRECATED_NAME, HOTKEY, ICON, launch, N_DICE, N_SIDES, NAME, nDice, nSides, plus, PLUS, PROMPT_ALWAYS, promptAlways, ran, REPORT_FORMAT, REPORT_NAME, REPORT_TOTAL, reportFormat, reportTotal, RESULT
 
Fields inherited from class VASSAL.build.AbstractConfigurable
changeSupport, config, name
 
Fields inherited from class VASSAL.build.AbstractBuildable
buildComponents, validator
 
Fields inherited from interface VASSAL.build.Configurable
NAME_PROPERTY
 
Constructor Summary
InternetDiceButton()
           
 
Method Summary
 void addTo(Buildable parent)
          Expects to be added to the DieManager.
 Command decode(java.lang.String command)
          Translate a String into a Command
protected  void DR()
          Ask the die manager to do our roll!
 java.lang.String encode(Command c)
          Translate a Command into a String
 java.lang.Class[] getAttributeTypes()
          Return the Class for the attributes of this object.
static java.lang.String getConfigureTypeName()
           
 HelpFile getHelpFile()
           
 Command getRestoreCommand()
          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
protected  void initDieManager()
           
 void removeFrom(Buildable b)
          Remove this component from its parent
 void setup(boolean gameStarting)
          Notify the GameComponent that a game has started/ended
 
Methods inherited from class VASSAL.build.module.DiceButton
formatResult, getAllowableConfigureComponents, getAttributeDescriptions, getAttributeNames, getAttributeValueString, getAttributeVisibility, getComponent, getReportPrefix, getReportSuffix, setAttribute
 
Methods inherited from class VASSAL.build.AbstractConfigurable
addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, remove, setConfigureName
 
Methods inherited from class VASSAL.build.AbstractBuildable
add, build, getBuildComponents, getBuildElement, getComponents, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface VASSAL.build.Buildable
add, build, getBuildElement
 

Field Detail

dieManager

protected static DieManager dieManager

DETAILS

public static final java.lang.String DETAILS
Report format variale
Constructor Detail

InternetDiceButton

public InternetDiceButton()
Method Detail

getConfigureTypeName

public static java.lang.String getConfigureTypeName()

getAttributeTypes

public java.lang.Class[] getAttributeTypes()
Description copied from class: AbstractConfigurable
Return the Class for the attributes of this object. Valid classes are: String, Integer, Double, Boolean, Image, Color, and KeyStroke The order of classes should be the same as the order of names in AbstractBuildable.getAttributeNames()
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.
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
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
Following copied from interface: VASSAL.build.module.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(java.lang.String command)
Description copied from interface: CommandEncoder
Translate a String into a Command
Specified by:
decode in interface CommandEncoder

encode

public java.lang.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()
Overrides:
getHelpFile in class DiceButton
Following copied from interface: VASSAL.build.Configurable
Returns:
a HelpFilte describing how to use and configure this component