|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--VASSAL.counters.Decorator
|
+--VASSAL.counters.Obscurable
| Field Summary | |
protected static char |
BACKGROUND
|
protected KeyCommand[] |
commands
|
protected char |
displayStyle
|
protected java.lang.String |
hideCommand
|
static java.lang.String |
ID
|
protected static char |
IMAGE
|
protected java.lang.String |
imageName
|
protected static char |
INSET
|
protected java.lang.String |
maskName
|
protected java.lang.String |
obscuredBy
|
protected GamePiece |
obscuredToMeView
|
protected java.lang.String |
obscuredToOthersImage
|
protected GamePiece |
obscuredToOthersView
|
protected char |
obscureKey
|
protected static char |
PEEK
|
protected boolean |
peeking
|
protected char |
peekKey
|
| Fields inherited from class VASSAL.counters.Decorator |
piece |
| Constructor Summary | |
Obscurable()
|
|
Obscurable(java.lang.String type,
GamePiece d)
|
|
| Method Summary | |
protected java.awt.Rectangle |
bBoxObscuredToMe()
|
protected java.awt.Rectangle |
bBoxObscuredToOthers()
|
java.awt.Rectangle |
boundingBox()
The area which this GamePiece occupies when drawn at the point (0,0) |
void |
draw(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
Draw this GamePiece |
protected void |
drawObscuredToMe(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
|
protected void |
drawObscuredToOthers(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()
|
KeyCommand[] |
getKeyCommands()
The set of key commands that will populate the piece's right-click menu. |
java.lang.String |
getName()
The plain English name for this piece |
java.lang.Object |
getProperty(java.lang.Object key)
|
java.awt.Shape |
getShape()
The shape of the piece from the user's viewpoint. |
boolean |
isMaskableBy(java.lang.String id)
Return true if this piece can be masked/un-masked by the player with the given id |
boolean |
isPeeking()
Return true if the piece is currently being "peeked at" |
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 in)
Set just the state of this trait |
void |
mySetType(java.lang.String in)
Set the type information for this piece. |
boolean |
obscuredToMe()
|
boolean |
obscuredToOthers()
|
static void |
setAllHidden(boolean allHidden)
If true, then all masked pieces are considered masked to all players. |
void |
setProperty(java.lang.Object key,
java.lang.Object val)
Other properties, possibly game-specific, can be associated with a piece. |
| Methods inherited from class VASSAL.counters.Decorator |
getDecorator, getId, getInner, getInnermost, 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.GamePiece |
getId, getMap, getParent, getPosition, getState, getType, keyEvent, setId, setMap, setParent, setPosition, setState |
| Field Detail |
public static final java.lang.String ID
protected static final char INSET
protected static final char BACKGROUND
protected static final char PEEK
protected static final char IMAGE
protected char obscureKey
protected char peekKey
protected java.lang.String imageName
protected java.lang.String obscuredToOthersImage
protected java.lang.String obscuredBy
protected java.lang.String hideCommand
protected GamePiece obscuredToMeView
protected GamePiece obscuredToOthersView
protected boolean peeking
protected char displayStyle
protected java.lang.String maskName
protected KeyCommand[] commands
| Constructor Detail |
public Obscurable()
public Obscurable(java.lang.String type,
GamePiece d)
| Method Detail |
public void mySetState(java.lang.String in)
DecoratormySetState in class DecoratorVASSAL.counters.DecoratorDecorator.myGetState()public void mySetType(java.lang.String in)
EditablePieceDecorator.myGetType()mySetType in interface EditablePiecepublic java.lang.String myGetType()
myGetType in class DecoratorVASSAL.counters.DecoratorDecorator.getType()public java.lang.String myGetState()
myGetState in class DecoratorVASSAL.counters.DecoratorDecorator.getState()public java.awt.Rectangle boundingBox()
GamePieceboundingBox in interface GamePiecepublic java.awt.Shape getShape()
GamePieceGamePiece.boundingBox(), it assumes the position is (0,0) and must be translated
to the actual location where the piece is being drawn.getShape in interface GamePiecepublic boolean obscuredToMe()
public boolean obscuredToOthers()
public void setProperty(java.lang.Object key,
java.lang.Object val)
GamePieceGamePiece.getState() method.setProperty in interface GamePiecesetProperty in class Decoratorpublic java.lang.Object getProperty(java.lang.Object key)
getProperty in interface GamePiecegetProperty in class Decorator
public void draw(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
GamePiecedraw in interface GamePieceVASSAL.counters.GamePieceg - x - x-location of the center of the piecey - y-location of the center of the pieceobs - the Component on which this piece is being drawnzoom - the scaling factor.
protected void drawObscuredToMe(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
protected void drawObscuredToOthers(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
public boolean isPeeking()
protected java.awt.Rectangle bBoxObscuredToMe()
protected java.awt.Rectangle bBoxObscuredToOthers()
public java.lang.String getName()
GamePiecegetName in interface GamePiecepublic KeyCommand[] getKeyCommands()
DecoratorProperties.KEY_COMMANDS property.
The commands for a Decorator are a composite of Decorator.myGetKeyCommands() and the
commands of its inner piece.getKeyCommands in class DecoratorVASSAL.counters.Decoratorpublic KeyCommand[] myGetKeyCommands()
myGetKeyCommands in class DecoratorVASSAL.counters.DecoratorDecorator.getKeyCommands()public boolean isMaskableBy(java.lang.String id)
public Command myKeyEvent(javax.swing.KeyStroke stroke)
DecoratormyKeyEvent in class DecoratorVASSAL.counters.Decoratorstroke - Decorator.keyEvent(javax.swing.KeyStroke)public java.lang.String getDescription()
EditablePiecegetDescription in interface EditablePiecepublic HelpFile getHelpFile()
getHelpFile in interface EditablePiecepublic PieceEditor getEditor()
EditablePiecegetEditor in interface EditablePiecegetEditor in class Decoratorpublic static void setAllHidden(boolean allHidden)
allHidden -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||