|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--VASSAL.counters.Decorator
|
+--VASSAL.counters.Embellishment
| Field Summary | |
protected java.lang.String |
activateCommand
|
protected java.lang.String |
activateKey
|
protected java.lang.String |
activationStatus
|
protected KeyCommand[] |
commands
|
protected java.lang.String[] |
commonName
|
protected java.lang.String |
downCommand
|
protected java.lang.String |
downKey
|
protected boolean |
drawUnderneathWhenSelected
|
static java.lang.String |
ID
|
protected java.lang.String[] |
imageName
|
protected int |
nValues
|
protected java.awt.Dimension[] |
size
|
protected java.lang.String |
upCommand
|
protected java.lang.String |
upKey
|
protected int |
value
|
protected int |
xOff
|
protected int |
yOff
|
| Constructor Summary | |
Embellishment()
|
|
Embellishment(java.lang.String type,
GamePiece d)
|
|
| 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)
|
protected java.awt.Image |
getCurrentImage()
|
java.awt.Dimension |
getCurrentImageSize()
|
java.lang.String |
getDescription()
A plain-English description of this type of piece |
PieceEditor |
getEditor()
Get the configurer for this trait |
HelpFile |
getHelpFile()
|
static Embellishment |
getLayerWithMatchingActivateCommand(GamePiece piece,
javax.swing.KeyStroke stroke,
boolean active)
If the argument GamePiece contains a Layer whose "activate" command matches the given keystroke, and whose active status matches the boolean argument, return that Layer |
java.lang.String |
getName()
The plain English name for this piece |
int |
getValue()
|
boolean |
isActive()
|
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 s)
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 |
setActive(boolean val)
|
void |
setValue(int val)
|
| Methods inherited from class VASSAL.counters.Decorator |
getDecorator, getId, getInner, getInnermost, getKeyCommands, getMap, getOutermost, getParent, getPosition, getProperty, getState, getType, keyEvent, 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, keyEvent, setId, setMap, setParent, setPosition, setProperty, setState |
| Field Detail |
public static final java.lang.String ID
protected java.lang.String activateKey
protected java.lang.String upKey
protected java.lang.String downKey
protected java.lang.String upCommand
protected java.lang.String downCommand
protected java.lang.String activateCommand
protected int value
protected java.lang.String activationStatus
protected int nValues
protected int xOff
protected int yOff
protected java.lang.String[] imageName
protected java.lang.String[] commonName
protected java.awt.Dimension[] size
protected boolean drawUnderneathWhenSelected
protected KeyCommand[] commands
| Constructor Detail |
public Embellishment()
public Embellishment(java.lang.String type,
GamePiece d)
| Method Detail |
public boolean isActive()
public void setActive(boolean val)
public int getValue()
public void setValue(int val)
public void mySetType(java.lang.String s)
EditablePieceDecorator.myGetType()
mySetType in interface EditablePiecepublic java.lang.String getName()
GamePiece
getName in interface GamePiecepublic void mySetState(java.lang.String s)
Decorator
mySetState in class DecoratorDecorator.myGetState()public java.lang.String myGetType()
myGetType in class DecoratorDecorator.getType()public java.lang.String myGetState()
myGetState in class DecoratorDecorator.getState()
public void draw(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
draw in interface GamePiecepublic KeyCommand[] myGetKeyCommands()
myGetKeyCommands in class DecoratorDecorator.getKeyCommands()public Command myKeyEvent(javax.swing.KeyStroke stroke)
Decorator
myKeyEvent in class Decoratorstroke -
Decorator.keyEvent(javax.swing.KeyStroke)
protected java.awt.Image getCurrentImage()
throws java.io.IOException
java.io.IOExceptionpublic java.awt.Rectangle boundingBox()
GamePiece
boundingBox in interface GamePiecepublic java.awt.Dimension getCurrentImageSize()
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 PieceEditor getEditor()
EditablePiece
getEditor in interface EditablePiecegetEditor in class Decorator
public static Embellishment getLayerWithMatchingActivateCommand(GamePiece piece,
javax.swing.KeyStroke stroke,
boolean active)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||