|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jorion.balboa.common.GuiUtils
public final class GuiUtils
Set of static utility function to create the GUI.
| Nested Class Summary | |
|---|---|
static class |
GuiUtils.StatusBar
Component to create a status bar. |
| Field Summary | |
|---|---|
static java.awt.Font |
FNT_BOLD
Default bold font. |
static java.awt.Font |
FNT_PLAIN
Default plain font. |
static java.lang.String |
SUFFIX_ACTION
Suffix applied to the key used in resource file lookups for an action. |
static java.lang.String |
SUFFIX_IMAGE
Suffix applied to the key used in resource file lookups for an image. |
static java.lang.String |
SUFFIX_LABEL
Suffix applied to the key used in resource file lookups for a label. |
static java.lang.String |
SUFFIX_TIP
Suffix applied to the key used in resource file lookups for tooltip text. |
| Method Summary | |
|---|---|
static javax.swing.JButton |
createButton(java.lang.String text,
java.util.ResourceBundle rb)
Create a JButton. |
static javax.swing.JButton |
createButton(java.lang.String text,
java.util.ResourceBundle rb,
java.awt.Font font)
Create a JButton. |
static javax.swing.JCheckBox |
createCheckBox(java.lang.String text,
java.util.ResourceBundle rb,
java.awt.Font font)
Create a JCheckbox. |
static java.awt.datatransfer.ClipboardOwner |
createDefaultClipboardOwner()
|
static javax.swing.JLabel |
createLabel(java.lang.String text)
Create a JLabel. |
static javax.swing.JLabel |
createLabel(java.lang.String text,
java.util.ResourceBundle rb)
Create a JLabel. |
static javax.swing.JLabel |
createLabel(java.lang.String text,
java.util.ResourceBundle rb,
java.awt.Font font)
Create a JLabel. |
static javax.swing.JMenuBar |
createMenuBar(java.util.ResourceBundle rb,
java.util.Map<java.lang.String,javax.swing.Action> commands,
java.lang.String menuKey)
Create a JMenu Bar. |
static GuiUtils.StatusBar |
createStatusbar()
Create a status bar. |
static javax.swing.JToolBar |
createToolbar(java.util.ResourceBundle rb,
java.util.Map<java.lang.String,javax.swing.Action> commands,
java.lang.String toolbarKey)
Create a JToolBar. |
static java.net.URL |
getResource(java.util.ResourceBundle rb,
java.lang.String key)
|
static java.lang.String |
getResourceString(java.util.ResourceBundle rb,
java.lang.String key)
Retrieve the string corresponding to the given key in the given resource bundle. |
static java.awt.GridBagConstraints |
makeConstraints(int gridx,
int gridy,
int gridwidth,
int fill)
Helper function to build the GridBagConstraints. |
static void |
setLocation(java.awt.Window window)
Center the given window on the screen. |
static boolean |
setLookAndFeel(java.awt.Component c,
java.lang.String classname)
Update the given component's look and feel. |
static java.lang.String[] |
tokenize(java.lang.String input)
Take the given string and chop it up into a series of strings on whitespace boundaries. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SUFFIX_IMAGE
public static final java.lang.String SUFFIX_LABEL
public static final java.lang.String SUFFIX_ACTION
public static final java.lang.String SUFFIX_TIP
public static final java.awt.Font FNT_PLAIN
public static final java.awt.Font FNT_BOLD
| Method Detail |
|---|
public static java.lang.String[] tokenize(java.lang.String input)
input - The given string.
public static java.lang.String getResourceString(java.util.ResourceBundle rb,
java.lang.String key)
rb - The resource bundle.key - The resource key.
public static java.net.URL getResource(java.util.ResourceBundle rb,
java.lang.String key)
rb - The resource bundle.key - The resource key.
public static void setLocation(java.awt.Window window)
window - The window.
public static boolean setLookAndFeel(java.awt.Component c,
java.lang.String classname)
classname is empty.
c - The component to update.classname - The classname of the Look & Feel.
public static java.awt.GridBagConstraints makeConstraints(int gridx,
int gridy,
int gridwidth,
int fill)
gridx - The x-coordinate in the grid.gridy - The y-coordinate in the grid.gridwidth - Specifies the number of cells in a row for the component's display area.fill - This field is used when the component's display area is larger than the component's requested size.
public static java.awt.datatransfer.ClipboardOwner createDefaultClipboardOwner()
public static javax.swing.JMenuBar createMenuBar(java.util.ResourceBundle rb,
java.util.Map<java.lang.String,javax.swing.Action> commands,
java.lang.String menuKey)
rb - The resource bundle.commands - A map of commands.menuKey - The menu key.
public static javax.swing.JToolBar createToolbar(java.util.ResourceBundle rb,
java.util.Map<java.lang.String,javax.swing.Action> commands,
java.lang.String toolbarKey)
rb - The resource bundle.commands - A map of commands.toolbarKey - The toolbar key.
public static javax.swing.JLabel createLabel(java.lang.String text)
text - The text or the key in the ResourceBundle.
public static javax.swing.JLabel createLabel(java.lang.String text,
java.util.ResourceBundle rb)
text - The text or the key in the ResourceBundle.rb - The ResourceBundle or null if not used.
public static javax.swing.JLabel createLabel(java.lang.String text,
java.util.ResourceBundle rb,
java.awt.Font font)
text - The text or the key in the ResourceBundle.rb - The ResourceBundle or null if not used.font - The font or null if the default font must be used.
public static javax.swing.JCheckBox createCheckBox(java.lang.String text,
java.util.ResourceBundle rb,
java.awt.Font font)
text - The text or the key in the ResourceBundle.rb - The ResourceBundle or null if not used.font - The font or null if the default font must be used.
public static javax.swing.JButton createButton(java.lang.String text,
java.util.ResourceBundle rb)
text - The text or the key in the ResourceBundle.rb - The ResourceBundle or null if not used.
public static javax.swing.JButton createButton(java.lang.String text,
java.util.ResourceBundle rb,
java.awt.Font font)
text - The text or the key in the ResourceBundle.rb - The ResourceBundle or null if not used.font - The font or null if the default font must be used.
public static GuiUtils.StatusBar createStatusbar()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||