|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--VASSAL.counters.Decorator
|
+--VASSAL.counters.Marker
A generic Decorator that retains in its state the value of a property. That is, if setProperty() is invoked with a key that's one of getKeys(), the String value of that property will be reflected in the myGetState() method.
| Field Summary | |
static java.lang.String |
ID
|
protected java.lang.String[] |
keys
|
protected java.lang.String[] |
values
|
| Constructor Summary | |
Marker()
|
|
Marker(java.lang.String type,
GamePiece p)
|
|
| Method Summary | |
java.awt.Rectangle |
boundingBox()
The area which this GamePiece occupies when drawn at the point given by getPosition(). |
void |
draw(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
|
java.lang.String |
getDescription()
A plain-English description of this type of piece |
HelpFile |
getHelpFile()
|
java.lang.String[] |
getKeys()
|
java.lang.String |
getName()
The plain English name for this piece |
java.lang.Object |
getProperty(java.lang.Object key)
|
protected KeyCommand[] |
myGetKeyCommands()
|
java.lang.String |
myGetState()
|
java.lang.String |
myGetType()
|
Command |
myKeyEvent(javax.swing.KeyStroke stroke)
The response of this trait alone to the given KeyStroke |
void |
mySetState(java.lang.String state)
Set just the state of this trait |
void |
mySetType(java.lang.String s)
Set the type information for this piece. |
java.awt.Rectangle |
selectionBounds()
The area which is considered part of this GamePiece for purposes of selecting it with the mouse |
void |
setProperty(java.lang.Object key,
java.lang.Object value)
The GamePiece should store properties for retrieval (e.g in a Hashtable) It is not necessary that properties stored with this method be retained in the piece's Decorator.getState() method. |
| Methods inherited from class VASSAL.counters.Decorator |
getDecorator, getEditor, getId, getInner, getInnermost, getKeyCommands, getMap, getOutermost, getParent, getPosition, getState, getType, keyEvent, mergeState, setId, setInner, setMap, setParent, setPosition, setState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface VASSAL.counters.EditablePiece |
getEditor |
| Methods inherited from interface VASSAL.counters.GamePiece |
getId, getMap, getParent, getPosition, getState, getType, keyEvent, setId, setMap, setParent, setPosition, setState |
| Field Detail |
public static final java.lang.String ID
protected java.lang.String[] keys
protected java.lang.String[] values
| Constructor Detail |
public Marker()
public Marker(java.lang.String type,
GamePiece p)
| Method Detail |
public java.lang.String[] getKeys()
public void mySetType(java.lang.String s)
EditablePieceDecorator.myGetType()
mySetType in interface EditablePiece
public void draw(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
draw in interface GamePiecepublic java.lang.String getName()
GamePiece
getName in interface GamePiecepublic java.awt.Rectangle boundingBox()
GamePiece
boundingBox in interface GamePiecepublic java.awt.Rectangle selectionBounds()
GamePiece
selectionBounds in interface GamePiecepublic java.lang.Object getProperty(java.lang.Object key)
getProperty in interface GamePiecegetProperty in class Decorator
public void setProperty(java.lang.Object key,
java.lang.Object value)
GamePieceGamePiece.getState() method.
setProperty in interface GamePiecesetProperty in class Decoratorpublic java.lang.String myGetState()
myGetState in class DecoratorDecorator.getState()public void mySetState(java.lang.String state)
Decorator
mySetState in class DecoratorDecorator.myGetState()public java.lang.String myGetType()
myGetType in class DecoratorDecorator.getType()protected KeyCommand[] myGetKeyCommands()
myGetKeyCommands in class DecoratorDecorator.getKeyCommands()public Command myKeyEvent(javax.swing.KeyStroke stroke)
Decorator
myKeyEvent in class Decoratorstroke -
Decorator.keyEvent(javax.swing.KeyStroke)public java.lang.String getDescription()
EditablePiece
getDescription in interface EditablePiecepublic HelpFile getHelpFile()
getHelpFile in interface EditablePiece
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||