Up: Java Kali Source Code and Documentation
Class ImageButton
Class ImageButton
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----ImageButton
- class ImageButton
- extends Canvas
An ImageButton is a custom GUI widget which is a button with an
image on it. (The AWT does not have such a widget, presumably
because it's not very portable, but I find that this works fine.)

ImageButton(Image, Image, ImageButtonGroup)
- Create a new button with the given images and group,
and initially in its "false" (up) state.
ImageButton(Image, Image, ImageButtonGroup, boolean)
- Create a new button with the given images, group, and initial
state.

getState()
- Return the state (true corresponds to down) of the button.
minimumSize()
mouseDown(Event, int, int)
mouseEnter(Event, int, int)
mouseExit(Event, int, int)
mouseUp(Event, int, int)
paint(Graphics)
preferredSize()
setState(boolean)
- Set the state of the button.
setStateInternal(boolean)

ImageButton
public ImageButton(Image upImage,
Image downImage,
ImageButtonGroup group,
boolean state)
- Create a new button with the given images, group, and initial
state.
ImageButton
public ImageButton(Image upImage,
Image downImage,
ImageButtonGroup group)
- Create a new button with the given images and group,
and initially in its "false" (up) state.

preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Component
minimumSize
public Dimension minimumSize()
- Overrides:
- minimumSize in class Component
paint
public void paint(Graphics g)
- Overrides:
- paint in class Canvas
getState
public boolean getState()
- Return the state (true corresponds to down) of the button.
setState
public void setState(boolean state)
- Set the state of the button. True corresponds to down.
setStateInternal
public void setStateInternal(boolean state)
mouseDown
public boolean mouseDown(Event evt,
int x,
int y)
- Overrides:
- mouseDown in class Component
mouseUp
public boolean mouseUp(Event evt,
int x,
int y)
- Overrides:
- mouseUp in class Component
mouseEnter
public boolean mouseEnter(Event evt,
int x,
int y)
- Overrides:
- mouseEnter in class Component
mouseExit
public boolean mouseExit(Event evt,
int x,
int y)
- Overrides:
- mouseExit in class Component
Up: Java Kali Source Code and Documentation
The Geometry Center Home Page
Author: Mark Phillips
Comments to:
webmaster@www.geom.uiuc.edu
Created: Sep 16 1996 ---
Last modified: Sep 18 1996