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).


The ToolBarPanel is a JPanel with a ToolBarPanelLayout. It support horizontal and vertical orientation, and can contain one or more VLToolbars (with given ToolBarContraints for positionning).

UNKNOWN: 2006/09/09 Support for LTR and RTL component 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
voidadd(JToolBar toolbar)
Adds a new toolbar respecting the given positionning constraints.
voidadd(JToolBar toolbar, int major)
Adds a new JToolBar to the Panel at the given row.
voidadd(VLToolBar toolbar, ToolBarConstraints constraints)
Adds a new toolbar respecting the given positionning constraints.
BackgroundPaintergetBackgroundPainter()
Returns the optional background painter for this toolbar panel (may be null)
intgetOrientation()
Returns the orientation of this toolbarpanel
voidpaintComponent(Graphics g)
Overriden for optional background painting
voidremove(Component comp)
voidsetOrientation(int orientation)
voidsetPainter(BackgroundPainter painter)
Updates the optional background painter for this toolbar panel

Constructor Detail

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 Detail

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-2007 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications