|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.base.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. The Modes must be of type FigModifyingMode, because Editor can only deal with such Modes.
Field Summary | |
protected javax.swing.event.EventListenerList |
_listeners
|
Editor |
editor
The Editor that owns this ModeManager. |
Constructor Summary | |
ModeManager(Editor ed)
Construct a ModeManager with no modes. |
Method Summary | |
void |
addModeChangeListener(ModeChangeListener listener)
|
void |
checkModeTransitions(java.awt.event.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 |
boolean |
includes(java.lang.Class modeClass)
|
void |
keyPressed(java.awt.event.KeyEvent ke)
Pass events to all modes in order, until one consumes it. |
void |
keyReleased(java.awt.event.KeyEvent ke)
Pass events to all modes in order, until one consumes it. |
void |
keyTyped(java.awt.event.KeyEvent ke)
Pass events to all modes in order, until one consumes it. |
void |
leaveAll()
Finish all modes immediately. |
void |
mouseClicked(java.awt.event.MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseDragged(java.awt.event.MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseEntered(java.awt.event.MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseExited(java.awt.event.MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseMoved(java.awt.event.MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mousePressed(java.awt.event.MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
mouseReleased(java.awt.event.MouseEvent me)
Pass events to all modes in order, until one consumes it. |
void |
paint(java.awt.Graphics g)
Paint each mode in the stack: bottom to top. |
FigModifyingMode |
pop()
Remove the topmost Mode if it can exit. |
void |
popAll()
Remove all Modes that can exit. |
void |
push(FigModifyingMode newMode)
Add the given Mode to the stack if 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 |
FigModifyingMode |
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 javax.swing.event.EventListenerList _listeners
Constructor Detail |
public ModeManager(Editor ed)
Method Detail |
public void setEditor(Editor w)
public Editor getEditor()
public FigModifyingMode top()
public void push(FigModifyingMode newMode)
public FigModifyingMode pop()
public void popAll()
public boolean includes(java.lang.Class modeClass)
public void leaveAll()
public void keyTyped(java.awt.event.KeyEvent ke)
keyTyped
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent ke)
keyReleased
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent ke)
keyPressed
in interface java.awt.event.KeyListener
public void mouseMoved(java.awt.event.MouseEvent me)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent me)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent me)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent me)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent me)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent me)
mouseExited
in interface java.awt.event.MouseListener
public void checkModeTransitions(java.awt.event.InputEvent ie)
public void addModeChangeListener(ModeChangeListener listener)
public void removeModeChangeListener(ModeChangeListener listener)
protected void fireModeChanged()
public void paint(java.awt.Graphics g)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |