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

java.lang.Object
  |
  +--org.tigris.gef.base.Selection
        |
        +--org.tigris.gef.base.SelectionResize
              |
              +--org.argouml.uml.diagram.ui.SelectionNodeClarifiers
                    |
                    +--org.argouml.uml.diagram.ui.SelectionWButtons
                          |
                          +--org.argouml.uml.diagram.static_structure.ui.SelectionInterface
All Implemented Interfaces:
java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable

public class SelectionInterface
extends SelectionWButtons

See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Category cat
           
static javax.swing.Icon realiz
           
 
Fields inherited from class org.argouml.uml.diagram.ui.SelectionWButtons
_paintButtons, _pressedButton, _showRapidButtons, IMAGE_SIZE, MARGIN, Num_Button_Clicks, PRESSED_COLOR
 
Fields inherited from class org.tigris.gef.base.Selection
_content, BORDER_WIDTH, HAND_SIZE
 
Constructor Summary
SelectionInterface(org.tigris.gef.presentation.Fig f)
          Construct a new SelectionInterface for the given Fig
 
Method Summary
 java.lang.Object addRealization(org.tigris.gef.graph.MutableGraphModel mgm, ru.novosoft.uml.foundation.core.MInterface cls, ru.novosoft.uml.foundation.core.MClass newCls)
           
protected  java.lang.Object createEdgeUnder(org.tigris.gef.graph.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, org.tigris.gef.presentation.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, org.tigris.gef.presentation.Handle h)
          Return a handle ID for the handle under the mouse, or -1 if none.
 void paintButtons(java.awt.Graphics g)
          Paint the handles at the four corners and midway along each edge of the bounding box.
 
Methods inherited from class org.argouml.uml.diagram.ui.SelectionWButtons
buttonClicked, createEdgeAbove, createEdgeLeft, createEdgeRight, createEdgeToSelf, getBounds, hideButtons, hitAbove, hitBelow, hitLeft, hitRight, intersectsRect, mouseEntered, mouseExited, mousePressed, mouseReleased, paint, paintButton, paintButtonAbove, paintButtonBelow, paintButtonLeft, paintButtonRight, placeFig, toggleShowRapidButtons
 
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, startTrans, stuffBounds, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cat

protected static org.apache.log4j.Category cat

realiz

public static javax.swing.Icon realiz
Constructor Detail

SelectionInterface

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

hitHandle

public void hitHandle(java.awt.Rectangle r,
                      org.tigris.gef.presentation.Handle h)
Return a handle ID for the handle under the mouse, or -1 if none. TODO: in the future, return a Handle instance or null.

   0-------1-------2
   |               |
   3               4
   |               |
   5-------6-------7
 
Overrides:
hitHandle in class org.tigris.gef.base.SelectionResize

paintButtons

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

dragHandle

public void dragHandle(int mX,
                       int mY,
                       int anX,
                       int anY,
                       org.tigris.gef.presentation.Handle hand)
Overrides:
dragHandle in class org.tigris.gef.base.SelectionResize

addRealization

public java.lang.Object addRealization(org.tigris.gef.graph.MutableGraphModel mgm,
                                       ru.novosoft.uml.foundation.core.MInterface cls,
                                       ru.novosoft.uml.foundation.core.MClass newCls)

createEdgeUnder

protected java.lang.Object createEdgeUnder(org.tigris.gef.graph.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
See Also:
SelectionWButtons.createEdgeUnder(org.tigris.gef.graph.MutableGraphModel, java.lang.Object)

getNewNode

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


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook