org.tigris.gef.base
Class ModePopup

java.lang.Object
  extended by org.tigris.gef.base.ModeImpl
      extended by org.tigris.gef.base.FigModifyingModeImpl
          extended by org.tigris.gef.base.ModePopup
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable, java.util.EventListener, FigModifyingMode, Mode

public class ModePopup
extends FigModifyingModeImpl

A permanent Mode to catch right-mouse-button events and show a popup menu. Needs-more-work: this is not fully implemented yet. It should ask the Fig under the mouse what menu it should offer.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tigris.gef.base.FigModifyingModeImpl
editor
 
Fields inherited from class org.tigris.gef.base.ModeImpl
_args
 
Constructor Summary
ModePopup(Editor par)
           
 
Method Summary
 boolean canExit()
          Always false because I never want to get out of popup mode.
 java.lang.String instructions()
          Reply a string of instructions that should be shown in the statusbar when this mode starts.
 void mouseClicked(java.awt.event.MouseEvent me)
          Determine if a popup menu should be displayed by this mouse key being clicked
 void mousePressed(java.awt.event.MouseEvent me)
          Determine if a popup menu should be displayed by this mouse key being pressed
 void mouseReleased(java.awt.event.MouseEvent me)
          Determine if a popup menu should be displayed by this mouse key being released
 boolean showPopup(java.awt.event.MouseEvent me)
           
 
Methods inherited from class org.tigris.gef.base.FigModifyingModeImpl
done, getEditor, getInitialCursor, isFigEnclosedIn, paint, print, setCursor, setEditor
 
Methods inherited from class org.tigris.gef.base.ModeImpl
getArg, getArgs, init, keyPressed, keyReleased, keyTyped, leave, mouseDragged, 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
 

Constructor Detail

ModePopup

public ModePopup(Editor par)
Method Detail

canExit

public boolean canExit()
Always false because I never want to get out of popup mode.

Specified by:
canExit in interface Mode
Overrides:
canExit in class ModeImpl
See Also:
ModeManager

instructions

public java.lang.String instructions()
Description copied from class: FigModifyingModeImpl
Reply a string of instructions that should be shown in the statusbar when this mode starts.

Specified by:
instructions in interface FigModifyingMode
Overrides:
instructions in class FigModifyingModeImpl

showPopup

public boolean showPopup(java.awt.event.MouseEvent me)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
Determine if a popup menu should be displayed by this mouse key being released

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class ModeImpl

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
Determine if a popup menu should be displayed by this mouse key being pressed

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class ModeImpl

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent me)
Determine if a popup menu should be displayed by this mouse key being clicked

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class ModeImpl