org.openpermis.editor.policy.gui
Class ToolBarFactory

java.lang.Object
  extended by org.openpermis.editor.policy.gui.AbstractComponentFactory
      extended by org.openpermis.editor.policy.gui.ToolBarFactory

public final class ToolBarFactory
extends AbstractComponentFactory

Factory for tool bars.

The factory creates tool bars from a resource description.

Since:
0.1.0

Nested Class Summary
 class ToolBarFactory.Customizer
          Tool bar customizer passed to the callback.
static interface ToolBarFactory.Resolver
          Resolver for tool bar placeholder keys.
 
Constructor Summary
ToolBarFactory(ActionMap actionMap, org.jdesktop.application.ResourceMap resourceMap)
          Creates a tool bar factory that operates on the specified action and resource map.
 
Method Summary
static JToolBar createToolBar(ActionMap actionMap, org.jdesktop.application.ResourceMap resourceMap, String key)
          Convenience method to create a tool bar.
static JToolBar createToolBar(ActionMap actionMap, org.jdesktop.application.ResourceMap resourceMap, String key, ToolBarFactory.Resolver resolver)
          Convenience method to create a tool bar.
 JToolBar createToolBar(String key)
          Creates a tool bar from the specfied resource key.
 JToolBar createToolBar(String key, ToolBarFactory.Resolver resolver)
          Creates a tool bar from the specfied resource key.
static boolean isToolBarEmpty(JToolBar toolBar)
          Test if the tool bar specified contains at least one button.
 
Methods inherited from class org.openpermis.editor.policy.gui.AbstractComponentFactory
getAction, getAction, getActionMap, getEntries, getResourceMap, isComposite, isGlue, isPlaceholder, isSeparator, unmaskComposite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolBarFactory

public ToolBarFactory(ActionMap actionMap,
                      org.jdesktop.application.ResourceMap resourceMap)
Creates a tool bar factory that operates on the specified action and resource map.

Parameters:
actionMap - the action map this factory operates on.
resourceMap - the resource map this factory operates on.
Since:
0.1.0
Method Detail

createToolBar

public static JToolBar createToolBar(ActionMap actionMap,
                                     org.jdesktop.application.ResourceMap resourceMap,
                                     String key)
Convenience method to create a tool bar.

Except for performance this convenience method is equivalent to creating a tool bar factory for the specfied action and resource map and then creating the tool bar using the newly created factory.

Parameters:
actionMap - the action map this factory operates on.
resourceMap - the resource map this factory operates on.
key - the resource key for the tool bar.
Returns:
the tool bar requested.
Since:
0.1.0

createToolBar

public static JToolBar createToolBar(ActionMap actionMap,
                                     org.jdesktop.application.ResourceMap resourceMap,
                                     String key,
                                     ToolBarFactory.Resolver resolver)
Convenience method to create a tool bar.

Except for performance this convenience method is equivalent to creating a tool bar factory for the specfied action and resource map and then creating the tool bar using the newly created factory.

Parameters:
actionMap - the action map this factory operates on.
resourceMap - the resource map this factory operates on.
key - the resource key for the tool bar.
resolver - the resolver for placeholder entries.
Returns:
the tool bar requested.
Since:
0.9.0

isToolBarEmpty

public static boolean isToolBarEmpty(JToolBar toolBar)
Test if the tool bar specified contains at least one button.

Parameters:
toolBar - the tool bar to test, may be null.
Returns:
true if there is at least one button on the tool bar, false otherwise.
Since:
0.9.0

createToolBar

public JToolBar createToolBar(String key)
Creates a tool bar from the specfied resource key.

Parameters:
key - the resource key from which to create tool bar.
Returns:
the tool bar created.
Since:
0.1.0

createToolBar

public JToolBar createToolBar(String key,
                              ToolBarFactory.Resolver resolver)
Creates a tool bar from the specfied resource key.

Parameters:
key - the resource key from which to create tool bar.
resolver - the resolver for placeholder entries.
Returns:
the tool bar created.
Since:
0.9.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG