de.randgestalten.toolbar
Class AbstractCustomizedToolbarBuilder<V extends AbstractCustomizedToolbarBuilder>

java.lang.Object
  extended by de.randgestalten.toolbar.AbstractToolbarBuilder<V,T>
      extended by de.randgestalten.toolbar.AbstractSegmentedToolbarBuilder<V,com.bric.swing.toolbar.CustomizedToolbar>
          extended by de.randgestalten.toolbar.AbstractCustomizedToolbarBuilder<V>
All Implemented Interfaces:
SwingConstants
Direct Known Subclasses:
CustomizableToolbarBuilder

public abstract class AbstractCustomizedToolbarBuilder<V extends AbstractCustomizedToolbarBuilder>
extends AbstractSegmentedToolbarBuilder<V,com.bric.swing.toolbar.CustomizedToolbar>

Use this builder top create customized toolbars.

Author:
Thasso Griebel (thasso.griebel@gmail.com)

Nested Class Summary
 
Nested classes/interfaces inherited from class de.randgestalten.toolbar.AbstractToolbarBuilder
AbstractToolbarBuilder.ComponentFactory, AbstractToolbarBuilder.DefaultComponentFactory
 
Field Summary
 
Fields inherited from class de.randgestalten.toolbar.AbstractToolbarBuilder
builder, componentFactory, componentProperties, focusPainting, orientation, parent, toolbar, uiclass
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
  AbstractCustomizedToolbarBuilder(String toolbarName)
          Create a new CustomizedToolbarBuilder with a given name.
protected AbstractCustomizedToolbarBuilder(V parent, JComponent container)
           
 
Method Summary
 V addFlexibleGap()
          Add a flexible gap
 V addGap()
          Add a gap
protected  void addImpl(JComponent component)
          Internal method that adds component to the toolbar container
 V addSeperator()
          Adds a default separator to the toolbar
 V addSeperator(Dimension dimension)
          The size is ignored in this implementation and a default seperator is added.
 com.bric.swing.toolbar.CustomizedToolbar getToolbar()
           
 V hide()
          Hide the last component added to the toolabr.
 
Methods inherited from class de.randgestalten.toolbar.AbstractSegmentedToolbarBuilder
applyPosition, initBuilder, withSegmentation
 
Methods inherited from class de.randgestalten.toolbar.AbstractToolbarBuilder
add, add, add, add, add, close, createGroup, createGroup, createGroupContainer, createGroupContainer, getBuilder, installUI, prepareComponent, withComponentFactory, withFocusPainting, withProperty, withUI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCustomizedToolbarBuilder

public AbstractCustomizedToolbarBuilder(String toolbarName)
Create a new CustomizedToolbarBuilder with a given name. The name is used as the storage key.

Parameters:
toolbarName - the toolbars name used to store the layout

AbstractCustomizedToolbarBuilder

protected AbstractCustomizedToolbarBuilder(V parent,
                                           JComponent container)
Method Detail

addSeperator

public V addSeperator()
Description copied from class: AbstractToolbarBuilder
Adds a default separator to the toolbar

Overrides:
addSeperator in class AbstractToolbarBuilder<V extends AbstractCustomizedToolbarBuilder,com.bric.swing.toolbar.CustomizedToolbar>
Returns:
builder the builder

addSeperator

public V addSeperator(Dimension dimension)
The size is ignored in this implementation and a default seperator is added.

Overrides:
addSeperator in class AbstractToolbarBuilder<V extends AbstractCustomizedToolbarBuilder,com.bric.swing.toolbar.CustomizedToolbar>
Parameters:
dimension - the prefered size of the toolbar
Returns:
builder the builder

addGap

public V addGap()
Add a gap

Returns:
builder the builder

addFlexibleGap

public V addFlexibleGap()
Add a flexible gap

Returns:
builder the builder

hide

public V hide()
Hide the last component added to the toolabr. This removes the last added component from the default layout.

Returns:
builder the builder

addImpl

protected void addImpl(JComponent component)
Description copied from class: AbstractToolbarBuilder
Internal method that adds component to the toolbar container

Overrides:
addImpl in class AbstractSegmentedToolbarBuilder<V extends AbstractCustomizedToolbarBuilder,com.bric.swing.toolbar.CustomizedToolbar>

getToolbar

public com.bric.swing.toolbar.CustomizedToolbar getToolbar()
Overrides:
getToolbar in class AbstractToolbarBuilder<V extends AbstractCustomizedToolbarBuilder,com.bric.swing.toolbar.CustomizedToolbar>
Returns:
toolbar the final toolbar component