com.eteks.awt
Class PJAGraphics

java.lang.Object
  |
  +--java.awt.Graphics
        |
        +--com.eteks.awt.PJAGraphics
All Implemented Interfaces:
PJAGraphicsExtension

public class PJAGraphics
extends Graphics
implements PJAGraphicsExtension

Pure Java AWT Graphics class implementation. This class enables to draw in an off screen image, on a system that has no display available. All drawings are done in the buffer of an image of class PJAImage. All the methods are the implementation of the abstract ones of java.awt.Graphics class. See java.awt.Graphics for more information. This class uses only int and longnumber type (no float or double). This class can work even if the classes Rectangle, Color, Font and FontMetrics aren't accessible for security reasons.

Since:
PJA1.0
Author:
Emmanuel Puybaret
See Also:
PJAImage, Graphics, PJAGraphicsManager

Inner Class Summary
private  class PJAGraphics.AreaAveragingScaleFilter
           
private static interface PJAGraphics.CircleQuarterListener
           
private  class PJAGraphics.PJAFont
          Inner font class extending java.awtFont class to override getPeer ().
private static class PJAGraphics.PJARectangle
          Inner rectangle class avoiding the use of java.awt.Rectangle which requires java.awt.Toolkit class to be loaded.
 
Field Summary
(package private)  int ARGB
           
(package private)  int ARGBIndex
           
private  boolean classColorAccessible
           
private  boolean classFontMetricsAccessible
           
private  boolean classRectangleAccessible
           
(package private)  PJAGraphics.PJARectangle clip
           
(package private)  Color color
           
private static int COLOR_FACTOR_100
           
private  PJAGraphics.PJAFont defaultFont
           
(package private)  PJAGraphics.PJAFont font
           
private  boolean fontInstantiationEnabled
           
(package private)  String fontName
           
(package private)  PJAFontPeer fontPeer
           
(package private)  int fontSize
           
(package private)  int fontStyle
           
(package private)  PJAImage image
           
private  PJAGraphicsManager manager
           
private  int[] TAN_0_TO_45_SHIFT_16
           
(package private)  int translateX
           
(package private)  int translateY
           
(package private)  PJAGraphics.PJARectangle userClip
           
(package private)  Color XORColor
           
(package private)  boolean XORMode
           
(package private)  int XorRGB
           
 
Constructor Summary
private PJAGraphics()
           
protected PJAGraphics(PJAImage image)
           
private PJAGraphics(PJAImage image, Color color, int ARGB, int ARGBIndex, Color XORColor, boolean XORMode, int XorRGB, PJAFontPeer fontPeer, PJAGraphics.PJAFont font, String fontName, int fontStyle, int fontSize, int translateX, int translateY, PJAGraphics.PJARectangle userClip, PJAGraphics.PJARectangle clip)
           
 
Method Summary
private  void checkFontLoading()
           
 void clearRect(int x, int y, int width, int height)
          java.awt.Graphics implementation.
 void clipRect(int x, int y, int width, int height)
          java.awt.Graphics implementation.
private  boolean contains(int[] xPoints, int[] yPoints, int nPoints, PJAGraphics.PJARectangle bounds, int x, int y)
           
 void copyArea(int x, int y, int width, int height, int dx, int dy)
          java.awt.Graphics implementation.
 Graphics create()
          java.awt.Graphics implementation.
 void dispose()
          java.awt.Graphics implementation.
 void draw3DRect(int x, int y, int width, int height, boolean raised)
          Same implementation as in the class java.awtGraphics except it doesn't use Color class.
 void drawArc(int x, int y, int width, int height, int start, int arcAngle)
          java.awt.Graphics implementation.
private  void drawArcHorizontalLine(int[] xPoints, int[] yPoints, int nPoints, PJAGraphics.PJARectangle bounds, int xLeft, int xRight, int y)
           
private  void drawArcPoint(int[] xPoints, int[] yPoints, int nPoints, PJAGraphics.PJARectangle bounds, int x, int y)
           
private  void drawHorizontalLine(int x1, int x2, int y)
           
 boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
          java.awt.Graphics implementation.
 boolean drawImage(Image img, int x, int y, ImageObserver observer)
          java.awt.Graphics implementation.
 boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
          java.awt.Graphics implementation.
 boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
          java.awt.Graphics implementation.
 boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
          java.awt.Graphics implementation.
 boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
          java.awt.Graphics implementation.
 void drawLine(int x1, int y1, int x2, int y2)
           
 void drawOval(int x, int y, int width, int height)
          java.awt.Graphics implementation.
private  void drawPoint(int x, int y)
           
 void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
          java.awt.Graphics implementation.
 void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
          java.awt.Graphics implementation.
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          java.awt.Graphics implementation.
 void drawString(AttributedCharacterIterator iterator, int x, int y)
          java.awt.Graphics implementation.
 void drawString(String str, int x, int y)
          java.awt.Graphics implementation.
private  void drawVerticalLine(int x, int y1, int y2)
           
 void fill3DRect(int x, int y, int width, int height, boolean raised)
          Same implementation as in the class java.awtGraphics except it doesn't use Color class.
 void fillArc(int x, int y, int width, int height, int start, int arcAngle)
          java.awt.Graphics implementation.
 void fillOval(int x, int y, int width, int height)
          java.awt.Graphics implementation.
 void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
          java.awt.Graphics implementation.
 void fillRect(int x, int y, int width, int height)
          java.awt.Graphics implementation.
 void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          java.awt.Graphics implementation.
private  PJAGraphics.PJARectangle getBoundingBox(int[] xpoints, int[] ypoints, int npoints)
           
private  Point getBoundingPointAtAngle(int boundingX, int boundingY, int boundingWidth, int boundingHeight, int angle)
           
private  int getBoundingShape(int[] xPoints, int[] yPoints, int startAngle, int arcAngle, int centerX, int centerY, int boundingX, int boundingY, int boundingWidth, int boundingHeight)
          This method builds a bounding polygon of an arc of arcAngle degres starting at startAngle, and returnsthe number of points set in xPoints and yPoints tables.
private  int getBrighterColor(int ARGB)
           
 int getCharWidth(char ch)
          Returns the advance width of the specified character of the current font.
 Shape getClip()
          java.awt.Graphics implementation.
 Rectangle getClipBounds()
          java.awt.Graphics implementation.
 Color getColor()
          java.awt.Graphics implementation.
 int getColorRGB()
          Returns the graphics current color RGB.
private  int getDarkerColor(int ARGB)
           
 Font getFont()
          java.awt.Graphics implementation.
 int getFontAscent()
          Determines the font ascent of the current font.
 int getFontDescent()
          Determines the font descent of the current font.
 int getFontLeading()
          Determines the standard leading of the current font.
 int getFontMaxAdvance()
          Gets the maximum advance width of any character of the current Font.
 int getFontMaxAscent()
          Determines the maximum ascent of the current font.
 int getFontMaxDescent()
          Determines the maximum descent of the current font.
 FontMetrics getFontMetrics()
          java.awt.Graphics implementation.
 FontMetrics getFontMetrics(Font font)
          java.awt.Graphics implementation.
 String getFontName()
          Returns the graphics current font name.
 int getFontSize()
          Returns the graphics current font size.
 int getFontStyle()
          Returns the graphics current font style.
private  PJAGraphics.PJAFont getPJAFont(Font font)
          java.awt.Graphics implementation.
 int getStringWidth(String str)
          Returns the total advance width for showing the specified String of the current Font.
private  boolean isClipped(int x, int y)
           
private  void parseCircleQuarter(int x, int y, int width, int height, boolean fill, PJAGraphics.CircleQuarterListener listener)
          Enumerates all the points of the quarter of an ellipse.
static int roundDiv(int dividend, int divisor)
          Returns the rounded result of dividend / divisor, avoiding the use of floating point operation (returns the same as Math.round((float)dividend / divisor)).
static long roundDiv(long dividend, long divisor)
          Returns the rounded result of dividend / divisor, avoiding the use of floating point operation (returns the same as Math.round((double)dividend / divisor)).
 void setClip(int x, int y, int width, int height)
          java.awt.Graphics implementation.
 void setClip(Shape clip)
          java.awt.Graphics implementation.
 void setColor(Color color)
          java.awt.Graphics implementation.
 void setColor(int red, int green, int blue)
          Sets this graphics context's color.
 void setFont(Font font)
          java.awt.Graphics implementation.
 void setFont(String fontName, int fontStyle, int fontSize)
          Sets this graphics context's font to the specified font specified by its name, style and size.
 void setPaintMode()
          java.awt.Graphics implementation.
 void setXORMode(Color c1)
          java.awt.Graphics implementation.
 void setXORMode(int red, int green, int blue)
          Sets this graphics context's XOR color.
private  int tanOrCotanShift16(int angle)
          Returns the tangent of angle if angle is between -45 deg and 45 deg or between 135 deg and 225 deg, or returns the cotangent of angle if angle is between 45 deg and 135 deg or between 225 deg and 315 deg
 void translate(int x, int y)
          java.awt.Graphics implementation.
 
Methods inherited from class java.awt.Graphics
create, drawBytes, drawChars, drawPolygon, drawRect, fillPolygon, finalize, getClipBounds, getClipRect, hitClip, toString
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

manager

private PJAGraphicsManager manager

defaultFont

private PJAGraphics.PJAFont defaultFont

classColorAccessible

private boolean classColorAccessible

classRectangleAccessible

private boolean classRectangleAccessible

classFontMetricsAccessible

private boolean classFontMetricsAccessible

fontInstantiationEnabled

private boolean fontInstantiationEnabled

image

PJAImage image

color

Color color

ARGB

int ARGB

ARGBIndex

int ARGBIndex

XORColor

Color XORColor

XORMode

boolean XORMode

XorRGB

int XorRGB

fontPeer

PJAFontPeer fontPeer

font

PJAGraphics.PJAFont font

fontName

String fontName

fontStyle

int fontStyle

fontSize

int fontSize

translateX

int translateX

translateY

int translateY

userClip

PJAGraphics.PJARectangle userClip

clip

PJAGraphics.PJARectangle clip

COLOR_FACTOR_100

private static final int COLOR_FACTOR_100

TAN_0_TO_45_SHIFT_16

private final int[] TAN_0_TO_45_SHIFT_16
Constructor Detail

PJAGraphics

private PJAGraphics()

PJAGraphics

protected PJAGraphics(PJAImage image)

PJAGraphics

private PJAGraphics(PJAImage image,
                    Color color,
                    int ARGB,
                    int ARGBIndex,
                    Color XORColor,
                    boolean XORMode,
                    int XorRGB,
                    PJAFontPeer fontPeer,
                    PJAGraphics.PJAFont font,
                    String fontName,
                    int fontStyle,
                    int fontSize,
                    int translateX,
                    int translateY,
                    PJAGraphics.PJARectangle userClip,
                    PJAGraphics.PJARectangle clip)
Method Detail

create

public Graphics create()
java.awt.Graphics implementation.
Overrides:
create in class Graphics
See Also:
Graphics

translate

public void translate(int x,
                      int y)
java.awt.Graphics implementation.
Overrides:
translate in class Graphics
See Also:
Graphics

getColor

public Color getColor()
java.awt.Graphics implementation.
Overrides:
getColor in class Graphics
See Also:
Graphics

setColor

public void setColor(Color color)
java.awt.Graphics implementation.
Overrides:
setColor in class Graphics
See Also:
Graphics

getColorRGB

public int getColorRGB()
Returns the graphics current color RGB. PJAGraphicsExtension implementation.
Specified by:
getColorRGB in interface PJAGraphicsExtension
Returns:
the color RGB.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

setColor

public void setColor(int red,
                     int green,
                     int blue)
Sets this graphics context's color. PJAGraphicsExtension implementation.
Specified by:
setColor in interface PJAGraphicsExtension
Parameters:
red - the red component.
green - the green component.
blue - the blue component.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getBrighterColor

private int getBrighterColor(int ARGB)

getDarkerColor

private int getDarkerColor(int ARGB)

setPaintMode

public void setPaintMode()
java.awt.Graphics implementation.
Overrides:
setPaintMode in class Graphics
See Also:
Graphics

setXORMode

public void setXORMode(Color c1)
java.awt.Graphics implementation.
Overrides:
setXORMode in class Graphics
See Also:
Graphics

setXORMode

public void setXORMode(int red,
                       int green,
                       int blue)
Sets this graphics context's XOR color. PJAGraphicsExtension implementation.
Specified by:
setXORMode in interface PJAGraphicsExtension
Parameters:
red - the red component.
green - the green component.
blue - the blue component.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

checkFontLoading

private void checkFontLoading()

getFontMetrics

public FontMetrics getFontMetrics()
java.awt.Graphics implementation.
Overrides:
getFontMetrics in class Graphics
See Also:
Graphics

getFontMetrics

public FontMetrics getFontMetrics(Font font)
java.awt.Graphics implementation.
Overrides:
getFontMetrics in class Graphics
See Also:
Graphics

getFontLeading

public int getFontLeading()
Determines the standard leading of the current font. The standard leading (interline spacing) is the logical amount of space to be reserved between the descent of one line of text and the ascent of the next line. The height metric is calculated to include this extra space. PJAGraphicsExtension implementation.
Specified by:
getFontLeading in interface PJAGraphicsExtension
Returns:
the standard leading of the current font.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getFontAscent

public int getFontAscent()
Determines the font ascent of the current font. The font ascent is the distance from the font's baseline to the top of most alphanumeric characters. Some characters in the font may extend above the font ascent line. PJAGraphicsExtension implementation.
Specified by:
getFontAscent in interface PJAGraphicsExtension
Returns:
the font ascent of the font.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getFontDescent

public int getFontDescent()
Determines the font descent of the current font. The font descent is the distance from the font's baseline to the bottom of most alphanumeric characters with descenders. Some characters in the font may extend below the font descent line. PJAGraphicsExtension implementation.
Specified by:
getFontDescent in interface PJAGraphicsExtension
Returns:
the font descent of the font.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getFontMaxAscent

public int getFontMaxAscent()
Determines the maximum ascent of the current font. No character extends further above the font's baseline than this height. PJAGraphicsExtension implementation.
Specified by:
getFontMaxAscent in interface PJAGraphicsExtension
Returns:
the maximum ascent of any character in the font.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getFontMaxDescent

public int getFontMaxDescent()
Determines the maximum descent of the current font. No character extends further below the font's baseline than this height. PJAGraphicsExtension implementation.
Specified by:
getFontMaxDescent in interface PJAGraphicsExtension
Returns:
the maximum descent of any character in the font.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getFontMaxAdvance

public int getFontMaxAdvance()
Gets the maximum advance width of any character of the current Font. The advance width is the amount by which the current point is moved from one character to the next in a line of text. PJAGraphicsExtension implementation.
Specified by:
getFontMaxAdvance in interface PJAGraphicsExtension
Returns:
the maximum advance width of any character in the font.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getCharWidth

public int getCharWidth(char ch)
Returns the advance width of the specified character of the current font. The advance width is the amount by which the current point is moved from one character to the next in a line of text. PJAGraphicsExtension implementation.
Specified by:
getCharWidth in interface PJAGraphicsExtension
Parameters:
ch - the character to be measured
Returns:
the advance width of the specified char in the font described by this font metric.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getStringWidth

public int getStringWidth(String str)
Returns the total advance width for showing the specified String of the current Font. The advance width is the amount by which the current point is moved from one character to the next in a line of text. PJAGraphicsExtension implementation.
Specified by:
getStringWidth in interface PJAGraphicsExtension
Parameters:
str - the String to be measured
Returns:
the advance width of the specified string in the font described by this font metric.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getFont

public Font getFont()
java.awt.Graphics implementation.
Overrides:
getFont in class Graphics
See Also:
Graphics

getFontName

public String getFontName()
Returns the graphics current font name. Returns null if no font could be loaded from .pjaf font files. PJAGraphicsExtension implementation.
Specified by:
getFontName in interface PJAGraphicsExtension
Returns:
the font name.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getFontStyle

public int getFontStyle()
Returns the graphics current font style. PJAGraphicsExtension implementation.
Specified by:
getFontStyle in interface PJAGraphicsExtension
Returns:
the font style.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

getFontSize

public int getFontSize()
Returns the graphics current font size. PJAGraphicsExtension implementation.
Specified by:
getFontSize in interface PJAGraphicsExtension
Returns:
the font size.
Since:
PJA1.1
See Also:
PJAGraphicsExtension

setFont

public void setFont(Font font)
java.awt.Graphics implementation.
Overrides:
setFont in class Graphics
See Also:
Graphics

setFont

public void setFont(String fontName,
                    int fontStyle,
                    int fontSize)
Sets this graphics context's font to the specified font specified by its name, style and size. All subsequent text operations using this graphics context use this font. If unable to have a default toolkit this method enables to draw text although with an other font. PJAGraphicsExtension implementation.
Specified by:
setFont in interface PJAGraphicsExtension
Parameters:
fontName - the font name.
fontStyle - the font style.
fontSize - the font size.
Since:
PJA1.1
See Also:
PJAGraphicsExtension, Graphics.setFont(Font)

getPJAFont

private PJAGraphics.PJAFont getPJAFont(Font font)
java.awt.Graphics implementation.
See Also:
Graphics

getClipBounds

public Rectangle getClipBounds()
java.awt.Graphics implementation.
Overrides:
getClipBounds in class Graphics
See Also:
Graphics

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
java.awt.Graphics implementation.
Overrides:
clipRect in class Graphics
See Also:
Graphics

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
java.awt.Graphics implementation.
Overrides:
setClip in class Graphics
See Also:
Graphics

getClip

public Shape getClip()
java.awt.Graphics implementation.
Overrides:
getClip in class Graphics
See Also:
Graphics

setClip

public void setClip(Shape clip)
java.awt.Graphics implementation.
Overrides:
setClip in class Graphics
See Also:
Graphics

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int dx,
                     int dy)
java.awt.Graphics implementation.
Overrides:
copyArea in class Graphics
See Also:
Graphics

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Overrides:
drawLine in class Graphics

isClipped

private boolean isClipped(int x,
                          int y)

drawPoint

private void drawPoint(int x,
                       int y)

drawHorizontalLine

private void drawHorizontalLine(int x1,
                                int x2,
                                int y)

drawVerticalLine

private void drawVerticalLine(int x,
                              int y1,
                              int y2)

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
java.awt.Graphics implementation.
Overrides:
fillRect in class Graphics
See Also:
Graphics

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
java.awt.Graphics implementation.
Overrides:
clearRect in class Graphics
See Also:
Graphics

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
java.awt.Graphics implementation.
Overrides:
drawRoundRect in class Graphics
See Also:
Graphics

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
java.awt.Graphics implementation.
Overrides:
fillRoundRect in class Graphics
See Also:
Graphics

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Same implementation as in the class java.awtGraphics except it doesn't use Color class.
Overrides:
draw3DRect in class Graphics

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Same implementation as in the class java.awtGraphics except it doesn't use Color class.
Overrides:
fill3DRect in class Graphics

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
java.awt.Graphics implementation.
Overrides:
drawOval in class Graphics
See Also:
Graphics

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
java.awt.Graphics implementation.
Overrides:
fillOval in class Graphics
See Also:
Graphics

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int start,
                    int arcAngle)
java.awt.Graphics implementation.
Overrides:
drawArc in class Graphics
See Also:
Graphics

getBoundingShape

private int getBoundingShape(int[] xPoints,
                             int[] yPoints,
                             int startAngle,
                             int arcAngle,
                             int centerX,
                             int centerY,
                             int boundingX,
                             int boundingY,
                             int boundingWidth,
                             int boundingHeight)
This method builds a bounding polygon of an arc of arcAngle degres starting at startAngle, and returnsthe number of points set in xPoints and yPoints tables.

tanOrCotanShift16

private int tanOrCotanShift16(int angle)
Returns the tangent of angle if angle is between -45 deg and 45 deg or between 135 deg and 225 deg, or returns the cotangent of angle if angle is between 45 deg and 135 deg or between 225 deg and 315 deg

getBoundingPointAtAngle

private Point getBoundingPointAtAngle(int boundingX,
                                      int boundingY,
                                      int boundingWidth,
                                      int boundingHeight,
                                      int angle)

drawArcPoint

private void drawArcPoint(int[] xPoints,
                          int[] yPoints,
                          int nPoints,
                          PJAGraphics.PJARectangle bounds,
                          int x,
                          int y)

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int start,
                    int arcAngle)
java.awt.Graphics implementation.
Overrides:
fillArc in class Graphics
See Also:
Graphics

drawArcHorizontalLine

private void drawArcHorizontalLine(int[] xPoints,
                                   int[] yPoints,
                                   int nPoints,
                                   PJAGraphics.PJARectangle bounds,
                                   int xLeft,
                                   int xRight,
                                   int y)

roundDiv

public static int roundDiv(int dividend,
                           int divisor)
Returns the rounded result of dividend / divisor, avoiding the use of floating point operation (returns the same as Math.round((float)dividend / divisor)).
Parameters:
dividend - A int number to divide.
divisor - A int divisor.
Returns:
dividend / divisor rounded to the closest int integer.

roundDiv

public static long roundDiv(long dividend,
                            long divisor)
Returns the rounded result of dividend / divisor, avoiding the use of floating point operation (returns the same as Math.round((double)dividend / divisor)).
Parameters:
dividend - A long number to divide.
divisor - A long divisor.
Returns:
dividend / divisor rounded to the closest long integer.

parseCircleQuarter

private void parseCircleQuarter(int x,
                                int y,
                                int width,
                                int height,
                                boolean fill,
                                PJAGraphics.CircleQuarterListener listener)
Enumerates all the points of the quarter of an ellipse. Each computed point is sent to the method newPoint () of the interface CircleQuarterListener.

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
java.awt.Graphics implementation.
Overrides:
drawPolyline in class Graphics
See Also:
Graphics

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
java.awt.Graphics implementation.
Overrides:
drawPolygon in class Graphics
See Also:
Graphics

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
java.awt.Graphics implementation.
Overrides:
fillPolygon in class Graphics
See Also:
Graphics

getBoundingBox

private PJAGraphics.PJARectangle getBoundingBox(int[] xpoints,
                                                int[] ypoints,
                                                int npoints)

contains

private boolean contains(int[] xPoints,
                         int[] yPoints,
                         int nPoints,
                         PJAGraphics.PJARectangle bounds,
                         int x,
                         int y)

drawString

public void drawString(String str,
                       int x,
                       int y)
java.awt.Graphics implementation. Strings are drawn using .pjaf font files read in PJAFontData objects by PJAGraphicsManager.
Overrides:
drawString in class Graphics
See Also:
PJAGraphicsManager, PJAFontData, Graphics

drawString

public void drawString(AttributedCharacterIterator iterator,
                       int x,
                       int y)
java.awt.Graphics implementation.
Overrides:
drawString in class Graphics
See Also:
Graphics

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         ImageObserver observer)
java.awt.Graphics implementation.
Overrides:
drawImage in class Graphics
See Also:
Graphics

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         Color bgcolor,
                         ImageObserver observer)
java.awt.Graphics implementation.
Overrides:
drawImage in class Graphics
See Also:
Graphics

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         ImageObserver observer)
java.awt.Graphics implementation.
Overrides:
drawImage in class Graphics
See Also:
Graphics

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         Color bgcolor,
                         ImageObserver observer)
java.awt.Graphics implementation.
Overrides:
drawImage in class Graphics
See Also:
Graphics

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         ImageObserver observer)
java.awt.Graphics implementation.
Overrides:
drawImage in class Graphics
See Also:
Graphics

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         Color bgcolor,
                         ImageObserver observer)
java.awt.Graphics implementation.
Overrides:
drawImage in class Graphics
See Also:
Graphics

dispose

public void dispose()
java.awt.Graphics implementation.
Overrides:
dispose in class Graphics
See Also:
Graphics