|
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.javatools.ui.balloon.BalloonManager
public final class BalloonManager
Manages showing and hiding Balloon
s. Balloons are associated with some target component. You can obtain the BalloonManager instance for a given component using the forTarget(JComponent)
method.
Balloon
s are added to the layered pane of the JFrame
or JDialog
containing the target component when you call show(Balloon,int)
. The BalloonManager will track the motion of the target component and ensure that the Balloon continues to point at it.
The BalloonManager will clean up (remove the balloon from the layered pane, and deregister listeners) when the target component is removed from its container or hidden. However, if you are hiding a dialog or frame containing a target component, you should take care to clean up the balloon manager for any visible balloons via hide(Balloon)
.
Thread Safety: This class is not thread safe. It should be used only from the AWT event dispatch thread.
Field Summary | |
---|---|
static int |
TTL_ACTION_FAILURE Recommended time to live for a balloon showing notification of a failed action. |
static int |
TTL_ACTION_SUCCESS Recommended time to live for a balloon showing notification of a successful action. |
static int |
TTL_OPTIONAL_USER_TASK Recommended time to live for a balloon showing notification of an optional user task. |
Method Summary | |
---|---|
Balloon |
balloon() Returns the balloon this manager is tracking. |
static BalloonManager |
forTarget(javax.swing.JComponent target) Gets a BalloonManager for the specified target component. |
void |
hide(Balloon balloon) Hides a balloon and cleans up all references. |
void |
show(Balloon balloon) Shows a Balloon pointing to a specified target component. |
void |
show(Balloon balloon, int timeToLive) Shows a balloon pointing to a specified target component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TTL_ACTION_SUCCESS
public static final int TTL_ACTION_FAILURE
public static final int TTL_OPTIONAL_USER_TASK
Method Detail |
---|
public static BalloonManager forTarget(javax.swing.JComponent target)
target
- a target component.java.lang.NullPointerException
- if target is null.public Balloon balloon()
public void show(Balloon balloon, int timeToLive)
JFrame
or JDialog
in its component hierarchy.
You can specify how long the balloon should remain on screen. After the specified period elapses, the balloon will be closed automatically.
balloon
- the balloon component to show.timeToLive
- time in milliseconds the balloon should remain visible. After this period of time elapses, the balloon will be removed. A number of standard values for this parameter are defined as static constants.java.lang.IllegalArgumentException
- if timeToLive is less than zero.java.lang.NullPointerException
- if balloon is null.java.lang.IllegalStateException
- if the targetComponent is not visible, or the targetComponent is not inside a JDialog or JFrame.public void show(Balloon balloon)
Balloon
pointing to a specified target component. The target component must be visible, and it must have a JFrame
or JDialog
in its component hierarchy.
It is strongly recommended that clients use the show(Balloon,int)
method with one of the TTL_ constants declared on this class. This ensures that Balloon
s are dismissed after a suitable period of time automatically.
balloon
- the balloon component to show.{@link
- NullPointerException} if parameters are null
.{@link
- NullPointerException} if The target
is not a JFrame
or JDialog
, is not visible, or already contains a Balloon.public void hide(Balloon balloon)
balloon
- a balloon to hide.
|
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 |