JLogView_.datastructs.shapes
Class LGLine
java.lang.Object
JLogView_.datastructs.LGShape
JLogView_.datastructs.shapes.LGLine
public class LGLine
- extends LGShape
LGLine is a descendant of LGShape. It represents the shape of a line.
- See Also:
LGShape
Constructor Summary |
LGLine(float startX,
float startY,
float endX,
float endY)
This is the constructor of LGLine. |
Method Summary |
protected void |
drawShape(java.awt.Graphics gr,
int x1,
int y1,
int x2,
int y2)
This method draws the line itself. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LGLine
public LGLine(float startX,
float startY,
float endX,
float endY)
- This is the constructor of LGLine.
- Parameters:
startX
- the x graph coordinate of one end of the linestartY
- the y graph coordinate of one end of the lineendX
- the x graph coordinate of the other end of the lineendY
- the y graph coordinate of the other end of the line
drawShape
protected void drawShape(java.awt.Graphics gr,
int x1,
int y1,
int x2,
int y2)
- This method draws the line itself. It is overriding the definition in LGShape
In this case the two pair of coordinates represents the two end points of
of the line.
- Specified by:
drawShape
in class LGShape
- Parameters:
gr
- a Graphics object, the graphic context to draw onx1
- the x coordinate in pixels of one endy1
- the y coordinate in pixels of one endx2
- the x coordinate in pixels of the other endy2
- the y coordinate in pixels of the other end- See Also:
Graphics