Class symantec.itools.awt.util.ToolBarPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.util.ToolBarPanel

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Panel
                           |
                           +----BorderPanel
                                   |
                                   +----symantec.itools.awt.util.ToolBarPanel

public class ToolBarPanel
extends BorderPanel
ToolBarPanel component. This component creates a panel to which you can add buttons to create a toolbar in a window. Toolbars commonly contain buttons, but a ToolBarPanel can hold other types of components like static text, check boxes, even images. Tool bar components are separated with a ToolBarSpacer component.

Version:
1.1, July 23, 1997
Author:
Symantec
See Also:
ToolBarSpacer

Variable Index

 o HORIZONTAL
The constant to use to have a horizontally oriented toolbar.
 o VERTICAL
The constant to use to have a vertically oriented toolbar.
 o errors
Error strings.
 o orientation
The orientation for the toolbar.

Constructor Index

 o symantec.itools.awt.util.ToolBarPanel()
Create ToolBarPanel.
 o symantec.itools.awt.util.ToolBarPanel(int, int)
Create ToolBarPanel.

Method Index

 o addNotify()
Tells this component that it has been added to a container.
 o addOrientationListener(PropertyChangeListener)
Adds a listener for Orienation changes.
 o addOrientationListener(VetoableChangeListener)
Adds a vetoable listener for Orienation changes.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o getOrientation()
Gets the orientation of the toolbar.
 o getPreferredSize()
Returns the recommended dimensions to properly display this component.
 o isValidOrientation(int)
Is the specified orientation type valid?
 o removeNotify()
Tells this component that it is being removed from a container.
 o removeOrientationListener(PropertyChangeListener)
Removes a listener for Orienation changes.
 o removeOrientationListener(VetoableChangeListener)
Removes a vetoable listener for Orienation changes.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o setLayout(LayoutManager)
Takes no action.
 o setOrientation(int)
Sets the orientation of the toolbar.

Variables

 o HORIZONTAL
public static final int HORIZONTAL
The constant to use to have a horizontally oriented toolbar.

See Also:
setOrientation, getOrientation
 o VERTICAL
public static final int VERTICAL
The constant to use to have a vertically oriented toolbar.

See Also:
setOrientation, getOrientation
 o errors
protected transient java.util.ResourceBundle errors
Error strings.

 o orientation
protected int orientation
The orientation for the toolbar. Either HORIZONTAL or VERTICAL.

See Also:
HORIZONTAL, VERTICAL

Constructors

 o ToolBarPanel
public ToolBarPanel()
Create ToolBarPanel. Default ToolBarPanel uses a BEVEL_RAISED style and is HORIZONTAL.

 o ToolBarPanel
public ToolBarPanel(int bevelStyle,
                    int orientationType)
Create ToolBarPanel.

Parameters:
bevelStyle - either BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE. If the value passed is not valid, it will default to BEVEL_RAISED.
orientationType - either HORIZONTAL or VERTICAL. If the value passed is not valid, it will default to HORIZONTAL.
See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE, HORIZONTAL, VERTICAL

Methods

 o addNotify
public synchronized void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It has been overridden here to hook-up event listeners.

Overrides:
addNotify in class BorderPanel
See Also:
removeNotify
 o addOrientationListener
public synchronized void addOrientationListener(PropertyChangeListener listener)
Adds a listener for Orienation changes.

Parameters:
listener - the listener to add
See Also:
removeOrientationListener
 o addOrientationListener
public synchronized void addOrientationListener(VetoableChangeListener listener)
Adds a vetoable listener for Orienation changes.

Parameters:
listener - the listener to add
See Also:
removeOrientationListener
 o addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
listener - the listener to add.
Overrides:
addPropertyChangeListener in class BorderPanel
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
listener - the listener to add
Overrides:
addVetoableChangeListener in class BorderPanel
See Also:
removeVetoableChangeListener
 o getOrientation
public int getOrientation()
Gets the orientation of the toolbar.

Returns:
VERTICAL: getPreferredSize will return the Dimension best suited for this toolbar layed out vertically. HORIZONTAL: getPreferredSize will return the Dimension best suited for this toolbar layed out horizontally.
See Also:
setOrientation
 o getPreferredSize
public synchronized java.awt.Dimension getPreferredSize()
Returns the recommended dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component.

Overrides:
getPreferredSize in class BorderPanel
See Also:
getMinimumSize
 o isValidOrientation
public boolean isValidOrientation(int orientationType)
Is the specified orientation type valid?

Parameters:
orientationType - the type to test
Returns:
if true then the parameter was equal to either HORIZONTAL or VERTICAL.
See Also:
setOrientation, getOrientation, HORIZONTAL, VERTICAL
 o removeNotify
public synchronized void removeNotify()
Tells this component that it is being removed from a container. This is a standard Java AWT method which gets called by the AWT when this component is removed from a container. Typically, it is used to destroy the peers of this component and all its subcomponents. It has been overridden here to unhook event listeners.

Overrides:
removeNotify in class BorderPanel
See Also:
addNotify
 o removeOrientationListener
public synchronized void removeOrientationListener(PropertyChangeListener listener)
Removes a listener for Orienation changes.

Parameters:
listener - the listener to remove
See Also:
addOrientationListener
 o removeOrientationListener
public synchronized void removeOrientationListener(VetoableChangeListener listener)
Removes a vetoable listener for Orienation changes.

Parameters:
listener - the listener to remove
See Also:
addOrientationListener
 o removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
listener - the listener to remove
Overrides:
removePropertyChangeListener in class BorderPanel
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
listener - the listener to remove
Overrides:
removeVetoableChangeListener in class BorderPanel
See Also:
addVetoableChangeListener
 o setLayout
public void setLayout(LayoutManager lm)
Takes no action. This is a standard Java AWT method which gets called to specify which layout manager should be used to layout the components in standard containers. Since layout managers CANNOT BE USED with this container the standard setLayout has been OVERRIDDEN for this container and does nothing.

Parameters:
lm - the layout manager to use to layout this container's components (IGNORED)
Overrides:
setLayout in class BorderPanel
See Also:
getLayout
 o setOrientation
public void setOrientation(int orientationType) throws PropertyVetoException
Sets the orientation of the toolbar. Modifies the results from getPreferredSize. If the orientation is VERTICAL, getPreferredSize will return the Dimension best suited for this toolbar layed out vertically. If the orientaion is HORIZONTAL getPreferredSize will return the Dimension best suited for this toolbar layed out horizontally.

Parameters:
orientationType - the orientation to adhere to. Either HORIZONTAL or VERTICAL
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getOrientation, HORIZONTAL, VERTICAL

All Packages  Class Hierarchy  This Package  Previous  Next  Index