fr.emn.reactiveinput.system
Class AWTMouseDisabler
java.lang.Object
fr.emn.reactiveinput.system.AWTMouseDisabler
- All Implemented Interfaces:
- StdInputDisabler
- Direct Known Subclasses:
- SystemMouseDisabler
- public class AWTMouseDisabler
- extends java.lang.Object
- implements StdInputDisabler
This class globally disables mouse event handling and hides system cursor in the given Java Frame.
It uses the AWTEventQueue method.
Methods for keeping the system cursor inside the frame are delegated to SystemMouseDisabler.
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 |
NO_CURSOR
protected static final java.awt.Cursor NO_CURSOR
DEFAULT_CURSOR
protected static final java.awt.Cursor DEFAULT_CURSOR
oldCursor
protected java.awt.Cursor oldCursor
installed
protected boolean installed
frame
protected javax.swing.JFrame frame
AWTMouseDisabler
public AWTMouseDisabler()
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