VASSAL.counters
Class FreeRotator
java.lang.Object
|
+--VASSAL.counters.Decorator
|
+--VASSAL.counters.FreeRotator
- All Implemented Interfaces:
- Drawable, EditablePiece, java.util.EventListener, GamePiece, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
- public class FreeRotator
- extends Decorator
- implements EditablePiece, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, Drawable
A Decorator that rotates a GamePiece to an arbitrary angle
|
Field Summary |
static java.lang.String |
ID
|
| Methods inherited from class VASSAL.counters.Decorator |
getDecorator, getId, getInner, getInnermost, getKeyCommands, getMap, getOutermost, getParent, getPosition, getState, getType, keyEvent, mergeState, setId, 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, getState, getType, keyEvent, setId, setMap, setParent, setPosition, setProperty, setState |
ID
public static final java.lang.String ID
FreeRotator
public FreeRotator()
FreeRotator
public FreeRotator(java.lang.String type,
GamePiece inner)
getName
public java.lang.String getName()
- Description copied from interface:
GamePiece
- The plain English name for this piece
- Specified by:
getName in interface GamePiece
setInner
public void setInner(GamePiece p)
- Description copied from class:
Decorator
- Set the inner GamePiece
- Overrides:
setInner in class Decorator
boundingBox
public java.awt.Rectangle boundingBox()
- Description copied from interface:
GamePiece
- The area which this GamePiece occupies when
drawn at the point given by getPosition().
- Specified by:
boundingBox in interface GamePiece
getAngle
public double getAngle()
setAngle
public void setAngle(double angle)
getRotatedBounds
public java.awt.Rectangle getRotatedBounds()
selectionBounds
public java.awt.Rectangle selectionBounds()
- Description copied from interface:
GamePiece
- The area which is considered part of this GamePiece
for purposes of selecting it with the mouse
- Specified by:
selectionBounds in interface GamePiece
mySetType
public void mySetType(java.lang.String type)
- Description copied from interface:
EditablePiece
- Set the type information for this piece. See
Decorator.myGetType()
- Specified by:
mySetType in interface EditablePiece
draw
public void draw(java.awt.Graphics g,
int x,
int y,
java.awt.Component obs,
double zoom)
- Specified by:
draw in interface GamePiece
draw
public void draw(java.awt.Graphics g,
Map map)
- Specified by:
draw in interface Drawable
myGetType
public java.lang.String myGetType()
- Overrides:
myGetType in class Decorator
- Following copied from class:
VASSAL.counters.Decorator
- Returns:
- the type of this trait alone
- See Also:
Decorator.getType()
myGetState
public java.lang.String myGetState()
- Overrides:
myGetState in class Decorator
- Following copied from class:
VASSAL.counters.Decorator
- Returns:
- the state of this trait alone
- See Also:
Decorator.getState()
mySetState
public void mySetState(java.lang.String state)
- Description copied from class:
Decorator
- Set just the state of this trait
- Overrides:
mySetState in class Decorator
- Following copied from class:
VASSAL.counters.Decorator
- See Also:
Decorator.myGetState()
myGetKeyCommands
public KeyCommand[] myGetKeyCommands()
- Overrides:
myGetKeyCommands in class Decorator
- Following copied from class:
VASSAL.counters.Decorator
- Returns:
- the commands for this trait alone
- See Also:
Decorator.getKeyCommands()
myKeyEvent
public Command myKeyEvent(javax.swing.KeyStroke stroke)
- Description copied from class:
Decorator
- The response of this trait alone to the given KeyStroke
- Overrides:
myKeyEvent in class Decorator
- Following copied from class:
VASSAL.counters.Decorator
- Parameters:
stroke - - Returns:
- null if no effect
- See Also:
Decorator.keyEvent(javax.swing.KeyStroke)
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked in interface java.awt.event.MouseListener
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered in interface java.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited in interface java.awt.event.MouseListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed in interface java.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased in interface java.awt.event.MouseListener
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
getProperty
public java.lang.Object getProperty(java.lang.Object key)
- Specified by:
getProperty in interface GamePiece- Overrides:
getProperty in class Decorator
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
getRotatedImage
public java.awt.Image getRotatedImage(double angle,
java.awt.Component obs)
getDescription
public java.lang.String getDescription()
- Description copied from interface:
EditablePiece
- A plain-English description of this type of piece
- Specified by:
getDescription in interface EditablePiece
getHelpFile
public HelpFile getHelpFile()
- Specified by:
getHelpFile in interface EditablePiece
getEditor
public PieceEditor getEditor()
- Description copied from interface:
EditablePiece
- Get the configurer for this trait
- Specified by:
getEditor in interface EditablePiece- Overrides:
getEditor in class Decorator