|
|||||||
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.Canvas
com.sun.perseus.demo.picturedecorator.ItemPicker
public class ItemPicker
The ItemPicker
canvas creates thumbnails of the various props
from its associated props images and displays them in a grid.
The user can use the arrow keys to select a thumbnail (which gets highlighted)
and use the fire button to select the desired item or the '*' key to cancel
the picker.
Field Summary | |
---|---|
static java.lang.String |
SVG_NAMESPACE_URI
The SVG Namespace URI. |
static int |
THUMBNAIL_HEIGHT
Desired thumbnail height |
static int |
THUMBNAIL_PADDING
The desired padding for each thumbnail |
static int |
THUMBNAIL_WIDTH
Desired thumbnail width |
static java.lang.String |
XLINK_NAMESPACE_URI
The XLink Namespace URI. |
Fields inherited from class javax.microedition.lcdui.Canvas |
---|
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP |
Constructor Summary | |
---|---|
ItemPicker(PhotoFrame frame,
javax.microedition.m2g.SVGImage svgImage,
javax.microedition.lcdui.Display display)
|
Method Summary | |
---|---|
void |
keyPressed(int keyCode)
|
(package private) static org.w3c.dom.svg.SVGRect |
pad(org.w3c.dom.svg.SVGRect bbox)
Helper method. |
void |
paint(javax.microedition.lcdui.Graphics g)
Repaints this canvas with the current item selected. |
Methods inherited from class javax.microedition.lcdui.Canvas |
---|
getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, hideNotify, isDoubleBuffered, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, serviceRepaints, setFullScreenMode, showNotify, sizeChanged |
Methods inherited from class javax.microedition.lcdui.Displayable |
---|
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setCommandListener, setTicker, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SVG_NAMESPACE_URI
public static final java.lang.String XLINK_NAMESPACE_URI
public static final int THUMBNAIL_WIDTH
public static final int THUMBNAIL_HEIGHT
public static final int THUMBNAIL_PADDING
Constructor Detail |
---|
public ItemPicker(PhotoFrame frame, javax.microedition.m2g.SVGImage svgImage, javax.microedition.lcdui.Display display)
frame
- the associated PhotoFrame instance.svgImage
- the svgImage where items are defined.display
- the SVGImage containing all the props definitions.Method Detail |
---|
public void keyPressed(int keyCode)
keyPressed
in class javax.microedition.lcdui.Canvas
public void paint(javax.microedition.lcdui.Graphics g)
paint
in class javax.microedition.lcdui.Canvas
g
- the Graphics to paint into.static org.w3c.dom.svg.SVGRect pad(org.w3c.dom.svg.SVGRect bbox)
bbox
- the box to pad.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |