clock
Class Hand

java.lang.Object
  extended by clock.Hand

public class Hand
extends java.lang.Object

Display of a clock hand


Constructor Summary
Hand(int centerX, int centerY, int length, java.awt.Color color)
          Constructor
 
Method Summary
 void draw(java.awt.Graphics graphics)
          Draw this hand
 void setAngle(long angle)
          Set the angle for this hand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hand

public Hand(int centerX,
            int centerY,
            int length,
            java.awt.Color color)
Constructor

Parameters:
centerX - the X coordinate of the center of the clock of which this is a part relative to upper left corner of clock
centerY - the Y coordinate of the center of the clock of which this is a part relative to upper left corner of clock
length - the length of this hand
color - the color of this hand
Method Detail

setAngle

public void setAngle(long angle)
Set the angle for this hand

Parameters:
angle - the angle (in degrees relative to vertical) for this hand

draw

public void draw(java.awt.Graphics graphics)
Draw this hand

Parameters:
graphics - the graphics object on which to draw