uci.uml.visual
Class SelectionWButtons

java.lang.Object
  |
  +--uci.gef.Selection
        |
        +--uci.gef.SelectionResize
              |
              +--uci.uml.visual.SelectionNodeClarifiers
                    |
                    +--uci.uml.visual.SelectionWButtons
Direct Known Subclasses:
SelectionActor, SelectionClass, SelectionInterface, SelectionState, SelectionUseCase

public abstract class SelectionWButtons
extends SelectionNodeClarifiers

See Also:
Serialized Form

Field Summary
protected  boolean _paintButtons
           
protected  int _pressedButton
           
static boolean _showRapidButtons
           
static int IMAGE_SIZE
           
static int MARGIN
           
static int Num_Button_Clicks
           
static Color PRESSED_COLOR
           
 
Fields inherited from class uci.gef.Selection
_content, BORDER_WIDTH, HAND_SIZE
 
Constructor Summary
SelectionWButtons(Fig f)
          Construct a new SelectionWButtons for the given Fig
 
Method Summary
 void buttonClicked(int buttonInt)
           
 Rectangle getBounds()
           
 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)
           
 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)
           
static void toggleShowRapidButtons()
           
 
Methods inherited from class uci.gef.SelectionResize
dragHandle, hitHandle
 
Methods inherited from class uci.gef.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

IMAGE_SIZE

public static final int IMAGE_SIZE

MARGIN

public static final int MARGIN

PRESSED_COLOR

public static final Color PRESSED_COLOR

Num_Button_Clicks

public static int Num_Button_Clicks

_showRapidButtons

public static boolean _showRapidButtons

_paintButtons

protected boolean _paintButtons

_pressedButton

protected int _pressedButton
Constructor Detail

SelectionWButtons

public SelectionWButtons(Fig f)
Construct a new SelectionWButtons for the given Fig
Method Detail

toggleShowRapidButtons

public static void toggleShowRapidButtons()

hitAbove

public boolean hitAbove(int x,
                        int y,
                        int w,
                        int h,
                        Rectangle r)

hitBelow

public boolean hitBelow(int x,
                        int y,
                        int w,
                        int h,
                        Rectangle r)

hitLeft

public boolean hitLeft(int x,
                       int y,
                       int w,
                       int h,
                       Rectangle r)

hitRight

public boolean hitRight(int x,
                        int y,
                        int w,
                        int h,
                        Rectangle r)

intersectsRect

public boolean intersectsRect(Rectangle r,
                              int x,
                              int y,
                              int w,
                              int h)

paint

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

paintButtons

public abstract void paintButtons(Graphics g)

paintButtonAbove

public void paintButtonAbove(Icon i,
                             Graphics g,
                             int x,
                             int y,
                             int hi)

paintButtonBelow

public void paintButtonBelow(Icon i,
                             Graphics g,
                             int x,
                             int y,
                             int hi)

paintButtonLeft

public void paintButtonLeft(Icon i,
                            Graphics g,
                            int x,
                            int y,
                            int hi)

paintButtonRight

public void paintButtonRight(Icon i,
                             Graphics g,
                             int x,
                             int y,
                             int hi)

paintButton

public void paintButton(Icon i,
                        Graphics g,
                        int x,
                        int y,
                        int hi)

getBounds

public Rectangle getBounds()
Overrides:
getBounds in class Selection

hideButtons

public void hideButtons()
Dont show buttons while the user is moving the Class. Called from FigClass when it is translated.

buttonClicked

public void buttonClicked(int buttonInt)

mousePressed

public void mousePressed(MouseEvent me)
Overrides:
mousePressed in class Selection

mouseReleased

public void mouseReleased(MouseEvent me)
Overrides:
mouseReleased in class Selection

mouseEntered

public void mouseEntered(MouseEvent me)
Overrides:
mouseEntered in class Selection

mouseExited

public void mouseExited(MouseEvent me)
Overrides:
mouseExited in class Selection