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

java.lang.Object
  extended byorg.tigris.gef.base.Selection
      extended byorg.tigris.gef.base.SelectionResize
          extended byorg.argouml.uml.diagram.ui.SelectionNodeClarifiers
              extended byorg.argouml.uml.diagram.ui.SelectionWButtons
                  extended byorg.argouml.uml.diagram.activity.ui.SelectionActionState
All Implemented Interfaces:
EventListener, KeyListener, MouseListener, MouseMotionListener, Serializable

public class SelectionActionState
extends SelectionWButtons

See Also:
Serialized Form

Field Summary
private static Logger LOG
           
private  boolean showIncomingAbove
           
private  boolean showIncomingLeft
           
private  boolean showOutgoingBelow
           
private  boolean showOutgoingRight
           
private static Icon trans
           
private static Icon transDown
           
 
Fields inherited from class org.argouml.uml.diagram.ui.SelectionWButtons
 
Fields inherited from class org.tigris.gef.base.SelectionResize
 
Fields inherited from class org.tigris.gef.base.Selection
_content, BORDER_WIDTH, HAND_SIZE
 
Constructor Summary
SelectionActionState(org.tigris.gef.presentation.Fig f)
          Construct a new SelectionActionState for the given Fig.
 
Method Summary
protected  Object createEdgeAbove(org.tigris.gef.graph.MutableGraphModel mgm, Object newNode)
          Subclasses should override this method if they want to provide a quickbutton above the _content fig.
protected  Object createEdgeLeft(org.tigris.gef.graph.MutableGraphModel gm, Object newNode)
          Subclasses should override this method if they want to provide a quickbutton at the left of the _content fig.
protected  Object createEdgeRight(org.tigris.gef.graph.MutableGraphModel gm, Object newNode)
          Subclasses should override this method if they want to provide a quickbutton at the right of the _content fig.
protected  Object createEdgeToSelf(org.tigris.gef.graph.MutableGraphModel gm)
          To enable this we need to add an icon.
protected  Object createEdgeUnder(org.tigris.gef.graph.MutableGraphModel gm, 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, org.tigris.gef.presentation.Handle hand)
           
protected  Object getNewNode(int buttonCode)
          Implementors should return a new node for adding via the buttons.
 void hitHandle(Rectangle r, org.tigris.gef.presentation.Handle h)
           
 void paintButtons(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, getPressedButton, hideButtons, hitAbove, hitBelow, hitLeft, hitRight, intersectsRect, isPaintButtons, mouseEntered, mouseExited, mousePressed, mouseReleased, paint, paintButton, paintButtonAbove, paintButtonBelow, paintButtonLeft, paintButtonRight, placeFig, setPaintButtons, setPressedButton, toggleShowRapidButtons
 
Methods inherited from class org.tigris.gef.base.SelectionResize
 
Methods inherited from class org.tigris.gef.base.Selection
contains, contains, contains, damage, delete, dispose, endTrans, getContent, getContentBounds, getLocation, getLocked, hit, hitHandle, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseMoved, print, reorder, setcontent, stuffBounds, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Logger LOG

trans

private static Icon trans

transDown

private static Icon transDown

showIncomingLeft

private boolean showIncomingLeft

showIncomingAbove

private boolean showIncomingAbove

showOutgoingRight

private boolean showOutgoingRight

showOutgoingBelow

private boolean showOutgoingBelow
Constructor Detail

SelectionActionState

public SelectionActionState(org.tigris.gef.presentation.Fig f)
Construct a new SelectionActionState for the given Fig.

Parameters:
f - The given Fig.
Method Detail

setOutgoingButtonEnabled

public void setOutgoingButtonEnabled(boolean b)
Parameters:
b - true if the buton is enabled

setIncomingButtonEnabled

public void setIncomingButtonEnabled(boolean b)
Parameters:
b - true if the buton is enabled

setIncomingLeftButtonEnabled

public void setIncomingLeftButtonEnabled(boolean b)
Parameters:
b - true if the buton is enabled

setOutgoingRightButtonEnabled

public void setOutgoingRightButtonEnabled(boolean b)
Parameters:
b - true if the buton is enabled

setIncomingAboveButtonEnabled

public void setIncomingAboveButtonEnabled(boolean b)
Parameters:
b - true if the buton is enabled

setOutgoingBelowButtonEnabled

public void setOutgoingBelowButtonEnabled(boolean b)
Parameters:
b - true if the buton is enabled

hitHandle

public void hitHandle(Rectangle r,
                      org.tigris.gef.presentation.Handle h)
See Also:
Selection.hitHandle(java.awt.Rectangle, org.tigris.gef.presentation.Handle)

paintButtons

public void paintButtons(Graphics g)
Description copied from class: SelectionWButtons
Paint the handles at the four corners and midway along each edge of the bounding box.

Specified by:
paintButtons in class SelectionWButtons
Parameters:
g - The Graphics where to paint the buttons.
See Also:
SelectionWButtons.paintButtons(Graphics)

dragHandle

public void dragHandle(int mX,
                       int mY,
                       int anX,
                       int anY,
                       org.tigris.gef.presentation.Handle hand)
See Also:
Selection.dragHandle(int, int, int, int, org.tigris.gef.presentation.Handle)

getNewNode

protected 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
Parameters:
buttonCode - the code (identifier) for the selection button that was hit
Returns:
a newly created UML element
See Also:
SelectionWButtons.getNewNode(int)

createEdgeAbove

protected Object createEdgeAbove(org.tigris.gef.graph.MutableGraphModel mgm,
                                 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 - the graphmodel
newNode - The node (modelelement) created by pressing the quickbutton
Returns:
Object The new edge
See Also:
SelectionWButtons.createEdgeAbove( org.tigris.gef.graph.MutableGraphModel, java.lang.Object)

createEdgeLeft

protected Object createEdgeLeft(org.tigris.gef.graph.MutableGraphModel gm,
                                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 - the graphmodel
newNode - The node (modelelement) created by pressing the quickbutton
Returns:
Object The new edge
See Also:
SelectionWButtons.createEdgeLeft( org.tigris.gef.graph.MutableGraphModel, java.lang.Object)

createEdgeRight

protected Object createEdgeRight(org.tigris.gef.graph.MutableGraphModel gm,
                                 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 - the graphmodel
newNode - The node (modelelement) created by pressing the quickbutton
Returns:
Object The new edge
See Also:
SelectionWButtons.createEdgeRight( org.tigris.gef.graph.MutableGraphModel, java.lang.Object)

createEdgeToSelf

protected Object createEdgeToSelf(org.tigris.gef.graph.MutableGraphModel gm)
To enable this we need to add an icon.

Overrides:
createEdgeToSelf in class SelectionWButtons
Parameters:
gm - the graphmodel
Returns:
Object The new edge
See Also:
SelectionWButtons.createEdgeToSelf( org.tigris.gef.graph.MutableGraphModel)

createEdgeUnder

protected Object createEdgeUnder(org.tigris.gef.graph.MutableGraphModel gm,
                                 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 - the graphmodel
newNode - The node (modelelement) created by pressing the quickbutton
Returns:
Object The new edge
See Also:
SelectionWButtons.createEdgeUnder( org.tigris.gef.graph.MutableGraphModel, java.lang.Object)


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