legos
Class Leg

java.lang.Object
  extended by objectdraw.ObjectDrawObject
      extended by objectdraw.ObjectDrawShape
          extended by legos.LegoPiece
              extended by legos.Leg
All Implemented Interfaces:
Dependent, DrawableInterface, LocatableInterface

public class Leg
extends LegoPiece

A Leg is a LegoPiece representing the leg of a lego person. It has no subunits.

Author:
Russell Zahniser (russell@zahniser.net)

Constructor Summary
Leg()
          Construct a leg, but do not make it appear on any canvas yet.
Leg(Color color)
          Construct a leg, but do not make it appear on any canvas yet.
Leg(Color color, DrawingCanvas canvas)
          Construct a leg, placing it on the given canvas.
Leg(DrawingCanvas canvas)
          Construct a leg, placing it on the given canvas.
 
Method Summary
 
Methods inherited from class legos.LegoPiece
addToCanvas, canAttach, contains, detach, getAttachmentPoint, getCanvas, getColor, getDoubleX, getDoubleY, getLocation, getOwner, getSubunit, getSubunitCount, getX, getY, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, removeSubunit, removeSubunit, sendBackward, sendForward, sendToBack, sendToFront, setColor, setSubunit, show, toString
 
Methods inherited from class objectdraw.ObjectDrawShape
clearCanvas, draw, draw, getDrawables, getShape, makeShape, removeCanvas, setMyShape, update
 
Methods inherited from class objectdraw.ObjectDrawObject
deferUpdates, depend, runUpdates, undepend
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface objectdraw.DrawableInterface
draw, getShape
 

Constructor Detail

Leg

public Leg()
Construct a leg, but do not make it appear on any canvas yet. It will be colored blue. You can make it appear by adding it to a canvas, or setting it as one of the legs of a Legs that is already visible on a canvas.


Leg

public Leg(Color color)
Construct a leg, but do not make it appear on any canvas yet. You can make it appear by adding it to a canvas, or setting it as one of the legs of a Legs that is already visible on a canvas.

Parameters:
color - The color of the leg.

Leg

public Leg(Color color,
           DrawingCanvas canvas)
Construct a leg, placing it on the given canvas.

Parameters:
color - The color of the leg.
canvas - Canvas to place this leg on.

Leg

public Leg(DrawingCanvas canvas)
Construct a leg, placing it on the given canvas. The leg will be colored blue.

Parameters:
canvas - Canvas to place this leg on.