Class como.awt.ImageClick
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class como.awt.ImageClick

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----como.awt.ImageClick

public class ImageClick
extends Canvas
ImageButton is a button which uses images to represent the states of the button - normal, pressed. They don't have to be fully loaded! They will be loaded asynchronously here!

Constructor Index

 o ImageClick(Image)

Method Index

 o getPos()
Get the current state of the switch! (if it's a button you will get true if it's currently pressed).
 o gotFocus(Event, Object)
 o handleEvent(Event)
handle the MouseDownEvents.
 o imageUpdate(Image, int, int, int, int, int)
Tell me all about the image ;-) (inspired from Component.java)
 o keyDown(Event, int)
Move the focus to the next component Does NOT work! (cause nextFocus() doesn't do what I wanted)
 o lostFocus(Event, Object)
 o paint(Graphics)
Draws the picture on the screen (if parts are loaded, then it draws those parts).
 o preferredSize()
 o setEditable(boolean)
 o setImageSize()
 o setPos(int, int)
 o setPos(Point)
Set the current state of the switch! (If it is a button then do nothing!)

Constructors

 o ImageClick
  public ImageClick(Image i)

Methods

 o setPos
  public void setPos(int x,
                     int y)
 o setPos
  public void setPos(Point pos)
Set the current state of the switch! (If it is a button then do nothing!)
Parameters:
onoff - indicating on or off
 o setEditable
  public void setEditable(boolean e)
 o getPos
  public Point getPos()
Get the current state of the switch! (if it's a button you will get true if it's currently pressed).
Returns:
if the switch is on then return true; else false.
 o keyDown
  public boolean keyDown(Event evt,
                         int key)
Move the focus to the next component Does NOT work! (cause nextFocus() doesn't do what I wanted)
Overrides:
keyDown in class Component
 o handleEvent
  public boolean handleEvent(Event evt)
handle the MouseDownEvents.
Overrides:
handleEvent in class Component
 o paint
  public void paint(Graphics graphics)
Draws the picture on the screen (if parts are loaded, then it draws those parts). Overrides paint-Method.
Overrides:
paint in class Canvas
 o gotFocus
  public boolean gotFocus(Event evt,
                          Object what)
Overrides:
gotFocus in class Component
 o lostFocus
  public boolean lostFocus(Event evt,
                           Object what)
Overrides:
lostFocus in class Component
 o imageUpdate
  public boolean imageUpdate(Image img,
                             int flags,
                             int x,
                             int y,
                             int w,
                             int h)
Tell me all about the image ;-) (inspired from Component.java)
Overrides:
imageUpdate in class Component
 o setImageSize
  public void setImageSize()
 o preferredSize
  public Dimension preferredSize()
Overrides:
preferredSize in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index