com.vlsolutions.swing.toolbars

Class ToolBarPanel


public class ToolBarPanel
extends JPanel

The toolbar panel is able to receive multiple toolbars and arrange them in many columns or rows (depending on the horizontal/vertical orientation).


Constructor Summary

ToolBarPanel()
Constructs a new toobar panel with a LEADING alignment.
ToolBarPanel(int align)
Constructs a new ToolBarPanel with the specified alignment.
ToolBarPanel(int align, BackgroundPainter painter)
Constructs a new ToolBarPanel with the specified alignment and background painter.

Method Summary

void
add(JToolBar toolbar)
Adds a new toolbar respecting the given positionning constraints.
void
add(JToolBar toolbar, int major)
Adds a new JToolBar to the Panel at the given row.
void
add(VLToolBar toolbar, ToolBarConstraints constraints)
Adds a new toolbar respecting the given positionning constraints.
BackgroundPainter
getBackgroundPainter()
Returns the optional background painter for this toolbar panel (may be null)
int
getOrientation()
Returns the orientation of this toolbarpanel
void
paintComponent(Graphics g)
Overriden for optional background painting
void
remove(Component comp)
void
setOrientation(int orientation)
void
setPainter(BackgroundPainter painter)
Updates the optional background painter for this toolbar panel

Constructor Details

ToolBarPanel

public ToolBarPanel()
Constructs a new toobar panel with a LEADING alignment.

ToolBarPanel

public ToolBarPanel(int align)
Constructs a new ToolBarPanel with the specified alignment.
Parameters:
align - the alignment value The value of the alignment argument must be one of FlowLayout.LEFT, FlowLayout.RIGHT, FlowLayout.CENTER, FlowLayout.LEADING, or FlowLayout.TRAILING.

ToolBarPanel

public ToolBarPanel(int align,
                    BackgroundPainter painter)
Constructs a new ToolBarPanel with the specified alignment and background painter.
Parameters:
align - the alignment value The value of the alignment argument must be one of FlowLayout.LEFT, FlowLayout.RIGHT, FlowLayout.CENTER, FlowLayout.LEADING, or FlowLayout.TRAILING.
painter - the background painter.
Since:
2.1.4

Method Details

add

public void add(JToolBar toolbar)
Adds a new toolbar respecting the given positionning constraints.

add

public void add(JToolBar toolbar,
                int major)
Adds a new JToolBar to the Panel at the given row. Multiple VLToolBars are constructed using Separators in the original JToolBar

add

public void add(VLToolBar toolbar,
                ToolBarConstraints constraints)
Adds a new toolbar respecting the given positionning constraints.

getBackgroundPainter

public BackgroundPainter getBackgroundPainter()
Returns the optional background painter for this toolbar panel (may be null)
Since:
2.1.4

getOrientation

public int getOrientation()
Returns the orientation of this toolbarpanel

paintComponent

public void paintComponent(Graphics g)
Overriden for optional background painting

remove

public void remove(Component comp)

setOrientation

public void setOrientation(int orientation)

setPainter

public void setPainter(BackgroundPainter painter)
Updates the optional background painter for this toolbar panel
Parameters:
painter - the new painer (may be null)
Since:
2.1.4

© Copyright 2004-2006 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications