|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uci.gef.ModeManager
ModeManager keeps track of all the Modes for a given Editor. Events are passed to the Modes for handling. The submodes are prioritized according to their order on a stack, i.e., the last Mode added gets the first chance to handle an Event.
| Field Summary | |
Editor |
_editor
The Editor that owns this ModeManager. |
protected EventListenerList |
_listeners
|
| Constructor Summary | |
ModeManager(Editor ed)
Construct a ModeManager with no modes. |
|
| Method Summary | |
void |
addModeChangeListener(ModeChangeListener listener)
|
void |
checkModeTransitions(InputEvent ie)
Check for events that should cause transitions from one Mode to another or otherwise change the ModeManager. |
protected void |
fireModeChanged()
|
Editor |
getEditor()
Get the parent Editor of this ModeManager |
Vector |
getModes()
Reply the stack of Mode's. |
boolean |
includes(Class modeClass)
|
void |
keyPressed(KeyEvent ke)
Pass events to all modes in order, until one consumes it. |
void |
keyReleased(KeyEvent ke)
Do nothing, this event are not passed to the Modes. |
void |
keyTyped(KeyEvent ke)
Pass events to all modes in order, until one consumes it. |
void |
mouseClicked(MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseDragged(MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseEntered(MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseExited(MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseMoved(MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mousePressed(MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseReleased(MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
paint(Graphics g)
Paint each mode in the stack: bottom to top. |
Mode |
pop()
Remove the topmost Mode iff it can exit. |
void |
popAll()
Remove all Modes that can exit. |
void |
push(Mode newMode)
Add the given Mode to the stack iff another instance of the same class is not already on the stack. |
void |
removeModeChangeListener(ModeChangeListener listener)
|
void |
setEditor(Editor w)
Set the parent Editor of this ModeManager |
void |
setModes(Vector newModes)
Set the entire stack of Mode's. |
Mode |
top()
Reply the top (first) Mode. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public Editor _editor
protected EventListenerList _listeners
| Constructor Detail |
public ModeManager(Editor ed)
| Method Detail |
public void setEditor(Editor w)
public Editor getEditor()
public Vector getModes()
public void setModes(Vector newModes)
public Mode top()
public void push(Mode newMode)
public Mode pop()
public void popAll()
public boolean includes(Class modeClass)
public void keyTyped(KeyEvent ke)
public void keyReleased(KeyEvent ke)
public void keyPressed(KeyEvent ke)
public void mouseMoved(MouseEvent me)
public void mouseDragged(MouseEvent me)
public void mouseClicked(MouseEvent me)
public void mousePressed(MouseEvent me)
public void mouseReleased(MouseEvent me)
public void mouseEntered(MouseEvent me)
public void mouseExited(MouseEvent me)
public void checkModeTransitions(InputEvent ie)
public void addModeChangeListener(ModeChangeListener listener)
public void removeModeChangeListener(ModeChangeListener listener)
protected void fireModeChanged()
public void paint(Graphics g)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||