|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfds.micro.ui.Component
fds.micro.ui.ImageItem
This class implements an component that display a non interactive image.
An object of this class is dedicated to be used within an object of fds.micro.ui.AbstractPanel sub-class (J2ME).
Warning: Use this class only if you want to have control on rendering. If possible, always prefer javax.microedition.lcdui.ImageItem.
You can read below a typical use within a class that inherit fds.micro.ui.RowPanel:
... this.append(new ImageItem(Image.createImage("/test.png"))); ...
Field Summary |
Fields inherited from class fds.micro.ui.Component |
INTERN_BOTTOM_VALIGN, INTERN_CENTER_HALIGN, INTERN_CENTER_VALIGN, INTERN_LEFT_HALIGN, INTERN_RIGHT_HALIGN, INTERN_TOP_VALIGN |
Constructor Summary | |
ImageItem(javax.microedition.lcdui.Image image)
Build an component that displays the given image. |
Method Summary | |
javax.microedition.lcdui.Image |
getImage()
Get the image, not truncated (if truncated due to maximum width/height). |
void |
keyPressed(int keyCode,
int gameAction)
Called to notify the component that a key is pressed. |
void |
pointerPressed(int xpos,
int ypos)
Called to notify the component that pointer device was pressed. |
void |
setImage(javax.microedition.lcdui.Image image)
Change the image. |
void |
setMaximumSize(int width,
int height)
Set the maximum size for this component. |
Methods inherited from class fds.micro.ui.Component |
addFocusListener, addItemListener, equals, getHAlign, getHeight, getParent, getVAlign, getWidth, getX, getY, isDisabled, isHaveFocus, isHidden, isManageFocus, isOpaque, removeFocusListener, removeItemListener, setBackground, setDisabled, setFocusColor, setHAlign, setHidden, setLocation, setManageFocus, setOpaque, setVAlign |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ImageItem(javax.microedition.lcdui.Image image)
image
- The image to display.
java.lang.IllegalArgumentException
- if given image is null.Method Detail |
public javax.microedition.lcdui.Image getImage()
public void keyPressed(int keyCode, int gameAction)
keyPressed
in class Component
keyCode
- The key code.gameAction
- Game action corresponding to the key code.public void pointerPressed(int xpos, int ypos)
pointerPressed
in class Component
xpos
- The X position of pointer on parent Canvas.ypos
- The Y position of pointer on parent Canvas.public void setImage(javax.microedition.lcdui.Image image)
image
- The image to display.
java.lang.IllegalArgumentException
- if given image is null.public void setMaximumSize(int width, int height)
setMaximumSize
in class Component
width
- The maximum width.height
- The maximum height.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |