|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fdda.dialog.java2d.AbstractManipulator | +--fdda.dialog.java2d.LineCreator
Adds lines between nodes. The starting component must be a node.
Field Summary | |
static int |
LINE_IS_LOOP
Reason for Exception: loop |
static int |
NO_END_NODE
Reason for Exception: line not ended above node |
static int |
NODES_ALREADY_CONNECTED
Reason for Exception: nodes already connected |
Fields inherited from class fdda.dialog.java2d.AbstractManipulator |
graphicHolder, painter |
Constructor Summary | |
LineCreator(GraphicHolder graphicHolder,
boolean directedLine)
Constructor |
Method Summary | |
void |
execute(double x,
double y)
Executes the action. |
void |
finish(double x,
double y)
Finishes the action, making the changes permanent. |
void |
start(Component component)
Starts the action, using the specified component |
void |
start(double x,
double y)
Starts the action. |
Methods inherited from class fdda.dialog.java2d.AbstractManipulator |
getGraphicHolder, moveToGrid, setGraphicHolder |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NO_END_NODE
public static final int NODES_ALREADY_CONNECTED
public static final int LINE_IS_LOOP
Constructor Detail |
public LineCreator(GraphicHolder graphicHolder, boolean directedLine)
graphicHolder
- the graphic holderdirectedLine
- whether the line shall be directedMethod Detail |
public void start(Component component) throws NoSuitableComponentException
Manipulator
start
in interface Manipulator
component
- the component
NoSuitableComponentException
- if the component can't be used for the
action of the manipulatorpublic void start(double x, double y) throws NoSuitableComponentException
Manipulator
start
in interface Manipulator
x
- the x coordinatey
- the y coordinate
NoSuitableComponentException
- if no component that could be used for
the action of the manipulator is at that pointpublic void execute(double x, double y) throws NoSuitableComponentException
Manipulator
execute
in interface Manipulator
x
- the new x coordinate (may not be important)y
- the new y coordinate (may not be important)
NoSuitableComponentException
- if no suitable component was selected
first by calling startpublic void finish(double x, double y) throws NoSuitableComponentException
Manipulator
finish
in interface Manipulator
x
- the new x coordinate (may not be important)y
- the new y coordinate (may not be important)
NoSuitableComponentException
- if no suitable component was selected
first by calling start
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |