|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.softsmithy.lib.swing.action.XActions
public class XActions
A utility class for XActions.
Note: The API may change in a future version!
XAction
Method Summary | |
---|---|
static void |
configureButton(AbstractButton button,
XAction action,
ButtonGroup group,
IconType iconType,
boolean showText,
boolean coolStyle)
Configures a button from a XAction. |
static void |
configureButton(AbstractButton button,
XAction action,
IconType iconType,
boolean showText,
boolean coolStyle)
Configures a button from a XAction. |
static void |
configureButton(AbstractButton button,
XAction action,
ItemListener listener,
IconType iconType,
boolean showText,
boolean coolStyle)
Configures a button from a XAction. |
static void |
configureXAction(XAction action,
String name,
ResourceBundle rb)
Configures an XAction from a ResourceBundle. |
static JButton |
createButton(XAction action,
IconType iconType,
boolean showText,
boolean coolStyle)
Creates a configured button. |
static JCheckBox |
createCheckBox(XAction action,
ItemListener listener,
IconType iconType,
boolean showText)
Creates a configured check box. |
static JCheckBoxMenuItem |
createCheckBoxMenuItem(XAction action,
ItemListener listener,
IconType iconType,
boolean showText)
Creates a configured check button menu item. |
static JMenu |
createEditMenu(Locale locale)
Creates an edit menu with a localized text. |
static JMenu |
createFileMenu(Locale locale)
Creates a file menu with a localized text. |
static JMenu |
createHelpMenu(Locale locale)
Creates a help menu with a localized text. |
static JMenuItem |
createMenuItem(XAction action,
IconType iconType,
boolean showText)
Creates a configured menu item. |
static JRadioButton |
createRadioButton(XAction action,
ButtonGroup group,
IconType iconType,
boolean showText)
Creates a configured radio button. |
static JRadioButtonMenuItem |
createRadioButtonMenuItem(XAction action,
ButtonGroup group,
IconType iconType,
boolean showText)
Creates a configured radio button menu item. |
static JToggleButton |
createToggleButton(XAction action,
ButtonGroup group,
IconType iconType,
boolean showText,
boolean coolStyle)
Creates a configured toggle button. |
static JToggleButton |
createToggleButton(XAction action,
ItemListener listener,
IconType iconType,
boolean showText,
boolean coolStyle)
Creates a configured toggle button. |
static XAction |
createXAction(String name,
Object target,
ResourceBundle rb)
Creates a new XAction from a ResourceBundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static XAction createXAction(String name, Object target, ResourceBundle rb) throws NoSuchMethodException
name
- the method name (must take an ActionEvent
obect as its single parameter) that gets
called when an ActionEvent occurstarget
- the object with the specified methodrb
- a ResourceBundle (doesn't have to specify all XAction properties)
NoSuchMethodException
- if no such method foundpublic static void configureXAction(XAction action, String name, ResourceBundle rb)
Key | Value |
---|---|
<name>.name | The name to be displayed |
<name>.shortDescription | Tool Tip |
<name>.acceleratorKey | Shortcut |
<name>.mnemonicKey | Mnemonic |
<name>.largeDisabledIcon | File Name |
<name>.largeDisabledSelectedIcon | File Name |
<name>.largeIcon | File Name |
<name>.largePressedIcon | File Name |
<name>.largeRolloverIcon | File Name |
<name>.largeRolloverSelectedIcon | File Name |
<name>.largeSelectedIcon | File Name |
<name>.smallDisabledIcon | File Name |
<name>.smallDisabledSelectedIcon | File Name |
<name>.smallIcon | File Name |
<name>.smallPressedIcon | File Name |
<name>.smallRolloverIcon | File Name |
<name>.smallRolloverSelectedIcon | File Name |
<name>.smallSelectedIcon | File Name |
action
- the XAction to configurename
- the base name of the keysrb
- a ResourceBundle (doesn't have to specify all XAction properties)public static JButton createButton(XAction action, IconType iconType, boolean showText, boolean coolStyle)
action
- the XAction with the configuration dataiconType
- the icon typeshowText
- if the label text should be showncoolStyle
- specifies if the cool style should be applied
public static JToggleButton createToggleButton(XAction action, ItemListener listener, IconType iconType, boolean showText, boolean coolStyle)
action
- the XAction with the configuration datalistener
- a listener, which listens to the item stateiconType
- the icon typeshowText
- if the label text should be showncoolStyle
- specifies if the cool style should be applied
public static JToggleButton createToggleButton(XAction action, ButtonGroup group, IconType iconType, boolean showText, boolean coolStyle)
action
- the XAction with the configuration datagroup
- a ButtonGroup to which this button will be addediconType
- the icon typeshowText
- if the label text should be showncoolStyle
- specifies if the cool style should be applied
public static JRadioButton createRadioButton(XAction action, ButtonGroup group, IconType iconType, boolean showText)
action
- the XAction with the configuration datagroup
- a ButtonGroup to which this button will be addediconType
- the icon typeshowText
- if the label text should be shown
public static JCheckBox createCheckBox(XAction action, ItemListener listener, IconType iconType, boolean showText)
action
- the XAction with the configuration datalistener
- a listener, which listens to the item stateiconType
- the icon typeshowText
- if the label text should be shown
public static JMenuItem createMenuItem(XAction action, IconType iconType, boolean showText)
action
- the XAction with the configuration dataiconType
- the icon typeshowText
- if the label text should be shown
public static JRadioButtonMenuItem createRadioButtonMenuItem(XAction action, ButtonGroup group, IconType iconType, boolean showText)
action
- the XAction with the configuration datagroup
- a ButtonGroup to which this button will be addediconType
- the icon typeshowText
- if the label text should be shown
public static JCheckBoxMenuItem createCheckBoxMenuItem(XAction action, ItemListener listener, IconType iconType, boolean showText)
action
- the XAction with the configuration datalistener
- a listener, which listens to the item stateiconType
- the icon typeshowText
- if the label text should be shown
public static void configureButton(AbstractButton button, XAction action, ItemListener listener, IconType iconType, boolean showText, boolean coolStyle)
button
- the button to configureaction
- the XAction with the configuration datalistener
- a listener, which listens to the item stateiconType
- the icon typeshowText
- if the label text should be showncoolStyle
- specifies if the cool style should be appliedpublic static void configureButton(AbstractButton button, XAction action, ButtonGroup group, IconType iconType, boolean showText, boolean coolStyle)
button
- the button to configureaction
- the XAction with the configuration datagroup
- a ButtonGroup to which this button will be addediconType
- the icon typeshowText
- if the label text should be showncoolStyle
- specifies if the cool style should be appliedpublic static void configureButton(AbstractButton button, XAction action, IconType iconType, boolean showText, boolean coolStyle)
button
- the button to configureaction
- the XAction with the configuration dataiconType
- the icon typeshowText
- if the label text should be showncoolStyle
- specifies if the cool style should be appliedpublic static JMenu createFileMenu(Locale locale)
locale
- the locale
public static JMenu createEditMenu(Locale locale)
locale
- the locale
public static JMenu createHelpMenu(Locale locale)
locale
- the locale
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |