com.sas.visuals
Class BufferedGraphics

com.sas.visuals.BufferedGraphics
All Implemented Interfaces:
DoubleBufferInterface, VisualAspects

public class BufferedGraphics
implements VisualAspects, DoubleBufferInterface

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
 
Fields inherited from interface com.sas.visuals.VisualAspects
BDR_BUMP, BDR_BUTTON_NORMAL, BDR_BUTTON_PRESSED, BDR_BUTTON_SELECTED, BDR_DIP, BDR_FIELD_BORDER, BDR_FLAT, BDR_FLAT_BORDER, BDR_GROUP_BORDER, BDR_NONE, BDR_RAISED, BDR_RAISED_INNER, BDR_RAISED_OUTER, BDR_STATUSFIELD_BORDER, BDR_SUNKEN, BDR_SUNKEN_INNER, BDR_SUNKEN_OUTER, BDR_WINDOW_BORDER, BS_NONE, BS_NORMAL, BS_PRESSED, BS_ROUND_NORMAL, BS_ROUND_PRESSED, BS_ROUND_SELECTED, BS_ROUNDEDGE_NORMAL, BS_ROUNDEDGE_PRESSED, BS_ROUNDEDGE_SELECTED, BS_SELECTED, CENTER, CONTENTS_CENTER, CONTENTS_LEFT, CONTENTS_RIGHT, DEVELOPMENT, DOUBLE_BUFFERED, DT_CENTER, DT_LEFT, DT_OPAQUE, DT_RIGHT, DT_UNDERLINE, EAST, HORIZONTAL, NORTH, NORTH_EAST, NORTH_WEST, SHOW_IMAGE, SHOW_NONE, SHOW_TEXT, SOUTH, SOUTH_EAST, SOUTH_WEST, TEXT_CENTER, TEXT_EAST, TEXT_LEFT, TEXT_NORTH, TEXT_RIGHT, TEXT_SOUTH, TEXT_WEST, VERTICAL, WEST
 
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

_image

protected java.awt.Image _image
The image representation of what is drawn. This is only available if double buffering is enabled.


_graphics

protected java.awt.Graphics _graphics
The Graphics object that receives all paint operations on this object.


_size

protected java.awt.Dimension _size
The size of the Graphics.


_doubleBuffer

protected boolean _doubleBuffer
The state of double buffering

Constructor Detail

BufferedGraphics

public BufferedGraphics()
Create the default BufferedGraphics. By default, double buffering is disabled.


BufferedGraphics

public BufferedGraphics(java.awt.Graphics g)
Create an BufferedGraphics

Parameters:
g - The Graphics object to be associated with the BufferedGraphics. By default, double buffering is disabled.

BufferedGraphics

public BufferedGraphics(java.awt.Graphics g,
                        boolean doubleBuffer)
                 throws java.lang.NullPointerException
Creates an BufferedGraphics with the desired double buffer state.

Parameters:
g - The Graphics object to be associated with the BufferedGraphics
doubleBuffer - The double buffer state
Throws:
java.lang.NullPointerException
Method Detail

setDoubleBuffered

public void setDoubleBuffered(boolean doubleBuffer)
Set the double buffer state. Any previous double buffered graphic operations are drawn to the screen.

Specified by:
setDoubleBuffered in interface DoubleBufferInterface
Parameters:
doubleBuffer - The double buffer state

isDoubleBuffered

public boolean isDoubleBuffered()
Get the double buffer state.

Specified by:
isDoubleBuffered in interface DoubleBufferInterface
Returns:
boolean containing the double buffered state

getGraphics

public java.awt.Graphics getGraphics()
Get the Graphics used for the graphic operations.

Returns:
Graphics containing the Graphics used for the graphic operations

getImage

protected java.awt.Image getImage()
Get the image representation of what is drawn. This is only available if double buffering is enabled.

Returns:
Image containing the image representation of what is drawn

getImage

public 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. This is only available if double buffering is enabled.

Parameters:
wait - Specifies whether to wait until the image is fully loaded
Returns:
Image containing the image representation of what is drawn

beginPaint

public void beginPaint(java.awt.Component component,
                       java.awt.Graphics g)
                throws java.lang.NullPointerException
Signals the BufferedGraphics that painting operations will start.

Parameters:
component - The Component associated with the Graphics object
g - The Graphics object used to paint
Throws:
java.lang.NullPointerException

beginPaint

public void beginPaint(java.awt.Component component,
                       java.awt.Graphics g,
                       java.awt.Dimension size)
                throws java.lang.NullPointerException
Signals the BufferedGraphics that painting operations will start.

Parameters:
component - The Component associated with the Graphics object
g - The Graphics object used to paint
size - The specifed dimension region for the graphics object
Throws:
java.lang.NullPointerException

endPaint

public void endPaint(java.awt.Component component,
                     java.awt.Graphics g)
Signals the BufferedGraphics to end painting operations. This will draw the double buffer image, if double buffering is enabled.


createDoubleBuffer

protected java.awt.Graphics createDoubleBuffer(java.awt.Component component,
                                               java.awt.Graphics g,
                                               java.awt.Dimension size)
Create an image used for double buffering.

Parameters:
size - The size of the buffer to create

drawDottedLine

public void drawDottedLine(int x1,
                           int y1,
                           int x2,
                           int y2)
Draws a dotted line between two points.

Parameters:
x1 - the first x coordinate
y1 - the first y coordinate
x2 - the second x coordinate
y2 - the second y coordinate

drawDottedLine

public void drawDottedLine(java.awt.Point point1,
                           java.awt.Point point2)
Draws a dotted line between two points.

Parameters:
point1 - the first point
point2 - the second point

drawLine

public void drawLine(java.awt.Point point1,
                     java.awt.Point point2)
Draws a line between two points.

Parameters:
g - the Graphics to use
point1 - the first point
point2 - the second point

fillRect

public void fillRect(java.awt.Rectangle rectangle)
Fill the specified rectangle

Parameters:
rectangle - the rectangle to fill

drawRect

public void drawRect(java.awt.Rectangle rectangle)
Draw the specified rectangle.

Parameters:
rectangle - the rectangle to draw

clearRect

public void clearRect(java.awt.Rectangle rectangle)
Clear the specified rectangle.

Parameters:
rectangle - the rectangle to clear

drawRoundRect

public void drawRoundRect(java.awt.Rectangle rectangle,
                          int arcWidth,
                          int arcHeight)
Draw a rectangle with rounded corners.

Parameters:
rectangle - the bounding rectangle
arcWidth - the width of the arc
arcHeight - the height of the arc

fillRoundRect

public void fillRoundRect(java.awt.Rectangle rectangle,
                          int arcWidth,
                          int arcHeight)
Fill a rectangle with rounded corners.

Parameters:
rectangle - the bounding rectangle
arcWidth - the width of the arc
arcHeight - the height of the arc

draw3DRoundRect

public void draw3DRoundRect(java.awt.Rectangle rectangle,
                            int arcWidth,
                            int arcHeight,
                            int style)
Draw a 3-D rectangle with rounded corners.

Parameters:
rectangle - the bounding rectangle
arcWidth - the width of the arc
arcHeight - the height of the arc
style - the border style to use

draw3DRect

public void draw3DRect(java.awt.Rectangle rectangle,
                       boolean raised)
Draw a 3-D rectangle.

Parameters:
rectangle - the rectangle to draw
rasied - the state of the rectangle

fill3DRect

public void fill3DRect(java.awt.Rectangle rectangle,
                       boolean raised)
Fill a 3-D rectangle.

Parameters:
rectangle - the rectangle to fill
rasied - the state of the rectangle

drawArc

public void drawArc(java.awt.Rectangle rectangle,
                    int startAngle,
                    int arcAngle)
Draw an arc.

Parameters:
rectangle - the bounding rectangle
startAngle - the starting angle
arcAngle - the angle to draw

fillArc

public void fillArc(java.awt.Rectangle rectangle,
                    int startAngle,
                    int arcAngle)
Fill an arc.

Parameters:
rectangle - the bounding rectangle
startAngle - the starting angle
arcAngle - the angle to fill

drawBasicBorderRect

public void drawBasicBorderRect(java.awt.Rectangle rectangle,
                                int style)
Draw a Windows95 basic window border.

Parameters:
rectangle - the bounding rectangle
style - the border style to use

drawBasicBorderRect

public void drawBasicBorderRect(int x,
                                int y,
                                int width,
                                int height,
                                int style)
Draw a Windows95 basic window border.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region
style - the border style to use

drawColoredBorderRect

public void drawColoredBorderRect(java.awt.Rectangle rectangle,
                                  int style,
                                  java.awt.Color c)
Draw a colored border.

Parameters:
rectangle - the bounding rectangle
style - the border style to use
c - the Color to use

drawColoredBorderRect

public void drawColoredBorderRect(int x,
                                  int y,
                                  int width,
                                  int height,
                                  int style,
                                  java.awt.Color c)
Draw a colored border.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region
style - the border style to use
c - the Color to use

drawBasicBorderRect

public 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.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region
c - the background color
topLeft - the top-left border color
bottomRight - the bottom-right border color

drawWindowBorderRect

public void drawWindowBorderRect(java.awt.Rectangle rectangle)
Draw a Windows95 window border.

Parameters:
rectangle - the bounding region

drawWindowBorderRect

public void drawWindowBorderRect(int x,
                                 int y,
                                 int width,
                                 int height)
Draw a Windows95 window border.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region

drawBasicButtonBorderRect

public void drawBasicButtonBorderRect(java.awt.Rectangle rectangle,
                                      int style)
Draw a basic Windows95 button border.

Parameters:
rectangle - the bounding region
style - the border style to use

drawBasicButtonBorderRect

public void drawBasicButtonBorderRect(int x,
                                      int y,
                                      int width,
                                      int height,
                                      int style)
Draw a Windows95 basic button border.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region
style - the border style to use

drawButtonBorderRect

public void drawButtonBorderRect(java.awt.Rectangle rectangle,
                                 int style)
Draw a Windows95 push button border.

Parameters:
rectangle - the bounding region
style - the border style to use (BS_PRESSED, BS_NORMAL, BS_SELECTED)

drawButtonBorderRect

public void drawButtonBorderRect(int x,
                                 int y,
                                 int width,
                                 int height,
                                 int style)
Draw a Windows95 basic button border.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region
style - the border style to use (BS_PRESSED, BS_NORMAL, BS_SELECTED)

drawFieldBorderRect

public void drawFieldBorderRect(java.awt.Rectangle rectangle)
Draw a Windows95 field border.

Parameters:
rectangle - the bounding rectangle

drawFieldBorderRect

public void drawFieldBorderRect(int x,
                                int y,
                                int width,
                                int height)
Draw a Windows95 field border.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region

drawStatusFieldBorderRect

public void drawStatusFieldBorderRect(java.awt.Rectangle rectangle)
Draw a Windows95 status field border.

Parameters:
rectangle - the bounding rectangle

drawStatusFieldBorderRect

public void drawStatusFieldBorderRect(int x,
                                      int y,
                                      int width,
                                      int height)
Draw a Windows95 status field border.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region

drawGroupBorderRect

public void drawGroupBorderRect(java.awt.Rectangle rectangle)
Draw a Windows95 grouping border.

Parameters:
rectangle - the bounding rectangle

drawGroupBorderRect

public void drawGroupBorderRect(int x,
                                int y,
                                int width,
                                int height)
Draw a Windows95 grouping border.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region

drawFocusRect

public void drawFocusRect(java.awt.Rectangle rectangle)
Draw a Windows95 focus rectangle.

Parameters:
rectangle - the bounding rectangle

drawDottedRect

public void drawDottedRect(java.awt.Rectangle rectangle)
Draw a dotted line rectangle.

Parameters:
rectangle - the bounding rectangle

drawFocusRect

public void drawFocusRect(int x,
                          int y,
                          int width,
                          int height)
Draw a Windows95 focus rectangle.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width of the bounding region
height - the height of the bounding region

drawDottedRect

public void drawDottedRect(int x,
                           int y,
                           int width,
                           int height)

drawString

public void drawString(java.lang.String[] text,
                       int x,
                       int y,
                       int drawStringMask)
Draw a vector of Strings.

Parameters:
text - the array of Strings to draw
x - the x coordinate
y - the y coordinate
drawStringMask - the drawStringMask

drawString

public void drawString(java.lang.String[] text,
                       int x,
                       int y,
                       int drawStringMask,
                       java.awt.Color opaque)
Draw a vector of Strings.

Parameters:
text - the array of Strings to draw
x - the x coordinate
y - the y coordinate
drawStringMask - the drawStringMask
opaque - the opaque color. This value is ignored unless drawStringMask contains the DT_OPAQUE mask

drawString

public void drawString(java.lang.String text,
                       int x,
                       int y,
                       int drawStringMask)
Draw a String.

Parameters:
text - the String to draw
x - the x coordinate
y - the y coordinate
drawStringMask - the drawStringMask

drawString

public void drawString(java.lang.String text,
                       int x,
                       int y,
                       int drawStringMask,
                       java.awt.Color opaque)
Draw a String.

Parameters:
text - the String to draw
x - the x coordinate
y - the y coordinate
drawStringMask - the drawStringMask
opaque - the opaque color. This value is ignored unless drawStringMask contains the DT_OPAQUE mask

drawDisabledString

public void drawDisabledString(java.lang.String[] text,
                               int x,
                               int y,
                               int drawStringMask)
Draw a vector of Strings with a disabled appearance.

Parameters:
text - the array of Strings to draw
x - the x coordinate
y - the y coordinate
drawStringMask - the drawStringMask

drawDisabledString

public 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.

Parameters:
text - the String to draw
x - the x coordinate
y - the y coordinate
drawStringMask - the drawStringMask
opaque - the opaque color. This value is ignored unless drawStringMask contains the DT_OPAQUE mask

drawDisabledString

public void drawDisabledString(java.lang.String text,
                               int x,
                               int y)
Draw a String with a disabled appearance.

Parameters:
text - the String to draw
x - the x coordinate
y - the y coordinate

drawDisabledString

public void drawDisabledString(java.lang.String text,
                               int x,
                               int y,
                               int drawStringMask)
Draw a vector of Strings with a disabled appearance.

Parameters:
text - the array of Strings to draw
x - the x coordinate
y - the y coordinate
drawStringMask - the drawStringMask

drawDisabledString

public 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.

Parameters:
text - the String to draw
x - the x coordinate
y - the y coordinate
drawStringMask - the drawStringMask
opaque - the opaque color. This value is ignored unless drawStringMask contains the DT_OPAQUE mask

drawDisabledImage

public boolean drawDisabledImage(java.awt.Image img,
                                 int x,
                                 int y,
                                 java.awt.image.ImageObserver observer)
Draw an image with a disabled appearance.

Parameters:
img - the image to use
x - the x coordinate
y - the y coordinate
observer - the image observer

drawMixedImage

public 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.

Parameters:
img - the image to use
x - the x coordinate
y - the y coordinate
c - the color to mix
observer - the image observer

drawTransparentImage

public boolean drawTransparentImage(java.awt.Image img,
                                    int x,
                                    int y,
                                    java.awt.Color c,
                                    java.awt.image.ImageObserver observer)

getStringSize

public java.awt.Dimension getStringSize(java.lang.String[] text)
Gets the dimension of a specified array of Strings.

Parameters:
text - the array of Strings
Returns:
Dimension containing the size needed to draw the Strings

getStringSize

public java.awt.Dimension getStringSize(java.lang.String[] text,
                                        java.awt.Font font)
Gets the dimension of a specified array of Strings.

Parameters:
text - the array of Strings
font - the font to use when rendering
Returns:
Dimension containing the size needed to draw the Strings

getStringSize

public java.awt.Dimension getStringSize(java.lang.String text)
Gets the dimension of a specified String.

Parameters:
text - the String
Returns:
Dimension containing the size needed to draw the String

getStringSize

public java.awt.Dimension getStringSize(java.lang.String text,
                                        java.awt.Font font)
Gets the dimension of a specified String.

Parameters:
text - the String
font - the font to use when rendering
Returns:
Dimension containing the size needed to draw the String

getStringAscent

public int getStringAscent()
Get the ascent of an arbitrary String.

Returns:
int containing the ascent value of a String

getStringAscent

public int getStringAscent(java.awt.Font font)
Get the ascent of an arbitrary String.

Parameters:
font - the font to use when rendering
Returns:
int containing the ascent value of a String

getStringDescent

public int getStringDescent()
Get the descent of an arbitrary String.

Returns:
int containing the descent value of a String

getStringDescent

public int getStringDescent(java.awt.Font font)
Get the descent of an arbitrary String.

Parameters:
font - the font to use when rendering
Returns:
int containing the descent value of a String

getImageSize

public java.awt.Dimension getImageSize(java.awt.Image image,
                                       java.awt.Component component)
Get the demension of a specified image.

Parameters:
image - the image to use
component - the component where the image will be rendered
Returns:
Dimension containing the size needed for rendering the image

create

public java.awt.Graphics create()
Identical to java.awt.Graphics functionality.

Specified by:
create in class java.awt.Graphics

create

public java.awt.Graphics create(int x,
                                int y,
                                int width,
                                int height)
Identical to java.awt.Graphics functionality.

Overrides:
create in class java.awt.Graphics

translate

public void translate(int x,
                      int y)
Identical to java.awt.Graphics functionality.

Specified by:
translate in class java.awt.Graphics

getColor

public java.awt.Color getColor()
Identical to java.awt.Graphics functionality.

Specified by:
getColor in class java.awt.Graphics

setColor

public void setColor(java.awt.Color c)
Identical to java.awt.Graphics functionality.

Specified by:
setColor in class java.awt.Graphics

setPaintMode

public void setPaintMode()
Identical to java.awt.Graphics functionality.

Specified by:
setPaintMode in class java.awt.Graphics

setXORMode

public void setXORMode(java.awt.Color c1)
Identical to java.awt.Graphics functionality.

Specified by:
setXORMode in class java.awt.Graphics

getFont

public java.awt.Font getFont()
Identical to java.awt.Graphics functionality.

Specified by:
getFont in class java.awt.Graphics

setFont

public void setFont(java.awt.Font font)
Identical to java.awt.Graphics functionality.

Specified by:
setFont in class java.awt.Graphics

getFontMetrics

public java.awt.FontMetrics getFontMetrics()
Identical to java.awt.Graphics functionality.

Overrides:
getFontMetrics in class java.awt.Graphics

getFontMetrics

public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
Identical to java.awt.Graphics functionality.

Specified by:
getFontMetrics in class java.awt.Graphics

getClipBounds

public java.awt.Rectangle getClipBounds()
Identical to java.awt.Graphics functionality.

Specified by:
getClipBounds in class java.awt.Graphics

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
Identical to java.awt.Graphics functionality.

Specified by:
clipRect in class java.awt.Graphics

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int dx,
                     int dy)
Identical to java.awt.Graphics functionality.

Specified by:
copyArea in class java.awt.Graphics

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Identical to java.awt.Graphics functionality.

Specified by:
drawLine in class java.awt.Graphics

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
Identical to java.awt.Graphics functionality.

Specified by:
fillRect in class java.awt.Graphics

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)
Identical to java.awt.Graphics functionality.

Overrides:
drawRect in class java.awt.Graphics

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Identical to java.awt.Graphics functionality.

Specified by:
clearRect in class java.awt.Graphics

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Identical to java.awt.Graphics functionality.

Specified by:
drawRoundRect in class java.awt.Graphics

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Identical to java.awt.Graphics functionality.

Specified by:
fillRoundRect in class java.awt.Graphics

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Identical to java.awt.Graphics functionality.

Overrides:
draw3DRect in class java.awt.Graphics

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Identical to java.awt.Graphics functionality.

Overrides:
fill3DRect in class java.awt.Graphics

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Identical to java.awt.Graphics functionality.

Specified by:
drawOval in class java.awt.Graphics

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Identical to java.awt.Graphics functionality.

Specified by:
fillOval in class java.awt.Graphics

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Identical to java.awt.Graphics functionality.

Specified by:
drawArc in class java.awt.Graphics

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Identical to java.awt.Graphics functionality.

Specified by:
fillArc in class java.awt.Graphics

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Identical to java.awt.Graphics functionality.

Specified by:
drawPolygon in class java.awt.Graphics

drawPolygon

public void drawPolygon(java.awt.Polygon p)
Identical to java.awt.Graphics functionality.

Overrides:
drawPolygon in class java.awt.Graphics

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Identical to java.awt.Graphics functionality.

Specified by:
fillPolygon in class java.awt.Graphics

fillPolygon

public void fillPolygon(java.awt.Polygon p)
Identical to java.awt.Graphics functionality.

Overrides:
fillPolygon in class java.awt.Graphics

drawString

public void drawString(java.lang.String str,
                       int x,
                       int y)
Identical to java.awt.Graphics functionality.

Specified by:
drawString in class java.awt.Graphics

drawChars

public void drawChars(char[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Identical to java.awt.Graphics functionality.

Overrides:
drawChars in class java.awt.Graphics

drawBytes

public void drawBytes(byte[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Identical to java.awt.Graphics functionality.

Overrides:
drawBytes in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image img,
                         int x,
                         int y,
                         java.awt.image.ImageObserver observer)
Identical to java.awt.Graphics functionality.

Specified by:
drawImage in class java.awt.Graphics

drawImage

public 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.

Specified by:
drawImage in class java.awt.Graphics

drawImage

public 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.

Specified by:
drawImage in class java.awt.Graphics

drawImage

public 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.

Specified by:
drawImage in class java.awt.Graphics

dispose

public void dispose()
Identical to java.awt.Graphics functionality.

Specified by:
dispose in class java.awt.Graphics

finalize

public void finalize()
Identical to java.awt.Graphics functionality.

Overrides:
finalize in class java.awt.Graphics

toString

public java.lang.String toString()
Identical to java.awt.Graphics functionality.

Overrides:
toString in class java.awt.Graphics

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
Identical to java.awt.Graphics functionality.

Specified by:
setClip in class java.awt.Graphics

setClip

public void setClip(java.awt.Shape clip)
Identical to java.awt.Graphics functionality.

Specified by:
setClip in class java.awt.Graphics

getClip

public java.awt.Shape getClip()
Identical to java.awt.Graphics functionality.

Specified by:
getClip in class java.awt.Graphics

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
Identical to java.awt.Graphics functionality.

Specified by:
drawPolyline in class java.awt.Graphics

drawImage

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)
Identical to java.awt.Graphics functionality.

Specified by:
drawImage in class java.awt.Graphics

drawImage

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)
Identical to java.awt.Graphics functionality.

Specified by:
drawImage in class java.awt.Graphics

drawString

public void drawString(java.text.AttributedCharacterIterator iterator,
                       int x,
                       int y)
Specified by:
drawString in class java.awt.Graphics



Copyright © 2009 SAS Institute Inc. All Rights Reserved.