org.tigris.toolbar
Class ToolBarFactory

java.lang.Object
  |
  +--org.tigris.toolbar.ToolBarFactory

public class ToolBarFactory
extends java.lang.Object

A factory class for creating new instances of toolbars

Author:
Bob Tarling

Method Summary
static javax.swing.JToolBar createToolBar(boolean rollover, java.lang.Object[] items)
          Create a new toolbar containing buttons and other controls based on the given array with the given rollover effect.
static javax.swing.JToolBar createToolBar(boolean rollover, java.lang.Object[] items, boolean floatable)
          Create a new toolbar containing buttons and other controls based on the given array with the given rollover effect and float style.
static javax.swing.JToolBar createToolBar(boolean rollover, java.lang.String name, java.lang.Object[] items, boolean floatable)
          Create a named toolbar containing buttons and other controls based on the given array with the given rollover effect and float style.
static javax.swing.JToolBar createToolBar(java.lang.Object[] items)
          Create a new toolbar containing buttons and other controls based on the given array.
static javax.swing.JToolBar createToolBar(java.lang.String name, java.lang.Object[] items)
          Create a new toolbar containing buttons and other controls based on the given array with the given rollover effect and float style.
static javax.swing.JToolBar createToolBar(java.lang.String name, java.lang.Object[] items, boolean floatable)
          Create a named toolbar containing buttons and other controls based on the given array with the given rollover effect and float style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createToolBar

public static javax.swing.JToolBar createToolBar(java.lang.Object[] items)

Create a new toolbar containing buttons and other controls based on the given array.

The array elements can be on of the following types.

null Results in a toolbar seperator being created
Action Results in a button being created which is listening to the changes on the action and will perform the action when pressed
Component Will place the component on the toolbar

Parameters:
items - the array of elements representing toolbar items

createToolBar

public static javax.swing.JToolBar createToolBar(boolean rollover,
                                                 java.lang.Object[] items)

Create a new toolbar containing buttons and other controls based on the given array with the given rollover effect.

Parameters:
rollover - true if buttons are to be shown with rollover effect
items - the array of elements representing toolbar items

createToolBar

public static javax.swing.JToolBar createToolBar(boolean rollover,
                                                 java.lang.Object[] items,
                                                 boolean floatable)

Create a new toolbar containing buttons and other controls based on the given array with the given rollover effect and float style.

Parameters:
rollover - true if buttons are to be shown with rollover effect
items - the array of elements representing toolbar items
floatable - true if the toolbar can be dragged into a floating position

createToolBar

public static javax.swing.JToolBar createToolBar(java.lang.String name,
                                                 java.lang.Object[] items)

Create a new toolbar containing buttons and other controls based on the given array with the given rollover effect and float style.

Parameters:
items - the array of elements representing toolbar items

createToolBar

public static javax.swing.JToolBar createToolBar(java.lang.String name,
                                                 java.lang.Object[] items,
                                                 boolean floatable)

Create a named toolbar containing buttons and other controls based on the given array with the given rollover effect and float style.

Parameters:
name - the name to place in the titlebar of the toolbar
items - the array of elements representing toolbar items
floatable - true if the toolbar can be dragged into a floating position

createToolBar

public static javax.swing.JToolBar createToolBar(boolean rollover,
                                                 java.lang.String name,
                                                 java.lang.Object[] items,
                                                 boolean floatable)

Create a named toolbar containing buttons and other controls based on the given array with the given rollover effect and float style.

Parameters:
rollover - true if buttons are to be shown with rollover effect
name - the name to place in the titlebar of the toolbar
items - the array of elements representing toolbar items
floatable - true if the toolbar can be dragged into a floating position