be.ugent.caagt.swirl.actions

Class ButtonFactory


public final class ButtonFactory
extends java.lang.Object

Provides various methods to create buttons from internationalized descriptions.

All class methods given here take a resource bundle bundle and a key string key as arguments. In each case, the corresponding resource string bundle.getString(key) is used as a description string for the button, as defined in Description.

Method Summary

static JButton
createJButton(ResourceBundle bundle, String key)
Create a new JButton with a description taken from the given resource bundle.
static JCheckBox
createJCheckBox(ResourceBundle bundle, String key)
Create a new JCheckBox with a description taken from the given resource bundle.
static JCheckBoxMenuItem
createJCheckBoxMenuItem(ResourceBundle bundle, String key)
Create a new JCheckBoxMenuItem with a description taken from the given resource bundle.
static JMenu
createJMenu(ResourceBundle bundle, String key)
Create a new JMenu with a description taken from the given resource bundle.
static JMenuItem
createJMenuItem(ResourceBundle bundle, String key)
Create a new JMenuItem with a description taken from the given resource bundle.
static JRadioButton
createJRadioButton(ResourceBundle bundle, String key)
Create a new JRadioButton with a description taken from the given resource bundle.
static JRadioButtonMenuItem
createJRadioButtonMenuItem(ResourceBundle bundle, String key)
Create a new JRadioButtonMenuItem with a description taken from the given resource bundle.
static JToggleButton
createJToggleButton(ResourceBundle bundle, String key)
Create a new JToggleButton with a description taken from the given resource bundle.

Method Details

createJButton

public static JButton createJButton(ResourceBundle bundle,
                                    String key)
Create a new JButton with a description taken from the given resource bundle. Users are encouraged to build menu items from actions instead.

createJCheckBox

public static JCheckBox createJCheckBox(ResourceBundle bundle,
                                        String key)
Create a new JCheckBox with a description taken from the given resource bundle. Users are encouraged to build menu items from actions instead.

createJCheckBoxMenuItem

public static JCheckBoxMenuItem createJCheckBoxMenuItem(ResourceBundle bundle,
                                                        String key)
Create a new JCheckBoxMenuItem with a description taken from the given resource bundle. Users are encouraged to build menu items from actions instead.

createJMenu

public static JMenu createJMenu(ResourceBundle bundle,
                                String key)
Create a new JMenu with a description taken from the given resource bundle.

createJMenuItem

public static JMenuItem createJMenuItem(ResourceBundle bundle,
                                        String key)
Create a new JMenuItem with a description taken from the given resource bundle. Users are encouraged to build menu items from actions instead.

createJRadioButton

public static JRadioButton createJRadioButton(ResourceBundle bundle,
                                              String key)
Create a new JRadioButton with a description taken from the given resource bundle. Users are encouraged to build menu items from actions instead.

createJRadioButtonMenuItem

public static JRadioButtonMenuItem createJRadioButtonMenuItem(ResourceBundle bundle,
                                                              String key)
Create a new JRadioButtonMenuItem with a description taken from the given resource bundle. Users are encouraged to build menu items from actions instead.

createJToggleButton

public static JToggleButton createJToggleButton(ResourceBundle bundle,
                                                String key)
Create a new JToggleButton with a description taken from the given resource bundle. Users are encouraged to build menu items from actions instead.