|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.base.Selection
org.tigris.gef.base.SelectionResize
org.argouml.uml.diagram.ui.SelectionNodeClarifiers
org.argouml.uml.diagram.ui.SelectionWButtons
Field Summary | |
private static int |
IMAGE_SIZE
|
private static int |
MARGIN
|
private static int |
MAX_PLACINGS
The maximum number of tries to place a fig. |
private static int |
numButtonClicks
|
private boolean |
paintButtons
True if the buttons on selection are currently shown. |
private int |
placeCounter
Counter for counting the number of times there has been a try to place a fig. |
private static Color |
PRESSED_COLOR
|
private int |
pressedButton
|
private static boolean |
showRapidButtons
The bool showRapidButtons is only false if the user selected to never show the buttons. |
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 | |
SelectionWButtons(org.tigris.gef.presentation.Fig f)
Construct a new SelectionWButtons for the given Fig. |
Method Summary | |
void |
buttonClicked(int buttonCode)
|
protected Object |
createEdgeAbove(org.tigris.gef.graph.MutableGraphModel gm,
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)
Subclasses should override this method if they want to provide a quickbutton for selfassociation. |
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. |
Rectangle |
getBounds()
|
protected abstract Object |
getNewNode(int buttonCode)
Implementors should return a new node for adding via the buttons. |
protected int |
getPressedButton()
|
void |
hideButtons()
Dont show buttons while the user is moving the Class. |
boolean |
hitAbove(int x,
int y,
int w,
int h,
Rectangle r)
|
boolean |
hitBelow(int x,
int y,
int w,
int h,
Rectangle r)
|
boolean |
hitLeft(int x,
int y,
int w,
int h,
Rectangle r)
|
boolean |
hitRight(int x,
int y,
int w,
int h,
Rectangle r)
|
boolean |
intersectsRect(Rectangle r,
int x,
int y,
int w,
int h)
|
protected boolean |
isPaintButtons()
|
void |
mouseEntered(MouseEvent me)
|
void |
mouseExited(MouseEvent me)
|
void |
mousePressed(MouseEvent me)
|
void |
mouseReleased(MouseEvent me)
|
void |
paint(Graphics g)
Paint the handles at the four corners and midway along each edge of the bounding box. |
void |
paintButton(Icon i,
Graphics g,
int x,
int y,
int hi)
|
void |
paintButtonAbove(Icon i,
Graphics g,
int x,
int y,
int hi)
|
void |
paintButtonBelow(Icon i,
Graphics g,
int x,
int y,
int hi)
|
void |
paintButtonLeft(Icon i,
Graphics g,
int x,
int y,
int hi)
|
void |
paintButtonRight(Icon i,
Graphics g,
int x,
int y,
int hi)
|
abstract void |
paintButtons(Graphics g)
Paint the handles at the four corners and midway along each edge of the bounding box. |
protected boolean |
placeFig(org.tigris.gef.presentation.Fig figToPlace,
org.tigris.gef.base.LayerPerspective layerToPlaceOn,
int x,
int y,
Rectangle bumpRect)
Places a fig on the canvas in the correct position. |
protected void |
setPaintButtons(boolean paint)
|
protected void |
setPressedButton(int pressed)
|
static void |
toggleShowRapidButtons()
Toggle ShowRapidButtons. |
Methods inherited from class org.tigris.gef.base.SelectionResize |
dragHandle, hitHandle |
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 |
private static final int IMAGE_SIZE
private static final int MARGIN
private static final Color PRESSED_COLOR
private static final int MAX_PLACINGS
private static int numButtonClicks
private static boolean showRapidButtons
private boolean paintButtons
private int pressedButton
private int placeCounter
Constructor Detail |
public SelectionWButtons(org.tigris.gef.presentation.Fig f)
f
- The given Fig.Method Detail |
public static void toggleShowRapidButtons()
public boolean hitAbove(int x, int y, int w, int h, Rectangle r)
x
- x of the selection button icony
- y of the selection button iconw
- width of the selection button iconh
- height of the selection button iconr
- outer rectangle of the fig
public boolean hitBelow(int x, int y, int w, int h, Rectangle r)
x
- x of the selection button icony
- y of the selection button iconw
- width of the selection button iconh
- height of the selection button iconr
- outer rectangle of the fig
public boolean hitLeft(int x, int y, int w, int h, Rectangle r)
x
- x of the selection button icony
- y of the selection button iconw
- width of the selection button iconh
- height of the selection button iconr
- outer rectangle of the fig
public boolean hitRight(int x, int y, int w, int h, Rectangle r)
x
- x of the selection button icony
- y of the selection button iconw
- width of the selection button iconh
- height of the selection button iconr
- outer rectangle of the fig
public boolean intersectsRect(Rectangle r, int x, int y, int w, int h)
x
- x of rectangle 2y
- y of rectangle 2w
- width of rectangle 2h
- height of rectangle 2r
- rectangle 1
public void paint(Graphics g)
paint
in class SelectionNodeClarifiers
g
- The Graphics where we paint this.Selection.paint(java.awt.Graphics)
public abstract void paintButtons(Graphics g)
g
- The Graphics where to paint the buttons.public void paintButtonAbove(Icon i, Graphics g, int x, int y, int hi)
i
- the icon to be paintedg
- the graphics to draw onx
- x for the icony
- y for the iconhi
- the button identifierpublic void paintButtonBelow(Icon i, Graphics g, int x, int y, int hi)
i
- the icon to be paintedg
- the graphics to draw onx
- x for the icony
- y for the iconhi
- the button identifierpublic void paintButtonLeft(Icon i, Graphics g, int x, int y, int hi)
i
- the icon to be paintedg
- the graphics to draw onx
- x for the icony
- y for the iconhi
- the button identifierpublic void paintButtonRight(Icon i, Graphics g, int x, int y, int hi)
i
- the icon to be paintedg
- the graphics to draw onx
- x for the icony
- y for the iconhi
- the button identifierpublic void paintButton(Icon i, Graphics g, int x, int y, int hi)
i
- the icon to be paintedg
- the graphics to draw onx
- x for the icony
- y for the iconhi
- the button identifierpublic Rectangle getBounds()
Selection.getBounds()
public void hideButtons()
public void buttonClicked(int buttonCode)
buttonCode
- the button identifierpublic void mousePressed(MouseEvent me)
MouseListener.mousePressed(java.awt.event.MouseEvent)
public void mouseReleased(MouseEvent me)
MouseListener.mouseReleased(java.awt.event.MouseEvent)
public void mouseEntered(MouseEvent me)
MouseListener.mouseEntered(java.awt.event.MouseEvent)
public void mouseExited(MouseEvent me)
MouseListener.mouseExited(java.awt.event.MouseEvent)
protected boolean placeFig(org.tigris.gef.presentation.Fig figToPlace, org.tigris.gef.base.LayerPerspective layerToPlaceOn, int x, int y, Rectangle bumpRect)
figToPlace
- The figure one wishes to place on a diagramlayerToPlaceOn
- The layer that contains the figsx
- The x coordinate where one wishes to place the figy
- The y coordinate where one wishes to place the figbumpRect
- The rectangle that should be avoided since
there can be other figs.
protected abstract Object getNewNode(int buttonCode)
buttonCode
- the code (identifier) for the selection button
that was hit
protected Object createEdgeAbove(org.tigris.gef.graph.MutableGraphModel gm, Object newNode)
gm
- the graphmodelnewNode
- The node (modelelement) created by pressing the
quickbutton
protected Object createEdgeLeft(org.tigris.gef.graph.MutableGraphModel gm, Object newNode)
gm
- the graphmodelnewNode
- The node (modelelement) created by pressing the
quickbutton
protected Object createEdgeRight(org.tigris.gef.graph.MutableGraphModel gm, Object newNode)
gm
- the graphmodelnewNode
- The node (modelelement) created by pressing the
quickbutton
protected Object createEdgeUnder(org.tigris.gef.graph.MutableGraphModel gm, Object newNode)
gm
- the graphmodelnewNode
- The node (modelelement) created by pressing the
quickbutton
protected Object createEdgeToSelf(org.tigris.gef.graph.MutableGraphModel gm)
gm
- the graphmodel
protected void setPaintButtons(boolean paint)
paint
- The _paintButtons to set.protected boolean isPaintButtons()
protected void setPressedButton(int pressed)
pressed
- the identifier for the pressed Buttonprotected int getPressedButton()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |