org.argouml.uml.diagram.activity.ui
Class SelectionActionState

java.lang.Object
  |
  +--SelectionResize
        |
        +--org.argouml.uml.diagram.ui.SelectionNodeClarifiers
              |
              +--org.argouml.uml.diagram.ui.SelectionWButtons
                    |
                    +--org.argouml.uml.diagram.activity.ui.SelectionActionState

public class SelectionActionState
extends SelectionWButtons

See Also:
Serialized Form

Field Summary
protected  boolean _showIncomingAbove
           
protected  boolean _showIncomingLeft
           
protected  boolean _showOutgoingBelow
           
protected  boolean _showOutgoingRight
           
protected static Logger cat
           
static javax.swing.Icon trans
           
static javax.swing.Icon transDown
           
 
Fields inherited from class org.argouml.uml.diagram.ui.SelectionWButtons
_paintButtons, _pressedButton, _showRapidButtons, IMAGE_SIZE, MARGIN, Num_Button_Clicks, PRESSED_COLOR
 
Constructor Summary
SelectionActionState(Fig f)
          Construct a new SelectionActionState for the given Fig
 
Method Summary
protected  java.lang.Object createEdgeAbove(MutableGraphModel mgm, java.lang.Object newNode)
          Subclasses should override this method if they want to provide a quickbutton above the _content fig.
protected  java.lang.Object createEdgeLeft(MutableGraphModel gm, java.lang.Object newNode)
          Subclasses should override this method if they want to provide a quickbutton at the left of the _content fig.
protected  java.lang.Object createEdgeRight(MutableGraphModel gm, java.lang.Object newNode)
          Subclasses should override this method if they want to provide a quickbutton at the right of the _content fig.
protected  java.lang.Object createEdgeToSelf(MutableGraphModel gm)
          To enable this we need to add an icon.
protected  java.lang.Object createEdgeUnder(MutableGraphModel gm, java.lang.Object newNode)
          Subclasses should override this method if they want to provide a quickbutton under the _content fig.
 void dragHandle(int mX, int mY, int anX, int anY, Handle hand)
           
protected  java.lang.Object getNewNode(int buttonCode)
          Implementors should return a new node for adding via the buttons.
 void hitHandle(java.awt.Rectangle r, Handle h)
           
 void paintButtons(java.awt.Graphics g)
          Paint the handles at the four corners and midway along each edge of the bounding box.
 void setIncomingAboveButtonEnabled(boolean b)
           
 void setIncomingButtonEnabled(boolean b)
           
 void setIncomingLeftButtonEnabled(boolean b)
           
 void setOutgoingBelowButtonEnabled(boolean b)
           
 void setOutgoingButtonEnabled(boolean b)
           
 void setOutgoingRightButtonEnabled(boolean b)
           
 
Methods inherited from class org.argouml.uml.diagram.ui.SelectionWButtons
buttonClicked, getBounds, hideButtons, hitAbove, hitBelow, hitLeft, hitRight, intersectsRect, mouseEntered, mouseExited, mousePressed, mouseReleased, paint, paintButton, paintButtonAbove, paintButtonBelow, paintButtonLeft, paintButtonRight, placeFig, toggleShowRapidButtons
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cat

protected static Logger cat

trans

public static javax.swing.Icon trans

transDown

public static javax.swing.Icon transDown

_showIncomingLeft

protected boolean _showIncomingLeft

_showIncomingAbove

protected boolean _showIncomingAbove

_showOutgoingRight

protected boolean _showOutgoingRight

_showOutgoingBelow

protected boolean _showOutgoingBelow
Constructor Detail

SelectionActionState

public SelectionActionState(Fig f)
Construct a new SelectionActionState for the given Fig

Method Detail

setOutgoingButtonEnabled

public void setOutgoingButtonEnabled(boolean b)

setIncomingButtonEnabled

public void setIncomingButtonEnabled(boolean b)

setIncomingLeftButtonEnabled

public void setIncomingLeftButtonEnabled(boolean b)

setOutgoingRightButtonEnabled

public void setOutgoingRightButtonEnabled(boolean b)

