|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.util.resources.ResourceManager
org.apache.batik.util.gui.resource.ButtonFactory
public class ButtonFactory
This class represents a button factory which builds
buttons from the content of a resource bundle.
The resource entries format is (for a button named 'Button'):
Button.text = text Button.icon = icon_name Button.mnemonic = mnemonic Button.action = action_name Button.selected = true | false Button.tooltip = tool tip text where text, icon_name and action_name are strings mnemonic is a character
Field Summary |
---|
Fields inherited from class org.apache.batik.util.resources.ResourceManager |
---|
bundle |
Constructor Summary | |
---|---|
ButtonFactory(ResourceBundle rb,
ActionMap am)
Creates a new button factory |
Method Summary | |
---|---|
JButton |
createJButton(String name)
Creates and returns a new swing button |
JCheckBox |
createJCheckBox(String name)
Creates and returns a new swing check box |
JRadioButton |
createJRadioButton(String name)
Creates and returns a new swing radio button |
JButton |
createJToolbarButton(String name)
Creates and returns a new swing button initialised to be used as a toolbar button |
JToggleButton |
createJToolbarToggleButton(String name)
Creates and returns a new swing button initialised to be used as a toolbar toggle button |
Methods inherited from class org.apache.batik.util.resources.ResourceManager |
---|
getBoolean, getCharacter, getInteger, getString, getStringList, getStringList, getStringList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ButtonFactory(ResourceBundle rb, ActionMap am)
rb
- the resource bundle that contains the buttons
description.am
- the actions to bind to the buttonMethod Detail |
---|
public JButton createJButton(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException
name
- the name of the button in the resource bundle
MissingResourceException
- if key is not the name of a button.
It is not thrown if the mnemonic and the action keys are missing
ResourceFormatException
- if the mnemonic is not a single
character
MissingListenerException
- if the button action is not found in
the action mappublic JButton createJToolbarButton(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException
name
- the name of the button in the resource bundle
MissingResourceException
- if key is not the name of a button.
It is not thrown if the mnemonic and the action keys are missing
ResourceFormatException
- if the mnemonic is not a single
character
MissingListenerException
- if the button action is not found in
the action mappublic JToggleButton createJToolbarToggleButton(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException
name
- the name of the button in the resource bundle
MissingResourceException
- if key is not the name of a button.
It is not thrown if the mnemonic and the action keys are missing
ResourceFormatException
- if the mnemonic is not a single
character
MissingListenerException
- if the button action is not found in
the action mappublic JRadioButton createJRadioButton(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException
name
- the name of the button in the resource bundle
MissingResourceException
- if key is not the name of a button.
It is not thrown if the mnemonic and the action keys are
missing.
ResourceFormatException
- if the mnemonic is not a single
character.
MissingListenerException
- if the button action is not found in
the action map.public JCheckBox createJCheckBox(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException
name
- the name of the button in the resource bundle
MissingResourceException
- if key is not the name of a button.
It is not thrown if the mnemonic and the action keys are missing
ResourceFormatException
- if the mnemonic is not a single
character.
MissingListenerException
- if the button action is not found in
the action map.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |