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
createJButton(String name) Creates and returns a new swing button
Parameters: name - the name of the button in the resource bundle throws: MissingResourceException - if key is not the name of a button.
createJCheckBox(String name) Creates and returns a new swing check box
Parameters: name - the name of the button in the resource bundle throws: MissingResourceException - if key is not the name of a button.
createJRadioButton(String name) Creates and returns a new swing radio button
Parameters: name - the name of the button in the resource bundle throws: MissingResourceException - if key is not the name of a button.
createJToolbarButton(String name) Creates and returns a new swing button initialised to be used as a
toolbar button
Parameters: name - the name of the button in the resource bundle throws: MissingResourceException - if key is not the name of a button.
Creates a new button factory
Parameters: rb - the resource bundle that contains the buttons description. Parameters: am - the actions to bind to the button
Creates and returns a new swing button
Parameters: name - the name of the button in the resource bundle throws: MissingResourceException - if key is not the name of a button. It is not thrown if themnemonic and the action keys are missing throws: ResourceFormatException - if the mnemonic is not a single character throws: MissingListenerException - if the button action is not found in the action map
Creates and returns a new swing check box
Parameters: name - the name of the button in the resource bundle throws: MissingResourceException - if key is not the name of a button. It is not thrown if themnemonic and the action keys are missing throws: ResourceFormatException - if the mnemonic is not a single character. throws: MissingListenerException - if the button action is not found in the action map.
Creates and returns a new swing radio button
Parameters: name - the name of the button in the resource bundle throws: MissingResourceException - if key is not the name of a button. It is not thrown if themnemonic and the action keys are missing. throws: ResourceFormatException - if the mnemonic is not a single character. throws: MissingListenerException - if the button action is not found in the action map.
Creates and returns a new swing button initialised to be used as a
toolbar button
Parameters: name - the name of the button in the resource bundle throws: MissingResourceException - if key is not the name of a button. It is not thrown if themnemonic and the action keys are missing throws: ResourceFormatException - if the mnemonic is not a single character throws: MissingListenerException - if the button action is not found in the action map
Initializes a button
Parameters: b - the button to initialize Parameters: name - the button's name throws: ResourceFormatException - if the mnemonic is not a single character. throws: MissingListenerException - if the button action is not found in the action map.
Fields inherited from org.apache.batik.util.gui.resource.ResourceManager