setIncomingAboveButtonEnabled

public void setIncomingAboveButtonEnabled(boolean b)

setOutgoingBelowButtonEnabled

public void setOutgoingBelowButtonEnabled(boolean b)

hitHandle

public void hitHandle(java.awt.Rectangle r,
                      Handle h)

paintButtons

public void paintButtons(java.awt.Graphics g)
Paint the handles at the four corners and midway along each edge of the bounding box.

Specified by:
paintButtons in class SelectionWButtons

dragHandle

public void dragHandle(int mX,
                       int mY,
                       int anX,
                       int anY,
                       Handle hand)

getNewNode

protected java.lang.Object getNewNode(int buttonCode)
Description copied from class: SelectionWButtons
Implementors should return a new node for adding via the buttons.

Specified by:
getNewNode in class SelectionWButtons
See Also:
SelectionWButtons.getNewNode(int)

createEdgeAbove

protected java.lang.Object createEdgeAbove(MutableGraphModel mgm,
                                           java.lang.Object newNode)
Description copied from class: SelectionWButtons
Subclasses should override this method if they want to provide a quickbutton above the _content fig. This method returns the edge (modelelement) that should be drawn in the case such a quickbutton was pressed.

Overrides:
createEdgeAbove in class SelectionWButtons
Parameters:
mgm -
newNode - The node (modelelement) created by pressing the quickbutton
Returns:
Object The new edge
See Also:
org.argouml.uml.diagram.ui.SelectionWButtons#createEdgeAbove(org.tigris.gef.graph.MutableGraphModel, java.lang.Object)

createEdgeLeft

protected java.lang.Object createEdgeLeft(MutableGraphModel gm,
                                          java.lang.Object newNode)
Description copied from class: SelectionWButtons
Subclasses should override this method if they want to provide a quickbutton at the left of the _content fig. This method returns the edge (modelelement) that should be drawn in the case such a quickbutton was pressed.

Overrides:
createEdgeLeft in class SelectionWButtons
Parameters:
gm -
newNode - The node (modelelement) created by pressing the quickbutton
Returns:
Object The new edge
See Also:
org.argouml.uml.diagram.ui.SelectionWButtons#createEdgeLeft(org.tigris.gef.graph.MutableGraphModel, java.lang.Object)

createEdgeRight

protected java.lang.Object createEdgeRight(MutableGraphModel gm,
                                           java.lang.Object newNode)
Description copied from class: SelectionWButtons
Subclasses should override this method if they want to provide a quickbutton at the right of the _content fig. This method returns the edge (modelelement) that should be drawn in the case such a quickbutton was pressed.

Overrides:
createEdgeRight in class SelectionWButtons
Parameters:
gm -
newNode - The node (modelelement) created by pressing the quickbutton
Returns:
Object The new edge
See Also:
org.argouml.uml.diagram.ui.SelectionWButtons#createEdgeRight(org.tigris.gef.graph.MutableGraphModel, java.lang.Object)

createEdgeToSelf

protected java.lang.Object createEdgeToSelf(MutableGraphModel gm)
To enable this we need to add an icon.

Overrides:
createEdgeToSelf in class SelectionWButtons
Parameters:
gm -
Returns:
Object The new edge
See Also:
org.argouml.uml.diagram.ui.SelectionWButtons#createEdgeToSelf(org.tigris.gef.graph.MutableGraphModel)

createEdgeUnder

protected java.lang.Object createEdgeUnder(MutableGraphModel gm,
                                           java.lang.Object newNode)
Description copied from class: SelectionWButtons
Subclasses should override this method if they want to provide a quickbutton under the _content fig. This method returns the edge (modelelement) that should be drawn in the case such a quickbutton was pressed.

Overrides:
createEdgeUnder in class SelectionWButtons
Parameters:
gm -
newNode - The node (modelelement) created by pressing the quickbutton
Returns:
Object The new edge
See Also:
org.argouml.uml.diagram.ui.SelectionWButtons#createEdgeUnder(org.tigris.gef.graph.MutableGraphModel, java.lang.Object)


ArgoUML © 1996-2004 (20040306)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook