Package VASSAL.build.module.turn
Class CounterTurnLevel
java.lang.Object
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
VASSAL.build.module.turn.TurnComponent
VASSAL.build.module.turn.TurnLevel
VASSAL.build.module.turn.CounterTurnLevel
- All Implemented Interfaces:
AutoConfigurable,Buildable,Configurable,PropertyNameSource,ValidityChecker,Translatable
public class CounterTurnLevel extends TurnLevel
-
Nested Class Summary
Nested 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 intincrprotected static StringINCRprotected booleanloopprotected static StringLOOPprotected static StringLOOP_LIMITprotected intloopLimitprotected static StringSTARTFields 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 CounterTurnLevel() -
Method Summary
Modifier and Type Method Description protected voidadvance()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()protected StringgetLongestValueName()protected ComponentgetSetControl()protected StringgetState()protected StringgetValueString()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, buildConfigMenu, findMaximumStrings, getActiveChildLevels, getAllowableConfigureComponents, getConfigMenu, getI18nData, getLongestFormattedValue, getPropertyNames, getSetControls, getTurn, getTurnString, hasRolledOver, hasSubLevelRolledOver, isActive, isConfigurable, 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, getAllDescendantComponents, getAllDescendantComponentsOf, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, validate
-
Field Details
-
START
- See Also:
- Constant Field Values
-
INCR
- See Also:
- Constant Field Values
-
LOOP
- See Also:
- Constant Field Values
-
LOOP_LIMIT
- See Also:
- Constant Field Values
-
incr
protected int incr -
loop
protected boolean loop -
loopLimit
protected int loopLimit
-
-
Constructor Details
-
CounterTurnLevel
public CounterTurnLevel()
-
-
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() -
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;
-