Class iicm.widgets.ImageButton
All Packages Class Hierarchy This Package Previous Next Index
Class iicm.widgets.ImageButton
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----iicm.widgets.ImageButton
- public class ImageButton
- extends Canvas
ImageButton - image button
-
ImageButton(String, Image, int, int, boolean, ImageButtonGroup)
- constructor
-
getState()
-
-
minimumSize()
-
-
mouseDown(Event, int, int)
-
-
paint(Graphics)
-
-
preferredSize()
-
-
setState(boolean)
-
-
subimage(Image, int, int, int, int, Component)
- small helper to crop a subimage area out of an image.
-
update(Graphics)
-
-
waitForImage(Image, Component)
- small helper to wait until an image is completely loaded
ImageButton
public ImageButton(String label,
Image img,
int width,
int height,
boolean state,
ImageButtonGroup group)
- constructor
- Parameters:
- label - label used when img is null
- width - image width, substituted by label width when img is null
- height - allows uniform button height if some images are not available,
width determined from image or label
- state - initial state flag
- group - ImageButtonGroup for radio buttons, null for toggle buttons
subimage
public static Image subimage(Image img,
int x,
int y,
int w,
int h,
Component target)
- small helper to crop a subimage area out of an image.
will wait until cropping has been completed when target is non-null.
waitForImage
public static boolean waitForImage(Image img,
Component target)
- small helper to wait until an image is completely loaded
- Returns:
- flag whether all was ok
minimumSize
public Dimension minimumSize()
- Overrides:
- minimumSize in class Component
preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Component
update
public void update(Graphics g)
- Overrides:
- update in class Component
paint
public void paint(Graphics g)
- Overrides:
- paint in class Canvas
mouseDown
public boolean mouseDown(Event evt,
int x,
int y)
- Overrides:
- mouseDown in class Component
setState
public void setState(boolean value)
getState
public boolean getState()
All Packages Class Hierarchy This Package Previous Next Index