org.apache.batik.util.gui.resource
public class ButtonFactory extends ResourceManager
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
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 |
Parameters: rb the resource bundle that contains the buttons description. am the actions to bind to the 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 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
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 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.
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 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.
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 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