org.argouml.uml.diagram.static_structure.ui
Class SelectionStereotype

java.lang.Object
  extended by SelectionButtons
      extended by org.argouml.uml.diagram.ui.SelectionNodeClarifiers2
          extended by org.argouml.uml.diagram.static_structure.ui.SelectionStereotype

public class SelectionStereotype
extends SelectionNodeClarifiers2

The buttons on selection for a Stereotype.

TODO: Find a way to hide the OperationsCompartment on the FigClass of the created metaclass.


Field Summary
 
Fields inherited from class org.argouml.uml.diagram.ui.SelectionNodeClarifiers2
BASE, BOTTOM, LEFT, LOWER_LEFT, RIGHT, TOP
 
Constructor Summary
SelectionStereotype(Fig f)
          Construct a new SelectionStereotype for the given Fig.
 
Method Summary
protected  java.lang.Object createEdgeAbove(MutableGraphModel mgm, java.lang.Object newNode)
           
protected  javax.swing.Icon[] getIcons()
          Get array of icons to use when drawing handles.
protected  java.lang.String getInstructions(int index)
          Get the "instructions" string to pass to GEF for the given handle number.
protected  java.lang.Object getNewEdgeType(int index)
          Get the edge type to create when dragging from the given handle number.
protected  java.lang.Object getNewNode(int index)
           
protected  java.lang.Object getNewNodeType(int index)
          Get the node type to create when dragging from the given handle number.
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 mouseEntered(java.awt.event.MouseEvent me)
           
 
Methods inherited from class org.argouml.uml.diagram.ui.SelectionNodeClarifiers2
buttonClicked, createEdgeLeft, createEdgeRight, createEdgeToSelf, createEdgeUnder, dragHandle, getButton, getNewModeCreateEdgeAndNode, hitHandle, isDraggableHandle, paint, paintButtons, postProcessEdge2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionStereotype

public SelectionStereotype(Fig f)
Construct a new SelectionStereotype for the given Fig.

Parameters:
f - the given fig
Method Detail

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent me)

getNewNode

protected java.lang.Object getNewNode(int index)
Overrides:
getNewNode in class SelectionNodeClarifiers2

getNewNodeType

protected java.lang.Object getNewNodeType(int index)
Description copied from class: SelectionNodeClarifiers2
Get the node type to create when dragging from the given handle number.

Specified by:
getNewNodeType in class SelectionNodeClarifiers2
Parameters:
index - handle number that is being dragged from
Returns:
metatype for model element. Null to disallow drag.

createEdgeAbove

protected java.lang.Object createEdgeAbove(MutableGraphModel mgm,
                                           java.lang.Object newNode)
Overrides:
createEdgeAbove in class SelectionNodeClarifiers2

getIcons

protected javax.swing.Icon[] getIcons()
Description copied from class: SelectionNodeClarifiers2
Get array of icons to use when drawing handles.

Specified by:
getIcons in class SelectionNodeClarifiers2
Returns:
icon or null

getInstructions

protected java.lang.String getInstructions(int index)
Description copied from class: SelectionNodeClarifiers2
Get the "instructions" string to pass to GEF for the given handle number.

Specified by:
getInstructions in class SelectionNodeClarifiers2
Parameters:
index - handle number that is being dragged from
Returns:
string or null

getNewEdgeType

protected java.lang.Object getNewEdgeType(int index)
Description copied from class: SelectionNodeClarifiers2
Get the edge type to create when dragging from the given handle number.

Specified by:
getNewEdgeType in class SelectionNodeClarifiers2
Parameters:
index - handle number that is being dragged from
Returns:
metatype for model element. Null to disallow drag.

isReverseEdge

protected boolean isReverseEdge(int index)
Description copied from class: SelectionNodeClarifiers2
Get the node type to create when dragging from the given handle number.

Overrides:
isReverseEdge in class SelectionNodeClarifiers2
Parameters:
index - handle number that is being dragged from
Returns:
true to reverse direction of assocation from direction of drag. eg. specialization instead of generalization. Default implementation always returns false.

isEdgePostProcessRequested

protected boolean isEdgePostProcessRequested()
Description copied from class: SelectionNodeClarifiers2
Request post processing of edge by GEF after it is created using ModeCreateEdgeAndNode#ModeCreateEdgeAndNode(Editor, Object, Object, boolean)

Overrides:
isEdgePostProcessRequested in class SelectionNodeClarifiers2
Returns:
true if postprocessing requested


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook