|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fdda.graphics.java2d.Component | +--fdda.graphics.java2d.Point
Represents a point on a line. The point appears as a small black rectangle; the coordinates are the middle point of this rectangle.
Field Summary |
Fields inherited from class fdda.graphics.java2d.Component |
COLOR_NORMAL, COLOR_SELECTED, dirtyShape, selected, shape, x, y |
Fields inherited from interface fdda.graphics.Component |
SEL_ALL, SEL_EQUALS, SEL_MOVABLES, SEL_NOTHING |
Constructor Summary | |
Point(double x,
double y)
Default constructor. |
|
Point(double x,
double y,
boolean selected)
Constructor |
Method Summary | |
protected void |
calcShape()
Recalculates the shape. |
void |
draw(Graphics2D graphContext)
Draws the component, using the given graphics. |
Line |
getLine()
Returns the line that contains the point. |
boolean |
isMovable()
Returns true. |
void |
move(double x,
double y)
Move the component (or its most prominent point). |
int |
selectableWith()
Returns SEL_ALL. |
void |
setLine(Line line)
Sets the line that contains the point. |
Object |
visit(ComponentVisitor visitor)
Calls visitPoint according to visitor pattern. |
Methods inherited from class fdda.graphics.java2d.Component |
clone, deselect, getGraphicalSystem, getShape, getX, getY, isSelected, recalculateShape, select, setGraphicalSystem, setXY |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Point(double x, double y)
x
- the x coordinatey
- the y coordinatepublic Point(double x, double y, boolean selected)
x
- the x coordinatey
- the y coordinateselected
- whether the point shall be selectedMethod Detail |
public Line getLine()
public void setLine(Line line)
line
- the linepublic void move(double x, double y)
Component
x
- offset for move in x directiony
- offset for move in y directionpublic void draw(Graphics2D graphContext)
Component
draw
in class Component
graphContext
- the graphicspublic boolean isMovable()
Component.isMovable()
public int selectableWith()
Component.selectableWith()
public Object visit(ComponentVisitor visitor)
visitor
- the visitor
Component.visit(fdda.graphics.ComponentVisitor)
protected void calcShape()
Component
calcShape
in class Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |