All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.ToolBar

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----jp.kyasu.awt.KContainer
                           |
                           +----jp.kyasu.awt.ToolBar

public class ToolBar
extends KContainer
implements ActionListener
A ToolBar object provides a component which is useful for displaying commonly used Actions or controls. It can be showed or hidden by the user.

Version:
22 Jun 1998
Author:
Kazuki YASUMATSU

Constructor Index

 o ToolBar(Component[][][])
Constructs a new tool bar with the specified components.
 o ToolBar(Component[][][], boolean)
Constructs a new tool bar with the specified components and flag that determins to be showd or hidden initially.

Method Index

 o actionPerformed(ActionEvent)
Invoked when an action occurs.
 o getToolBarCount()
Returns the number of horizontal bars.
 o getToolBarState(int)
Returns the horizontal bar at the specified index is showed or hidden.
 o main(String[])
Executes the examples.
 o paint(Graphics)
Paints this component.
 o setToolBarState(int, boolean)
Sets the horizontal bar at the specified index to be showed or hidden.

Constructors

 o ToolBar
 public ToolBar(Component toolBarComponents[][][])
Constructs a new tool bar with the specified components.

Parameters:
toolBarComponents - the components of the tool bar. the first dimension classifies the horizontal bar; the second dimension classifies the actions with the vertical separator; and the third dimension shows the actions.
 o ToolBar
 public ToolBar(Component toolBarComponents[][][],
                boolean showToolBar)
Constructs a new tool bar with the specified components and flag that determins to be showd or hidden initially.

Parameters:
toolBarComponents - the components of the tool bar. the first dimension classifies the horizontal bar; the second dimension classifies the actions with the vertical separator; and the third dimension shows the actions.
showToolBar - If true, shows the actions initially; otherwise hides.

Methods

 o paint
 public void paint(Graphics g)
Paints this component.

Overrides:
paint in class Container
 o getToolBarCount
 public int getToolBarCount()
Returns the number of horizontal bars.

 o getToolBarState
 public boolean getToolBarState(int index)
Returns the horizontal bar at the specified index is showed or hidden.

See Also:
setToolBarState
 o setToolBarState
 public void setToolBarState(int index,
                             boolean state)
Sets the horizontal bar at the specified index to be showed or hidden.

See Also:
getToolBarState
 o actionPerformed
 public void actionPerformed(ActionEvent e)
Invoked when an action occurs.

See Also:
ActionListener
 o main
 public static void main(String args[])
Executes the examples.


All Packages  Class Hierarchy  This Package  Previous  Next  Index