|
http://www.eteks.com | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
PJAGraphicsManager
,
PJAGraphics
,
Graphics
Method Summary | |
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. |
Method Detail |
public void setFont(java.lang.String fontName, int fontStyle, int fontSize)
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.Graphics.setFont(Font)
public java.lang.String getFontName()
getFont ().getName ()
call with a
Graphics
instance, but doesn't need to instantiate a Font
object.
Graphics.getFont()
public int getFontStyle()
getFont ().getStyle ()
call with a
Graphics
instance, but doesn't need to instantiate a Font
object.
Graphics.getFont()
public int getFontSize()
getFont ().getSize ()
call with a
Graphics
instance, but doesn't need to instantiate a Font
object.
Graphics.getFont()
public void setColor(int red, int green, int blue)
Graphics
class,
but doesn't need to instantiate a
red
- the red component.green
- the green component.blue
- the blue component.PJAGraphicsExtension
public int getColorRGB()
getColor ().getRGB ()
call with a
Graphics
instance, but doesn't need to instantiate a Color
object.
Graphics.getFont()
public void setXORMode(int red, int green, int blue)
Graphics
class,
but doesn't need to instantiate a
red
- the red component.green
- the green component.blue
- the blue component.PJAGraphicsExtension
public int getFontLeading()
getFontMetrics ().getLeading ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getLeading()
public int getFontAscent()
getFontMetrics ().getAscent ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getAscent()
public int getFontDescent()
getFontMetrics ().getDescent ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getDescent()
public int getFontMaxAscent()
getFontMetrics ().getMaxAscent ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getMaxAscent()
public int getFontMaxDescent()
getFontMetrics ().getMaxDescent ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getMaxDescent()
public int getFontMaxAdvance()
getFontMetrics ().getMaxAdvance ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getMaxAdvance()
public int getCharWidth(char ch)
getFontMetrics ().charWidth (ch)
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
ch
- the character to be measured
char
in the font described by this font metric.FontMetrics.charWidth(int)
public int getStringWidth(java.lang.String str)
getFontMetrics ().stringWidth (str)
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
str
- the String to be measured
FontMetrics.stringWidth(java.lang.String)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |