org.pbjar.jxlayer.plaf.misc
Class HideCursorUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by org.jdesktop.jxlayer.plaf.LayerUI<V>
          extended by org.jdesktop.jxlayer.plaf.AbstractLayerUI<V>
              extended by org.pbjar.jxlayer.plaf.misc.GeneralLayerUI<JComponent,HideCursorUI.HideCursorState>
                  extended by org.pbjar.jxlayer.plaf.misc.HideCursorUI
All Implemented Interfaces:
Serializable

public final class HideCursorUI
extends GeneralLayerUI<JComponent,HideCursorUI.HideCursorState>

A LayerUI that hides the cursor. After a MouseEvent or MouseMoveEvent the cursor will reappear for some specified time.

Author:
Piet Blok
See Also:
Serialized Form

Nested Class Summary
protected static class HideCursorUI.HideCursorState
          Holds state information.
 
Constructor Summary
HideCursorUI()
          Equivalent to HideCursorUI(0).
HideCursorUI(int timeout)
          Create a HideCursorUI with a specified timeout.
 
Method Summary
protected  void cleanupStateObject(HideCursorUI.HideCursorState stateObject)
          Cleanup the state object.
protected  HideCursorUI.HideCursorState createStateObject(org.jdesktop.jxlayer.JXLayer<? extends JComponent> layer)
          Create a StateObject specific for this LayerUI and the JXLayer argument.
 List<Action> getActions(org.jdesktop.jxlayer.JXLayer<? extends JComponent> layer)
          Get Actions that: Set the cursor timeout value.
protected  void processMouseEvent(MouseEvent e, org.jdesktop.jxlayer.JXLayer<? extends JComponent> layer)
           
protected  void processMouseMotionEvent(MouseEvent e, org.jdesktop.jxlayer.JXLayer<? extends JComponent> l)
           
 
Methods inherited from class org.pbjar.jxlayer.plaf.misc.GeneralLayerUI
getActions, getName, getStateObject, installUI, processMouseWheelEvent, uninstallUI
 
Methods inherited from class org.jdesktop.jxlayer.plaf.AbstractLayerUI
configureGraphics, eventDispatched, getClip, getComposite, getLayerEventMask, getRenderingHints, getTransform, handlePropertyChangeEvent, isDirty, paint, paintLayer, processFocusEvent, processKeyEvent, setDirty
 
Methods inherited from class org.jdesktop.jxlayer.plaf.LayerUI
addPropertyChangeListener, addPropertyChangeListener, contains, firePropertyChange, getPreferredScrollableViewportSize, getPropertyChangeListeners, getPropertyChangeListeners, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, removePropertyChangeListener, removePropertyChangeListener, updateUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HideCursorUI

public HideCursorUI()
Equivalent to HideCursorUI(0).

See Also:
HideCursorUI(int)

HideCursorUI

public HideCursorUI(int timeout)
Create a HideCursorUI with a specified timeout. If timeout is 0, the cursor will not be hidden.

Parameters:
timeout - the timeout
Method Detail

getActions

public List<Action> getActions(org.jdesktop.jxlayer.JXLayer<? extends JComponent> layer)
Get Actions that:
  1. Set the cursor timeout value.

Overrides:
getActions in class GeneralLayerUI<JComponent,HideCursorUI.HideCursorState>
Parameters:
layer - the JXLayer
Returns:
a list of applicable actions

cleanupStateObject

protected void cleanupStateObject(HideCursorUI.HideCursorState stateObject)
Description copied from class: GeneralLayerUI
Cleanup the state object. The default implementation does nothing.

Overrides:
cleanupStateObject in class GeneralLayerUI<JComponent,HideCursorUI.HideCursorState>
Parameters:
stateObject - a state object

createStateObject

protected HideCursorUI.HideCursorState createStateObject(org.jdesktop.jxlayer.JXLayer<? extends JComponent> layer)
Description copied from class: GeneralLayerUI
Create a StateObject specific for this LayerUI and the JXLayer argument. The default implementation returns null.

Overrides:
createStateObject in class GeneralLayerUI<JComponent,HideCursorUI.HideCursorState>
Parameters:
layer - the JXLayer
Returns:
a StateObject or null, if no state is maintained.

processMouseEvent

protected void processMouseEvent(MouseEvent e,
                                 org.jdesktop.jxlayer.JXLayer<? extends JComponent> layer)
Overrides:
processMouseEvent in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>

processMouseMotionEvent

protected void processMouseMotionEvent(MouseEvent e,
                                       org.jdesktop.jxlayer.JXLayer<? extends JComponent> l)
Overrides:
processMouseMotionEvent in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>