Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.geotools.resources
Class SwingUtilities  view SwingUtilities download SwingUtilities.java

java.lang.Object
  extended byorg.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:

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:


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.