|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines drawing operations performed on a native UI element.
Method Summary | |
void |
drawRect(int x,
int y,
int width,
int height)
Draws the outline of the specified rectangle. |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Draws an outlined round-cornered rectangle using the color of a current Pen object. |
void |
fillRect(int x,
int y,
int width,
int height)
Fills the specified rectangle. |
java.awt.Color |
getColor()
Returns the current color. |
Pen |
getPen()
Returns a Pen object for the current object. |
void |
setColor(java.awt.Color color)
Sets the current color to the specified color. |
void |
setPen(Pen pen)
Sets a Pen object for the current object. |
Method Detail |
public void setPen(Pen pen)
Pen
object for the current object.
pen
- a Pen
object for the current objectpublic Pen getPen()
public void setColor(java.awt.Color color)
color
- the specified colorpublic java.awt.Color getColor()
public void drawRect(int x, int y, int width, int height)
Pen
object.
x
- the x coordinate of the rectangle to be drawny
- the y coordinate of the rectangle to be drawnwidth
- the width of the rectangle to be drawnheight
- the height of the rectangle to be drawnpublic void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Pen
object.
The left and right edges of the rectangle are at x and x + width, respectively.
The top and bottom edges of the rectangle are at y and y + height.
x
- the x coordinate of the rectangle to be drawny
- the y coordinate of the rectangle to be drawnwidth
- the width of the rectangle to be drawnheight
- the height of the rectangle to be drawnarcWidth
- the horizontal diameter of the arc at the four cornersarcHeight
- the vertical diameter of the arc at the four cornerspublic void fillRect(int x, int y, int width, int height)
x
- the x coordinate of the rectangle to be filledy
- the y coordinate of the rectangle to be filledwidth
- the width of the rectangle to be filledheight
- the height of the rectangle to be filled
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |