Package VASSAL.build
Interface AutoConfigurable
- All Superinterfaces:
Buildable
,Configurable
,Translatable
- All Known Implementing Classes:
AboutScreen
,AbstractConfigurable
,AbstractDeckKeyCommand
,AbstractFolder
,AbstractScenarioProperty
,AbstractScript
,AbstractToolbarItem
,ActionScript
,BasicModule
,BasicPreference
,Board
,BooleanPreference
,BooleanScenarioProperty
,BoxWidget
,BrowserHelpFile.ConfigSupport
,BrowserPDFFile
,BshPlugin
,CardSlot
,ChangePropertyButton
,Chart
,ChartWindow
,ChessClock
,ChessClockControl
,ColorManager
,ColorSwatch
,CounterDetailViewer
,CounterTurnLevel
,DeckGlobalKeyCommand
,DeckSendKeyCommand
,DeckSortKeyCommand
,DeckSubFolder
,DiceButton
,DieManager
,DoActionButton
,Documentation
,DoublePreference
,DrawPile
,EnumPreference
,Flare
,FontManager
,FontStyle
,GameModule
,GamePieceImage
,GamePieceImageDefinitions
,GamePieceLayout
,GamePieceLayoutsContainer
,GeneralScript
,GlobalKeyCommand
,GlobalMap
,GlobalMap.CounterViewer
,GlobalOptions
,GlobalProperties
,GlobalProperty
,GlobalPropertyFolder
,GlobalTranslatableMessage
,GlobalTranslatableMessages
,HandMetrics
,HelpFile
,HexGrid
,HexGridNumbering
,HidePiecesButton
,HighlightLastMoved
,HtmlChart
,IconFamily
,ImageItem
,ImageItemInstance
,ImageSaver
,IntegerPreference
,InternetDiceButton
,Inventory
,Item
,ItemInstance
,Language
,LayerControl
,LayeredPieceCollection
,ListScenarioProperty
,ListTurnLevel
,ListWidget
,Localization
,LOS_Thread
,Map
,MapShader
,MapSubFolder
,MapWidget
,MassKeyCommand
,ModuleSubFolder
,MoveCameraButton
,MultiActionButton
,NotesWindow
,NumberScenarioProperty
,PanelWidget
,PieceRecenterer
,PieceSlot
,PieceWindow
,PlayerHand
,PlayerRoster
,Plugin
,PredefinedSetup
,PrivateMap
,PrototypeDefinition
,PrototypeFolder
,PrototypesContainer
,RandomTextButton
,Region
,RegionGrid
,RegularGridNumbering
,ScenarioPropertiesOptionTab
,ScriptContainer
,SelectionHighlighter
,SelectionHighlighters
,SetupStack
,ShapeItem
,ShapeItemInstance
,SpecialDiceButton
,SpecialDie
,SpecialDieFace
,SquareGrid
,SquareGridNumbering
,StackMetrics
,StartupGlobalKeyCommand
,StringPreference
,StringScenarioProperty
,SymbolItem
,SymbolItemInstance
,TabWidget
,TextBoxItem
,TextBoxItemInstance
,TextItem
,TextItemInstance
,TextPreference
,TextSaver
,ToolbarMenu
,TranslatableMarker
,Translation
,TurnComponent
,TurnGlobalHotkey
,TurnLevel
,TurnTracker
,Tutorial
,VassalTranslation
,Widget
,WidgetMap
,Zone
,ZonedGrid
,ZonedGridHighlighter
,ZoneHighlight
,ZoneProperty
,Zoomer
A class that implements AutoConfigurable can use the
AutoConfigurer
class to automatically build a property editor.-
Nested Class Summary
-
Field Summary
Fields inherited from interface VASSAL.build.Configurable
NAME_PROPERTY
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Return an array of Strings describing the attributes of this object.String[]
Class<?>[]
Return the Class for the attributes of this object.Called by theBuildable.getBuildElement(org.w3c.dom.Document)
method to write the attributes into an XML elementgetAttributeVisibility
(String name) Because attributes are not always applicable in all cases, this method returns an interface to determine when the controls for specifying the named attribute should be visible.void
setAttribute
(String key, Object value) Called by theBuildable.build(org.w3c.dom.Element)
method, wherevalue
is the String value read by the XML attribute.Methods inherited from interface VASSAL.build.Buildable
add, addTo, build, getBuildElement, isMandatory, isMovable, isUnique
Methods inherited from interface VASSAL.build.Configurable
addPropertyChangeListener, getAllowableConfigureComponents, getConfigureComponents, getConfigureName, getConfigurer, getHelpFile, remove, removeFrom
Methods inherited from interface VASSAL.i18n.Translatable
getI18nData
-
Method Details
-
getAttributeNames
String[] getAttributeNames()- Returns:
- an array of Strings giving all attributes of this Buildable component that will be written to/read from an XML element
-
setAttribute
Called by theBuildable.build(org.w3c.dom.Element)
method, wherevalue
is the String value read by the XML attribute. Can also be called with Object value to set the attribute.- Specified by:
setAttribute
in interfaceTranslatable
- Parameters:
key
- the name of the attribute. If the implementing class extendsAbstractConfigurable
, will be one of those listed inAbstractBuildable.getAttributeNames()
.value
- If thevalue
parameter is a String, it will be the value returned byTranslatable.getAttributeValueString(java.lang.String)
for the samekey
. If the implementing class extendsAbstractConfigurable
, thenvalue
can also be an instance of the corresponding Class listed inAbstractConfigurable.getAttributeTypes()
-
getAttributeValueString
Called by theBuildable.getBuildElement(org.w3c.dom.Document)
method to write the attributes into an XML element- Specified by:
getAttributeValueString
in interfaceTranslatable
- Parameters:
key
- the name of the attribute. If the implementing class extendsAbstractConfigurable
, will be one of those listed inAbstractBuildable.getAttributeNames()
.- Returns:
- a String representation of the attribute with the given name. When initializing a module, this String value will be passed to
Translatable.setAttribute(java.lang.String, java.lang.Object)
.
-
getAttributeDescriptions
String[] 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. -
getAttributeTypes
Class<?>[] getAttributeTypes()Return the Class for the attributes of this object. Valid classes are: String, Integer, Double, Boolean, Image, File, Color, and KeyStroke -
getAttributeVisibility
Because attributes are not always applicable in all cases, this method returns an interface to determine when the controls for specifying the named attribute should be visible.- Parameters:
name
-- Returns:
- null if the attribute controls should always be visible;
-