|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.marvin.util.SwingUtil
public class SwingUtil
Swing utility functions.
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev)
|
static javax.swing.JMenu |
createMenu(java.util.ResourceBundle rc,
java.lang.String key)
Utility method to create a menu with a label specified as a resource. |
static javax.swing.JMenu |
createMenu(java.util.ResourceBundle rc,
java.lang.String key,
boolean mnemo)
Creates a menu with a label specified as a resource. |
static javax.swing.JMenuItem |
createMenuItem(java.util.ResourceBundle rc,
java.lang.String key)
Creates a menu with a label specified as a resource. |
static javax.swing.JMenuItem |
createMenuItem(java.util.ResourceBundle rc,
java.lang.String key,
boolean mnemo)
Creates a menu with a label specified as a resource. |
static javax.swing.JMenuItem |
createMenuItem(java.util.ResourceBundle rc,
java.lang.String key,
java.lang.Class what,
boolean mnemo)
Creates a menu item with a label specified as a resource. |
static javax.swing.JPanel |
createSubPanel(java.lang.String title)
Creates a sub-panel with a title. |
static java.awt.GridBagConstraints |
createTopLeftConstraints()
Creates GridBagConstraints for the top left component. |
static void |
decorateSubPanel(javax.swing.JPanel panel,
java.lang.String title)
Creates border and title for a panel. |
static javax.swing.KeyStroke |
getCommandKeyStroke(int key)
Gets the command keystroke preferred on the current platform. |
static void |
initAction(javax.swing.Action action,
java.util.ResourceBundle rc,
java.lang.String key,
javax.swing.KeyStroke accel)
Initializes an action from information in a resource. |
static void |
initButton(javax.swing.AbstractButton b,
java.util.ResourceBundle rc,
java.lang.String key)
Utility method to initialize a button from information in a resource. |
static void |
initButton(javax.swing.AbstractButton b,
java.util.ResourceBundle rc,
java.lang.String key,
boolean mnemo)
Utility method to initialize a button from information in a resource. |
static void |
initCtrlShortcutForMac(javax.swing.JMenuItem mi)
Makes Mac Command shortcuts work with Ctrl too. |
static void |
initInApplet()
This method must be called if the JVM runs in an applet. |
static java.awt.Color |
showColorChooserDialog(java.awt.Component component,
java.lang.String title,
java.awt.Color color,
javax.swing.JColorChooser pane)
Displays a color chooser dialog. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void initInApplet()
public static java.awt.Color showColorChooserDialog(java.awt.Component component,
java.lang.String title,
java.awt.Color color,
javax.swing.JColorChooser pane)
component - the parent component for the dialogtitle - the dialog titlecolor - the initial colorpane - the color chooser panepublic static javax.swing.KeyStroke getCommandKeyStroke(int key)
key - the key
public static javax.swing.JMenuItem createMenuItem(java.util.ResourceBundle rc,
java.lang.String key,
java.lang.Class what,
boolean mnemo)
rc - the resourceskey - name of the label resourcewhat - menu item classmnemo - use mnemonic or not
public static javax.swing.JMenuItem createMenuItem(java.util.ResourceBundle rc,
java.lang.String key,
boolean mnemo)
rc - the resourceskey - name of the label resourcemnemo - set the mnemonic or not
public static javax.swing.JMenuItem createMenuItem(java.util.ResourceBundle rc,
java.lang.String key)
rc - the resourceskey - name of the label resource
public static javax.swing.JMenu createMenu(java.util.ResourceBundle rc,
java.lang.String key)
rc - the resourceskey - name of the label resource
public static javax.swing.JMenu createMenu(java.util.ResourceBundle rc,
java.lang.String key,
boolean mnemo)
rc - the resourceskey - name of the label resourcemnemo - set the mnemonic or not
public static void initButton(javax.swing.AbstractButton b,
java.util.ResourceBundle rc,
java.lang.String key)
b - the buttonrc - the resourceskey - name of the resource
public static void initButton(javax.swing.AbstractButton b,
java.util.ResourceBundle rc,
java.lang.String key,
boolean mnemo)
b - the buttonrc - the resourceskey - name of the resourcemnemo - set the mnemonic or not
public static void initAction(javax.swing.Action action,
java.util.ResourceBundle rc,
java.lang.String key,
javax.swing.KeyStroke accel)
action - the actionrc - the resourceskey - name of the resourceaccel - the accelerator or nullpublic static void initCtrlShortcutForMac(javax.swing.JMenuItem mi)
readObject method of the menu item
class because the secondary keyboard shortcut is not serialized.
mi - menu item to initialize
public static void decorateSubPanel(javax.swing.JPanel panel,
java.lang.String title)
title - the panel titlepublic static javax.swing.JPanel createSubPanel(java.lang.String title)
title - the panel title
decorateSubPanel(JPanel, String)public static java.awt.GridBagConstraints createTopLeftConstraints()
public void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed in interface java.awt.event.ActionListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||