|
BenQ Mobile |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.lcdui.game.Layer
Description:
Method Summary | |
int |
getHeight()
Gets the current height of this layer, in pixels. |
int |
getWidth()
Gets the current width of this layer, in pixels. |
int |
getX()
Gets the horizontal position of this Layer’s upper-left corner. |
int |
getY()
Gets the vertical position of this Layer’s upper-left corner. |
boolean |
isVisible()
Gets the visibility of this Layer. |
void |
move(int dx,
int dy)
Moves this Layer by the specified horizontal and vertical distances. |
abstract void |
paint(Graphics g)
Paints this Layer if it is visible. |
void |
setPosition(int x,
int y)
Sets this Layer’s position by specifying the location of its upper-left corner. |
void |
setVisible(boolean visible)
Sets the visibility of this Layer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public final int getHeight()
public final int getWidth()
public final int getX()
public final int getY()
public final boolean isVisible()
public void move(int dx, int dy)
dx
- Distance to move along horizontal axis (positive to the right, negative to the left)dy
- Distance to move along vertical axis (positive down, negative up)public abstract void paint(Graphics g)
Implementations of this method are responsible for checking if this Layer is visible; this method does nothing if the Layer is not visible.
Implementations of this method may modify the origin and clip region of the Graphics object in order to render the layer. However, they may not expand the clip region, and both the clip region and origin translation MUST be restored to their original values before this method returns. Also, implementations should not make any assumptions regarding the state of the Graphics object (drawing color, font, line style, etc.).
g
- Graphics object for rendering the Layer
java.lang.NullPointerException
- if g is nullpublic void setPosition(int x, int y)
x
- The horizontal positiony
- The vertical positionpublic void setVisible(boolean visible)
visible
- True to make the Layer visible, false to make it invisible
|
BenQ Mobile |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner. All Rights Reserved. BenQ Corp. is a trademark licensee of Siemens AG. |
For further information about Mobility Toolkit (MTK) visit our Developer Portal. |