http://www.eteks.com

com.eteks.awt
インタフェース PJAGraphicsExtension

既知の実装クラスの一覧:
PJAGraphics

public interface PJAGraphicsExtension

Pure Java AWT Graphics extension. This interface lists extension methods implemented by Graphics classes. This methods may be usefull for graphics operation when security manager is restrictive.

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

メソッドの概要
 int getCharWidth(char ch)
          Returns the advance width of the specified character of the current font.
 int getColorRGB()
          Returns the graphics current color.
 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.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.
 void setColor(int red, int green, int blue)
          Sets the graphics context's color.
 void setFont(java.lang.String fontName, int fontStyle, int fontSize)
          Sets the graphics font to the specified font specified by its name, style and size.
 void setXORMode(int red, int green, int blue)
          Sets this graphics context's XOR color.
 

メソッドの詳細

setFont

public void setFont(java.lang.String fontName,
                    int fontStyle,
                    int fontSize)
Sets the graphics font to the specified font specified by its name, style and size. It has the same effect as setFont (Font) of Graphics class, but doesn't need to instantiate a Font object.
パラメータ:
fontName - the font name.
fontStyle - the font style.
fontSize - the font size.
導入されたバージョン:
PJA1.1
関連項目:
Graphics.setFont(Font)

getFontName

public java.lang.String getFontName()
Returns the graphics current font name. It has the same effect as getFont ().getName () call with a Graphics instance, but doesn't need to instantiate a Font object.
戻り値:
the font name.
導入されたバージョン:
PJA1.1
関連項目:
Graphics.getFont()

getFontStyle

public int getFontStyle()
Returns the graphics current font style. It has the same effect as getFont ().getStyle () call with a Graphics instance, but doesn't need to instantiate a Font object.
戻り値:
the font style.
導入されたバージョン:
PJA1.1
関連項目:
Graphics.getFont()

getFontSize

public int getFontSize()
Returns the graphics current font size. It has the same effect as getFont ().getSize () call with a Graphics instance, but doesn't need to instantiate a Font object.
戻り値:
the font size.
導入されたバージョン:
PJA1.1
関連項目:
Graphics.getFont()

setColor

public void setColor(int red,
                     int green,
                     int blue)
Sets the graphics context's color. It has the same effect as setColor (Color) of Graphics class, but doesn't need to instantiate a Font object.
パラメータ:
red - the red component.
green - the green component.
blue - the blue component.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

getColorRGB

public int getColorRGB()
Returns the graphics current color. It has the same effect as getColor ().getRGB () call with a Graphics instance, but doesn't need to instantiate a Color object.
戻り値:
the color RGB.
導入されたバージョン:
PJA1.1
関連項目:
Graphics.getFont()

setXORMode

public void setXORMode(int red,
                       int green,
                       int blue)
Sets this graphics context's XOR color. It has the same effect as setXORMode (Color) of Graphics class, but doesn't need to instantiate a Font object.
パラメータ:
red - the red component.
green - the green component.
blue - the blue component.
導入されたバージョン:
PJA1.1
関連項目:
PJAGraphicsExtension

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. It has the same effect as getFontMetrics ().getLeading () call with a Graphics instance, but doesn't need to instantiate a FontMetrics object.
戻り値:
the standard leading of the current font.
導入されたバージョン:
PJA1.1
関連項目:
FontMetrics.getLeading()

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. It has the same effect as getFontMetrics ().getAscent () call with a Graphics instance, but doesn't need to instantiate a FontMetrics object.
戻り値:
the font ascent of the font.
導入されたバージョン:
PJA1.1
関連項目:
FontMetrics.getAscent()

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. It has the same effect as getFontMetrics ().getDescent () call with a Graphics instance, but doesn't need to instantiate a FontMetrics object.
戻り値:
the font descent of the font.
導入されたバージョン:
PJA1.1
関連項目:
FontMetrics.getDescent()

getFontMaxAscent

public int getFontMaxAscent()
Determines the maximum ascent of the current font. No character extends further above the font's baseline than this height. It has the same effect as getFontMetrics ().getMaxAscent () call with a Graphics instance, but doesn't need to instantiate a FontMetrics object.
戻り値:
the maximum ascent of any character in the font.
導入されたバージョン:
PJA1.1
関連項目:
FontMetrics.getMaxAscent()

getFontMaxDescent

public int getFontMaxDescent()
Determines the maximum descent of the current font. No character extends further below the font's baseline than this height. It has the same effect as getFontMetrics ().getMaxDescent () call with a Graphics instance, but doesn't need to instantiate a FontMetrics object.
戻り値:
the maximum descent of any character in the font.
導入されたバージョン:
PJA1.1
関連項目:
FontMetrics.getMaxDescent()

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. It has the same effect as getFontMetrics ().getMaxAdvance () call with a Graphics instance, but doesn't need to instantiate a FontMetrics object.
戻り値:
the maximum advance width of any character in the font.
導入されたバージョン:
PJA1.1
関連項目:
FontMetrics.getMaxAdvance()

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. It has the same effect as getFontMetrics ().charWidth (ch) call with a Graphics instance, but doesn't need to instantiate a FontMetrics object.
パラメータ:
ch - the character to be measured
戻り値:
the advance width of the specified char in the font described by this font metric.
導入されたバージョン:
PJA1.1
関連項目:
FontMetrics.charWidth(int)

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. It has the same effect as getFontMetrics ().stringWidth (str) call with a Graphics instance, but doesn't need to instantiate a FontMetrics object.
パラメータ:
str - the String to be measured
戻り値:
the advance width of the specified string in the font described by this font metric.
導入されたバージョン:
PJA1.1
関連項目:
FontMetrics.stringWidth(java.lang.String)

© 1997-2001 eTeks - All rights reserved