|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSelectionButtons
org.argouml.uml.diagram.ui.SelectionNodeClarifiers2
public abstract class SelectionNodeClarifiers2
Enhanced version of SelectionNodeClarifiers with the new methods necessary for the enhanced support marked as abstract so that implementors are forced to implement them. SelectionNodeClarifiers is simple extension of this which implements null versions of the required methods for backward compatibility with the previous implementation.
To upgrade subtypes of SelectionNodeClarifiers, change them to extend this class instead and implement the required abstract methods. The methods paintButtons, dragHandle, hitHandle, and createEdge* can all usually be removed.
Field Summary | |
---|---|
protected static int |
BASE
Base index of array |
protected static int |
BOTTOM
Bottom Handle |
protected static int |
LEFT
Left Handle |
protected static int |
LOWER_LEFT
Lower left corner Handle |
protected static int |
RIGHT
Right Handle |
protected static int |
TOP
Top Handle |
Constructor Summary | |
---|---|
SelectionNodeClarifiers2(Fig f)
Construct a new SelectionNodeClarifiers for the given Fig |
Method Summary | |
---|---|
void |
buttonClicked(int buttonCode)
|
protected java.lang.Object |
createEdgeAbove(MutableGraphModel gm,
java.lang.Object newNode)
|
protected java.lang.Object |
createEdgeLeft(MutableGraphModel gm,
java.lang.Object newNode)
|
protected java.lang.Object |
createEdgeRight(MutableGraphModel gm,
java.lang.Object newNode)
|
protected java.lang.Object |
createEdgeToSelf(MutableGraphModel gm)
|
protected java.lang.Object |
createEdgeUnder(MutableGraphModel gm,
java.lang.Object newNode)
|
void |
dragHandle(int mX,
int mY,
int anX,
int anY,
Handle hand)
|
protected int |
getButton()
|
protected abstract javax.swing.Icon[] |
getIcons()
Get array of icons to use when drawing handles. |
protected abstract java.lang.String |
getInstructions(int index)
Get the "instructions" string to pass to GEF for the given handle number. |
protected abstract java.lang.Object |
getNewEdgeType(int index)
Get the edge type to create when dragging from the given handle number. |
protected ModeCreateEdgeAndNode |
getNewModeCreateEdgeAndNode(Editor ce,
java.lang.Object edgeType,
boolean postProcess,
SelectionNodeClarifiers2 nodeCreator)
Override this to implement post-processing. |
protected java.lang.Object |
getNewNode(int arg0)
|
protected abstract java.lang.Object |
getNewNodeType(int index)
Get the node type to create when dragging from the given handle number. |
void |
hitHandle(java.awt.Rectangle cursor,
Handle h)
Compute handle selection, if any, from cursor location. |
protected boolean |
isDraggableHandle(int index)
Get the draggability of a particular handle. |
protected boolean |
isEdgePostProcessRequested()
Request post processing of edge by GEF after it is created using ModeCreateEdgeAndNode#ModeCreateEdgeAndNode(Editor, Object, Object, boolean) |
protected boolean |
isReverseEdge(int index)
Get the node type to create when dragging from the given handle number. |
void |
paint(java.awt.Graphics g)
|
void |
paintButtons(java.awt.Graphics g)
|
protected void |
postProcessEdge2(java.lang.Object newEdge)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int BASE
protected static final int TOP
protected static final int BOTTOM
protected static final int LEFT
protected static final int RIGHT
protected static final int LOWER_LEFT
Constructor Detail |
---|
public SelectionNodeClarifiers2(Fig f)
f
- the given FigMethod Detail |
---|
public void paint(java.awt.Graphics g)
public final void paintButtons(java.awt.Graphics g)
protected java.lang.Object getNewNode(int arg0)
public void hitHandle(java.awt.Rectangle cursor, Handle h)
cursor
- cursor point represented by a 0-size rectangleh
- handle in which to return selected Handle information (output
parameter). A handle index of -1 indicates that the cursor is
not over any handle.
If GEF had any API documentation you could see the following:org.tigris.gef.base.SelectionResize#hitHandle(java.awt.Rectangle,
org.tigris.gef.presentation.Handle)
public void dragHandle(int mX, int mY, int anX, int anY, Handle hand)
protected ModeCreateEdgeAndNode getNewModeCreateEdgeAndNode(Editor ce, java.lang.Object edgeType, boolean postProcess, SelectionNodeClarifiers2 nodeCreator)
ce
- the current EditoredgeType
- the new edge typepostProcess
- true if post-processing is wantednodeCreator
- this class will create the node
public void buttonClicked(int buttonCode)
protected java.lang.Object createEdgeAbove(MutableGraphModel gm, java.lang.Object newNode)
protected java.lang.Object createEdgeUnder(MutableGraphModel gm, java.lang.Object newNode)
protected java.lang.Object createEdgeLeft(MutableGraphModel gm, java.lang.Object newNode)
protected java.lang.Object createEdgeRight(MutableGraphModel gm, java.lang.Object newNode)
protected java.lang.Object createEdgeToSelf(MutableGraphModel gm)
protected abstract javax.swing.Icon[] getIcons()
protected abstract java.lang.String getInstructions(int index)
index
- handle number that is being dragged from
protected abstract java.lang.Object getNewNodeType(int index)
index
- handle number that is being dragged from
protected abstract java.lang.Object getNewEdgeType(int index)
index
- handle number that is being dragged from
protected boolean isReverseEdge(int index)
index
- handle number that is being dragged from
protected boolean isDraggableHandle(int index)
index
- handle index to check draggability for
protected boolean isEdgePostProcessRequested()
ModeCreateEdgeAndNode#ModeCreateEdgeAndNode(Editor, Object, Object, boolean)
protected void postProcessEdge2(java.lang.Object newEdge)
newEdge
- the new edge to post-processprotected int getButton()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |