All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.ibm.desktop.TToolButton

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----COM.ibm.desktop.TToolButton

public class TToolButton
extends Canvas
implements MouseListener
TToolButton provides the functionality of an image button. It can be a push button or a toggle button. It can have a tool tip, which is the text displayed when the mouse enters the tool button. The tool button can be enabled or disabled. When it is disabled, a grayed out image is displayed.

The button image is specified by an image filename, along with a referencing class. The image file must reside in an "images" directory off the directory of the referencing class.

 Copyright (c) Taligent, Inc.  1996 - 1997.
 Copyright (c) IBM Corporation 1996 - 1997.
 All Rights Reserved.
 


Constructor Index

 o TToolButton(Class, String, String, String)
Constructs a tool button.
 o TToolButton(Class, String, String, String, boolean)
Constructs a toggle tool button.

Method Index

 o addActionListener(ActionListener)
Add the specified action listener to receive action events from this tool button.
 o isButtonDown()
Is the tool button down?
 o isToggle()
Is this a toggle tool button?
 o mouseClicked(MouseEvent)
Invoked when the tool button is clicked.
 o mouseEntered(MouseEvent)
Invoked when the mouse enters the tool button.
 o mouseExited(MouseEvent)
Invoked when the mouse exits the tool button.
 o mousePressed(MouseEvent)
Invoked when the tool button is pressed.
 o mouseReleased(MouseEvent)
Invoked when the tool button is released.
 o paint(Graphics)
Invoked when the tool button is to be painted.
 o removeActionListener(ActionListener)
Remove the specified action listener so it no longer receives action events from this tool button.
 o setButtonDown(boolean)
Set the tool button down or up.
 o setEnabled(boolean)
Enable or disable the tool button.
 o toggle()
Toggle the tool button.

Constructors

 o TToolButton
 public TToolButton(Class refClass,
                    String filename,
                    String tip,
                    String text)
Constructs a tool button.

Parameters:
refClass - the referencing class where the images directory resides
filename - image file name
tip - tool tip
text - short description of tool displayed in the status bar
 o TToolButton
 public TToolButton(Class refClass,
                    String filename,
                    String tip,
                    String text,
                    boolean toggle)
Constructs a toggle tool button.

Parameters:
refClass - the referencing class where the images directory resides
filename - image file name
tip - tool tip
text - short description of tool displayed in the status bar
toggle - if true, creates a toggle button

Methods

 o isButtonDown
 public boolean isButtonDown()
Is the tool button down?

 o setButtonDown
 public void setButtonDown(boolean buttonDown)
Set the tool button down or up.

 o toggle
 public void toggle()
Toggle the tool button.

 o isToggle
 public boolean isToggle()
Is this a toggle tool button?

 o setEnabled
 public void setEnabled(boolean enable)
Enable or disable the tool button.

Overrides:
setEnabled in class Component
 o mouseEntered
 public void mouseEntered(MouseEvent e)
Invoked when the mouse enters the tool button.

 o mouseExited
 public void mouseExited(MouseEvent e)
Invoked when the mouse exits the tool button.

 o mousePressed
 public void mousePressed(MouseEvent e)
Invoked when the tool button is pressed.

 o mouseReleased
 public void mouseReleased(MouseEvent e)
Invoked when the tool button is released.

 o mouseClicked
 public void mouseClicked(MouseEvent e)
Invoked when the tool button is clicked.

 o paint
 public void paint(Graphics g)
Invoked when the tool button is to be painted.

Overrides:
paint in class Canvas
 o addActionListener
 public void addActionListener(ActionListener l)
Add the specified action listener to receive action events from this tool button.

Parameters:
l - the action listener
 o removeActionListener
 public void removeActionListener(ActionListener l)
Remove the specified action listener so it no longer receives action events from this tool button.

Parameters:
l - the action listener

All Packages  Class Hierarchy  This Package  Previous  Next  Index