http://www.eteks.com

com.eteks.awt
クラス PJAGraphics

java.lang.Object
  |
  +--java.awt.Graphics
        |
        +--com.eteks.awt.PJAGraphics
すべての実装インタフェース:
PJAGraphicsExtension

public class PJAGraphics
extends java.awt.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.

導入されたバージョン:
PJA1.0
バージョン:
2.3.1
作成者:
Emmanuel Puybaret
関連項目:
PJAImage, Graphics, PJAGraphicsManager

コンストラクタの概要
protected PJAGraphics(PJAImage image)
           
 
メソッドの概要
 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.
 void copyArea(int x, int y, int width, int height, int dx, int dy)
          java.awt.Graphics implementation.
 java.awt.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.
 boolean drawImage(java.awt.Image img, int x, int y, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
          java.awt.Graphics implementation.
 boolean drawImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
          java.awt.Graphics implementation.
 boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
          java.awt.Graphics implementation.
 boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
          java.awt.Graphics implementation.
 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)
          java.awt.Graphics implementation.
 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)
          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.
 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(java.text.AttributedCharacterIterator iterator, int x, int y)
          java.awt.Graphics implementation.
 void drawString(java.lang.String str, int x, int y)
          java.awt.Graphics implementation.
 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.
 int getCharWidth(char ch)
          Returns the advance width of the specified character of the current font.
 java.awt.Shape getClip()
          java.awt.Graphics implementation.
 java.awt.Rectangle getClipBounds()
          java.awt.Graphics implementation.
 java.awt.Color getColor()
          java.awt.Graphics implementation.
 int getColorRGB()
          Returns the graphics current color RGB.
 java.awt.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.
 java.awt.FontMetrics getFontMetrics()
          java.awt.Graphics implementation.
 java.awt.FontMetrics getFontMetrics(java.awt.Font font)
          java.awt.Graphics implementation.
 java.lang.String getFontName()
          Returns the graphics current font name.
 int getFontSize()
          Returns the graphics current font size.
 int getFontStyle()
          Returns the graphics current font style.
 int getStringWidth(java.lang.String str)
          Returns the total advance width for showing the specified String of the current Font.
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(java.awt.Shape clip)
          java.awt.Graphics implementation.
 void setColor(java.awt.Color color)
          java.awt.Graphics implementation.
 void setColor(int red, int green, int blue)
          Sets this graphics context's color.
 void setFont(java.awt.Font font)
          java.awt.Graphics implementation.
 void setFont(java.lang.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(java.awt.Color c1)
          java.awt.Graphics implementation.
 void setXORMode(int red, int green, int blue)
          Sets this graphics context's XOR color.
 void translate(int x, int y)
          java.awt.Graphics implementation.
 
クラス java.awt.Graphics から継承したメソッド
create, drawBytes, drawChars, drawPolygon, drawRect, fillPolygon, finalize, getClipBounds, getClipRect, hitClip, toString
 
クラス java.lang.Object から継承したメソッド
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

PJAGraphics

protected PJAGraphics(PJAImage image)
メソッドの詳細

create

public java.awt.Graphics create()
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の create
関連項目:
Graphics

translate

public void translate(int x,
                      int y)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の translate
関連項目:
Graphics

getColor

public java.awt.Color getColor()
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の getColor
関連項目:
Graphics

setColor

public void setColor(java.awt.Color color)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の setColor
関連項目:
Graphics

getColorRGB

public int getColorRGB()
Returns the graphics current color RGB. PJAGraphicsExtension implementation.
定義:
インタフェース PJAGraphicsExtension 内の getColorRGB
戻り値:
the color RGB.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

setColor

public void setColor(int red,
                     int green,
                     int blue)
Sets this graphics context's color. PJAGraphicsExtension implementation.
定義:
インタフェース PJAGraphicsExtension 内の setColor
パラメータ:
red - the red component.
green - the green component.
blue - the blue component.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

setPaintMode

public void setPaintMode()
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の setPaintMode
関連項目:
Graphics

setXORMode

public void setXORMode(java.awt.Color c1)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の setXORMode
関連項目:
Graphics

setXORMode

public void setXORMode(int red,
                       int green,
                       int blue)
Sets this graphics context's XOR color. PJAGraphicsExtension implementation.
定義:
インタフェース PJAGraphicsExtension 内の setXORMode
パラメータ:
red - the red component.
green - the green component.
blue - the blue component.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

getFontMetrics

public java.awt.FontMetrics getFontMetrics()
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の getFontMetrics
関連項目:
Graphics

getFontMetrics

public java.awt.FontMetrics getFontMetrics(java.awt.Font font)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の getFontMetrics
関連項目:
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.
定義:
インタフェース PJAGraphicsExtension 内の getFontLeading
戻り値:
the standard leading of the current font.
導入されたバージョン:
PJA1.1
関連項目:
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.
定義:
インタフェース PJAGraphicsExtension 内の getFontAscent
戻り値:
the font ascent of the font.
導入されたバージョン:
PJA1.1
関連項目:
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.
定義:
インタフェース PJAGraphicsExtension 内の getFontDescent
戻り値:
the font descent of the font.
導入されたバージョン:
PJA1.1
関連項目:
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.
定義:
インタフェース PJAGraphicsExtension 内の getFontMaxAscent
戻り値:
the maximum ascent of any character in the font.
導入されたバージョン:
PJA1.1
関連項目:
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.
定義:
インタフェース PJAGraphicsExtension 内の getFontMaxDescent
戻り値:
the maximum descent of any character in the font.
導入されたバージョン:
PJA1.1
関連項目:
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.
定義:
インタフェース PJAGraphicsExtension 内の getFontMaxAdvance
戻り値:
the maximum advance width of any character in the font.
導入されたバージョン:
PJA1.1
関連項目:
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.
定義:
インタフェース PJAGraphicsExtension 内の getCharWidth
パラメータ:
ch - the character to be measured
戻り値:
the advance width of the specified char in the font described by this font metric.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

getStringWidth

public int getStringWidth(java.lang.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.
定義:
インタフェース PJAGraphicsExtension 内の getStringWidth
パラメータ:
str - the String to be measured
戻り値:
the advance width of the specified string in the font described by this font metric.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

getFont

public java.awt.Font getFont()
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の getFont
関連項目:
Graphics

getFontName

public java.lang.String getFontName()
Returns the graphics current font name. Returns null if no font could be loaded from .pjaf font files. PJAGraphicsExtension implementation.
定義:
インタフェース PJAGraphicsExtension 内の getFontName
戻り値:
the font name.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

getFontStyle

public int getFontStyle()
Returns the graphics current font style. PJAGraphicsExtension implementation.
定義:
インタフェース PJAGraphicsExtension 内の getFontStyle
戻り値:
the font style.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

getFontSize

public int getFontSize()
Returns the graphics current font size. PJAGraphicsExtension implementation.
定義:
インタフェース PJAGraphicsExtension 内の getFontSize
戻り値:
the font size.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

setFont

public void setFont(java.awt.Font font)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の setFont
関連項目:
Graphics

setFont

public void setFont(java.lang.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.
定義:
インタフェース PJAGraphicsExtension 内の setFont
パラメータ:
fontName - the font name.
fontStyle - the font style.
fontSize - the font size.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension, Graphics.setFont(Font)

getClipBounds

public java.awt.Rectangle getClipBounds()
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の getClipBounds
関連項目:
Graphics

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の clipRect
関連項目:
Graphics

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の setClip
関連項目:
Graphics

getClip

public java.awt.Shape getClip()
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の getClip
関連項目:
Graphics

setClip

public void setClip(java.awt.Shape clip)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の setClip
関連項目:
Graphics

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int dx,
                     int dy)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の copyArea
関連項目:
Graphics

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
オーバーライド:
クラス java.awt.Graphics 内の drawLine

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の fillRect
関連項目:
Graphics

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の clearRect
関連項目:
Graphics

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawRoundRect
関連項目:
Graphics

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の fillRoundRect
関連項目:
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.
オーバーライド:
クラス java.awt.Graphics 内の draw3DRect

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.
オーバーライド:
クラス java.awt.Graphics 内の fill3DRect

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawOval
関連項目:
Graphics

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の fillOval
関連項目:
Graphics

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int start,
                    int arcAngle)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawArc
関連項目:
Graphics

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int start,
                    int arcAngle)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の fillArc
