|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ModeCreate | +--org.argouml.uml.diagram.ui.ModeCreateEdgeAndNode
A Mode to interpret user input while creating an edge. Basically mouse down starts creating an edge from a source port Fig, mouse motion paints a rubberband line, mouse up finds the destination port and finishes creating the edge and makes an FigEdge and sends it to the back of the Layer. The argument "edgeClass" determines the type if edge to suggest that the Editor's GraphModel construct. The GraphModel is responsible for acutally making an edge in the underlying model and connecting it to other model elements.
Field Summary | |
---|---|
private boolean |
_destToSource
False if drawing from source and destination. |
protected FigEdge |
_fe
|
protected FigNode |
_fn
|
protected Handle |
_handle
The number of points added so far. |
private java.lang.Object |
_newEdge
The new NetEdge that is being created |
protected boolean |
_postProcessEdge
|
private FigNode |
_sourceFigNode
The FigNode on the NetNode that owns the start port |
private java.lang.Object |
_startPort
The NetPort where the arc is paintn from |
private Fig |
_startPortFig
The Fig that presents the starting NetPort |
protected static Logger |
cat
|
static int |
Drags_To_Existing
|
static int |
Drags_To_New
|
(package private) static long |
serialVersionUID
|
Constructor Summary | |
---|---|
ModeCreateEdgeAndNode()
|
|
ModeCreateEdgeAndNode(Editor ed,
java.lang.Class edgeClass,
java.lang.Class nodeClass,
boolean post)
|
Method Summary | |
---|---|
Fig |
createNewItem(java.awt.event.MouseEvent me,
int snapX,
int snapY)
Create the new item that will be drawn. |
void |
done()
|
java.lang.String |
instructions()
|
void |
keyTyped(java.awt.event.KeyEvent ke)
|
void |
mouseDragged(java.awt.event.MouseEvent me)
|
void |
mouseMoved(java.awt.event.MouseEvent me)
|
void |
mousePressed(java.awt.event.MouseEvent me)
On mousePressed determine what port the user is dragging from. |
void |
mouseReleased(java.awt.event.MouseEvent me)
On mouseReleased, find the destination port, ask the GraphModel to connect the two ports. |
void |
postProcessEdge()
|
void |
setup(FigNode fn,
java.lang.Object port,
int x,
int y,
boolean reverse)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Logger cat
public static int Drags_To_Existing
public static int Drags_To_New
private java.lang.Object _startPort
private Fig _startPortFig
private FigNode _sourceFigNode
private java.lang.Object _newEdge
private boolean _destToSource
protected Handle _handle
protected FigNode _fn
protected FigEdge _fe
protected boolean _postProcessEdge
static final long serialVersionUID
Constructor Detail |
public ModeCreateEdgeAndNode()
public ModeCreateEdgeAndNode(Editor ed, java.lang.Class edgeClass, java.lang.Class nodeClass, boolean post)
Method Detail |
public void setup(FigNode fn, java.lang.Object port, int x, int y, boolean reverse)
public java.lang.String instructions()
public Fig createNewItem(java.awt.event.MouseEvent me, int snapX, int snapY)
public void done()
public void mousePressed(java.awt.event.MouseEvent me)
public void mouseReleased(java.awt.event.MouseEvent me)
public void mouseMoved(java.awt.event.MouseEvent me)
public void mouseDragged(java.awt.event.MouseEvent me)
public void keyTyped(java.awt.event.KeyEvent ke)
public void postProcessEdge()
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |