|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--VASSAL.counters.Decorator
|
+--VASSAL.counters.ReportState
A GamePiece with this trait will echo the piece's current name when any of a given key commands are pressed (and after they take effect)
| Nested Class Summary | |
static class |
ReportState.Ed
|
| Field Summary | |
static java.lang.String |
ID
|
| Constructor Summary | |
ReportState()
|
|
ReportState(java.lang.String type,
GamePiece inner)
|
|
| 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 |
PieceEditor |
getEditor()
Get the configurer for this trait |
HelpFile |
getHelpFile()
|
java.lang.String |
getName()
The plain English name for this piece |
Command |
keyEvent(javax.swing.KeyStroke stroke)
Keyboard events are forward to this method when a piece is selected The GamePiece can respond in any way it likes |
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 newState)
Set just the state of this trait |
void |
mySetType(java.lang.String type)
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 |
| Methods inherited from class VASSAL.counters.Decorator |
getDecorator, getId, getInner, getInnermost, getKeyCommands, getMap, getOutermost, getParent, getPosition, getProperty, getState, getType, mergeState, setId, setInner, setMap, setParent, setPosition, setProperty, 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.GamePiece |
getId, getMap, getParent, getPosition, getProperty, getState, getType, setId, setMap, setParent, setPosition, setProperty, setState |
| Field Detail |
public static final java.lang.String ID
| Constructor Detail |
public ReportState()
public ReportState(java.lang.String type,
GamePiece inner)
| Method Detail |
public java.awt.Rectangle boundingBox()
GamePiece
boundingBox in interface GamePiece
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 GamePieceprotected KeyCommand[] myGetKeyCommands()
myGetKeyCommands in class DecoratorDecorator.getKeyCommands()public java.lang.String myGetState()
myGetState in class DecoratorDecorator.getState()public java.lang.String myGetType()
myGetType in class DecoratorDecorator.getType()public Command myKeyEvent(javax.swing.KeyStroke stroke)
Decorator
myKeyEvent in class Decoratorstroke -
Decorator.keyEvent(javax.swing.KeyStroke)public Command keyEvent(javax.swing.KeyStroke stroke)
GamePiece
keyEvent in interface GamePiecekeyEvent in class DecoratorCommand that, when executed, will invoke
the same response. Usually a ChangePiece command.ForwardToKeyBufferpublic void mySetState(java.lang.String newState)
Decorator
mySetState in class DecoratorDecorator.myGetState()public java.awt.Rectangle selectionBounds()
GamePiece
selectionBounds in interface GamePiecepublic java.lang.String getDescription()
EditablePiece
getDescription in interface EditablePiecepublic HelpFile getHelpFile()
getHelpFile in interface EditablePiecepublic void mySetType(java.lang.String type)
EditablePieceDecorator.myGetType()
mySetType in interface EditablePiecepublic PieceEditor getEditor()
EditablePiece
getEditor in interface EditablePiecegetEditor in class Decorator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||