DynamicJava Javadoc: Class ToolBarFactory

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## koala.dynamicjava.gui.resource
Class ToolBarFactory

    java.lang.Object
      |
      +--koala.dynamicjava.gui.resource.ResourceManager
            |
            +--koala.dynamicjava.gui.resource.ToolBarFactory

public class ToolBarFactory
extends ResourceManager

This class represents a tool bar factory which builds tool bars from the content of a resource file.
The resource entries format is (for a tool bar named 'ToolBar'):

       ToolBar           = Item1 Item2 - Item3 ...
       See ButtonFactory.java for details about the items
       ...
     '-' represents a separator

All entries are optional.

Fields inherited from class koala.dynamicjava.gui.resource.ResourceManager
`bundle`

Constructor Summary
`ToolBarFactory(java.util.ResourceBundle rb, ActionMap am)` Creates a new tool bar factory

Method Summary
`javax.swing.JButton` | `createJButton(java.lang.String name)` Creates and returns a new swing button
`javax.swing.JToolBar` | `createJToolBar(java.lang.String name)` Creates a tool bar

Methods inherited from class koala.dynamicjava.gui.resource.ResourceManager
`getBoolean, 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

### ToolBarFactory

    public ToolBarFactory(java.util.ResourceBundle rb,
                          ActionMap am)

  Creates a new tool bar factory
  Parameters:
    `rb` - the resource bundle that contains the menu bar description.
    `am` - the actions to add to menu items

Method Detail

### createJToolBar

    public javax.swing.JToolBar createJToolBar(java.lang.String name)
                                        throws java.util.MissingResourceException,
                                               ResourceFormatException,
                                               MissingListenerException

  Creates a tool bar
  Parameters:
    `name` - the name of the menu bar in the resource bundle
  Throws:
    `java.util.MissingResourceException` - if one of the keys that compose the tool bar is missing. It is not thrown if the action key is missing
    `ResourceFormatException` - if a boolean is malformed
    `MissingListenerException` - if an item action is not found in the action map

### createJButton

    public javax.swing.JButton createJButton(java.lang.String name)
                                      throws java.util.MissingResourceException,
                                             ResourceFormatException,
                                             MissingListenerException

  Creates and returns a new swing button
  Parameters:
    `name` - the name of the button in the resource bundle
  Throws:
    `java.util.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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Stephane Hillion. All Rights Reserved.