|
PJA Toolkit 2.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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 |
---|
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)
java.lang.String getFontName()
getFont ().getName ()
call with a
Graphics
instance, but doesn't need to instantiate a Font
object.
Graphics.getFont()
int getFontStyle()
getFont ().getStyle ()
call with a
Graphics
instance, but doesn't need to instantiate a Font
object.
Graphics.getFont()
int getFontSize()
getFont ().getSize ()
call with a
Graphics
instance, but doesn't need to instantiate a Font
object.
Graphics.getFont()
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
int getColorRGB()
getColor ().getRGB ()
call with a
Graphics
instance, but doesn't need to instantiate a Color
object.
Graphics.getFont()
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
int getFontLeading()
getFontMetrics ().getLeading ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getLeading()
int getFontAscent()
getFontMetrics ().getAscent ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getAscent()
int getFontDescent()
getFontMetrics ().getDescent ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getDescent()
int getFontMaxAscent()
getFontMetrics ().getMaxAscent ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getMaxAscent()
int getFontMaxDescent()
getFontMetrics ().getMaxDescent ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getMaxDescent()
int getFontMaxAdvance()
getFontMetrics ().getMaxAdvance ()
call with a
Graphics
instance, but doesn't need to instantiate a FontMetrics
object.
FontMetrics.getMaxAdvance()
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)
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)
|
PJA Toolkit 2.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |