Package 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,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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInternetDiceButton.InternetReportFormatConfigNested classes/interfaces inherited from class VASSAL.build.module.DiceButton
DiceButton.IconConfig, DiceButton.ReportFormatConfigNested classes/interfaces inherited from interface VASSAL.build.AutoConfigurable
AutoConfigurable.Util -
Field Summary
Fields Modifier and Type Field Description static StringDETAILSReport format varialeprotected static DieManagerdieManagerFields inherited from class VASSAL.build.module.DiceButton
ADD_TO_TOTAL, addToTotal, BUTTON_TEXT, DEPRECATED_NAME, HOTKEY, ICON, launch, N_DICE, N_SIDES, NAME, nDice, nSides, plus, PLUS, PROMPT_ALWAYS, promptAlways, property, ran, REPORT_FORMAT, REPORT_NAME, REPORT_TOTAL, reportFormat, reportTotal, RESULT, SORT_DICE_RESULTS, sortDice, tooltip, TOOLTIPFields inherited from class VASSAL.build.AbstractConfigurable
changeSupport, config, localizedName, myI18nData, nameFields inherited from class VASSAL.build.AbstractBuildable
buildComponents, validatorFields inherited from interface VASSAL.build.Configurable
NAME_PROPERTY -
Constructor Summary
Constructors Constructor Description InternetDiceButton() -
Method Summary
Modifier and Type Method Description voidaddTo(Buildable parent)Expects to be added to the DieManager.Commanddecode(String command)Translate a String into aCommandprotected voidDR()Ask the die manager to do our roll!Stringencode(Command c)Translate aCommandinto a StringClass<?>[]getAttributeTypes()Return the Class for the buildFile (XML) attributes of this component.static StringgetConfigureTypeName()HelpFilegetHelpFile()CommandgetRestoreCommand()When saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullprotected voidinitDieManager()voidremoveFrom(Buildable b)Remove this component from its parentvoidsetup(boolean gameStarting)Notify the GameComponent that a game has started/endedMethods inherited from class VASSAL.build.module.DiceButton
formatResult, getAllowableConfigureComponents, getAttributeDescriptions, getAttributeNames, getAttributeValueString, getAttributeVisibility, getComponent, getPropertyNames, getReportPrefix, getReportSuffix, initLaunchButton, setAttributeMethods inherited from class VASSAL.build.AbstractConfigurable
add, addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, getI18nData, getI18nPrefix, getLocalizedConfigureName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureNameMethods inherited from class VASSAL.build.AbstractBuildable
build, getAllDescendantComponents, getAllDescendantComponentsOf, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface VASSAL.build.Buildable
build, getBuildElement
-
Field Details
-
dieManager
-
DETAILS
Report format variale- See Also:
- Constant Field Values
-
-
Constructor Details
-
InternetDiceButton
public InternetDiceButton()
-
-
Method Details
-
getConfigureTypeName
-
getAttributeTypes
Description copied from class:AbstractConfigurableReturn 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 ofAutoConfigurerwill 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 inAbstractBuildable.getAttributeNames()- Specified by:
getAttributeTypesin interfaceAutoConfigurable- Overrides:
getAttributeTypesin classDiceButton
-
DR
protected void DR()Ask the die manager to do our roll!- Overrides:
DRin classDiceButton
-
addTo
Expects to be added to the DieManager.- Specified by:
addToin interfaceBuildable- Overrides:
addToin classDiceButton
-
initDieManager
protected void initDieManager() -
removeFrom
Description copied from interface:ConfigurableRemove this component from its parent- Specified by:
removeFromin interfaceConfigurable- Overrides:
removeFromin classDiceButton
-
setup
public void setup(boolean gameStarting)Description copied from interface:GameComponentNotify the GameComponent that a game has started/ended- Specified by:
setupin interfaceGameComponent- Parameters:
gameStarting- if true, a game is starting. If false, then a game is ending
-
getRestoreCommand
Description copied from interface:GameComponentWhen saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null- Specified by:
getRestoreCommandin interfaceGameComponent
-
decode
Description copied from interface:CommandEncoderTranslate a String into aCommand- Specified by:
decodein interfaceCommandEncoder
-
encode
Description copied from interface:CommandEncoderTranslate aCommandinto a String- Specified by:
encodein interfaceCommandEncoder
-
getHelpFile
- Specified by:
getHelpFilein interfaceConfigurable- Overrides:
getHelpFilein classDiceButton- Returns:
- a HelpFilte describing how to use and configure this component
-