|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectyu.ac.bg.etf.javaqx.qswing.graphics.Line
Line Shape.
Nested Class Summary | |
protected static class |
Line.LinePathIterator
Line Path Iterator. |
Constructor Summary | |
Line()
Constructs new Line object. |
|
Line(int x1,
int y1,
int x2,
int y2)
Constructs new Line object. |
|
Line(Point p1,
Point p2)
Constructs new Line object. |
Method Summary | |
boolean |
contains(int x,
int y)
Returns true if the specified coordinates lie in the shape. |
boolean |
equals(java.lang.Object obj)
|
Rectangle |
getBounds()
Returns a rectangle that completely encloses the shape. |
PathIterator |
getPathIterator()
Returns path iterator that traverses the geometry of the Shape. |
int |
getX1()
Returns the x coordinate of the first point. |
int |
getX2()
Returns the x coordinate of the second point. |
int |
getY1()
Returns the y coordinate of the first point. |
int |
getY2()
Returns the y coordinate of the second point. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Line()
public Line(int x1, int y1, int x2, int y2)
x1
- the x coordinate of the first pointy1
- the y coordinate of the first pointx2
- the x coordinate of the second pointy2
- the y coordinate of the second pointpublic Line(Point p1, Point p2)
p1
- the first pointp2
- the second point
java.lang.IllegalArgumentException
- is p1 or p2 is
nullMethod Detail |
public int getX1()
public int getY1()
public int getX2()
public int getY2()
public boolean contains(int x, int y)
contains
in interface Shape
x
- the x coordinatey
- the y coordinate
public Rectangle getBounds()
getBounds
in interface Shape
public PathIterator getPathIterator()
getPathIterator
in interface Shape
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |