fr.emn.reactiveinput.system
Class AWTGlassMouseDisabler

java.lang.Object
  extended byfr.emn.reactiveinput.system.AWTGlassMouseDisabler
All Implemented Interfaces:
StdInputDisabler

public class AWTGlassMouseDisabler
extends java.lang.Object
implements StdInputDisabler

This class disables standard mouse event handling and hides system cursor in the given Java Frame. It uses an old "GlassPane method", which is not used any more.


Field Summary
protected static java.awt.Cursor DEFAULT_CURSOR
           
protected  javax.swing.JFrame frame
           
protected  fr.emn.reactiveinput.system.JGlassPane glass
           
protected  boolean installed
           
protected static java.awt.Cursor NO_CURSOR
           
protected  java.awt.Cursor oldCursor
           
 
Constructor Summary
AWTGlassMouseDisabler()
           
 
Method Summary
 void doDisable()
          Disables input for a short amount of time.
 boolean install(javax.swing.JFrame frame, java.lang.Object context)
          Deactivates standard input handling and/or feedback on the given frame.
 boolean uninstall()
          Reactivates standard input handling in the context specified in install().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CURSOR

protected static final java.awt.Cursor NO_CURSOR

DEFAULT_CURSOR

protected static final java.awt.Cursor DEFAULT_CURSOR

glass

protected final fr.emn.reactiveinput.system.JGlassPane glass

oldCursor

protected java.awt.Cursor oldCursor

installed

protected boolean installed

frame

protected javax.swing.JFrame frame
Constructor Detail

AWTGlassMouseDisabler

public AWTGlassMouseDisabler()
Method Detail

install

public boolean install(javax.swing.JFrame frame,
                       java.lang.Object context)
Description copied from interface: StdInputDisabler
Deactivates standard input handling and/or feedback on the given frame.

Specified by:
install in interface StdInputDisabler
Parameters:
frame - must be non-null.
context - not used here.
Returns:
false if frame is null.

uninstall

public boolean uninstall()
Description copied from interface: StdInputDisabler
Reactivates standard input handling in the context specified in install().

Specified by:
uninstall in interface StdInputDisabler
Returns:
false if there is nothing to uninstall.

doDisable

public void doDisable()
Description copied from interface: StdInputDisabler
Disables input for a short amount of time. Some classes require continuously calling this method between install() and uninstall().

Specified by:
doDisable in interface StdInputDisabler