|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.controls.WaitCursor
public class WaitCursor
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(). To show a wait cursor:
import oracle.ide.Ide; // ... void rebuildTheWorld() { WaitCursor wc = Ide.getWaitCursor(); wc.show(); //... wc.hide(); }
Although this class is not marked final, extension writers should not subclass it..
Constructor Summary | |
---|---|
WaitCursor() Deprecated. since 11.1.1 Use WaitCursor(Component) . |
|
WaitCursor(java.awt.Component component) Attaches WaitCursor to the RootPaneContainer of the specified Component . |
Method Summary | |
---|---|
void |
attach(javax.swing.RootPaneContainer rootPaneContainer) Deprecated. since 11.1.1. Instead of calling this method, clients should construct a new instance of WaitCursor, passing in the root pane container component in the constructor. In particular, clients should never call the attach method on the WaitCursor instance returned by Ide#getWaitCursor() , since doing so will almost certainly leak memory. |
void |
detach(javax.swing.RootPaneContainer rootPaneContainer) Deprecated. since 11.1.1. Instead of attaching and attaching from specific root panes, clients should construct new WaitCursor instances for new root panes using the WaitCursor(Component) API. If you want to force a wait cursor to detach from all of its attached root panes, you should call dispose() . Note that the WaitCursor returned from Ide#getWaitCursor() does not support the dispose() method, and will throw an exception if you attempt to use it. |
void |
dispose() Detaches this WaitCursor from any components it is attached to. |
protected void |
finalize() |
protected javax.swing.RootPaneContainer |
findRootPaneContainer(java.awt.Component component) |
void |
hide() Hides the wait cursor if visible. |
void |
show() Shows the wait cursor after DEFAULT_DELAY number of milliseconds has elapsed. |
void |
show(int delay) Schedules the wait cursor to be shown after the specified number of milliseconds has elapsed. |
void |
show(long delay) Deprecated. since 11.1.1.0.0. Use #show(int). |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WaitCursor()
WaitCursor(Component)
.public WaitCursor(java.awt.Component component)
RootPaneContainer
of the specified Component
.Method Detail |
---|
protected final javax.swing.RootPaneContainer findRootPaneContainer(java.awt.Component component)
protected void finalize()
finalize
in class java.lang.Object
public void attach(javax.swing.RootPaneContainer rootPaneContainer)
Ide#getWaitCursor()
, since doing so will almost certainly leak memory.RootPaneContainer
. This method is used by the IDE. You should only use show() and hide().
Note that, if called on the WaitCursor instance returned by Ide#getWaitCursor()
, this method will dump a diagnostic trace to stderr. You can fix this by using a new WaitCursor instance instead of the one returned by Ide.getWaitCursor().
java.lang.IllegalStateException
- if called after dispose()
.public void detach(javax.swing.RootPaneContainer rootPaneContainer)
WaitCursor
instances for new root panes using the WaitCursor(Component)
API. If you want to force a wait cursor to detach from all of its attached root panes, you should call dispose()
. Note that the WaitCursor returned from Ide#getWaitCursor()
does not support the dispose() method, and will throw an exception if you attempt to use it.RootPaneContainer
. This method is used by the IDE. You should only use show() and hide().java.lang.IllegalStateException
- if called after dispose()
.public void dispose()
Calling this method on the WaitCursor returned from Ide#getWaitCursor()
is not supported, and will throw an UnsupportedOperationException.
Once this WaitCursor instance has been disposed, it can no longer be used. Calling show()
or hide()
on it will result in an IllegalStateException.
java.lang.UnsupportedOperationException
- if you call this method on the WaitCursor instance returned from Ide#getWaitCursor()
.public void show()
DEFAULT_DELAY
number of milliseconds has elapsed.java.lang.IllegalStateException
- if called after dispose()
.public final void show(int delay)
hide()
is called before the delay has elapsed, then the WaitCursor
is not shown.delay
- the number of milliseconds to delay before showing the wait cursor.java.lang.IllegalStateException
- if called after dispose()
.public void show(long delay)
hide()
is called before the delay has elapsed, then the WaitCursor
is not shown.delay
- the number of milliseconds to delay before showing the wait cursor.java.lang.IllegalStateException
- if called after dispose()
.public void hide()
Note that hide() must be called as many times as show() to clear all pending cursor display calls. Calls to hide() will always cancel calls to show() in FIFO order. consider the following scenario:
show(1000) // s1 show(3000) // s2 // wait 500 ms hide()Calling hide() at 500ms will cancel s1 but not s2 thus resulting in the cursor being shown after 2500ms.
java.lang.IllegalStateException
- if called after dispose()
.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |