|
|||||||||
| Home >> All >> org >> geotools >> [ resources overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.geotools.resources
Class SwingUtilities

java.lang.Objectorg.geotools.resources.SwingUtilities
- public final class SwingUtilities
- extends java.lang.Object
A collection of utility methods for Swing. All show* methods delegate
their work to the corresponding method in javax.swing.JOptionPane, with two differences:
SwingUtilities's method may be invoked from any thread. If they are invoked from a non-Swing thread, execution will be delegate to the Swing thread and the calling thread will block until completion.- If a parent component is a javax.swing.JDesktopPane, dialogs will be rendered as internal frames instead of frames.
- Version:
- $Id: SwingUtilities.java,v 1.5 2003/02/09 23:38:12 lbruand Exp $
| Field Summary | |
static java.lang.String |
CVSID
|
| Constructor Summary | |
private |
SwingUtilities()
Do not allow any instance of this class to be created. |
| Method Summary | |
static javax.swing.JComponent |
getMultilineLabelFor(javax.swing.JComponent owner,
java.lang.String text)
Retourne une étiquette pour la composante spécifiée. |
static void |
invokeAndWait(java.lang.Runnable runnable)
Causes runnable to have its run method called in the dispatch thread of the event queue. |
static boolean |
showConfirmDialog(java.awt.Component owner,
java.lang.Object message,
java.lang.String title,
int type)
Brings up a confirmation dialog with "Yes/No" buttons. |
static void |
showMessageDialog(java.awt.Component owner,
java.lang.Object message,
java.lang.String title,
int type)
Brings up a message dialog with a "Ok" button. |
static boolean |
showOptionDialog(java.awt.Component owner,
java.lang.Object dialog,
java.lang.String title)
Brings up a "Ok/Cancel" dialog with no icon. |
static boolean |
showOptionDialog(java.awt.Component owner,
java.lang.Object dialog,
java.lang.String title,
java.awt.event.ActionListener reset)
Brings up a "Ok/Cancel/Reset" dialog with no icon. |
static java.awt.Component |
toFrame(java.awt.Component owner,
javax.swing.JComponent panel,
java.lang.String title,
java.awt.event.WindowListener listener)
Insert a Swing component into a frame. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
CVSID
public static final java.lang.String CVSID
- See Also:
- Constant Field Values
| Constructor Detail |
SwingUtilities
private SwingUtilities()
- Do not allow any instance
of this class to be created.
| Method Detail |
toFrame
public static java.awt.Component toFrame(java.awt.Component owner, javax.swing.JComponent panel, java.lang.String title, java.awt.event.WindowListener listener)
- Insert a Swing component into a frame. The kind of frame depends on the owner:
- If
owneror one of its parent is a javax.swing.JDesktopPane, thenpanelis added into a javax.swing.JInternalFrame. - If
owneror one of its parent is a java.awt.Frame or a java.awt.Dialog, thenpanelis added into a javax.swing.JDialog. - Otherwise,
panelis added into a javax.swing.JFrame.
- If
showOptionDialog
public static boolean showOptionDialog(java.awt.Component owner, java.lang.Object dialog, java.lang.String title)
- Brings up a "Ok/Cancel" dialog with no icon. This method can be invoked
from any thread and blocks until the user click on "Ok" or "Cancel".
showOptionDialog
public static boolean showOptionDialog(java.awt.Component owner, java.lang.Object dialog, java.lang.String title, java.awt.event.ActionListener reset)
- Brings up a "Ok/Cancel/Reset" dialog with no icon. This method can be invoked
from any thread and blocks until the user click on "Ok" or "Cancel".
showMessageDialog
public static void showMessageDialog(java.awt.Component owner, java.lang.Object message, java.lang.String title, int type)
- Brings up a message dialog with a "Ok" button. This method can be invoked
from any thread and blocks until the user click on "Ok".
showConfirmDialog
public static boolean showConfirmDialog(java.awt.Component owner, java.lang.Object message, java.lang.String title, int type)
- Brings up a confirmation dialog with "Yes/No" buttons. This method can be
invoked from any thread and blocks until the user click on "Yes" or "No".
getMultilineLabelFor
public static javax.swing.JComponent getMultilineLabelFor(javax.swing.JComponent owner, java.lang.String text)
- Retourne une étiquette pour la composante spécifiée.
Le texte de l'étiquette pourra éventuellement être
distribué sur plusieurs lignes.
invokeAndWait
public static void invokeAndWait(java.lang.Runnable runnable)
- Causes runnable to have its run method called in the dispatch thread of
the event queue. This will happen after all pending events are processed.
The call blocks until this has happened.
|
|||||||||
| Home >> All >> org >> geotools >> [ resources overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.geotools.resources.SwingUtilities