|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Observable
boardGame.Piece
boardGame.RoundPiece
public class RoundPiece
Example playing piece. This class is only here as an example, and may be discarded.
| Constructor Summary | |
|---|---|
RoundPiece()
Constructs a RoundPiece. |
|
RoundPiece(java.awt.Color color)
Constructs a RoundPiece of the given color. |
|
RoundPiece(java.lang.String name,
java.awt.Color color)
Constructs a RoundPiece with the given name and color. |
|
| Method Summary | |
|---|---|
void |
paint(java.awt.Graphics g,
java.awt.Rectangle r)
Draws this RoundPiece on the given Graphics. |
| Methods inherited from class boardGame.Piece |
|---|
canMove, canMoveTo, dump, getBoard, getColumn, getName, getRow, getSpeed, isDraggable, isOnBoard, isOnBoard, isSelectable, move, moveTo, moveToTop, place, redraw, redraw, remove, setDraggable, setSelectable, setSpeed, toString |
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RoundPiece()
RoundPiece.
public RoundPiece(java.awt.Color color)
RoundPiece of the given color.
color - The Color of the new piece.
public RoundPiece(java.lang.String name,
java.awt.Color color)
RoundPiece with the given name and color.
name - A name for the new Piece.color - The Color of the new Piece.| Method Detail |
|---|
public void paint(java.awt.Graphics g,
java.awt.Rectangle r)
RoundPiece on the given Graphics.
Drawing should be limited to the provided java.awt.Rectangle.
paint in class Pieceg - The graphics on which to draw.r - The rectangle in which to draw.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||