| java.lang.Object net.xoetrope.builder.editor.syntaxhighlight.SyntaxStyle
SyntaxStyle | public class SyntaxStyle (Code) | | A simple text style class. It can specify the color, italic flag,
and bold flag of a run of text.
author: Slava Pestov version: $Id: SyntaxStyle.java,v 1.22 2005/01/05 17:20:49 luano Exp $ |
Constructor Summary | |
public | SyntaxStyle(Color color, boolean italic, boolean bold) Creates a new SyntaxStyle. |
Method Summary | |
public Color | getColor() Returns the color specified in this style. | public FontMetrics | getFontMetrics(Font font) Returns the font metrics for the styled font. | public Font | getStyledFont(Font font) Returns the specified font, but with the style's bold and
italic flags applied. | public boolean | isBold() Returns true if boldface is enabled for this style. | public boolean | isItalic() Returns true if italics is enabled for this style. | public boolean | isPlain() Returns true if no font styles are enabled. | public void | setGraphicsFlags(Graphics gfx, Font font) Sets the foreground color and font of the specified graphics
context to that specified in this style. | public String | toString() Returns a string representation of this object. |
SyntaxStyle | public SyntaxStyle(Color color, boolean italic, boolean bold)(Code) | | Creates a new SyntaxStyle.
Parameters: color - The text color Parameters: italic - True if the text should be italics Parameters: bold - True if the text should be bold |
getColor | public Color getColor()(Code) | | Returns the color specified in this style.
|
getFontMetrics | public FontMetrics getFontMetrics(Font font)(Code) | | Returns the font metrics for the styled font.
|
getStyledFont | public Font getStyledFont(Font font)(Code) | | Returns the specified font, but with the style's bold and
italic flags applied.
|
isBold | public boolean isBold()(Code) | | Returns true if boldface is enabled for this style.
|
isItalic | public boolean isItalic()(Code) | | Returns true if italics is enabled for this style.
|
isPlain | public boolean isPlain()(Code) | | Returns true if no font styles are enabled.
|
setGraphicsFlags | public void setGraphicsFlags(Graphics gfx, Font font)(Code) | | Sets the foreground color and font of the specified graphics
context to that specified in this style.
Parameters: gfx - The graphics context Parameters: font - The font to add the styles to |
toString | public String toString()(Code) | | Returns a string representation of this object.
|
|
|