java.lang.ObjectShapeCanvas
public class ShapeCanvas
A Canvas class for doing basic graphical drawing. This particular canvas focuses on drawing shapes that have been "added" to it. Acts as a Singleton for ease of use.
Constructor Summary | |
---|---|
ShapeCanvas()
|
Method Summary | |
---|---|
static void |
addShape(DrawableShape shape)
Adds the given shape to the canvas. |
static void |
bringToFront(DrawableShape shape)
Moves a shape to the front of the drawing |
static void |
makeVisible()
Shows the canvas frame, in case it was closed. |
static void |
refresh()
A method that refreshes what is displayed on the canvas. |
static void |
removeShape(DrawableShape shape)
Removes the given shape from the canvas |
static void |
sendToBack(DrawableShape shape)
Moves a shape to the back of the drawing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShapeCanvas()
Method Detail |
---|
public static void addShape(DrawableShape shape)
public static void bringToFront(DrawableShape shape)
public static void makeVisible()
public static void refresh()
public static void removeShape(DrawableShape shape)
public static void sendToBack(DrawableShape shape)