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.util.Collection 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.util.Collection 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, javax.swing.JMenu menu)
          Create a new toolbar containing buttons and other controls based on the given menu with the given rollover effect.
static javax.swing.JToolBar createToolBar(boolean rollover, javax.swing.JMenu menu, boolean floatable)
          Create a new toolbar containing buttons and other controls based on the given menu with the given rollover effect and float style.
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.util.Collection 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(boolean rollover, java.lang.String name, javax.swing.JMenu menu, boolean floatable)
          Create a named toolbar containing buttons and other controls based on the given menu 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.util.Collection items)
          Create a new toolbar containing buttons and other controls based on the given array.
static javax.swing.JToolBar createToolBar(javax.swing.JMenu menu)
          Create a new toolbar containing buttons and other controls based on the given menu.
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.util.Collection 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.util.Collection 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.String name, javax.swing.JMenu menu)
          Create a new toolbar containing buttons and other controls based on the given menu with the given rollover effect and float style.
static javax.swing.JToolBar createToolBar(java.lang.String name, javax.swing.JMenu menu, boolean floatable)
          Create a named toolbar containing buttons and other controls based on the given menu with the given rollover effect and float style.
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

createToolBar

public static javax.swing.JToolBar createToolBar(java.util.Collection 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 collection of elements representing toolbar items

createToolBar

public static javax.swing.JToolBar createToolBar(boolean rollover,
                                                 java.util.Collection 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 collection of elements representing toolbar items

createToolBar

public static javax.swing.JToolBar createToolBar(boolean rollover,
                                                 java.util.Collection 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 collection 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.util.Collection 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 collection of elements representing toolbar items

createToolBar

public static javax.swing.JToolBar createToolBar(java.lang.String name,
                                                 java.util.Collection 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 collection 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.util.Collection 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 collection of elements representing toolbar items
floatable - true if the toolbar can be dragged into a floating position

createToolBar

public static javax.swing.JToolBar createToolBar(javax.swing.JMenu menu)

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

All JMenuItems contained in the JMenu are examined to see if they have an icon. If they do there actions are added to the toolbar.

Parameters:
menu - the menu of elements representing toolbar items

createToolBar

public static javax.swing.JToolBar createToolBar(boolean rollover,
                                                 javax.swing.JMenu menu)

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

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

createToolBar

public static javax.swing.JToolBar createToolBar(boolean rollover,
                                                 javax.swing.JMenu menu,
                                                 boolean floatable)

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

Parameters:
rollover - true if buttons are to be shown with rollover effect
menu - the menu 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,
                                                 javax.swing.JMenu menu)

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

Parameters:
menu - the menu of elements representing toolbar items

createToolBar

public static javax.swing.JToolBar createToolBar(java.lang.String name,
                                                 javax.swing.JMenu menu,
                                                 boolean floatable)

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

Parameters:
name - the name to place in the titlebar of the toolbar
menu - the menu 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,
                                                 javax.swing.JMenu menu,
                                                 boolean floatable)

Create a named toolbar containing buttons and other controls based on the given menu 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
menu - the menu of elements representing toolbar items
floatable - true if the toolbar can be dragged into a floating position