|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--VASSAL.counters.Decorator
|
+--VASSAL.counters.MovementMarkable
|
+--VASSAL.counters.Footprint
| Inner Class Summary | |
protected static class |
Footprint.Ed
Key Command Global Visibility Circle Radius Fill Color Line Color Selected Transparency Unselected Transparency Edge Buffer Display Limit Edge Buffer Point Limit |
| Field Summary | |
protected int |
circleRadius
|
protected static int |
DEFAULT_CIRCLE_RADIUS
|
protected static int |
DEFAULT_EDGE_DISPLAY_BUFFER
|
protected static int |
DEFAULT_EDGE_POINT_BUFFER
|
protected static java.awt.Color |
DEFAULT_FILL_COLOR
|
protected static java.lang.Boolean |
DEFAULT_GLOBALLY_VISIBLE
|
protected static java.lang.Boolean |
DEFAULT_INITIALLY_VISIBLE
|
protected static java.awt.Color |
DEFAULT_LINE_COLOR
|
protected static java.lang.String |
DEFAULT_MENU_COMMAND
|
protected static int |
DEFAULT_SELECTED_TRANSPARENCY
|
protected static char |
DEFAULT_TRAIL_KEY
|
protected static int |
DEFULT_UNSELECTED_TRANSPARENCY
|
protected int |
edgeDisplayBuffer
|
protected int |
edgePointBuffer
|
protected java.awt.Color |
fillColor
|
protected java.awt.Font |
font
|
protected boolean |
globallyVisible
|
protected boolean |
globalVisibility
|
static java.lang.String |
ID
|
protected boolean |
initiallyVisible
|
protected double |
lastZoom
|
protected static float |
LINE_WIDTH
|
protected java.awt.Color |
lineColor
|
protected double |
lineWidth
|
protected boolean |
localVisibility
|
protected int |
maxX
|
protected int |
maxY
|
protected java.lang.String |
menuCommand
|
protected int |
minX
|
protected int |
minY
|
protected java.awt.Rectangle |
myBoundingBox
|
protected java.util.Vector |
pointList
|
protected int |
selectedTransparency
|
protected java.lang.String |
startMapId
|
protected javax.swing.KeyStroke |
trailKey
|
protected int |
unSelectedTransparency
|
| Fields inherited from class VASSAL.counters.Decorator |
piece |
| Constructor Summary | |
Footprint()
|
|
Footprint(java.lang.String type,
GamePiece p)
|
|
| Method Summary | |
protected void |
addPoint(java.awt.Point p)
Add Point to list and adjust the overall boundingBox to encompass the trail. |
java.awt.Rectangle |
boundingBox()
Return a bounding box covering the whole trail if it is visible, otherwise just return the standard piece bounding box |
protected void |
clearTrail()
|
void |
draw(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
Draw this GamePiece |
protected void |
drawPoint(java.awt.Graphics g,
java.awt.Point p,
double zoom,
int elementCount)
Draw a Circle at the given point. |
protected void |
drawTrack(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2)
Draw a track from one Point to another. |
java.lang.String |
getDescription()
A plain-English description of this type of piece |
PieceEditor |
getEditor()
Get the configurer for this trait |
HelpFile |
getHelpFile()
|
java.awt.Rectangle |
getMyBoundingBox()
Return the boundingBox including the trail |
java.lang.String |
getName()
The plain English name for this piece |
protected java.util.Enumeration |
getPointList()
|
java.awt.Shape |
getShape()
The shape of the piece from the user's viewpoint. |
protected java.awt.Image |
getTrailImage(int elementCount)
Override this method to return an Image to display within each trail circle |
protected java.lang.String |
getTrailText(int elementCount)
Override this method to return text to display within each trail circle. |
protected boolean |
isTrailVisible()
Global Visibility means all players see the same trail Local Visibility means each player controls their own trail visibility |
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)
Type is the character command that toggles footprint visiblity |
void |
redraw()
|
void |
setMoved(boolean justMoved)
setMoved is called with an argument of true each time the piece is moved. |
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.MovementMarkable |
getProperty, isMoved |
| Methods inherited from class VASSAL.counters.Decorator |
getDecorator, 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.GamePiece |
getId, getMap, getParent, getPosition, getState, getType, keyEvent, setId, setMap, setParent, setPosition, setState |
| Field Detail |
public static final java.lang.String ID
protected boolean globalVisibility
protected java.lang.String startMapId
protected java.util.Vector pointList
protected javax.swing.KeyStroke trailKey
protected java.lang.String menuCommand
protected boolean initiallyVisible
protected boolean globallyVisible
protected int circleRadius
protected int selectedTransparency
protected int unSelectedTransparency
protected java.awt.Color lineColor
protected java.awt.Color fillColor
protected int edgePointBuffer
protected int edgeDisplayBuffer
protected static final char DEFAULT_TRAIL_KEY
protected static final java.lang.String DEFAULT_MENU_COMMAND
protected static final java.lang.Boolean DEFAULT_INITIALLY_VISIBLE
protected static final java.lang.Boolean DEFAULT_GLOBALLY_VISIBLE
protected static final int DEFAULT_CIRCLE_RADIUS
protected static final java.awt.Color DEFAULT_FILL_COLOR
protected static final java.awt.Color DEFAULT_LINE_COLOR
protected static final int DEFAULT_SELECTED_TRANSPARENCY
protected static final int DEFULT_UNSELECTED_TRANSPARENCY
protected static final int DEFAULT_EDGE_POINT_BUFFER
protected static final int DEFAULT_EDGE_DISPLAY_BUFFER
protected static final float LINE_WIDTH
protected int minX
protected int minY
protected int maxX
protected int maxY
protected java.awt.Rectangle myBoundingBox
protected java.awt.Font font
protected double lastZoom
protected boolean localVisibility
protected double lineWidth
| Constructor Detail |
public Footprint()
public Footprint(java.lang.String type,
GamePiece p)
| Method Detail |
protected java.util.Enumeration getPointList()
public void mySetState(java.lang.String newState)
DecoratormySetState in class MovementMarkableVASSAL.counters.DecoratorDecorator.myGetState()public java.lang.String myGetState()
myGetState in class MovementMarkableVASSAL.counters.DecoratorDecorator.getState()public void mySetType(java.lang.String type)
mySetType in class MovementMarkablepublic java.lang.String myGetType()
myGetType in class MovementMarkableVASSAL.counters.DecoratorDecorator.getType()
public void setProperty(java.lang.Object key,
java.lang.Object val)
GamePieceGamePiece.getState() method.setProperty in class MovementMarkablepublic void setMoved(boolean justMoved)
setMoved in class MovementMarkableprotected void clearTrail()
public HelpFile getHelpFile()
getHelpFile in class MovementMarkableprotected void addPoint(java.awt.Point p)
public void redraw()
public java.lang.String getDescription()
EditablePiecegetDescription in class MovementMarkable
public void draw(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
GamePiecedraw in class MovementMarkableVASSAL.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 drawPoint(java.awt.Graphics g,
java.awt.Point p,
double zoom,
int elementCount)
protected void drawTrack(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2)
protected java.awt.Image getTrailImage(int elementCount)
protected java.lang.String getTrailText(int elementCount)
protected boolean isTrailVisible()
public java.awt.Rectangle boundingBox()
boundingBox in class MovementMarkablepublic java.awt.Rectangle getMyBoundingBox()
public 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 class MovementMarkablepublic java.lang.String getName()
GamePiecegetName in class MovementMarkablepublic KeyCommand[] myGetKeyCommands()
myGetKeyCommands in class MovementMarkableVASSAL.counters.DecoratorDecorator.getKeyCommands()public Command myKeyEvent(javax.swing.KeyStroke stroke)
DecoratormyKeyEvent in class MovementMarkableVASSAL.counters.Decoratorstroke - Decorator.keyEvent(javax.swing.KeyStroke)public PieceEditor getEditor()
EditablePiecegetEditor in class MovementMarkable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||