Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pietschy.command.factory
Class DefaultToolbarFactory

    java.lang.Object
      com.pietschy.command.factory.DefaultToolbarFactory

All Implemented Interfaces:
  ButtonFactory, Factory, ToolbarFactory

    public class DefaultToolbarFactory

extends java.lang.Object
implements ToolbarFactory

Default implementation of `ToolbarFactory`. In its default configuration this factory creates toolbars for which `JToolBar.isFloatable()` is `false` and buttons for which `AbstractButton.isRolloverEnabled()` is `true`. Toolbars and buttons created by this factory are not focusble. If you want to have focusable toolbars you will need to configure `FocusTrackingDelegateMediator` appropriately. Please refer to `FocusTrackingDelegateMediator.isEligableForTracking(Component)`.

See Also:
  `setFloatable(boolean)`, `setRolloverEnabled(boolean)`, `setInsets(java.awt.Insets)`

Constructor Summary
`DefaultToolbarFactory()` Creates a new factory that creates non-floatable toolbars and rollover enabled buttons.
`DefaultToolbarFactory(java.awt.Insets insets, boolean floatable, boolean rolloverEnabled)` Creates a new factory.

Method Summary
`javax.swing.JButton` | `createButton()` Creates a new `JButton`.
`javax.swing.JCheckBox` | `createCheckBox()` Creates a new `JCheckBox`.
`javax.swing.JRadioButton` | `createRadioButton()` Creates a new `JRadioButton`.
`javax.swing.AbstractButton` | `createToggleButton()` Creates a new `JToggleButton`.
`javax.swing.JToolBar` | `createToolbar()` Creates a new `JToolBar`.
`java.awt.Insets` | `getInsets()` Gets the `Insets` this factory is applying to the buttons it creates.
`boolean` | `isFloatable()` Checks if this factory is creating floatable toolbars.
`boolean` | `isFocusable()` Checks if this factory is creating focusable toolbars and buttons.
`boolean` | `isRolloverEnabled()` Checks if this factory is creating rollover enabled buttons.
`void` | `setFloatable(boolean floatable)` Configures if this factory is creating floatable toolbars.
`void` | `setFocusable(boolean focusable)` Configures if this factory is creating focusable toolbars and buttons.
`void` | `setInsets(java.awt.Insets insets)` Sets the `Insets` this factory will apply to the buttons it creates.
`void` | `setRolloverEnabled(boolean rolloverEnabled)` Configures if this factory is creating rollover enabled buttons.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultToolbarFactory

    public DefaultToolbarFactory()

  Creates a new factory that creates non-floatable toolbars and rollover enabled buttons.

### DefaultToolbarFactory

    public DefaultToolbarFactory(java.awt.Insets insets,
                                 boolean floatable,
                                 boolean rolloverEnabled)

  Creates a new factory.

  Parameters:
    `insets` - the insets to use for all buttons.
    `floatable` - `true` if the toolbars created are to be floatable, `false` otherwise.
    `rolloverEnabled` - `true` if buttons created are to be rollover enabled, `false` otherwise.

Method Detail

### createButton

    public javax.swing.JButton createButton()

  Creates a new `JButton`.

  Specified by:
    `createButton` in interface `ButtonFactory`
  Returns:
    a new `JButton`.

### createCheckBox

    public javax.swing.JCheckBox createCheckBox()

  Creates a new `JCheckBox`.

  Specified by:
    `createCheckBox` in interface `ButtonFactory`
  Returns:
    a new `JCheckBox`.

### createRadioButton

    public javax.swing.JRadioButton createRadioButton()

  Creates a new `JRadioButton`.

  Specified by:
    `createRadioButton` in interface `ButtonFactory`
  Returns:
    a new `JRadioButton`.

### createToggleButton

    public javax.swing.AbstractButton createToggleButton()

  Creates a new `JToggleButton`.

  Specified by:
    `createToggleButton` in interface `ButtonFactory`
  Returns:
    a new `JToggleButton`.

### createToolbar

    public javax.swing.JToolBar createToolbar()

  Creates a new `JToolBar`.

  Specified by:
    `createToolbar` in interface `ToolbarFactory`
  Returns:
    a new `JToolBar`.

### getInsets

    public java.awt.Insets getInsets()

  Gets the `Insets` this factory is applying to the buttons it creates.

  Returns:
    the `Insets` this factory is applying to the buttons it creates.

### setInsets

    public void setInsets(java.awt.Insets insets)

  Sets the `Insets` this factory will apply to the buttons it creates.

  Parameters:
    `insets` - the `Insets` to use.

### isFloatable

    public boolean isFloatable()

  Checks if this factory is creating floatable toolbars.

  Returns:
    `true` if this factory is setting `floatable` to `true`, `false` otherwise.

### setFloatable

    public void setFloatable(boolean floatable)

  Configures if this factory is creating floatable toolbars.

  Parameters:
    `floatable` - `true` to make this factory set `floateable` to `true`, `false` otherwise.

### isRolloverEnabled

    public boolean isRolloverEnabled()

  Checks if this factory is creating rollover enabled buttons.

  Returns:
    `true` if this factory is setting `rollover enabled` to `true`, `false` otherwise.

### setRolloverEnabled

    public void setRolloverEnabled(boolean rolloverEnabled)

  Configures if this factory is creating rollover enabled buttons.

  Parameters:
    `rolloverEnabled` - `true` to make this factory set `rollover enabled` to `true`, `false` otherwise.

### isFocusable

    public boolean isFocusable()

  Checks if this factory is creating focusable toolbars and buttons. The default is `false`.

  Returns:
    `true` this factory is creating focusable toolbars and buttons.

### setFocusable

    public void setFocusable(boolean focusable)

  Configures if this factory is creating focusable toolbars and buttons. The default is `false`.

  Parameters:
    `focusable` - `true` for this factory to create focusable components, `false` otherwise.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 - 2007 Andrew Pietsch