fr.emn.reactiveinput.system
Class SystemMouseDisabler
java.lang.Object
fr.emn.reactiveinput.system.AWTMouseDisabler
fr.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.
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 |
SystemMouseDisabler
public SystemMouseDisabler()
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