org.tigris.swidgets

Class Toolbar

Implemented Interfaces:
MouseListener
Known Direct Subclasses:
Toolbox

public class Toolbar
extends JToolBar
implements MouseListener

A toolbar class which assumes rollover effects and automatically gives tooltip to any buttons created by adding an action.
Author:
Bob Tarling

Constructor Summary

Toolbar()
Creates a new instance of Toolbar
Toolbar(String title)
Creates a new instance of Toolbar
Toolbar(String title, boolean floatable)
Creates a new instance of Toolbar
Toolbar(int orientation)
Creates a new instance of Toolbar with the given orientation

Method Summary

JButton
add(Action action)
void
mouseClicked(MouseEvent me)
void
mouseEntered(MouseEvent me)
void
mouseExited(MouseEvent me)
void
mousePressed(MouseEvent me)
void
mouseReleased(MouseEvent me)
void
setRollover(boolean r)

Constructor Details

Toolbar

public Toolbar()
Creates a new instance of Toolbar

Toolbar

public Toolbar(String title)
Creates a new instance of Toolbar
Parameters:
title - The title to display in the titlebar when toolbar is floating

Toolbar

public Toolbar(String title,
               boolean floatable)
Creates a new instance of Toolbar
Parameters:
title - The title to display in the titlebar when toolbar is floating
floatable - true if the toolbar can be dragged to a floating position

Toolbar

public Toolbar(int orientation)
Creates a new instance of Toolbar with the given orientation
Parameters:
orientation - HORIZONTAL or VERTICAL

Method Details

add

public JButton add(Action action)
See Also:
javax.swing.JToolBar.add(javax.swing.Action)

mouseClicked

public void mouseClicked(MouseEvent me)
See Also:
java.awt.event.MouseListener.mouseClicked(java.awt.event.MouseEvent)

mouseEntered

public void mouseEntered(MouseEvent me)
See Also:
java.awt.event.MouseListener.mouseEntered(java.awt.event.MouseEvent)

mouseExited

public void mouseExited(MouseEvent me)
See Also:
java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent)

mousePressed

public void mousePressed(MouseEvent me)
See Also:
java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseReleased

public void mouseReleased(MouseEvent me)
See Also:
java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent)

setRollover

public void setRollover(boolean r)
See Also:
javax.swing.JToolBar.setRollover(boolean)