fr.emn.reactiveinput.system
Class SystemMouseDisabler

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

public abstract class SystemMouseDisabler
extends AWTMouseDisabler

Disables the mouse by hiding the system cursor. Use getInstance(). A DirectMouse object can be provided as context in install() method, so that cursor movements do not generate events.


Field Summary
 
Fields inherited from class fr.emn.reactiveinput.system.AWTMouseDisabler
DEFAULT_CURSOR, frame, installed, NO_CURSOR, oldCursor
 
Constructor Summary
SystemMouseDisabler()
           
 
Method Summary
 void doDisable()
          Disables input for a short amount of time.
static SystemMouseDisabler getInstance()
           
 boolean install(javax.swing.JFrame frameContext, java.lang.Object otherContext)
          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
 

Constructor Detail

SystemMouseDisabler

public SystemMouseDisabler()
Method Detail

getInstance

public static SystemMouseDisabler getInstance()
Returns:
an instance of this Disabler object.

install

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

Specified by:
install in interface StdInputDisabler
Overrides:
install in class AWTMouseDisabler
Parameters:
frameContext - Frame object required.
otherContext - A DirectMouse object can be provided so that cursor movements do not generate events.
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
Overrides:
uninstall in class AWTMouseDisabler

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
Overrides:
doDisable in class AWTMouseDisabler