VASSAL.build.module.map.boardPicker.board.mapgrid
Class RegularGridNumbering
java.lang.Object
|
+--VASSAL.build.AbstractBuildable
|
+--VASSAL.build.AbstractConfigurable
|
+--VASSAL.build.module.map.boardPicker.board.mapgrid.RegularGridNumbering
- All Implemented Interfaces:
- AutoConfigurable, Buildable, Configurable, GridNumbering
- Direct Known Subclasses:
- HexGridNumbering, SquareGridNumbering
- public abstract class RegularGridNumbering
- extends AbstractConfigurable
- implements GridNumbering
Abstract base class for grid numbering classes for hexagonal and rectangular grids
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface VASSAL.build.module.map.boardPicker.board.mapgrid.GridNumbering |
draw |
propSupport
protected java.beans.PropertyChangeSupport propSupport
first
protected char first
sep
protected java.lang.String sep
hType
protected char hType
vType
protected char vType
hLeading
protected int hLeading
vLeading
protected int vLeading
hOff
protected int hOff
vOff
protected int vOff
visible
protected boolean visible
fontSize
protected int fontSize
color
protected java.awt.Color color
visualizer
protected javax.swing.JComponent visualizer
FIRST
public static final java.lang.String FIRST
SEP
public static final java.lang.String SEP
H_TYPE
public static final java.lang.String H_TYPE
V_TYPE
public static final java.lang.String V_TYPE
H_LEADING
public static final java.lang.String H_LEADING
V_LEADING
public static final java.lang.String V_LEADING
H_OFF
public static final java.lang.String H_OFF
V_OFF
public static final java.lang.String V_OFF
FONT_SIZE
public static final java.lang.String FONT_SIZE
COLOR
public static final java.lang.String COLOR
VISIBLE
public static final java.lang.String VISIBLE
ALPHABET
public static final java.lang.String ALPHABET
RegularGridNumbering
public RegularGridNumbering()
getAttributeValueString
public java.lang.String getAttributeValueString(java.lang.String key)
- Description copied from interface:
AutoConfigurable
- Called by the
Buildable.getBuildElement(org.w3c.dom.Document) method to write the
attributes into an XML element
- Overrides:
getAttributeValueString in class AbstractBuildable
- Following copied from class:
VASSAL.build.AbstractBuildable
- Parameters:
key - the name of the attribute. Will be one of those
listed in AbstractBuildable.getAttributeNames()
setAttribute
public void setAttribute(java.lang.String key,
java.lang.Object value)
- Description copied from interface:
AutoConfigurable
- Called by the
Buildable.build(org.w3c.dom.Element) method, where value is the
String value read by the XML attribute.
Can also be called with Object value to set the attribute.
- Overrides:
setAttribute in class AbstractBuildable
- Following copied from class:
VASSAL.build.AbstractBuildable
- Parameters:
key - the name of the attribute. Will be one of those
listed in AbstractBuildable.getAttributeNames()
isVisible
public boolean isVisible()
- Specified by:
isVisible in interface GridNumbering
getRow
public abstract int getRow(java.awt.Point p)
getColumn
public abstract int getColumn(java.awt.Point p)
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
- Description copied from interface:
Configurable
- Add a PropertyChangeListener. A PropertyChangeEvent should be fired
with property name
Configurable.NAME_PROPERTY when the value returned from
Configurable.getConfigureName() has changed
- Overrides:
addPropertyChangeListener in class AbstractConfigurable
getAllowableConfigureComponents
public java.lang.Class[] getAllowableConfigureComponents()
- Description copied from interface:
Configurable
- Return 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.
getAttributeNames
public java.lang.String[] getAttributeNames()
- Overrides:
getAttributeNames in class AbstractBuildable
- Following copied from interface:
VASSAL.build.AutoConfigurable
- Returns:
- an array of Strings giving all attributes of this Buildable
component that will be written to/read from an XML element
getAttributeDescriptions
public java.lang.String[] getAttributeDescriptions()
- Description copied from class:
AbstractConfigurable
- 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
in
AbstractBuildable.getAttributeNames()
- Overrides:
getAttributeDescriptions in class AbstractConfigurable
getAttributeTypes
public java.lang.Class[] getAttributeTypes()
- Description copied from class:
AbstractConfigurable
- 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
in
AbstractBuildable.getAttributeNames()
- Overrides:
getAttributeTypes in class AbstractConfigurable
getGridVisualizer
protected abstract javax.swing.JComponent getGridVisualizer()
- Return a component that shows how the grid will draw itself
getAttributeVisibility
public VisibilityCondition getAttributeVisibility(java.lang.String name)
- Description copied from class:
AbstractConfigurable
- By default, all attributes are visible
- Overrides:
getAttributeVisibility in class AbstractConfigurable
- Following copied from class:
VASSAL.build.AbstractConfigurable
- Parameters:
name - - Returns:
-
getConfigurer
public Configurer getConfigurer()
- Description copied from class:
AbstractConfigurable
- The default
Configurer of an AbstractConfigurable class is an instance of AutoConfigurer
- Overrides:
getConfigurer in class AbstractConfigurable
getConfigureTypeName
public static java.lang.String getConfigureTypeName()
getHelpFile
public HelpFile getHelpFile()
- Following copied from interface:
VASSAL.build.Configurable
- Returns:
- a HelpFilte describing how to use and configure
this component
getName
protected java.lang.String getName(int row,
int column)
locationName
public java.lang.String locationName(java.awt.Point pt)
- Specified by:
locationName in interface GridNumbering
getName
protected java.lang.String getName(int rowOrColumn,
char type,
int leading)