MUC Javadocs Version 3.0 January 2, 2007

muc.drawings
Class Flag

java.lang.Object
  extended by muc.drawings.Flag

public class Flag
extends java.lang.Object

A graphical class that displays as a flag. The flag is a rectangle of one color with a horizontal stripe of another color.

Version:
2.0 January 2, 2007
Author:
Louise Moses. Modified by John Kirchmeyer

Field Summary
private  int down
          The vertical position of the upper left corner of this object.
private  java.awt.Color flagColor
          The background color.
private  int HEIGHT
          The overall height of this object.
private  int over
          The horizontal position of the upper left corner of this object.
private  java.awt.Color stripeColor
          The color of the horizontal stripe.
private  int WIDTH
          The overall width of this object.
 
Constructor Summary
Flag(int over, int down, java.awt.Color flagColor, java.awt.Color stripeColor)
          Creates a new Flag.
 
Method Summary
 void draw(java.awt.Graphics g)
          Draws this Flag.
 java.lang.String toString()
          Returns a string representation of this Flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

flagColor

private java.awt.Color flagColor
The background color.


stripeColor

private java.awt.Color stripeColor
The color of the horizontal stripe.


over

private int over
The horizontal position of the upper left corner of this object.


down

private int down
The vertical position of the upper left corner of this object.


WIDTH

private final int WIDTH
The overall width of this object.

See Also:
Constant Field Values

HEIGHT

private final int HEIGHT
The overall height of this object.

See Also:
Constant Field Values
Constructor Detail

Flag

public Flag(int over,
            int down,
            java.awt.Color flagColor,
            java.awt.Color stripeColor)
Creates a new Flag.

Parameters:
over - The horizontal position of the upper left corner of this object.
down - The vertical position of the upper left corner of this object.
flagColor - The background color of this object.
stripeColor - The color of the horizontal stripe.
Method Detail

draw

public void draw(java.awt.Graphics g)
Draws this Flag.

Parameters:
g - A Graphics context on which to draw.

toString

public java.lang.String toString()
Returns a string representation of this Flag.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this Flag.

MUC Javadocs Version 3.0 January 2, 2007