Extension SDK 10.1.2

oracle.ide.controls
Class WaitCursor

java.lang.Object
  extended byoracle.ide.controls.WaitCursor

public class WaitCursor
extends java.lang.Object

This class handles the wait cursor over the application. The show/hide methods increment/decrement a counter and the wait cursor is removed only when the counter==0.

All you have to do to show and hide the wait cursor is to call show(), do your long operation then call hide(). This MUST all happen on the event thread. To show a wait cursor:

 import oracle.ide.Ide;

 // ...

 void rebuildTheWorld()
 {
   WaitCursor wc = Ide.getWaitCursor();
   wc.show();

   //...

   wc.hide();
 }
 


Constructor Summary
WaitCursor()
          The WaitCursor is a singleton built by the IDE.
WaitCursor(java.awt.Component component)
          The WaitCursor is a singleton built by the IDE.
 
Method Summary
 void attach(javax.swing.RootPaneContainer rootPaneContainer)
          Installs the manager on the specified RootPaneContainer.
 void detach(javax.swing.RootPaneContainer rootPaneContainer)
          De-installs the manager from the specified RootPaneContainer.
 void hide()
          Hides the wait cursor if the counter reaches 0; does nothing if the wait count is already 0.
 void show()
          Shows the wait cursor after #DEFAULT_DELAY number of milliseconds has elapsed.
 void show(long delay)
          Schedules the wait cursor to be shown after the specified number of milliseconds has elapsed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaitCursor

public WaitCursor()
The WaitCursor is a singleton built by the IDE. You should never construct a WaitCursor yourself.


WaitCursor

public WaitCursor(java.awt.Component component)
The WaitCursor is a singleton built by the IDE. You should never construct a WaitCursor yourself.

Attaches WaitCursor to the RootPaneContainer of the specified Component.

Method Detail

attach

public void attach(javax.swing.RootPaneContainer rootPaneContainer)
Installs the manager on the specified RootPaneContainer. This method is used by the IDE. You should only use show() and hide().


detach

public void detach(javax.swing.RootPaneContainer rootPaneContainer)
De-installs the manager from the specified RootPaneContainer. This method is used by the IDE. You should only use show() and hide().


show

public void show()
Shows the wait cursor after #DEFAULT_DELAY number of milliseconds has elapsed.

This method must be called from the event thread


show

public void show(long delay)
Schedules the wait cursor to be shown after the specified number of milliseconds has elapsed. If hide() is called before the delay has elapsed, then the WaitCursor is not shown.

This method must be called from the event thread

Parameters:
delay - the number of milliseconds to delay before showing the wait cursor.

hide

public void hide()
Hides the wait cursor if the counter reaches 0; does nothing if the wait count is already 0.

This method must be called from the event thread


Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.