jMobileCore toolkit

com.jmobilecore.ui.core
Class ImageComponent

java.lang.Object
  extended by com.jmobilecore.ui.core.Component
      extended by com.jmobilecore.ui.core.ImageComponent
Direct Known Subclasses:
ListImage

public class ImageComponent
extends Component

Provides an image for display on the screen. An image is not focusable.

Author:
Greg Gridin

Field Summary
 javax.microedition.lcdui.Image image
          The iame of this ImageComponent.
 
Fields inherited from class com.jmobilecore.ui.core.Component
alignment, background, CENTER, focusable, focusedBackground, focusedForeground, font, foreground, height, isCompletelyVisible, isFocused, isVisible, LEFT, parentScreen, RIGHT, screenY, valid, width
 
Constructor Summary
ImageComponent(javax.microedition.lcdui.Image image)
          Constructs a new ImageComponent with the specified image, left justified.
ImageComponent(javax.microedition.lcdui.Image image, int alignment)
          Constructs a new ImageComponent with the specified image, and alignment.
 
Method Summary
 void destructor()
          Class destructor.
 void paint(javax.microedition.lcdui.Graphics g)
          Paints this component.
protected  void setHeight()
          Calculates the component height
 
Methods inherited from class com.jmobilecore.ui.core.Component
getBackground, getFont, getForeground, getHeight, getWidth, invalidate, isFocusOwner, keyPressed, keyReleased, keyRepeated, paintBackground, pointerDragged, pointerPressed, pointerReleased, prepareForeground, releaseFocus, requestFocus, setFont
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

public javax.microedition.lcdui.Image image
The iame of this ImageComponent.

Constructor Detail

ImageComponent

public ImageComponent(javax.microedition.lcdui.Image image)
Constructs a new ImageComponent with the specified image, left justified.

Parameters:
image - the image that this ImageComponent presents. A null value will be accepted without causing a NullPointerException to be thrown.

ImageComponent

public ImageComponent(javax.microedition.lcdui.Image image,
                      int alignment)
Constructs a new ImageComponent with the specified image, and alignment. Possible values for alignment are Component.LEFT, Component.RIGHT, and Component.CENTER.

Parameters:
image - the string that the label presents. A null value will be accepted without causing a NullPointerException to be thrown.
alignment - the alignment value.
Method Detail

destructor

public void destructor()
Class destructor. Helps VM to perform garbage collection

Overrides:
destructor in class Component

paint

public void paint(javax.microedition.lcdui.Graphics g)
Paints this component.

Overrides:
paint in class Component
Parameters:
g - the graphics context to use for painting

setHeight

protected void setHeight()
Calculates the component height

Overrides:
setHeight in class Component

jMobileCore toolkit