net.sf.swinglib
Class CursorManager

java.lang.Object
  extended by net.sf.swinglib.CursorManager

public class CursorManager
extends Object

This class manages a a stack of cursors for one or more components. It's normally used to manage busy cursors: at the start of an operation you call pushCursor(javax.swing.JComponent, java.awt.Cursor) (or more likely, pushBusyCursor(javax.swing.JComponent), at the end you popCursor(javax.swing.JComponent).

Usage note: if you want to change the cursor on a frame or dialog, use the root pane (frames and dialogs aren't themselves JComponents).


Constructor Summary
CursorManager()
           
 
Method Summary
 void popCursor(JComponent comp)
          Pops the last saved cursor for the specified component, replacing whatever it's currently displaying.
 void pushBusyCursor(JComponent comp)
          Pushes the current cursor for the specified component onto the stack, and sets the standard "busy" cursor.
 void pushCursor(JComponent comp, Cursor newCursor)
          Pushes the current cursor for the specified component onto the stack, and sets the specified cursor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CursorManager

public CursorManager()
Method Detail

pushCursor

public void pushCursor(JComponent comp,
                       Cursor newCursor)
Pushes the current cursor for the specified component onto the stack, and sets the specified cursor.


pushBusyCursor

public void pushBusyCursor(JComponent comp)
Pushes the current cursor for the specified component onto the stack, and sets the standard "busy" cursor.


popCursor

public void popCursor(JComponent comp)
Pops the last saved cursor for the specified component, replacing whatever it's currently displaying. If there aren't any saved cursors, does nothing.