eTextReader
Class CursorHandler

java.lang.Object
  extended by eTextReader.CursorHandler

public class CursorHandler
extends java.lang.Object


Field Summary
private  java.util.Stack<java.awt.Cursor> cursors
          The stack of cursors being maintained
private  java.awt.Component owner
          The component for which the cursor handling is being done
private  java.lang.String ownerName
          A name for the component; set to either the component's name, if set, otherwise to the class of the object
 
Constructor Summary
CursorHandler(java.awt.Component component)
          Constructs a CursorHandler for the specified component
 
Method Summary
private  void changeCursor(java.awt.Cursor cursor)
           
private  void pushCursor(java.awt.Cursor cursor)
           
 void restorePreviousCursor()
          Restores the most recently saved cursor from the top of the stack
 void saveCurrentCursor()
          This method saves the managed component's current cursor, without changing it
 void setCursor(java.awt.Cursor cursor)
          Changes the cursor of the managed component, saving the current cursor on a stack so it can be restored in the future
 void setCursor(int type)
          Changes the cursor of the managed component, saving the current cursor on a stack so it can be restored in the future.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

private java.awt.Component owner
The component for which the cursor handling is being done


ownerName

private java.lang.String ownerName
A name for the component; set to either the component's name, if set, otherwise to the class of the object


cursors

private java.util.Stack<java.awt.Cursor> cursors
The stack of cursors being maintained

Constructor Detail

CursorHandler

public CursorHandler(java.awt.Component component)
Constructs a CursorHandler for the specified component

Parameters:
component -
Method Detail

setCursor

public void setCursor(int type)
Changes the cursor of the managed component, saving the current cursor on a stack so it can be restored in the future. Calling this method is equivalent to:
   setCursor (Cursor.getPredefinedCursor (type));
 

Parameters:
type - one of the defined cursors in the java.awt.Cursor class

setCursor

public void setCursor(java.awt.Cursor cursor)
Changes the cursor of the managed component, saving the current cursor on a stack so it can be restored in the future

Parameters:
cursor -

saveCurrentCursor

public void saveCurrentCursor()
This method saves the managed component's current cursor, without changing it


restorePreviousCursor

public void restorePreviousCursor()
Restores the most recently saved cursor from the top of the stack


pushCursor

private void pushCursor(java.awt.Cursor cursor)

changeCursor

private void changeCursor(java.awt.Cursor cursor)