Package VASSAL.build.module.turn
Class ListTurnLevel
java.lang.Object
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
VASSAL.build.module.turn.TurnComponent
VASSAL.build.module.turn.TurnLevel
VASSAL.build.module.turn.ListTurnLevel
- All Implemented Interfaces:
ActionListener,EventListener,AutoConfigurable,Buildable,Configurable,PropertyNameSource,ValidityChecker,Translatable
public class ListTurnLevel extends TurnLevel implements ActionListener
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classListTurnLevel.ConfigDialogNested classes/interfaces inherited from class VASSAL.build.module.turn.TurnLevel
TurnLevel.TurnFormatConfigNested classes/interfaces inherited from interface VASSAL.build.AutoConfigurable
AutoConfigurable.Util -
Field Summary
Fields Modifier and Type Field Description protected boolean[]activeprotected static StringCONFIG_FIRSTprotected static StringCONFIG_LISTprotected JDialogconfigDialogprotected booleanconfigFirstprotected booleanconfigListprotected intfirstprotected String[]listprotected static StringLISTprotected Stringpromptprotected static StringPROMPTprotected ComponentsetControlsFields inherited from class VASSAL.build.module.turn.TurnLevel
childSetControls, current, currentSubLevel, LEVEL_VALUE, levelSetControls, myValue, NAME, parent, PROP, propertyName, rolledOver, setDialog, start, subLevelRolledOver, turn, TURN_FORMAT, turnFormatFields inherited from class VASSAL.build.AbstractConfigurable
changeSupport, config, localizedName, myI18nData, name -
Constructor Summary
Constructors Constructor Description ListTurnLevel() -
Method Summary
Modifier and Type Method Description voidactionPerformed(ActionEvent arg0)protected voidadvance()protected voidbuildConfigMenu(JMenu configMenu)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.VisibilityConditiongetAttributeVisibility(String name)By default, all attributes are visiblestatic StringgetConfigureTypeName()HelpFilegetHelpFile()ComponentI18nDatagetI18nData()Return the i18n data for this componentprotected StringgetLongestValueName()protected ComponentgetSetControl()protected StringgetState()protected StringgetValueString()protected booleanisActive()booleanisConfigurable()protected voidreset()protected voidretreat()voidsetAttribute(String key, Object value)Sets an attribute value for this component.protected voidsetHigh()protected voidsetLow()protected voidsetState(String code)Methods inherited from class VASSAL.build.module.turn.TurnLevel
addChildControls, addTo, findMaximumStrings, getActiveChildLevels, getAllowableConfigureComponents, getConfigMenu, getLongestFormattedValue, getPropertyNames, getSetControls, getTurn, getTurnString, hasRolledOver, hasSubLevelRolledOver, removeFrom, setRolledOverMethods inherited from class VASSAL.build.module.turn.TurnComponent
addLevel, getTurnLevel, getTurnLevelCount, getTurnLevels, removeLevelMethods inherited from class VASSAL.build.AbstractConfigurable
add, addPropertyChangeListener, getConfigureComponents, getConfigureName, getConfigurer, getI18nPrefix, getLocalizedConfigureName, remove, removePropertyChangeListener, setAllAttributesUntranslatable, setAttributeTranslatable, setConfigureNameMethods inherited from class VASSAL.build.AbstractBuildable
build, getAllDescendantComponentsOf, getBuildables, getBuildComponents, getBuildElement, getComponentsOf, validate
-
Field Details
-
LIST
- See Also:
- Constant Field Values
-
CONFIG_LIST
- See Also:
- Constant Field Values
-
CONFIG_FIRST
- See Also:
- Constant Field Values
-
PROMPT
- See Also:
- Constant Field Values
-
first
protected int first -
list
-
active
protected boolean[] active -
configList
protected boolean configList -
configFirst
protected boolean configFirst -
prompt
-
configDialog
-
setControls
-
-
Constructor Details
-
ListTurnLevel
public ListTurnLevel()
-
-
Method Details
-
reset
protected void reset() -
setLow
protected void setLow() -
setHigh
protected void setHigh() -
getState
-
setState
-
getValueString
- Specified by:
getValueStringin classTurnLevel
-
getLongestValueName
- Specified by:
getLongestValueNamein classTurnLevel
-
advance
protected void advance() -
retreat
protected void retreat() -
isActive
protected boolean isActive() -
buildConfigMenu
- Overrides:
buildConfigMenuin classTurnLevel
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
getSetControl
- Specified by:
getSetControlin classTurnLevel
-
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- Overrides:
getAttributeDescriptionsin classTurnLevel
-
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- Overrides:
getAttributeTypesin classTurnLevel
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceAutoConfigurable- Overrides:
getAttributeNamesin classTurnLevel- Returns:
- a list of all attribute names for this component
-
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- Overrides:
setAttributein classTurnLevel- Parameters:
key- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()
-
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- Overrides:
getAttributeValueStringin classTurnLevel- Parameters:
key- the name of the attribute. Will be one of those listed inAbstractBuildable.getAttributeNames()
-
getConfigureTypeName
-
getHelpFile
- Specified by:
getHelpFilein interfaceConfigurable- Overrides:
getHelpFilein classTurnComponent- Returns:
- a HelpFilte describing how to use and configure this component
-
getAttributeVisibility
Description copied from class:AbstractConfigurableBy default, all attributes are visible- Specified by:
getAttributeVisibilityin interfaceAutoConfigurable- Overrides:
getAttributeVisibilityin classAbstractConfigurable- Returns:
- null if the attribute controls should always be visible;
-
isConfigurable
public boolean isConfigurable()- Overrides:
isConfigurablein classTurnLevel
-
getI18nData
Description copied from class:AbstractConfigurableReturn the i18n data for this component- Specified by:
getI18nDatain interfaceTranslatable- Overrides:
getI18nDatain classTurnLevel
-