palmed.ui
Class Button

java.lang.Object
  extended by palmed.ui.Button

public final class Button
extends java.lang.Object

This class implements a clickable button.

Version:
$Revision$ $Date$
Author:
Mathieu Champlon

Constructor Summary
Button(ICommand command, ICommandListener listener, java.lang.String image)
          Create a button.
 
Method Summary
 void enter()
          Enter the button.
 int getHeight()
          Retrieve the height.
 int getWidth()
          Retrieve the width.
 void leave()
          Leave the button.
 void paint(javax.microedition.lcdui.Graphics g)
          Paint the button.
 void trigger()
          Trigger the button if in enter state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Button

public Button(ICommand command,
              ICommandListener listener,
              java.lang.String image)
Create a button.

Parameters:
command - the command
listener - the command listener
image - the image
Method Detail

paint

public void paint(javax.microedition.lcdui.Graphics g)
Paint the button.

Parameters:
g - the graphics

getWidth

public int getWidth()
Retrieve the width.

Returns:
the wdth in pixels

getHeight

public int getHeight()
Retrieve the height.

Returns:
the height in pixels

enter

public void enter()
Enter the button.


leave

public void leave()
Leave the button.


trigger

public void trigger()
Trigger the button if in enter state.



Copyright © 2004-2006 PalmEd. All Rights Reserved.