lab5lib
Class Triangle
java.lang.Object
cse115.graphics.AbstractGraphic
cse115.graphics.AbstractColorableGraphic
cse115.graphics.Polygon
lab5lib.Triangle
- All Implemented Interfaces:
- CenterLocatable, Colorable, ColorableGraphic, Graphic, Locatable, Rotatable, Sizeable, IMovingShape
public class Triangle
- extends Polygon
- implements IMovingShape
Constructor Summary |
Triangle()
Creates a new instance of Triangle, placing it on
the next available DrawingCanvas (left or right) |
Methods inherited from class cse115.graphics.AbstractGraphic |
addMouseListener, addMouseMotionListener, contains, getBounds, getCenterLocation, getContainer, getDimension, getMouseListeners, getMouseMotionListeners, getRotation, intersects, rotate, setCenterLocation, setContainer, setRotation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Triangle
public Triangle()
- Creates a new instance of Triangle, placing it on
the next available DrawingCanvas (left or right)
move
public void move(Vector v)
- Description copied from class:
Polygon
- Moves the Polygon by some amount, specified by a vector
- Specified by:
move
in interface Locatable
- Overrides:
move
in class Polygon
- Parameters:
v
- The vector representing the amount to move the Polygon- See Also:
Locatable.move(cse115.utilities.Vector)
setColor
public void setColor(Color color)
- Specified by:
setColor
in interface IMovingShape
- Parameters:
color
- - See Also:
IMovingShape.setColor(cse115.graphics.colors.Color)
slowDown
public void slowDown()
- Specified by:
slowDown
in interface IMovingShape
- See Also:
IMovingShape.slowDown()
speedUp
public void speedUp()
- Specified by:
speedUp
in interface IMovingShape
- See Also:
IMovingShape.speedUp()