MUC Javadocs Version 3.0 January 2, 2007

muc.drawings
Class DiagonalLine

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

public class DiagonalLine
extends java.lang.Object

A graphical class that displays a diagonal line.
You may draw either the upper left to lower right diagonal or the upper right to lower left diagonal of a rectangle.

Version:
2.0 January 13, 2007
Author:
Blase Cindric & John Kirchmeyer

Field Summary
private  java.awt.Color color
          The Color of this line.
private  int down
          The vertical position of the rectangle bounding this diagonal line.
private  int height
          The height of the rectangle bounding this diagonal line.
private  int over
          The horizontal position of the rectangle bounding this diagonal line.
private  int width
          The width of the rectangle bounding this diagonal line.
 
Constructor Summary
DiagonalLine(int over, int down, int width, int height, java.awt.Color color)
          Creates a new diagonal line.
 
Method Summary
 void drawBothWithBoundingRectangle(java.awt.Graphics g)
          Draws both diagonals, and draws the bounding rectangle in light gray.
 void drawLeftToRight(java.awt.Graphics g)
          Draws the diagonal line from upper left to lower right of the bounding rectangle.
 void drawRightToLeft(java.awt.Graphics g)
          Draws the diagonal line from upper right to lower left of the bounding rectangle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

over

private int over
The horizontal position of the rectangle bounding this diagonal line.


down

private int down
The vertical position of the rectangle bounding this diagonal line.


width

private int width
The width of the rectangle bounding this diagonal line.


height

private int height
The height of the rectangle bounding this diagonal line.


color

private java.awt.Color color
The Color of this line.

Constructor Detail

DiagonalLine

public DiagonalLine(int over,
                    int down,
                    int width,
                    int height,
                    java.awt.Color color)
Creates a new diagonal line.

Parameters:
over - The horizontal position of the rectangle bounding this diagonal line.
down - The vertical position of the rectangle bounding this diagonal line.
width - The width of the rectangle bounding this diagonal line.
height - The height of the rectangle bounding this diagonal line.
color - The Color of this line.
Method Detail

drawLeftToRight

public void drawLeftToRight(java.awt.Graphics g)
Draws the diagonal line from upper left to lower right of the bounding rectangle.

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

drawRightToLeft

public void drawRightToLeft(java.awt.Graphics g)
Draws the diagonal line from upper right to lower left of the bounding rectangle.

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

drawBothWithBoundingRectangle

public void drawBothWithBoundingRectangle(java.awt.Graphics g)
Draws both diagonals, and draws the bounding rectangle in light gray.

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

MUC Javadocs Version 3.0 January 2, 2007