DCT Lightfoot v3 API specification

javax.microedition.lcdui
Class ImageItem

java.lang.Object
  |
  +--javax.microedition.lcdui.Item
        |
        +--javax.microedition.lcdui.ImageItem

public class ImageItem
extends Item

Image items allow images to be used in a form


Nested Class Summary
protected  class ImageItem.Peer
          Peer class that does the drawing
 
Nested classes inherited from class javax.microedition.lcdui.Item
 
Field Summary
static int LAYOUT_CENTER
          Draw the image in the centre of the area
static int LAYOUT_DEFAULT
          Use the default layout
static int LAYOUT_LEFT
          Draw the image to the left of the area
static int LAYOUT_NEWLINE_AFTER
          Put a newline after the image
static int LAYOUT_NEWLINE_BEFORE
          Put a newline before the image
static int LAYOUT_RIGHT
          Draw the image to the right of the area
 
Fields inherited from class javax.microedition.lcdui.Item
form, highlighted, label, peer
 
Constructor Summary
ImageItem(java.lang.String label, Image img, int layout, java.lang.String altText)
          Create a new image item
 
Method Summary
 java.lang.String getAltText()
          Get the alternate text
 Image getImage()
          Get the image
 int getLayout()
          Get the layout
 void setAltText(java.lang.String altText)
          Set the alternate text
 void setImage(Image img)
          Set the image
 void setLayout(int layout)
          Set the layout
 
Methods inherited from class javax.microedition.lcdui.Item
getLabel, setLabel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAYOUT_DEFAULT

public static final int LAYOUT_DEFAULT
Use the default layout

See Also:
Constant Field Values

LAYOUT_LEFT

public static final int LAYOUT_LEFT
Draw the image to the left of the area

See Also:
Constant Field Values

LAYOUT_RIGHT

public static final int LAYOUT_RIGHT
Draw the image to the right of the area

See Also:
Constant Field Values

LAYOUT_CENTER

public static final int LAYOUT_CENTER
Draw the image in the centre of the area

See Also:
Constant Field Values

LAYOUT_NEWLINE_BEFORE

public static final int LAYOUT_NEWLINE_BEFORE
Put a newline before the image

See Also:
Constant Field Values

LAYOUT_NEWLINE_AFTER

public static final int LAYOUT_NEWLINE_AFTER
Put a newline after the image

See Also:
Constant Field Values
Constructor Detail

ImageItem

public ImageItem(java.lang.String label,
                 Image img,
                 int layout,
                 java.lang.String altText)
Create a new image item

Parameters:
label - The label to draw
img - The immutable image
layout - The layout to use
altText - The text to use in place of the image
Throws:
IllegalArgumentException - if the image is mutable
IllegalArgumentException - if the layout value is not valid
Method Detail

getAltText

public java.lang.String getAltText()
Get the alternate text

Returns:
the alternate text

setAltText

public void setAltText(java.lang.String altText)
Set the alternate text

Parameters:
altText - the alternate text

getImage

public Image getImage()
Get the image

Returns:
the image

setImage

public void setImage(Image img)
Set the image

Parameters:
img - The image

getLayout

public int getLayout()
Get the layout

Returns:
the layout value

setLayout

public void setLayout(int layout)
Set the layout

Parameters:
layout - The layout

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification