uci.gef
Class SelectionLowerRight
java.lang.Object
|
+--uci.gef.Selection
|
+--uci.gef.SelectionLowerRight
- public class SelectionLowerRight
- extends Selection
A Selection class to represent selections on Figs that present
resize handles. The selected Fig can be moved or resized. Figrect,
FigRRect, FigCircle, and FigGroup are some of the Figs that
normally use this Selection. The selected Fig is told it's new
bounding box, and some Figs (like FigGroup or FigPoly) do
calculations to scale themselves.
- See Also:
- Serialized Form
|
Method Summary |
void |
dragHandle(int mX,
int mY,
int anX,
int anY,
Handle hand)
Change some attribute of the selected Fig when the user drags one of its
handles. |
void |
hitHandle(Rectangle r,
Handle h)
Return a handle ID for the handle under the mouse, or -1 if
none. |
void |
paint(Graphics g)
Paint the handles at the four corners and midway along each edge
of the bounding box. |
| Methods inherited from class uci.gef.Selection |
contains,
contains,
contains,
damage,
delete,
dispose,
endTrans,
getBounds,
getContent,
getContentBounds,
getLocation,
getLocked,
hit,
hitHandle,
keyPressed,
keyReleased,
keyTyped,
mouseClicked,
mouseDragged,
mouseEntered,
mouseExited,
mouseMoved,
mousePressed,
mouseReleased,
print,
reorder,
setcontent,
startTrans,
stuffBounds,
translate |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SelectionLowerRight
public SelectionLowerRight(Fig f)
- Construct a new SelectionLowerRight for the given Fig
hitHandle
public void hitHandle(Rectangle r,
Handle h)
- Return a handle ID for the handle under the mouse, or -1 if
none. Needs-More-Work: in the future, return a Handle instance or
null.
0-------1-------2
| |
3 4
| |
5-------6-------7
- Overrides:
- hitHandle in class Selection
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 Selection
dragHandle
public void dragHandle(int mX,
int mY,
int anX,
int anY,
Handle hand)
- Change some attribute of the selected Fig when the user drags one of its
handles. Needs-More-Work: someday I might implement resizing that
maintains the aspect ratio.
- Overrides:
- dragHandle in class Selection