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.
-
TToolButton(Class, String, String, String)
- Constructs a tool button.
-
TToolButton(Class, String, String, String, boolean)
- Constructs a toggle tool button.
-
addActionListener(ActionListener)
- Add the specified action listener to receive action events
from this tool button.
-
isButtonDown()
- Is the tool button down?
-
isToggle()
- Is this a toggle tool button?
-
mouseClicked(MouseEvent)
- Invoked when the tool button is clicked.
-
mouseEntered(MouseEvent)
- Invoked when the mouse enters the tool button.
-
mouseExited(MouseEvent)
- Invoked when the mouse exits the tool button.
-
mousePressed(MouseEvent)
- Invoked when the tool button is pressed.
-
mouseReleased(MouseEvent)
- Invoked when the tool button is released.
-
paint(Graphics)
- Invoked when the tool button is to be painted.
-
removeActionListener(ActionListener)
- Remove the specified action listener so it no longer receives
action events from this tool button.
-
setButtonDown(boolean)
- Set the tool button down or up.
-
setEnabled(boolean)
- Enable or disable the tool button.
-
toggle()
- Toggle the tool button.
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
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
isButtonDown
public boolean isButtonDown()
- Is the tool button down?
setButtonDown
public void setButtonDown(boolean buttonDown)
- Set the tool button down or up.
toggle
public void toggle()
- Toggle the tool button.
isToggle
public boolean isToggle()
- Is this a toggle tool button?
setEnabled
public void setEnabled(boolean enable)
- Enable or disable the tool button.
- Overrides:
- setEnabled in class Component
mouseEntered
public void mouseEntered(MouseEvent e)
- Invoked when the mouse enters the tool button.
mouseExited
public void mouseExited(MouseEvent e)
- Invoked when the mouse exits the tool button.
mousePressed
public void mousePressed(MouseEvent e)
- Invoked when the tool button is pressed.
mouseReleased
public void mouseReleased(MouseEvent e)
- Invoked when the tool button is released.
mouseClicked
public void mouseClicked(MouseEvent e)
- Invoked when the tool button is clicked.
paint
public void paint(Graphics g)
- Invoked when the tool button is to be painted.
- Overrides:
- paint in class Canvas
addActionListener
public void addActionListener(ActionListener l)
- Add the specified action listener to receive action events
from this tool button.
- Parameters:
- l - the action listener
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