uci.gef
Class SelectionReshape
java.lang.Object
|
+--uci.gef.Selection
|
+--uci.gef.SelectionReshape
- Direct Known Subclasses:
- SelectionEdgeClarifiers
- public class SelectionReshape
- extends Selection
- implements KeyListener
A Selection that allows the user to reshape the selected Fig.
This is used with FigPoly, FigLine, and FigInk. One handle is
drawn over each point on the Fig.
- See Also:
FigLine,
FigPoly,
FigInk, Serialized Form
|
Method Summary |
void |
dragHandle(int mX,
int mY,
int anX,
int anY,
Handle h)
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 |
keyPressed(KeyEvent ke)
|
void |
keyReleased(KeyEvent ke)
|
void |
keyTyped(KeyEvent ke)
If the user presses delete or backaspace while a handle is
selected, remove that point from the polygon. |
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,
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 |
_selectedHandle
protected int _selectedHandle
SelectionReshape
public SelectionReshape(Fig f)
- Construct a new SelectionReshape 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.
- 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 h)
- Change some attribute of the selected Fig when the user drags one of its
handles.
- Overrides:
- dragHandle in class Selection
keyPressed
public void keyPressed(KeyEvent ke)
- Specified by:
- keyPressed in interface KeyListener
- Overrides:
- keyPressed in class Selection
keyReleased
public void keyReleased(KeyEvent ke)
- Specified by:
- keyReleased in interface KeyListener
- Overrides:
- keyReleased in class Selection
keyTyped
public void keyTyped(KeyEvent ke)
- If the user presses delete or backaspace while a handle is
selected, remove that point from the polygon. The 'n' and 'p'
keys select the next and previous points. The 'i' key inserts a
new point.
- Specified by:
- keyTyped in interface KeyListener
- Overrides:
- keyTyped in class Selection