|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--uci.gef.Mode
|
+--uci.gef.ModeSelect
This class implements a Mode that interperts user input as selecting one or more Figs. Clicking on a Fig will select it. Shift-clicking will toggle whether it is selected. Dragging in open space will draw a selection rectangle. Dragging on a Fig will switch to ModeModify. Dragging from a port will switch to ModeCreateEdge. ModeSelect paints itself by displaying its selection rectangle if any.
Needs-More-Work: this mode has more responsibility than just making selections, it has become the "main mode" of the editor and it has taken resposibility for switching to other modes. I shuold probably implement a "UIDialog" class that would have a state machine that describes the various transitions between UI modes.
Needs-More-Work: There is currently a bug in shift clicking, you cannot unselect an individual item by shift-clicking on it.
ModeCreateEdge,
ModeModify,
Fig,
Editor, Serialized Form| Fields inherited from class uci.gef.Mode |
_args,
_editor |
| Constructor Summary | |
ModeSelect()
Construct a new ModeSelect instance. |
|
ModeSelect(Editor par)
Construct a new ModeSelect with the given parent. |
|
| Method Summary | |
boolean |
canExit()
Always false because I never want to get out of selection mode. |
protected void |
gotoBroomMode(MouseEvent me)
|
protected void |
gotoModifyMode(MouseEvent me)
Set the Editor's Mode to ModeModify. |
String |
instructions()
Reply a string of instructions that should be shown in the statusbar when this mode starts. |
void |
mouseDragged(MouseEvent me)
On mouse dragging, stretch the selection rectangle. |
void |
mousePressed(MouseEvent me)
Handle mouse down events by preparing for a drag. |
void |
mouseReleased(MouseEvent me)
On mouse up, select or toggle the selection of items under the mouse or in the selection rectangle. |
void |
paint(Graphics g)
Paint this mode by painting the selection rectangle if appropriate. |
| Methods inherited from class uci.gef.Mode |
done,
getArg,
getArgs,
getEditor,
getInitialCursor,
keyPressed,
keyReleased,
keyTyped,
mouseClicked,
mouseEntered,
mouseExited,
mouseMoved,
print,
setArg,
setArgs,
setCursor,
setEditor,
start |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public ModeSelect(Editor par)
public ModeSelect()
| Method Detail |
public boolean canExit()
public void mousePressed(MouseEvent me)
public void mouseDragged(MouseEvent me)
public void mouseReleased(MouseEvent me)
public String instructions()
public void paint(Graphics g)
protected void gotoModifyMode(MouseEvent me)
protected void gotoBroomMode(MouseEvent me)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||