Package VASSAL.build
Class AbstractConfigurable
java.lang.Object
VASSAL.build.AbstractBuildable
VASSAL.build.AbstractConfigurable
- All Implemented Interfaces:
AutoConfigurable,Buildable,Configurable,PropertyNameSource,ValidityChecker,Translatable
- Direct Known Subclasses:
AboutScreen,AbstractScript,BasicPreference,Board,ChangePropertyButton,ColorManager,ColorSwatch,CounterDetailViewer,DiceButton,DieManager,DoActionButton,Documentation,FontManager,FontStyle,GameModule,GamePieceImage,GamePieceImageDefinitions,GamePieceLayout,GamePieceLayoutsContainer,GlobalOptions,GlobalProperties,GlobalProperty,HelpFile,HexGrid,HighlightLastMoved,IconFamily,ImageSaver,Inventory,Item,ItemInstance,Language,LayerControl,LayeredPieceCollection,LOS_Thread,Map,MapShader,MassKeyCommand,NotesWindow,PieceRecenterer,PlayerRoster,Plugin,PredefinedSetup,PrototypeDefinition,PrototypesContainer,Region,RegionGrid,RegularGridNumbering,ScriptContainer,SelectionHighlighter,SelectionHighlighters,SetupStack,SpecialDiceButton,SpecialDie,SpecialDieFace,SquareGrid,StackMetrics,TextSaver,ToolbarMenu,TranslatableMarker,Translation,TurnComponent,TurnGlobalHotkey,Tutorial,Widget,Zone,ZonedGrid,ZonedGridHighlighter,ZoneHighlight,Zoomer
public abstract class AbstractConfigurable extends AbstractBuildable implements AutoConfigurable
An abstract implementation of the Configurable interface. Takes care of most of the Configurable functionality
-
Nested Class Summary
Nested classes/interfaces inherited from interface VASSAL.build.AutoConfigurable
AutoConfigurable.Util -
Field Summary
Fields Modifier and Type Field Description protected PropertyChangeSupportchangeSupportprotected Configurerconfigprotected StringlocalizedNameprotected ComponentI18nDatamyI18nDataprotected Stringname -
Constructor Summary
Constructors Constructor Description AbstractConfigurable() -
Method Summary
Modifier and Type Method Description voidadd(Buildable b)Set the owning translatable of this componentvoidaddPropertyChangeListener(PropertyChangeListener l)Add a PropertyChangeListener.abstract String[]getAttributeDescriptions()Return an array of Strings describing the attributes of this object.abstract Class<?>[]getAttributeTypes()Return the Class for the attributes of this object.VisibilityConditiongetAttributeVisibility(String name)By default, all attributes are visibleConfigurable[]getConfigureComponents()StringgetConfigureName()The name of this Configurable ObjectConfigurergetConfigurer()ComponentI18nDatagetI18nData()Return the i18n data for this componentprotected StringgetI18nPrefix()Generate a standard prefix for i18n keys for attributes of this component - Classname.attributeNameStringgetLocalizedConfigureName()voidremove(Buildable b)Remove a Buildable object from this objectvoidremovePropertyChangeListener(PropertyChangeListener l)protected voidsetAllAttributesUntranslatable()protected voidsetAttributeTranslatable(String attr, boolean b)Over-ride the default attribute translatability.voidsetConfigureName(String s)Sets the name and fires a PropertyChangeEventMethods inherited from class VASSAL.build.AbstractBuildable
build, getAllDescendantComponents, getAllDescendantComponentsOf, getAttributeNames, getAttributeValueString, getBuildables, getBuildComponents, getBuildElement, getComponents, getComponentsOf, getPropertyNames, setAttribute, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface VASSAL.build.AutoConfigurable
getAttributeNames, getAttributeValueString, setAttributeMethods inherited from interface VASSAL.build.Configurable
getAllowableConfigureComponents, getHelpFile, removeFrom
-
Field Details
-
Constructor Details
-
AbstractConfigurable
public AbstractConfigurable()
-
-
Method Details
-
remove
Remove a Buildable object from this object- Specified by:
removein interfaceConfigurable
-
getConfigureName
Description copied from interface:ConfigurableThe name of this Configurable Object- Specified by:
getConfigureNamein interfaceConfigurable
-
getLocalizedConfigureName
-
setConfigureName
Sets the name and fires a PropertyChangeEvent -
getAttributeDescriptions
Return 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
-
getAttributeTypes
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 inAbstractBuildable.getAttributeNames()- Specified by:
getAttributeTypesin interfaceAutoConfigurable
-
getAttributeVisibility
By default, all attributes are visible- Specified by:
getAttributeVisibilityin interfaceAutoConfigurable- Parameters:
name-- Returns:
-
getI18nData
Return the i18n data for this component- Specified by:
getI18nDatain interfaceTranslatable
-
getI18nPrefix
Generate a standard prefix for i18n keys for attributes of this component - Classname.attributeName -
setAttributeTranslatable
Over-ride the default attribute translatability. This is called by inidivdual components to force specific attributes to be translatable or not translatable -
setAllAttributesUntranslatable
protected void setAllAttributesUntranslatable() -
add
Set the owning translatable of this component- Specified by:
addin interfaceBuildable- Overrides:
addin classAbstractBuildable
-
addPropertyChangeListener
Description copied from interface:ConfigurableAdd a PropertyChangeListener. A PropertyChangeEvent should be fired with property nameConfigurable.NAME_PROPERTYwhen the value returned fromConfigurable.getConfigureName()has changed- Specified by:
addPropertyChangeListenerin interfaceConfigurable
-
removePropertyChangeListener
-
getConfigureComponents
- Specified by:
getConfigureComponentsin interfaceConfigurable- Returns:
- an array of Configurer objects representing the Configurable children of this Configurable object
-
getConfigurer
- Specified by:
getConfigurerin interfaceConfigurable
-