Package VASSAL.build.module
Class GlobalOptions
java.lang.Object
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
VASSAL.build.module.GlobalOptions
- All Implemented Interfaces:
AutoConfigurable,Buildable,Configurable,PropertyNameSource,ValidityChecker,Translatable
public class GlobalOptions extends AbstractConfigurable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlobalOptions.PlayerIdFormatConfigstatic classGlobalOptions.PromptNested classes/interfaces inherited from interface VASSAL.build.AutoConfigurable
AutoConfigurable.Util -
Field Summary
Fields Modifier and Type Field Description static StringALWAYSstatic StringAUTO_REPORTstatic StringBUG_10295static StringCENTER_ON_MOVEstatic StringCHATTER_HTML_SUPPORTstatic StringCLASSIC_MFDstatic StringDRAG_THRESHOLDstatic StringINITIAL_HEAPstatic StringMAC_LEGACYstatic StringMARK_MOVEDstatic StringMAXIMUM_HEAPstatic StringNEVERstatic StringNON_OWNER_UNMASKABLEstatic StringPLAYER_IDstatic StringPLAYER_ID_ALTstatic StringPLAYER_ID_FORMATstatic StringPLAYER_NAMEstatic StringPLAYER_NAME_ALTstatic StringPLAYER_SIDEstatic StringPLAYER_SIDE_ALTstatic StringPROMPTstatic StringPROMPT_STRINGstatic StringSINGLE_WINDOWFields inherited from class VASSAL.build.AbstractConfigurable
changeSupport, config, localizedName, myI18nData, name -
Constructor Summary
Constructors Constructor Description GlobalOptions() -
Method Summary
Modifier and Type Method Description voidaddOption(Configurer option)Components may use GlobalOptions to store generic global attributes.voidaddTo(Buildable parent)Adds this component to its parent.booleanautoReportEnabled()voidbuild(Element e)Build this component by getting all XML attributes of the XML element and callingAbstractBuildable.setAttribute(java.lang.String, java.lang.Object)with the String value of the attributebooleancenterOnOpponentsMove()booleanchatterHTMLSupport()Class<?>[]getAllowableConfigureComponents()Return a list of valid sub-component Classes.String[]getAttributeDescriptions()Return an array of Strings describing the attributes of this object.String[]getAttributeNames()Class<?>[]getAttributeTypes()Return the Class for the attributes of this object.StringgetAttributeValueString(String key)Return a String representation of the attribute with the given name.ElementgetBuildElement(Document doc)ConfigurergetConfigurer()static StringgetConfigureTypeName()intgetDragThreshold()HelpFilegetHelpFile()static GlobalOptionsgetInstance()StringgetPlayerId()List<String>getPropertyNames()Implement PropertyNameSource - Expose our preference namesbooleanisAveragedScaling()Deprecated, for removal: This API element is subject to removal in a future version.No replacementbooleanisMarkMoveEnabled()booleanisUseClassicMoveFixedDistance()booleanisUseSingleWindow()voidremoveFrom(Buildable parent)Remove this component from its parentvoidsetAttribute(String key, Object value)Sets an attribute value for this component.voidsetPrefMacLegacy(boolean b)voidsetUseClassicMoveFixedDistance(boolean b)Methods inherited from class VASSAL.build.AbstractConfigurable
add, addPropertyChangeListener, getAttributeVisibility, getConfigureComponents, getConfigureName, getI18nData, getI18nPrefix, getLocalizedConfigureName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureNameMethods inherited from class VASSAL.build.AbstractBuildable
getAllDescendantComponents, getAllDescendantComponentsOf, getBuildables, getBuildComponents, getComponents, getComponentsOf, validate
-
Field Details
-
NON_OWNER_UNMASKABLE
- See Also:
- Constant Field Values
-
PROMPT_STRING
- See Also:
- Constant Field Values
-
CENTER_ON_MOVE
- See Also:
- Constant Field Values
-
MARK_MOVED
- See Also:
- Constant Field Values
-
AUTO_REPORT
- See Also:
- Constant Field Values
-
CHATTER_HTML_SUPPORT
- See Also:
- Constant Field Values
-
ALWAYS
- See Also:
- Constant Field Values
-
NEVER
- See Also:
- Constant Field Values
-
PROMPT
- See Also:
- Constant Field Values
-
SINGLE_WINDOW
- See Also:
- Constant Field Values
-
MAXIMUM_HEAP
- See Also:
- Constant Field Values
-
INITIAL_HEAP
- See Also:
- Constant Field Values
-
BUG_10295
- See Also:
- Constant Field Values
-
CLASSIC_MFD
- See Also:
- Constant Field Values
-
DRAG_THRESHOLD
- See Also:
- Constant Field Values
-
MAC_LEGACY
- See Also:
- Constant Field Values
-
PLAYER_NAME
- See Also:
- Constant Field Values
-
PLAYER_NAME_ALT
- See Also:
- Constant Field Values
-
PLAYER_SIDE
- See Also:
- Constant Field Values
-
PLAYER_SIDE_ALT
- See Also:
- Constant Field Values
-
PLAYER_ID
- See Also:
- Constant Field Values
-
PLAYER_ID_ALT
- See Also:
- Constant Field Values
-
PLAYER_ID_FORMAT
- See Also:
- Constant Field Values
-
-
Constructor Details
-
GlobalOptions
public GlobalOptions()
-
-
Method Details
-
addTo
Description copied from interface:BuildableAdds this component to its parent. In order to make Buildable objects extensible, the child is reponsible for adding itself to the parent. That way, Buildable subcomponents can be defined in an extension package without needing to modify the containing class. -
getInstance
-
isUseSingleWindow
public boolean isUseSingleWindow() -
isUseClassicMoveFixedDistance
public boolean isUseClassicMoveFixedDistance() -
setUseClassicMoveFixedDistance
public void setUseClassicMoveFixedDistance(boolean b) -
isAveragedScaling
Deprecated, for removal: This API element is subject to removal in a future version.No replacement -
setPrefMacLegacy
public void setPrefMacLegacy(boolean b) -
getConfigureTypeName
-
getAllowableConfigureComponents
Description copied from interface:ConfigurableReturn a list of valid sub-component Classes. If a Class appears in this list, then instances of that class may be added to this component from the Configuration Window. -
getAttributeDescriptions
Description copied from class:AbstractConfigurableReturn an array of Strings describing the attributes of this object. These strings are used as prompts in the Properties window for this object. The order of descriptions should be the same as the order of names inAbstractBuildable.getAttributeNames()- Specified by:
getAttributeDescriptionsin interfaceAutoConfigurable- Specified by:
getAttributeDescriptionsin classAbstractConfigurable
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceAutoConfigurable- Specified by:
getAttributeNamesin classAbstractBuildable- Returns:
- a list of all attribute names for this component
-
getAttributeTypes
Description copied from class:AbstractConfigurableReturn 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 inAbstractBuildable.getAttributeNames()- Specified by:
getAttributeTypesin interfaceAutoConfigurable- Specified by:
getAttributeTypesin classAbstractConfigurable
-
addOption
Components may use GlobalOptions to store generic global attributes. This method registers the given key as an attribute of the GlobalOptions with the given type. -
build
Description copied from class:AbstractBuildableBuild this component by getting all XML attributes of the XML element and callingAbstractBuildable.setAttribute(java.lang.String, java.lang.Object)with the String value of the attribute- Specified by:
buildin interfaceBuildable- Overrides:
buildin classAbstractBuildable- Parameters:
e- the XML element containing the object data
-
getBuildElement
- Specified by:
getBuildElementin interfaceBuildable- Overrides:
getBuildElementin classAbstractBuildable- Returns:
- an XML element from which this component can be built
-
getConfigurer
Description copied from class:AbstractConfigurable- Specified by:
getConfigurerin interfaceConfigurable- Overrides:
getConfigurerin classAbstractConfigurable
-
getAttributeValueString
Description copied from class:AbstractBuildableReturn a String representation of the attribute with the given name. When initializing a module, this String value will be passed toAbstractBuildable.setAttribute(java.lang.String, java.lang.Object).- Specified by:
getAttributeValueStringin interfaceAutoConfigurable- Specified by:
getAttributeValueStringin interfaceTranslatable- Specified by:
getAttributeValueStringin classAbstractBuildable- Parameters:
key- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()
-
getHelpFile
- Returns:
- a HelpFilte describing how to use and configure this component
-
removeFrom
Description copied from interface:ConfigurableRemove this component from its parent -
setAttribute
Description copied from class:AbstractBuildableSets an attribute value for this component. Thekeyparameter will be one of those listed inAbstractBuildable.getAttributeNames(). If thevalueparameter is a String, it will be the value returned byAbstractBuildable.getAttributeValueString(java.lang.String)for the samekey. If the implementing class extendsAbstractConfigurable, thenvaluewill be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()- Specified by:
setAttributein interfaceAutoConfigurable- Specified by:
setAttributein interfaceTranslatable- Specified by:
setAttributein classAbstractBuildable- Parameters:
key- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()
-
autoReportEnabled
public boolean autoReportEnabled() -
centerOnOpponentsMove
public boolean centerOnOpponentsMove() -
chatterHTMLSupport
public boolean chatterHTMLSupport() -
isMarkMoveEnabled
public boolean isMarkMoveEnabled() -
getDragThreshold
public int getDragThreshold() -
getPlayerId
-
getPropertyNames
Implement PropertyNameSource - Expose our preference names- Specified by:
getPropertyNamesin interfacePropertyNameSource- Overrides:
getPropertyNamesin classAbstractBuildable
-