|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.visuals.BufferedGraphics
public class BufferedGraphics
The BufferedGraphics class extends java.awt.Graphics in order to simplify drawing routines and size calculations as well as allow the use of Rectangle instead of x, y, width, height parameters. The BufferedGraphics class can also be used to handle double buffering. When double buffering, create the BufferedGraphics with doublebuffering enabled and perform all painting between public void beginPaint(Component component, Graphics g) and public void endPaint(). The BufferedGraphics can be used anywhere java.awt.Graphics is used.
Field Summary | |
---|---|
protected boolean |
_doubleBuffer
The state of double buffering |
protected java.awt.Graphics |
_graphics
The Graphics object that receives all paint operations on this object |
protected java.awt.Image |
_image
The image representation of what is drawn. |
protected java.awt.Dimension |
_size
The size of the Graphics |
Constructor Summary | |
---|---|
BufferedGraphics()
Create the default BufferedGraphics. |
|
BufferedGraphics(java.awt.Graphics g)
Create an BufferedGraphics | |
BufferedGraphics(java.awt.Graphics g,
boolean doubleBuffer)
Creates an BufferedGraphics with the desired double buffer state |
Method Summary | |
---|---|
void |
beginPaint(java.awt.Component component,
java.awt.Graphics g)
Signals the BufferedGraphics that painting operations will start |
void |
beginPaint(java.awt.Component component,
java.awt.Graphics g,
java.awt.Dimension size)
Signals the BufferedGraphics that painting operations will start |
void |
clearRect(int x,
int y,
int width,
int height)
Identical to java.awt.Graphics functionality |
void |
clearRect(java.awt.Rectangle rectangle)
Clear the specified rectangle |
void |
clipRect(int x,
int y,
int width,
int height)
Identical to java.awt.Graphics functionality |
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
Identical to java.awt.Graphics functionality |
java.awt.Graphics |
create()
Identical to java.awt.Graphics functionality |
java.awt.Graphics |
create(int x,
int y,
int width,
int height)
Identical to java.awt.Graphics functionality |
protected java.awt.Graphics |
createDoubleBuffer(java.awt.Component component,
java.awt.Graphics g,
java.awt.Dimension size)
Create an image used for double buffering |
void |
dispose()
Identical to java.awt.Graphics functionality |
void |
draw3DRect(int x,
int y,
int width,
int height,
boolean raised)
Identical to java.awt.Graphics functionality |
void |
draw3DRect(java.awt.Rectangle rectangle,
boolean raised)
Draw a 3-D rectangle |
void |
draw3DRoundRect(java.awt.Rectangle rectangle,
int arcWidth,
int arcHeight,
int style)
Draw a 3-D rectangle with rounded corners |
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Identical to java.awt.Graphics functionality |
void |
drawArc(java.awt.Rectangle rectangle,
int startAngle,
int arcAngle)
Draw an arc |
void |
drawBasicBorderRect(int x,
int y,
int width,
int height,
java.awt.Color c,
java.awt.Color topLeft,
java.awt.Color bottomRight)
Draw a Windows95 basic window border |
void |
drawBasicBorderRect(int x,
int y,
int width,
int height,
int style)
Draw a Windows95 basic window border |
void |
drawBasicBorderRect(java.awt.Rectangle rectangle,
int style)
Draw a Windows95 basic window border |
void |
drawBasicButtonBorderRect(int x,
int y,
int width,
int height,
int style)
Draw a Windows95 basic button border |
void |
drawBasicButtonBorderRect(java.awt.Rectangle rectangle,
int style)
Draw a basic Windows95 button border |
void |
drawButtonBorderRect(int x,
int y,
int width,
int height,
int style)
Draw a Windows95 basic button border |
void |
drawButtonBorderRect(java.awt.Rectangle rectangle,
int style)
Draw a Windows95 push button border |
void |
drawBytes(byte[] data,
int offset,
int length,
int x,
int y)
Identical to java.awt.Graphics functionality |
void |
drawChars(char[] data,
int offset,
int length,
int x,
int y)
Identical to java.awt.Graphics functionality |
void |
drawColoredBorderRect(int x,
int y,
int width,
int height,
int style,
java.awt.Color c)
Draw a colored border |
void |
drawColoredBorderRect(java.awt.Rectangle rectangle,
int style,
java.awt.Color c)
Draw a colored border |
boolean |
drawDisabledImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
Draw an image with a disabled appearance |
void |
drawDisabledString(java.awt.Graphics g,
java.lang.String str,
int x,
int y,
int drawStringMask,
java.awt.Color opaque)
Draw a String with a disabled appearance |
void |
drawDisabledString(java.lang.String[] text,
int x,
int y,
int drawStringMask)
Draw a vector of Strings with a disabled appearance |
void |
drawDisabledString(java.lang.String[] text,
int x,
int y,
int drawStringMask,
java.awt.Color opaque)
Draw a vector of Strings with a disabled appearance |
void |
drawDisabledString(java.lang.String text,
int x,
int y)
Draw a String with a disabled appearance |
void |
drawDisabledString(java.lang.String text,
int x,
int y,
int drawStringMask)
Draw a vector of Strings with a disabled appearance |
void |
drawDottedLine(int x1,
int y1,
int x2,
int y2)
Draws a dotted line between two points |
void |
drawDottedLine(java.awt.Point point1,
java.awt.Point point2)
Draws a dotted line between two points |
void |
drawDottedRect(int x,
int y,
int width,
int height)
|
void |
drawDottedRect(java.awt.Rectangle rectangle)
Draw a dotted line rectangle |
void |
drawFieldBorderRect(int x,
int y,
int width,
int height)
Draw a Windows95 field border |
void |
drawFieldBorderRect(java.awt.Rectangle rectangle)
Draw a Windows95 field border |
void |
drawFocusRect(int x,
int y,
int width,
int height)
Draw a Windows95 focus rectangle |
void |
drawFocusRect(java.awt.Rectangle rectangle)
Draw a Windows95 focus rectangle |
void |
drawGroupBorderRect(int x,
int y,
int width,
int height)
Draw a Windows95 grouping border |
void |
drawGroupBorderRect(java.awt.Rectangle rectangle)
Draw a Windows95 grouping border |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Identical to java.awt.Graphics functionality |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
Identical to java.awt.Graphics functionality |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Identical to java.awt.Graphics functionality |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
Identical to java.awt.Graphics functionality |
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Identical to java.awt.Graphics functionality |
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.image.ImageObserver observer)
Identical to java.awt.Graphics functionality |
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Identical to java.awt.Graphics functionality |
void |
drawLine(java.awt.Point point1,
java.awt.Point point2)
Draws a line between two points |
boolean |
drawMixedImage(java.awt.Image img,
int x,
int y,
java.awt.Color c,
java.awt.image.ImageObserver observer)
Draw an image mixed with a specified color |
void |
drawOval(int x,
int y,
int width,
int height)
Identical to java.awt.Graphics functionality |
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Identical to java.awt.Graphics functionality |
void |
drawPolygon(java.awt.Polygon p)
Identical to java.awt.Graphics functionality |
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
Identical to java.awt.Graphics functionality |
void |
drawRect(int x,
int y,
int width,
int height)
Identical to java.awt.Graphics functionality |
void |
drawRect(java.awt.Rectangle rectangle)
Draw the specified rectangle |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Identical to java.awt.Graphics functionality |
void |
drawRoundRect(java.awt.Rectangle rectangle,
int arcWidth,
int arcHeight)
Draw a rectangle with rounded corners |
void |
drawStatusFieldBorderRect(int x,
int y,
int width,
int height)
Draw a Windows95 status field border |
void |
drawStatusFieldBorderRect(java.awt.Rectangle rectangle)
Draw a Windows95 status field border |
void |
drawString(java.text.AttributedCharacterIterator iterator,
int x,
int y)
|
void |
drawString(java.lang.String[] text,
int x,
int y,
int drawStringMask)
Draw a vector of Strings |
void |
drawString(java.lang.String[] text,
int x,
int y,
int drawStringMask,
java.awt.Color opaque)
Draw a vector of Strings |
void |
drawString(java.lang.String str,
int x,
int y)
Identical to java.awt.Graphics functionality |
void |
drawString(java.lang.String text,
int x,
int y,
int drawStringMask)
Draw a String |
void |
drawString(java.lang.String text,
int x,
int y,
int drawStringMask,
java.awt.Color opaque)
Draw a String |
boolean |
drawTransparentImage(java.awt.Image img,
int x,
int y,
java.awt.Color c,
java.awt.image.ImageObserver observer)
|
void |
drawWindowBorderRect(int x,
int y,
int width,
int height)
Draw a Windows95 window border |
void |
drawWindowBorderRect(java.awt.Rectangle rectangle)
Draw a Windows95 window border |
void |
endPaint(java.awt.Component component,
java.awt.Graphics g)
Signals the BufferedGraphics to end painting operations. |
void |
fill3DRect(int x,
int y,
int width,
int height,
boolean raised)
Identical to java.awt.Graphics functionality |
void |
fill3DRect(java.awt.Rectangle rectangle,
boolean raised)
Fill a 3-D rectangle |
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Identical to java.awt.Graphics functionality |
void |
fillArc(java.awt.Rectangle rectangle,
int startAngle,
int arcAngle)
Fill an arc |
void |
fillOval(int x,
int y,
int width,
int height)
Identical to java.awt.Graphics functionality |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Identical to java.awt.Graphics functionality |
void |
fillPolygon(java.awt.Polygon p)
Identical to java.awt.Graphics functionality |
void |
fillRect(int x,
int y,
int width,
int height)
Identical to java.awt.Graphics functionality |
void |
fillRect(java.awt.Rectangle rectangle)
Fill the specified rectangle |
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Identical to java.awt.Graphics functionality |
void |
fillRoundRect(java.awt.Rectangle rectangle,
int arcWidth,
int arcHeight)
Fill a rectangle with rounded corners |
void |
finalize()
Identical to java.awt.Graphics functionality |
java.awt.Shape |
getClip()
Identical to java.awt.Graphics functionality |
java.awt.Rectangle |
getClipBounds()
Identical to java.awt.Graphics functionality |
java.awt.Color |
getColor()
Identical to java.awt.Graphics functionality |
java.awt.Font |
getFont()
Identical to java.awt.Graphics functionality |
java.awt.FontMetrics |
getFontMetrics()
Identical to java.awt.Graphics functionality |
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f)
Identical to java.awt.Graphics functionality |
java.awt.Graphics |
getGraphics()
Get the Graphics used for the graphic operations |
protected java.awt.Image |
getImage()
Get the image representation of what is drawn. |
java.awt.Image |
getImage(java.awt.Component component,
boolean wait)
Get the image representation of what is drawn and optionally waiting until the image is fully loaded. |
java.awt.Dimension |
getImageSize(java.awt.Image image,
java.awt.Component component)
Get the demension of a specified image |
int |
getStringAscent()
Get the ascent of an arbitrary String |
int |
getStringAscent(java.awt.Font font)
Get the ascent of an arbitrary String |
int |
getStringDescent()
Get the descent of an arbitrary String |
int |
getStringDescent(java.awt.Font font)
Get the descent of an arbitrary String |
java.awt.Dimension |
getStringSize(java.lang.String text)
Gets the dimension of a specified String |
java.awt.Dimension |
getStringSize(java.lang.String[] text)
Gets the dimension of a specified array of Strings |
java.awt.Dimension |
getStringSize(java.lang.String[] text,
java.awt.Font font)
Gets the dimension of a specified array of Strings |
java.awt.Dimension |
getStringSize(java.lang.String text,
java.awt.Font font)
Gets the dimension of a specified String |
boolean |
isDoubleBuffered()
Get the double buffer state |
void |
setClip(int x,
int y,
int width,
int height)
Identical to java.awt.Graphics functionality |
void |
setClip(java.awt.Shape clip)
Identical to java.awt.Graphics functionality |
void |
setColor(java.awt.Color c)
Identical to java.awt.Graphics functionality |
void |
setDoubleBuffered(boolean doubleBuffer)
Set the double buffer state. |
void |
setFont(java.awt.Font font)
Identical to java.awt.Graphics functionality |
void |
setPaintMode()
Identical to java.awt.Graphics functionality |
void |
setXORMode(java.awt.Color c1)
Identical to java.awt.Graphics functionality |
java.lang.String |
toString()
Identical to java.awt.Graphics functionality |
void |
translate(int x,
int y)
Identical to java.awt.Graphics functionality |
Field Detail |
---|
protected java.awt.Image _image
protected java.awt.Graphics _graphics
protected java.awt.Dimension _size
protected boolean _doubleBuffer
Constructor Detail |
---|
public BufferedGraphics()
public BufferedGraphics(java.awt.Graphics g)
g
- The Graphics object to be associated with the BufferedGraphics. By
default, double buffering is disabled.public BufferedGraphics(java.awt.Graphics g, boolean doubleBuffer) throws java.lang.NullPointerException
g
- The Graphics object to be associated with the BufferedGraphicsdoubleBuffer
- The double buffer state
java.lang.NullPointerException
Method Detail |
---|
public void setDoubleBuffered(boolean doubleBuffer)
setDoubleBuffered
in interface DoubleBufferInterface
doubleBuffer
- The double buffer statepublic boolean isDoubleBuffered()
isDoubleBuffered
in interface DoubleBufferInterface
public java.awt.Graphics getGraphics()
protected java.awt.Image getImage()
public java.awt.Image getImage(java.awt.Component component, boolean wait)
wait
- Specifies whether to wait until the image is fully loaded
public void beginPaint(java.awt.Component component, java.awt.Graphics g) throws java.lang.NullPointerException
component
- The Component associated with the Graphics objectg
- The Graphics object used to paint
java.lang.NullPointerException
public void beginPaint(java.awt.Component component, java.awt.Graphics g, java.awt.Dimension size) throws java.lang.NullPointerException
component
- The Component associated with the Graphics objectg
- The Graphics object used to paintsize
- The specifed dimension region for the graphics object
java.lang.NullPointerException
public void endPaint(java.awt.Component component, java.awt.Graphics g)
protected java.awt.Graphics createDoubleBuffer(java.awt.Component component, java.awt.Graphics g, java.awt.Dimension size)
size
- The size of the buffer to createpublic void drawDottedLine(int x1, int y1, int x2, int y2)
x1
- the first x coordinatey1
- the first y coordinatex2
- the second x coordinatey2
- the second y coordinatepublic void drawDottedLine(java.awt.Point point1, java.awt.Point point2)
point1
- the first pointpoint2
- the second pointpublic void drawLine(java.awt.Point point1, java.awt.Point point2)
g
- the Graphics to usepoint1
- the first pointpoint2
- the second pointpublic void fillRect(java.awt.Rectangle rectangle)
rectangle
- the rectangle to fillpublic void drawRect(java.awt.Rectangle rectangle)
rectangle
- the rectangle to drawpublic void clearRect(java.awt.Rectangle rectangle)
rectangle
- the rectangle to clearpublic void drawRoundRect(java.awt.Rectangle rectangle, int arcWidth, int arcHeight)
rectangle
- the bounding rectanglearcWidth
- the width of the arcarcHeight
- the height of the arcpublic void fillRoundRect(java.awt.Rectangle rectangle, int arcWidth, int arcHeight)
rectangle
- the bounding rectanglearcWidth
- the width of the arcarcHeight
- the height of the arcpublic void draw3DRoundRect(java.awt.Rectangle rectangle, int arcWidth, int arcHeight, int style)
rectangle
- the bounding rectanglearcWidth
- the width of the arcarcHeight
- the height of the arcstyle
- the border style to usepublic void draw3DRect(java.awt.Rectangle rectangle, boolean raised)
rectangle
- the rectangle to drawrasied
- the state of the rectanglepublic void fill3DRect(java.awt.Rectangle rectangle, boolean raised)
rectangle
- the rectangle to fillrasied
- the state of the rectanglepublic void drawArc(java.awt.Rectangle rectangle, int startAngle, int arcAngle)
rectangle
- the bounding rectanglestartAngle
- the starting anglearcAngle
- the angle to drawpublic void fillArc(java.awt.Rectangle rectangle, int startAngle, int arcAngle)
rectangle
- the bounding rectanglestartAngle
- the starting anglearcAngle
- the angle to fillpublic void drawBasicBorderRect(java.awt.Rectangle rectangle, int style)
rectangle
- the bounding rectanglestyle
- the border style to usepublic void drawBasicBorderRect(int x, int y, int width, int height, int style)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionstyle
- the border style to usepublic void drawColoredBorderRect(java.awt.Rectangle rectangle, int style, java.awt.Color c)
rectangle
- the bounding rectanglestyle
- the border style to usec
- the Color to usepublic void drawColoredBorderRect(int x, int y, int width, int height, int style, java.awt.Color c)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionstyle
- the border style to usec
- the Color to usepublic void drawBasicBorderRect(int x, int y, int width, int height, java.awt.Color c, java.awt.Color topLeft, java.awt.Color bottomRight)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionc
- the background colortopLeft
- the top-left border colorbottomRight
- the bottom-right border colorpublic void drawWindowBorderRect(java.awt.Rectangle rectangle)
rectangle
- the bounding regionpublic void drawWindowBorderRect(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic void drawBasicButtonBorderRect(java.awt.Rectangle rectangle, int style)
rectangle
- the bounding regionstyle
- the border style to usepublic void drawBasicButtonBorderRect(int x, int y, int width, int height, int style)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionstyle
- the border style to usepublic void drawButtonBorderRect(java.awt.Rectangle rectangle, int style)
rectangle
- the bounding regionstyle
- the border style to use (BS_PRESSED, BS_NORMAL, BS_SELECTED)public void drawButtonBorderRect(int x, int y, int width, int height, int style)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionstyle
- the border style to use (BS_PRESSED, BS_NORMAL, BS_SELECTED)public void drawFieldBorderRect(java.awt.Rectangle rectangle)
rectangle
- the bounding rectanglepublic void drawFieldBorderRect(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic void drawStatusFieldBorderRect(java.awt.Rectangle rectangle)
rectangle
- the bounding rectanglepublic void drawStatusFieldBorderRect(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic void drawGroupBorderRect(java.awt.Rectangle rectangle)
rectangle
- the bounding rectanglepublic void drawGroupBorderRect(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic void drawFocusRect(java.awt.Rectangle rectangle)
rectangle
- the bounding rectanglepublic void drawDottedRect(java.awt.Rectangle rectangle)
rectangle
- the bounding rectanglepublic void drawFocusRect(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic void drawDottedRect(int x, int y, int width, int height)
public void drawString(java.lang.String[] text, int x, int y, int drawStringMask)
text
- the array of Strings to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskpublic void drawString(java.lang.String[] text, int x, int y, int drawStringMask, java.awt.Color opaque)
text
- the array of Strings to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskopaque
- the opaque color. This value is ignored unless drawStringMask
contains the DT_OPAQUE maskpublic void drawString(java.lang.String text, int x, int y, int drawStringMask)
text
- the String to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskpublic void drawString(java.lang.String text, int x, int y, int drawStringMask, java.awt.Color opaque)
text
- the String to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskopaque
- the opaque color. This value is ignored unless drawStringMask
contains the DT_OPAQUE maskpublic void drawDisabledString(java.lang.String[] text, int x, int y, int drawStringMask)
text
- the array of Strings to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskpublic void drawDisabledString(java.lang.String[] text, int x, int y, int drawStringMask, java.awt.Color opaque)
text
- the String to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskopaque
- the opaque color. This value is ignored unless drawStringMask
contains the DT_OPAQUE maskpublic void drawDisabledString(java.lang.String text, int x, int y)
text
- the String to drawx
- the x coordinatey
- the y coordinatepublic void drawDisabledString(java.lang.String text, int x, int y, int drawStringMask)
text
- the array of Strings to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskpublic void drawDisabledString(java.awt.Graphics g, java.lang.String str, int x, int y, int drawStringMask, java.awt.Color opaque)
text
- the String to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskopaque
- the opaque color. This value is ignored unless drawStringMask
contains the DT_OPAQUE maskpublic boolean drawDisabledImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
img
- the image to usex
- the x coordinatey
- the y coordinateobserver
- the image observerpublic boolean drawMixedImage(java.awt.Image img, int x, int y, java.awt.Color c, java.awt.image.ImageObserver observer)
img
- the image to usex
- the x coordinatey
- the y coordinatec
- the color to mixobserver
- the image observerpublic boolean drawTransparentImage(java.awt.Image img, int x, int y, java.awt.Color c, java.awt.image.ImageObserver observer)
public java.awt.Dimension getStringSize(java.lang.String[] text)
text
- the array of Strings
public java.awt.Dimension getStringSize(java.lang.String[] text, java.awt.Font font)
text
- the array of Stringsfont
- the font to use when rendering
public java.awt.Dimension getStringSize(java.lang.String text)
text
- the String
public java.awt.Dimension getStringSize(java.lang.String text, java.awt.Font font)
text
- the Stringfont
- the font to use when rendering
public int getStringAscent()
public int getStringAscent(java.awt.Font font)
font
- the font to use when rendering
public int getStringDescent()
public int getStringDescent(java.awt.Font font)
font
- the font to use when rendering
public java.awt.Dimension getImageSize(java.awt.Image image, java.awt.Component component)
image
- the image to usecomponent
- the component where the image will be rendered
public java.awt.Graphics create()
create
in class java.awt.Graphics
public java.awt.Graphics create(int x, int y, int width, int height)
create
in class java.awt.Graphics
public void translate(int x, int y)
translate
in class java.awt.Graphics
public java.awt.Color getColor()
getColor
in class java.awt.Graphics
public void setColor(java.awt.Color c)
setColor
in class java.awt.Graphics
public void setPaintMode()
setPaintMode
in class java.awt.Graphics
public void setXORMode(java.awt.Color c1)
setXORMode
in class java.awt.Graphics
public java.awt.Font getFont()
getFont
in class java.awt.Graphics
public void setFont(java.awt.Font font)
setFont
in class java.awt.Graphics
public java.awt.FontMetrics getFontMetrics()
getFontMetrics
in class java.awt.Graphics
public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
getFontMetrics
in class java.awt.Graphics
public java.awt.Rectangle getClipBounds()
getClipBounds
in class java.awt.Graphics
public void clipRect(int x, int y, int width, int height)
clipRect
in class java.awt.Graphics
public void copyArea(int x, int y, int width, int height, int dx, int dy)
copyArea
in class java.awt.Graphics
public void drawLine(int x1, int y1, int x2, int y2)
drawLine
in class java.awt.Graphics
public void fillRect(int x, int y, int width, int height)
fillRect
in class java.awt.Graphics
public void drawRect(int x, int y, int width, int height)
drawRect
in class java.awt.Graphics
public void clearRect(int x, int y, int width, int height)
clearRect
in class java.awt.Graphics
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
drawRoundRect
in class java.awt.Graphics
public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
fillRoundRect
in class java.awt.Graphics
public void draw3DRect(int x, int y, int width, int height, boolean raised)
draw3DRect
in class java.awt.Graphics
public void fill3DRect(int x, int y, int width, int height, boolean raised)
fill3DRect
in class java.awt.Graphics
public void drawOval(int x, int y, int width, int height)
drawOval
in class java.awt.Graphics
public void fillOval(int x, int y, int width, int height)
fillOval
in class java.awt.Graphics
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
drawArc
in class java.awt.Graphics
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
fillArc
in class java.awt.Graphics
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
drawPolygon
in class java.awt.Graphics
public void drawPolygon(java.awt.Polygon p)
drawPolygon
in class java.awt.Graphics
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
fillPolygon
in class java.awt.Graphics
public void fillPolygon(java.awt.Polygon p)
fillPolygon
in class java.awt.Graphics
public void drawString(java.lang.String str, int x, int y)
drawString
in class java.awt.Graphics
public void drawChars(char[] data, int offset, int length, int x, int y)
drawChars
in class java.awt.Graphics
public void drawBytes(byte[] data, int offset, int length, int x, int y)
drawBytes
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public void dispose()
dispose
in class java.awt.Graphics
public void finalize()
finalize
in class java.awt.Graphics
public java.lang.String toString()
toString
in class java.awt.Graphics
public void setClip(int x, int y, int width, int height)
setClip
in class java.awt.Graphics
public void setClip(java.awt.Shape clip)
setClip
in class java.awt.Graphics
public java.awt.Shape getClip()
getClip
in class java.awt.Graphics
public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
drawPolyline
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public void drawString(java.text.AttributedCharacterIterator iterator, int x, int y)
drawString
in class java.awt.Graphics
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |