|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tigris.gef.base.ModeImpl
org.tigris.gef.base.FigModifyingModeImpl
org.tigris.gef.base.ModeSelect
This class implements a Mode that interprets 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 should probably implement a "UIDialog" class that would have a state machine that describes the various transitions between UI modes.
ModeCreateEdge,
ModeModify,
Fig,
Editor,
Serialized Form| Field Summary | |
static boolean |
isMacintoshUser
Deprecated. in 0.10.1 this variable is not used. GEF will be coded in a platform independant manner. |
| Fields inherited from class org.tigris.gef.base.FigModifyingModeImpl |
editor |
| Fields inherited from class org.tigris.gef.base.ModeImpl |
_args |
| Constructor Summary | |
ModeSelect()
Construct a new ModeSelect instance. |
|
ModeSelect(Editor parent)
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(java.awt.event.MouseEvent me)
|
protected void |
gotoModifyMode(java.awt.event.MouseEvent me)
Set the Editor's Mode to ModeModify. |
java.lang.String |
instructions()
Reply a string of instructions that should be shown in the statusbar when this mode starts. |
void |
mouseDragged(java.awt.event.MouseEvent me)
On mouse dragging, stretch the selection rectangle. |
void |
mousePressed(java.awt.event.MouseEvent me)
Handle mouse down events by preparing for a drag. |
void |
mouseReleased(java.awt.event.MouseEvent me)
On mouse up, select or toggle the selection of items under the mouse or in the selection rectangle. |
void |
paint(java.awt.Graphics g)
Paint this mode by painting the selection rectangle if appropriate. |
| Methods inherited from class org.tigris.gef.base.FigModifyingModeImpl |
done, getEditor, getInitialCursor, isFigEnclosedIn, print, setCursor, setEditor |
| Methods inherited from class org.tigris.gef.base.ModeImpl |
getArg, getArgs, init, keyPressed, keyReleased, keyTyped, leave, mouseClicked, mouseEntered, mouseExited, mouseMoved, setArg, setArgs, start |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.tigris.gef.base.Mode |
getArg, getArgs, init, setArg, setArgs, start |
| Field Detail |
public static boolean isMacintoshUser
| Constructor Detail |
public ModeSelect(Editor parent)
public ModeSelect()
| Method Detail |
public boolean canExit()
canExit in interface ModecanExit in class ModeImplModeManagerpublic void mousePressed(java.awt.event.MouseEvent me)
mousePressed in interface java.awt.event.MouseListenermousePressed in class ModeImplpublic void mouseDragged(java.awt.event.MouseEvent me)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class ModeImplpublic void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class ModeImplpublic java.lang.String instructions()
instructions in interface FigModifyingModeinstructions in class FigModifyingModeImplpublic void paint(java.awt.Graphics g)
paint in interface FigModifyingModepaint in class FigModifyingModeImplprotected void gotoModifyMode(java.awt.event.MouseEvent me)
protected void gotoBroomMode(java.awt.event.MouseEvent me)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||