|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--brf.j2me.dynaworks.env.kjava.KJavaGraphics
The KJavaGraphics class implements the Graphics interface for Palms.
Graphics| Field Summary | |
private int[] |
modes
|
| Fields inherited from interface brf.j2me.dynaworks.env.Graphics |
AND, AND_NOT, BUFFER, ERASE, GRAY, INVERT, NOT, OR, OVERWRITE, PLAIN, RAISED, SCREEN, SIMPLE, XOR |
| Constructor Summary | |
KJavaGraphics()
|
|
| Method Summary | |
void |
bitBlt(int sx,
int sy,
int w,
int h,
int tx,
int ty,
int mode)
bitblt areas on the screen. |
void |
bitBlt(int sx,
int sy,
int w,
int h,
int tx,
int ty,
int mode,
int from,
int to)
bitblt areas between canvases. |
void |
clearScreen()
clear screen. |
void |
dispose()
drop the graphics object. |
void |
drawBitmap(int x,
int y,
Bitmap icon)
draw a bitmap. |
void |
drawBorder(int x,
int y,
int w,
int h,
int mode,
int width,
int round)
draw a border (outlined area with rounded corners). |
void |
drawLine(int x,
int y,
int xx,
int yy,
int mode)
draw a line between two points. |
void |
drawRectangle(int x,
int y,
int w,
int h,
int mode,
int round)
draw a rectangle (solid area with rounded corners). |
int |
drawString(java.lang.String text,
int x,
int y)
draw a text in plain mode. |
int |
drawString(java.lang.String text,
int x,
int y,
int mode)
draw a text in a specified mode. |
int |
getHeight()
get height of canvas. |
int |
getStringHeight(java.lang.String s)
Get the display height of a string in pixels. |
int |
getStringWidth(java.lang.String s)
Get the display width of a string in pixels. |
int |
getWidth()
get width of canvas. |
private com.sun.kjava.Bitmap |
prepare(Bitmap bm)
|
void |
resetDrawRegion()
reset a clipping region for drawing. |
void |
setDrawRegion(int x,
int y,
int w,
int h)
set a clipping region for drawing. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private final int[] modes
| Constructor Detail |
public KJavaGraphics()
| Method Detail |
public int getWidth()
getWidth in interface Graphicspublic int getHeight()
getHeight in interface Graphicspublic void clearScreen()
GraphicsclearScreen in interface Graphics
public void setDrawRegion(int x,
int y,
int w,
int h)
GraphicssetDrawRegion in interface Graphicsbrf.j2me.dynaworks.env.Graphicsx - int - x-ccordinate of upper left corner.y - int - y-coordinate of upper left corner.w - int - width in pixel (positive to right)h - int - height in pixel (positive to bottom)public void resetDrawRegion()
GraphicsresetDrawRegion in interface Graphicspublic int getStringWidth(java.lang.String s)
GraphicsgetStringWidth in interface Graphicsbrf.j2me.dynaworks.env.Graphicss - String - string content to be checked.public int getStringHeight(java.lang.String s)
GraphicsgetStringHeight in interface Graphicsbrf.j2me.dynaworks.env.Graphicss - String - string content to be checked.
public int drawString(java.lang.String text,
int x,
int y,
int mode)
GraphicsdrawString in interface Graphicsbrf.j2me.dynaworks.env.Graphicss - String - string to be displayed.x - int - x-ccordinate of upper left corner.y - int - y-coordinate of upper left corner.mode - int - drawing mode.
public int drawString(java.lang.String text,
int x,
int y)
GraphicsdrawString in interface Graphicsbrf.j2me.dynaworks.env.Graphicss - String - string to be displayed.x - int - x-ccordinate of upper left corner.y - int - y-coordinate of upper left corner.
public void drawBorder(int x,
int y,
int w,
int h,
int mode,
int width,
int round)
GraphicsdrawBorder in interface Graphicsbrf.j2me.dynaworks.env.Graphicsx - int - x-ccordinate of upper left corner.y - int - y-coordinate of upper left corner.w - int - width in pixel (positive to right)h - int - height in pixel (positive to bottom)mode - int - drawing mode.thick - int - thickness of border.round - int - diameter of rounded corners.
public void drawRectangle(int x,
int y,
int w,
int h,
int mode,
int round)
GraphicsdrawRectangle in interface Graphicsbrf.j2me.dynaworks.env.Graphicsx - int - x-ccordinate of upper left corner.y - int - y-coordinate of upper left corner.w - int - width in pixel (positive to right)h - int - height in pixel (positive to bottom)mode - int - drawing mode.round - int - diameter of rounded corners.
public void drawBitmap(int x,
int y,
Bitmap icon)
GraphicsdrawBitmap in interface Graphicsbrf.j2me.dynaworks.env.Graphicsx - int - x-ccordinate of upper left corner.y - int - y-coordinate of upper left corner.icon - Bitmap - bitmap to be displayed.
public void drawLine(int x,
int y,
int xx,
int yy,
int mode)
GraphicsdrawLine in interface Graphicsbrf.j2me.dynaworks.env.Graphicsx - int - x-ccordinate of first endpoint.y - int - y-coordinate of first endpoint.xx - int - x-ccordinate of second endpoint.yy - int - y-coordinate of second endpoint.mode - int - drawing mode.
public void bitBlt(int sx,
int sy,
int w,
int h,
int tx,
int ty,
int mode)
GraphicsbitBlt in interface Graphicsbrf.j2me.dynaworks.env.Graphicssx - int - x-ccordinate of upper left corner of source area.sy - int - y-coordinate of upper left corner of source area.w - int - width in pixel (positive to right) of source areah - int - height in pixel (positive to bottom) of source areatx - int - x-ccordinate of upper left corner of target area.ty - int - y-coordinate of upper left corner of target area.mode - int - bitblt mode.
public void bitBlt(int sx,
int sy,
int w,
int h,
int tx,
int ty,
int mode,
int from,
int to)
GraphicsbitBlt in interface Graphicsbrf.j2me.dynaworks.env.Graphicssx - int - x-ccordinate of upper left corner of source area.sy - int - y-coordinate of upper left corner of source area.w - int - width in pixel (positive to right) of source areah - int - height in pixel (positive to bottom) of source areatx - int - x-ccordinate of upper left corner of target area.ty - int - y-coordinate of upper left corner of target area.mode - int - bitblt mode.from - int - ID of source canvasto - int - ID of target canvaspublic void dispose()
dispose in interface Graphicsprivate com.sun.kjava.Bitmap prepare(Bitmap bm)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||