関連項目:
Graphics

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)).
パラメータ:
dividend - A int number to divide.
divisor - A int divisor.
戻り値:
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)).
パラメータ:
dividend - A long number to divide.
divisor - A long divisor.
戻り値:
dividend / divisor rounded to the closest long integer.

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawPolyline
関連項目:
Graphics

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawPolygon
関連項目:
Graphics

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の fillPolygon
関連項目:
Graphics

drawString

public void drawString(java.lang.String str,
                       int x,
                       int y)
java.awt.Graphics implementation. Strings are drawn using .pjaf font files read in PJAFontData objects by PJAGraphicsManager.
オーバーライド:
クラス java.awt.Graphics 内の drawString
関連項目:
PJAGraphicsManager, PJAFontData, Graphics

drawString

public void drawString(java.text.AttributedCharacterIterator iterator,
                       int x,
                       int y)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawString
関連項目:
Graphics

drawImage

public boolean drawImage(java.awt.Image img,
                         int x,
                         int y,
                         java.awt.image.ImageObserver observer)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawImage
関連項目:
Graphics

drawImage

public boolean drawImage(java.awt.Image img,
                         int x,
                         int y,
                         java.awt.Color bgcolor,
                         java.awt.image.ImageObserver observer)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawImage
関連項目:
Graphics

drawImage

public boolean drawImage(java.awt.Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         java.awt.image.ImageObserver observer)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawImage
関連項目:
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)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawImage
関連項目:
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)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawImage
関連項目:
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)
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の drawImage
関連項目:
Graphics

dispose

public void dispose()
java.awt.Graphics implementation.
オーバーライド:
クラス java.awt.Graphics 内の dispose
関連項目:
Graphics

© 1997-2001 eTeks - All rights reserved