|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object graphics.AbstractGraphic graphics.AbstractColorableGraphic graphics.Polygon lab7lib.HexagonShape
public class HexagonShape
A square that moves when told to. Created: Wed Sep 15, 2004
Constructor Summary | |
---|---|
HexagonShape(Window w)
Creates a new instance of HexagonShape |
Method Summary | |
---|---|
java.lang.Integer |
getDx()
Get the x component of the movement vector (the change in x). |
java.lang.Integer |
getDy()
Get the y component of the movement vector (the change in y). |
Degree |
getOrientation()
Gets the orientation (degree of rotation) of the shape |
Vector |
getVector()
Get the vector that controls the movement for this shape. |
void |
setOrientation(Degree degree)
Sets the orientation (degree of rotation) of the shape |
void |
setVector(Vector v)
Change the vector that controls the movement for this shape. |
void |
update()
Update the position and orientation of the fish based on the velocity. |
void |
update(java.util.Observable o,
java.lang.Object arg)
|
Methods inherited from class graphics.Polygon |
---|
actualPaint, addPoint, getShape, removePoint, setDimension, setLocation |
Methods inherited from class graphics.AbstractColorableGraphic |
---|
getColor, paint, setColor |
Methods inherited from class graphics.AbstractGraphic |
---|
addMouseListener, addMouseMotionListener, contains, getBounds, getCenterLocation, getContainer, getDimension, getLocation, getMouseListeners, getMouseMotionListeners, getMovement, getRotation, intersects, move, rotate, setCenterLocation, setContainer, setMovement, setRotation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface graphics.IGraphic |
---|
addMouseListener, addMouseMotionListener, contains, getBounds, getContainer, getMouseListeners, getMouseMotionListeners, getMovement, intersects, setContainer, setMovement |
Methods inherited from interface graphics.ISizeable |
---|
getDimension |
Methods inherited from interface graphics.CenterLocatable |
---|
getCenterLocation, setCenterLocation |
Methods inherited from interface graphics.ILocatable |
---|
getLocation, move |
Methods inherited from interface graphics.IRotatable |
---|
getRotation, rotate, setRotation |
Constructor Detail |
---|
public HexagonShape(Window w)
w
- The window where the shape should appear.Method Detail |
---|
public void setOrientation(Degree degree)
degree
- The degree to which the orientation of the shape should be set.public Degree getOrientation()
public void update()
update
in interface IUpdatable
public Vector getVector()
public void setVector(Vector v)
v
- The new vector.public java.lang.Integer getDx()
public java.lang.Integer getDy()
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
o
- arg
- Observer.update(java.util.Observable, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |