com.vlsolutions.swing.toolbars
public class ToolBarContainer extends JPanel
The layout used is BorderLayout and the CENTER component is dedicated to the user (the other 4 places (NORTH, EAST, WEST and SOUTH are used to display the toolbar panels)).

The ToolBarContainer is a JPanel with a BorderLayout, containing a user component and a maximum of four
ToolBarPanels.
Loading and saving toolbar configurations is done with the ToolBarIO utility class, and works if VLToolbars are registered (given a name and made know to their container by registerToolBar ).
| Constructor Summary | |
|---|---|
| ToolBarContainer() | |
| Method Summary | |
|---|---|
| void | add(Component comp, Object constraints) Overriden to track component constraints |
| static ToolBarContainer | createDefaultContainer(boolean topToolbar, boolean leftToolBar, boolean bottomToolBar, boolean rightToolBar) Creates a default ToolBarContainer with preinstalled toolbar panels on the borders.
|
| Component | getComponentAt(Object constraints) Returns the component for a given BorderLayout constraints |
| Object | getConstraints(Component comp) Returns the BorderLayout constraints of the given component |
| List | getRegisteredToolBars() Returns the list of currently registered toolbars.
|
| VLToolBar | getToolBarByName(String name) Returns the registered toolbar associated with the given name, or null if not found |
| ToolBarPanel | getToolBarPanelAt(Object constraints) Returns the ToolBarPanel for a given BorderLayout constraints |
| void | registerToolBar(VLToolBar toolbar) Registers a new ToolBar.
|
| void | remove(Component comp) Overriden to keep track of component constraints |
| void | remove(int index) Overriden to keep track of component constraints |
| void | removeAll() Overriden to keep track of component constraints |
| void | unregisterToolBar(VLToolBar toolbar) Unregisters a ToolBar.
|
The toolbarPanels are then accessible with getToolBarPanelAt(constraints) where constraints values are BorderLayout.NORTH, EAST, WEST and SOUTH.
(eturns a new list at each invocation.)
Registering is used when reading a xml configuration
Registering is used when reading a xml configuration