JLogView_.datastructs.shapes
Class LGBox

java.lang.Object
  extended by JLogView_.datastructs.LGShape
      extended by JLogView_.datastructs.shapes.LGBox

public class LGBox
extends LGShape

LGBox is a descendant of LGShape. It represents a box (rectangle) shape.

See Also:
LGShape

Field Summary
 
Fields inherited from class JLogView_.datastructs.LGShape
colour, coords
 
Constructor Summary
LGBox(float startX, float startY, float endX, float endY)
          This is the constructor of LGBox.
 
Method Summary
protected  void drawShape(java.awt.Graphics gr, int x1, int y1, int x2, int y2)
          This method draws the box itself.
 
Methods inherited from class JLogView_.datastructs.LGShape
draw, setColour
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LGBox

public LGBox(float startX,
             float startY,
             float endX,
             float endY)
This is the constructor of LGBox.

Parameters:
startX - the x graph coordinate of one corner of the box
startY - the y graph coordinate of one corner of the box
endX - the x graph coordinate of the other corner of the box
endY - the y graph coordinate of the other corner of the box
Method Detail

drawShape

protected void drawShape(java.awt.Graphics gr,
                         int x1,
                         int y1,
                         int x2,
                         int y2)
This method draws the box itself. It is overriding the definition in LGShape In this case the two pair of coordinates represents the two opposite corners of the box.

Specified by:
drawShape in class LGShape
Parameters:
gr - a Graphics object, the graphic context to draw on
x1 - the x coordinate in pixels of the first corner
y1 - the y coordinate in pixels of the first corner
x2 - the x coordinate in pixels of the second corner
y2 - the y coordinate in pixels of the second corner
See Also:
Graphics