|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jdraw.graphicobjects.GraphicObject | +--jdraw.graphicobjects.SizedGraphicObject | +--jdraw.graphicobjects.Segment
A segment.
Field Summary | |
private static Cursor |
CURSOR
The mouse cursor for this object. |
static String |
FRIENDLY_NAME
The friendly name of objects of this class. |
private Line2D.Double |
line
The Line2D object used to compute distances. |
Fields inherited from class jdraw.graphicobjects.SizedGraphicObject |
|
Fields inherited from class jdraw.graphicobjects.GraphicObject |
|
Constructor Summary | |
Segment(int x,
int y,
Color color,
int width,
int height)
Creates a new Segment with specified position, color, "width" and "height". |
Method Summary | |
Cursor |
getCursor()
Returns the mouse cursor for this object. |
int |
getDistanceSq(Point point)
Returns the square of the minimal distance between this segment and the specified point. |
String |
getFriendlyName()
Returns the friendly name of this segment. |
void |
paint(Graphics g)
Paints this segment. |
void |
updateCachedData()
Invoked when cached data have to be updated. |
Methods inherited from class jdraw.graphicobjects.SizedGraphicObject |
getBoundingBox, getHeight, getWidth |
Methods inherited from class jdraw.graphicobjects.GraphicObject |
getColor, getDistance, getDistanceSq, getDistanceSq, getX, getY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String FRIENDLY_NAME
private static final Cursor CURSOR
private Line2D.Double line
Line2D
object used to compute distances.
Constructor Detail |
public Segment(int x, int y, Color color, int width, int height)
Segment
with specified position, color, "width" and "height".
Method Detail |
public Cursor getCursor()
getCursor
in class GraphicObject
public String getFriendlyName()
getFriendlyName
in class GraphicObject
public void paint(Graphics g)
paint
in class GraphicObject
public int getDistanceSq(Point point)
getDistanceSq
in class GraphicObject
public void updateCachedData()
updateCachedData
in class GraphicObject
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |