|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.lcdui.Displayable
javax.microedition.lcdui.Screen
javax.microedition.lcdui.Form
m3g06.Image2DTypesSample
public class Image2DTypesSample
Loads PNG images with different color types and transparency
combinations by using Loader.load() and displays the
resulting Image2D pixel format.
| Field Summary | |
|---|---|
private static java.lang.String |
IMAGE_NAME_BASE
Prefix for image names. |
private static java.lang.String |
IMAGE_NAME_END
Postfix for image names. |
private static java.util.Hashtable |
IMAGE2D_TYPES
Maps Image2D types to a string representation. |
private static java.lang.String[][] |
PNG_TYPES
List of PNG test images and their string representation. |
| Constructor Summary | |
|---|---|
Image2DTypesSample()
Initializes sample and loads images. |
|
| Method Summary | |
|---|---|
void |
destroy()
Destroys the sample. |
void |
init()
Initializes the sample. |
private java.lang.String |
testImage(java.lang.String imageName)
Fetches an image with Loader.load() and returns the
Image2D type as a string representation. |
| Methods inherited from class javax.microedition.lcdui.Form |
|---|
append, append, append, delete, deleteAll, get, getHeight, getWidth, insert, set, setItemStateListener, size |
| Methods inherited from class javax.microedition.lcdui.Displayable |
|---|
addCommand, getTicker, getTitle, isShown, removeCommand, setCommandListener, setTicker, setTitle, sizeChanged |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String IMAGE_NAME_BASE
private static final java.lang.String[][] PNG_TYPES
private static final java.lang.String IMAGE_NAME_END
private static final java.util.Hashtable IMAGE2D_TYPES
| Constructor Detail |
|---|
public Image2DTypesSample()
| Method Detail |
|---|
public void init()
init in interface Sampleprivate java.lang.String testImage(java.lang.String imageName)
Loader.load() and returns the
Image2D type as a string representation.
imageName - name and path of the image to load.
Image2D type as string.public void destroy()
destroy in interface Sample
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||