|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--waba.fx.Graphics
Graphics draws on a surface.
Since SuperWaba 2.0: now the Graphics class is much more improved, with lots of new methods. It also supports Grayscale in all Palm OS operating system versions. In grayscale mode, color can be from 0 to 3, where 0 = no color and 3 = darker color.
Surfaces are objects that implement the ISurface interface. MainWindow and Image are both examples of surfaces.
Here is an example that uses Graphics to draw a line:
public class MyProgram extends MainWindow { public void onPaint(Graphics g) { g.setForeColor(new Color(0, 0, 255)); g.drawLine(0, 0, 10, 10); g.setBackColor(new Color(255,0,255)); g.fillCircle(50,50,20); ...
Color
Field Summary | |
static byte |
ARROW_DOWN
used in the drawArrow method |
static byte |
ARROW_LEFT
used in the drawArrow method |
static byte |
ARROW_RIGHT
used in the drawArrow method |
static byte |
ARROW_UP
used in the drawArrow method |
protected static int[] |
currentPalette
|
static int |
DRAW_ERASE
The constant for a draw operation where the destination is cleared where source pixels are off (AND mode). |
static int |
DRAW_INVERT
The constant for a draw operation where the destination is inverted where source pixels are on (XOR mode). |
static int |
DRAW_MASK
The constant for a draw operation where the destination is cleared where source pixels are on (AND NOT mode). |
static int |
DRAW_OVERLAY
The constant for a draw operation where the destination set only where source pixels are on (OR mode). |
static int |
DRAW_PAINT
The constant for a draw operation where the destination is replaced with source pixels (copy mode). |
static int |
DRAW_PAINT_INVERSE
The constant for a draw operation where the destination is replaced with inverted source (copy NOT mode). |
static int |
DRAW_REPLACE_COLOR
The constant for a draw operation where the destination is replaced with foreground color if source pixels different of background color. |
static int |
DRAW_SPRITE
The constant for a draw operation where the destination is replaced if source pixels ! |
static int |
DRAW_SWAP_COLORS
The constant for a draw operation where the foreground color is swaped with the background color. |
protected int |
drawOp
|
Font |
lastFont
|
static byte |
R3D_CHECK
used in the draw3dRect method |
static byte |
R3D_EDIT
used in the draw3dRect method |
static byte |
R3D_LOWERED
used in the draw3dRect method |
static byte |
R3D_RAISED
used in the draw3dRect method |
static byte |
R3D_SHADED
used in the draw3dRect method. |
protected static Palette |
ScreenPalette
|
protected ISurface |
surface
|
Constructor Summary | |
Graphics(ISurface surface)
Constructs a graphics object which can be used to draw on the given surface. |
Method Summary | |
protected static void |
_applyPalette(int[] palrgb,
int startIndex,
int endIndex)
|
static void |
applyPalette(Palette pal,
int startIndex,
int endIndex)
apply the palette. since theres only one applied palette at any time, this method is static. |
void |
clearClip()
Clears the current clipping rectangle. |
void |
clearScreen()
Clears the screen bounded by this graphics object using the background color as the clear color. |
boolean |
clip(Rect r)
Clips the specified rectangle to the clipping bounds. |
boolean |
collisionDetect(ISurface surface,
int x1,
int y1,
Image img,
int x2,
int y2)
Tests if a surface collides with an image. |
static void |
compute3dColors(boolean enabled,
Color backColor,
Color foreColor,
Color[] fourColors)
Prior to use draw3dRect, you must compute the colors. |
void |
copyImageRect(Image image,
int x,
int y,
int width,
int height,
int drawOp,
Color backColor,
boolean doClip)
|
void |
copyRect(ISurface surface,
int x,
int y,
int width,
int height,
int dstX,
int dstY)
Copies a rectangular area from a surface to the given coordinates on the current surface. |
void |
copyScreen(ISurface src,
int ySrc,
int yDst,
int height)
Copies the given surface to this surface. |
void |
draw3dRect(int x,
int y,
int width,
int height,
byte type,
boolean yMirror,
boolean simple,
Color[] fourColors)
draws a 3d rect, defined by the R3D_xxx constants. |
void |
drawArc(int xc,
int yc,
int r,
float startAngle,
float endAngle)
Draws an arc, using the current foreground color as the outline color. |
void |
drawArrow(int x,
int y,
int h,
byte type,
boolean pressed,
boolean enabled,
Color fore)
Draws an arrow. use the ARROW_xxx type. h is the height (or width, if left/right arrows) in pixels. 1st line has 1 pixel, 2nd line has 3, 3rd line has 5, etc. h must be >= 2 or no arrow is drawn. |
void |
drawCircle(int xc,
int yc,
int r)
Draws a circle, using the current foreground color as the outline color. |
void |
drawCursor(int x,
int y,
int w,
int h)
Draws a rectangle using the xor operation. |
void |
drawCursorOutline(int x,
int y,
int w,
int h)
Draws a rectangle outline using the xor operation. |
void |
drawDots(int Ax,
int Ay,
int Bx,
int By)
Draws a dotted line in any direction, using the current foreground color as the 1st, 3rd, ... pixels and the background color as the 2nd, 4th, ... pixels. |
void |
drawDottedRect(int x,
int y,
int w,
int h)
Draws a dotted rectangle, using the current foreground color as the 1st, 3rd, ... pixels and the background color as the 2nd, 4th, ... pixels. |
void |
drawEllipse(int xc,
int yc,
int rx,
int ry)
Draws an Ellipse, using the current foreground color as the outline color. |
void |
drawEllipticalArc(int xc,
int yc,
int rx,
int ry,
float startAngle,
float endAngle)
Draws an elliptical arc, using the current foreground color as the outline color. |
void |
drawEllipticalPie(int xc,
int yc,
int rx,
int ry,
float startAngle,
float endAngle)
Draws an elliptical pie slice, using the current foreground color as the outline color. |
void |
drawHatchedRect(int x,
int y,
int width,
int height,
boolean top,
boolean bottom)
Draws a rectangle with hatched corners, using the current foreground color as the outline color. |
void |
drawHighLightFrame(int x,
int y,
int w,
int h,
Color topLeft,
Color bottomRight,
boolean yMirror)
used to draw the topleft lines of a rect with one color and the bottomright with another color. if yMirror, draws the borders mirrowed. |
void |
drawImage(Image image,
int x,
int y)
Draws an image at the given x and y coordinates. |
void |
drawImage(Image image,
int x,
int y,
int drawOp,
Color backColor,
boolean doClip)
Draws the image in the given position with the given draw operation and back color. |
void |
drawLine(int Ax,
int Ay,
int Bx,
int By)
Draws a line at any direction, using the current foreground color as the line color. |
void |
drawPie(int xc,
int yc,
int r,
float startAngle,
float endAngle)
Draws a pie slice, using the current foreground color as the outline color. |
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Draws a polygon, using the current foreground color as the outline color. |
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
Draws a sequence of connected lines, using the current foreground color as the outline color. |
void |
drawRect(int x,
int y,
int w,
int h)
Draws a rectangle, using the current foreground color as the outline color. |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int r)
Draws a rectangle with rounded corners, using the current foreground color as the outline color. |
void |
drawText(char[] chars,
int start,
int count,
int x,
int y)
Draws a text with the current font and the current foregrount color. |
void |
drawText(String text,
int x,
int y)
Draws a text with the current font and the current foregrount color. |
void |
eraseRect(int x,
int y,
int w,
int h)
Changes all the pixels with the current foreground color to the current background color |
void |
fillCircle(int xc,
int yc,
int r)
Fills a circle, using the current background color as the fill color. |
void |
fillEllipse(int xc,
int yc,
int rx,
int ry)
Fills an Ellipse, using the current background color as the fill color. |
void |
fillEllipticalPie(int xc,
int yc,
int rx,
int ry,
float startAngle,
float endAngle)
Fills an elliptical pie slice, using the current background color as the fill color and the current foreground color as the outline color. |
void |
fillHatchedRect(int x,
int y,
int width,
int height,
boolean top,
boolean bottom)
Fills a rectangle with hatched corners, using the current background color as the fill color. |
void |
fillPie(int xc,
int yc,
int r,
float startAngle,
float endAngle)
Fills a pie slice, using the current background color as the fill color and the current foreground color as the outline color. |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Fills a polygon, using the current background color as the fill color. |
void |
fillRect(int x,
int y,
int w,
int h)
Fills a rectangle, using the current background color as the outline and fill colors. |
void |
fillRoundRect(int x,
int y,
int width,
int height,
int r)
Fills a rectangle with rounded corners, using the current background color as the fill color. |
void |
free()
Frees any system resources (native device contexts) associated with the graphics object. |
Coord |
getAnglePoint(int xc,
int yc,
int rx,
int ry,
float angle)
Gets the coordinates where the specified point lies. |
Rect |
getClip(Rect r)
Gets the current clipping rectangle. |
Font |
getFont()
Returns the last font set with setFont |
int |
getPixel(int x,
int y)
Gets the pixel color index at given position |
Coord |
getTranslation()
Returns the current translation from the origin for this Graphics object |
void |
setBackColor(Color c)
Sets the current color for background and 2nd color operations. |
void |
setBackColor(int r,
int g,
int b)
Sets the current color for background and 2nd color operations. |
void |
setClip(int x,
int y,
int w,
int h)
Sets the clipping rectangle, translated to the current translated origin. |
void |
setClip(Rect r)
Sets the clipping rectangle, translated to the current translated origin. |
void |
setColor(int r,
int g,
int b)
Deprecated. Use setForeColor and setBackColor instead. |
void |
setColors(Color c)
Sets the current color as the foreground and background colors. |
void |
setDrawOp(int drawOp)
Sets the drawing operation. |
void |
setFont(Font font)
Sets the current font for operations that draw text. |
void |
setForeColor(Color c)
Sets the current color for border and drawing operations. |
void |
setForeColor(int r,
int g,
int b)
Sets the current color for border and drawing operations. |
void |
setPixel(int x,
int y)
Sets the pixel at the specified position, using the current foreground color as the pixel color. |
String |
toString()
Returns the string representation of the object, that is full_class_name@internal_address_hex. |
void |
translate(int dx,
int dy)
Translates the origin of the of the current coordinate system by the given dx and dy. |
void |
translateTo(int x,
int y)
Sets the origin of the current coordinate system to x and y. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
wait,
wait |
Field Detail |
public Font lastFont
protected int drawOp
protected ISurface surface
public static final byte R3D_EDIT
public static final byte R3D_LOWERED
public static final byte R3D_RAISED
public static final byte R3D_CHECK
public static final byte R3D_SHADED
public static final byte ARROW_UP
public static final byte ARROW_DOWN
public static final byte ARROW_LEFT
public static final byte ARROW_RIGHT
public static final int DRAW_PAINT
public static final int DRAW_ERASE
public static final int DRAW_MASK
public static final int DRAW_INVERT
public static final int DRAW_OVERLAY
public static final int DRAW_PAINT_INVERSE
public static final int DRAW_SPRITE
public static final int DRAW_REPLACE_COLOR
public static final int DRAW_SWAP_COLORS
protected static int[] currentPalette
protected static Palette ScreenPalette
Constructor Detail |
public Graphics(ISurface surface)
If you are trying to create a graphics object for drawing in a subclass of control, use the createGraphics() method in the Control class. It creates a graphics object and translated the origin to the origin of the control.
Method Detail |
public void drawEllipse(int xc, int yc, int rx, int ry)
xc
- x coordinate of the center of the ellipseyc
- y coordinate of the center of the ellipserx
- radix x of the ellipsery
- radix y of the ellipsepublic void fillEllipse(int xc, int yc, int rx, int ry)
xc
- x coordinate of the center of the ellipseyc
- y coordinate of the center of the ellipserx
- radix x of the ellipsery
- radix y of the ellipsepublic void drawArc(int xc, int yc, int r, float startAngle, float endAngle)
xc
- x coordinate of the center of the circle that contains the arc.yc
- y coordinate of the center of the circle that contains the arc.r
- radix of the circle that contains the arcstartAngle
- starting angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.endAngle
- ending angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.public void drawPie(int xc, int yc, int r, float startAngle, float endAngle)
xc
- x coordinate of the center of the circle that contains the arc.yc
- y coordinate of the center of the circle that contains the arc.r
- radix of the circle that contains the piestartAngle
- starting angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.endAngle
- ending angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.public void fillPie(int xc, int yc, int r, float startAngle, float endAngle)
xc
- x coordinate of the center of the circle that contains the arc.yc
- y coordinate of the center of the circle that contains the arc.r
- radix of the circle that contains the piestartAngle
- starting angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.endAngle
- ending angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.public void drawEllipticalArc(int xc, int yc, int rx, int ry, float startAngle, float endAngle)
xc
- x coordinate of the center of the circle that contains the arc.yc
- y coordinate of the center of the circle that contains the arc.rx
- x radix of the circle that contains the piery
- y radix of the circle that contains the piestartAngle
- starting angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.endAngle
- ending angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.public void drawEllipticalPie(int xc, int yc, int rx, int ry, float startAngle, float endAngle)
xc
- x coordinate of the center of the circle that contains the arc.yc
- y coordinate of the center of the circle that contains the arc.rx
- x radix of the circle that contains the piery
- y radix of the circle that contains the piestartAngle
- starting angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.endAngle
- ending angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.public void fillEllipticalPie(int xc, int yc, int rx, int ry, float startAngle, float endAngle)
xc
- x coordinate of the center of the circle that contains the arc.yc
- y coordinate of the center of the circle that contains the arc.rx
- x radix of the circle that contains the piery
- y radix of the circle that contains the piestartAngle
- starting angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.endAngle
- ending angle of the arc. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.public void drawCircle(int xc, int yc, int r)
xc
- x coordinate of the center of the circleyc
- y coordinate of the center of the circler
- radix of the circlepublic void fillCircle(int xc, int yc, int r)
xc
- x coordinate of the center of the circleyc
- y coordinate of the center of the circler
- radix of the circlepublic int getPixel(int x, int y)
x
- x coordinate of the pixely
- y coordinate of the pixelPalette.getColor(g.getPixel(x,y))
for color devices,
and (Settings.maxColor-1-g.getPixel(x,y)) for gray scale devices.
Note that if the pixel is from an image, you must use the image's palette like here:
img.getPalette().getColor(g.getPixel(x,y))
(be sure to read Image.getPalette docs).public void setPixel(int x, int y)
x
- x coordinate of the pixely
- y coordinate of the pixelpublic void eraseRect(int x, int y, int w, int h)
public void drawLine(int Ax, int Ay, int Bx, int By)
Ax
- x coordinate of the start of the line.Ay
- y coordinate of the start of the line.Bx
- x coordinate of the end of the line.By
- y coordinate of the end of the line.public void clearScreen()
public void drawDots(int Ax, int Ay, int Bx, int By)
Ax
- x coordinate of the start of the line.Ay
- y coordinate of the start of the line.Bx
- x coordinate of the end of the line.By
- y coordinate of the end of the line.public void drawCursor(int x, int y, int w, int h)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is drawn from x to x+w-1.h
- height of the rectangle. the rectangle is drawn from y to y+h-1.public void drawCursorOutline(int x, int y, int w, int h)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is drawn from x to x+w-1.h
- height of the rectangle. the rectangle is drawn from y to y+h-1.public void drawRect(int x, int y, int w, int h)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is drawn from x to x+w-1.h
- height of the rectangle. the rectangle is drawn from y to y+h-1.public void fillRect(int x, int y, int w, int h)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is filled from x to x+w-1.h
- height of the rectangle. the rectangle is filled from y to y+h-1.public void drawDottedRect(int x, int y, int w, int h)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is drawed from x to x+w-1.h
- height of the rectangle. the rectangle is drawed from y to y+h-1.public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
xPoints
- the array with the x coordinate pointsyPoints
- the array with the y coordinate pointsnPoints
- the total number of point to be drawn.public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
xPoints
- the array with the x coordinate pointsyPoints
- the array with the y coordinate pointsnPoints
- the total number of point to be drawn.public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
xPoints
- the array with the x coordinate pointsyPoints
- the array with the y coordinate pointsnPoints
- the total number of point to be drawn.public Coord getAnglePoint(int xc, int yc, int rx, int ry, float angle)
xc
- x coordinate of the center of the circleyc
- y coordinate of the center of the circlerx
- x radix of the circle that contains the pointry
- y radix of the circle that contains the pointangle
- angle of the point. It must be between 0 and 360 (degrees). 0º is at 3 o'clock.Coord
public void drawText(char[] chars, int start, int count, int x, int y)
chars
- the character array to displaystart
- the start position in arraycount
- the number of characters to displayx
- the left coordinate of the text's bounding boxy
- the top coordinate of the text's bounding boxpublic void drawText(String text, int x, int y)
text
- the text to be drawnx
- x coordinate of the texty
- y coordinate of the textpublic void drawRoundRect(int x, int y, int width, int height, int r)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is drawn from x to x+w-1.h
- height of the rectangle. the rectangle is drawn from y to y+h-1.r
- radix of the circle at the corners. If its greater than width/2 or greater than height/2, it will be adjusted to the minimum of both values.public void fillRoundRect(int x, int y, int width, int height, int r)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is filled from x to x+w-1.h
- height of the rectangle. the rectangle is filled from y to y+h-1.r
- radix of the circle at the corners. If its greater than width/2 or greater than height/2, it will be adjusted to the minimum of both values.public void setClip(int x, int y, int w, int h)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is filled from x to x+w-1.h
- height of the rectangle. the rectangle is filled from y to y+h-1.public void setClip(Rect r)
r
- the rectangle with the clipping coordinatespublic Rect getClip(Rect r)
r
- a Rect object where the clip coordinates will be stored and returned.public boolean clip(Rect r)
r
- The coordinates of the rectangle that are to be adjusted to match the clipping bounds.public void clearClip()
public void translate(int dx, int dy)
dx
- the delta x of the x coordinate translation. the new x origin coordinate will be x + dxdy
- the delta y of the y coordinate translation. the new y origin coordinate will be y + dypublic void copyRect(ISurface surface, int x, int y, int width, int height, int dstX, int dstY)
Not all combinations of surfaces are supported on all platforms. Java doesn't allow copying from an Window surface to an Image.
If the bitmap surface being transferred has the width of the screen and starts at x=0, the drawing occurs almost instantaneously.
surface
- the surface to copy fromx
- the source x coordinatey
- the source y coordinatewidth
- the width of the area on the source surfaceheight
- the height of the area on the source surfacedstX
- the destination x location on the current surfacedstY
- the destination y location on the current surfacesetDrawOp(int)
public void free()
public void setColor(int r, int g, int b)
public void setForeColor(Color c)
c
- the Color object with the r,g,b valuespublic void setBackColor(Color c)
c
- the Color object with the r,g,b valuespublic void setForeColor(int r, int g, int b)
r
- the red value (0..255)g
- the green value (0..255)b
- the blue value (0..255)public void setBackColor(int r, int g, int b)
r
- the red value (0..255)g
- the green value (0..255)b
- the blue value (0..255)public void setFont(Font font)
public boolean collisionDetect(ISurface surface, int x1, int y1, Image img, int x2, int y2)
surface
- one image or Window to test for collisionx1
- the left position where this image is "drawn"y1
- the top position where this Image is "drawn"img2
- the other image to test for collisionx2
- the left position where the other image is "drawn"y2
- the top position where the other Image is "drawn"public Coord getTranslation()
public static void applyPalette(Palette pal, int startIndex, int endIndex)
public void drawHatchedRect(int x, int y, int width, int height, boolean top, boolean bottom)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is drawn from x to x+w-1.h
- height of the rectangle. the rectangle is drawn from y to y+h-1.top
- true if the top corners will be hatchedbottom
- true if the bottom corners will be hatchedpublic void fillHatchedRect(int x, int y, int width, int height, boolean top, boolean bottom)
x
- left coordinate of the rectangley
- top coordinate of the rectanglew
- width of the rectangle. the rectangle is drawn from x to x+w-1.h
- height of the rectangle. the rectangle is drawn from y to y+h-1.top
- true if the top corners will be hatchedbottom
- true if the bottom corners will be hatchedpublic void drawHighLightFrame(int x, int y, int w, int h, Color topLeft, Color bottomRight, boolean yMirror)
public void translateTo(int x, int y)
dx
- the delta x of the x coordinate translation. the new x origin coordinate will be x + dxdy
- the delta y of the y coordinate translation. the new y origin coordinate will be y + dypublic void drawImage(Image image, int x, int y, int drawOp, Color backColor, boolean doClip)
public void copyImageRect(Image image, int x, int y, int width, int height, int drawOp, Color backColor, boolean doClip)
public void copyScreen(ISurface src, int ySrc, int yDst, int height)
0, ySrc, Settings.screenWidth, height
to 0, yDst, Settings.screenWidth, height
.
The draw operation will be DRAW_PAINT
.public void drawImage(Image image, int x, int y)
copyRect(waba.fx.ISurface, int, int, int, int, int, int)
public void setColors(Color c)
c
- the Color object with the r,g,b valuespublic void setDrawOp(int drawOp)
Not all operations are supported on all platforms. When used with Java, DRAW_OVER is supported for all types of drawing and DRAW_XOR is supported for drawing lines, rectangles, text and images. However, DRAW_XOR is not supported when copying surface areas and the DRAW_AND and DRAW_OR operations aren't supported at all under Java.
PalmOS platforms supports all the drawing operations when drawing images and copying surface regions. However, only the DRAW_OVER operation is supported when drawing lines, rectangles and text. If you need to use the XOR drawing operation for drawing lines under PalmOS, you can draw the line into an image and then draw the image with an XOR drawing operation.
Win32 and Windows CE platforms support all the drawing operations except when drawing text. Only DRAW_OVER is supported when drawing text. If you need to draw XOR'ed text, you can draw the text into an image and then draw the image with an XOR draw operation.
When calculating the result of XOR, AND and OR drawing, the value of the color black is all 1's (fully set) in binary and white is all 0's (fully unset).
op
- drawing operationDRAW_PAINT
,
DRAW_ERASE
,
DRAW_MASK
,
DRAW_INVERT
,
DRAW_OVERLAY
,
DRAW_PAINT_INVERSE
,
DRAW_SPRITE
,
DRAW_REPLACE_COLOR
,
DRAW_SWAP_COLORS
public Font getFont()
public static void compute3dColors(boolean enabled, Color backColor, Color foreColor, Color[] fourColors)
public void draw3dRect(int x, int y, int width, int height, byte type, boolean yMirror, boolean simple, Color[] fourColors)
public String toString()
public void drawArrow(int x, int y, int h, byte type, boolean pressed, boolean enabled, Color fore)
Example:
public void onPaint(Graphics g) { g.drawArrow(30,30,8, g.ARROW_LEFT, false,true, Color.BLACK ); ...
protected static void _applyPalette(int[] palrgb, int startIndex, int endIndex)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |