|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gridsystems.config.tools.swing.SwingTools
public final class SwingTools
Helper methods for Swing UI construction.
Method Summary | |
---|---|
static void |
addField(javax.swing.JPanel panel,
java.lang.String label,
javax.swing.JComponent c,
int row)
Adds a row consisting in a label and a component in a panel. |
static javax.swing.JPanel |
getGroupPanel(java.lang.String caption)
Creates a group panel with the specified caption, and a GridBagLayout. |
static javax.swing.JPanel |
getGroupPanel(java.lang.String caption,
java.awt.LayoutManager layout)
Creates a group panel with the specified caption, and layout. |
static javax.swing.Icon |
loadIcon(java.lang.Class c,
java.lang.String name)
Loads an icon as a class resource. |
static void |
showError(java.lang.String message,
java.lang.Exception e)
Shows a "standard" error dialog box. |
static void |
showInformation(java.lang.String message)
Shows a information message. |
static void |
showWarning(java.lang.String message,
java.lang.Exception e)
Shows a warning message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static javax.swing.JPanel getGroupPanel(java.lang.String caption)
caption
- The panel caption
public static javax.swing.JPanel getGroupPanel(java.lang.String caption, java.awt.LayoutManager layout)
caption
- The panel captionlayout
- The panel layout
public static void addField(javax.swing.JPanel panel, java.lang.String label, javax.swing.JComponent c, int row)
It supposes the panel uses a GridBoxLayout
panel
- Where to put the components rowlabel
- The component labelc
- The componentrow
- The row index in the GridBoxLayoutpublic static javax.swing.Icon loadIcon(java.lang.Class c, java.lang.String name)
c
- The class to use for resource searchname
- The name of the resource containing the icon
public static void showError(java.lang.String message, java.lang.Exception e)
message
- The error message. Should be already internationalizede
- The exception that causes this dialog box to be shownpublic static void showWarning(java.lang.String message, java.lang.Exception e)
message
- The message keye
- The exception causing this message.public static void showInformation(java.lang.String message)
message
- The message key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |