net.sourceforge.mewt.button
Class ImageButton

java.lang.Object
  extended by net.sourceforge.mewt.button.ImageButton
Direct Known Subclasses:
ListButton, TextButton

public class ImageButton
extends java.lang.Object

The Class ImageButton.


Field Summary
static int OUTSET
          The OUTSET.
static int STYLE_ROUND
          The Constant STYLE_ROUND.
static int STYLE_SQUARE
          The Constant STYLE_SQUARE.
 
Constructor Summary
ImageButton(java.lang.String image)
          Instantiates a new image button.
 
Method Summary
 javax.microedition.lcdui.Command getCommand()
          Gets the command.
 java.lang.String getImage()
          Gets the image.
 Themeable getParent()
          Gets the parent.
 int getStyle()
          Gets the style.
 boolean isSelected()
          Checks if is selected.
 boolean isStretchIcon()
          Checks if is stretch icon.
 void paint(javax.microedition.lcdui.Graphics gx, int x, int y, int width, int height)
          Paint.
 void setCommand(javax.microedition.lcdui.Command command)
          Sets the command.
 void setImage(java.lang.String image)
          Sets the image.
 void setParent(Themeable formCommon)
          Sets the parent.
 void setSelected(boolean s)
          Sets the selected.
 void setStretchIcon(boolean stretchIcon)
          Sets the stretch icon.
 void setStyle(int style)
          Sets the style.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLE_ROUND

public static final int STYLE_ROUND
The Constant STYLE_ROUND.

See Also:
Constant Field Values

STYLE_SQUARE

public static final int STYLE_SQUARE
The Constant STYLE_SQUARE.

See Also:
Constant Field Values

OUTSET

public static int OUTSET
The OUTSET.

Constructor Detail

ImageButton

public ImageButton(java.lang.String image)
Instantiates a new image button.

Parameters:
image - the image
Method Detail

getStyle

public int getStyle()
Gets the style.

Returns:
the style

setStyle

public void setStyle(int style)
Sets the style.

Parameters:
style - the new style

isSelected

public boolean isSelected()
Checks if is selected.

Returns:
true, if is selected

setSelected

public void setSelected(boolean s)
Sets the selected.

Parameters:
s - the new selected

paint

public void paint(javax.microedition.lcdui.Graphics gx,
                  int x,
                  int y,
                  int width,
                  int height)
Paint.

Parameters:
gx - the gx
x - the x
y - the y
width - the width
height - the height

getImage

public java.lang.String getImage()
Gets the image.

Returns:
the image

setImage

public void setImage(java.lang.String image)
Sets the image.

Parameters:
image - the new image

getCommand

public javax.microedition.lcdui.Command getCommand()
Gets the command.

Returns:
the command

setCommand

public void setCommand(javax.microedition.lcdui.Command command)
Sets the command.

Parameters:
command - the new command

setParent

public void setParent(Themeable formCommon)
Sets the parent.

Parameters:
formCommon - the new parent

getParent

public Themeable getParent()
Gets the parent.

Returns:
the parent

isStretchIcon

public boolean isStretchIcon()
Checks if is stretch icon.

Returns:
true, if is stretch icon

setStretchIcon

public void setStretchIcon(boolean stretchIcon)
Sets the stretch icon.

Parameters:
stretchIcon - the new stretch icon