|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmars.venus.editors.jeditsyntax.SyntaxStyle
public class SyntaxStyle
A simple text style class. It can specify the color, italic flag, and bold flag of a run of text.
| Constructor Summary | |
|---|---|
SyntaxStyle(Color color,
boolean italic,
boolean bold)
Creates a new SyntaxStyle. |
|
| Method Summary | |
|---|---|
Color |
getColor()
Returns the color specified in this style. |
String |
getColorAsHexString()
Returns the color coded as Stringified 32-bit hex with Red in bits 16-23, Green in bits 8-15, Blue in bits 0-7 e.g. |
FontMetrics |
getFontMetrics(Font font)
Returns the font metrics for the styled font. |
Font |
getStyledFont(Font font)
Returns the specified font, but with the style's bold and italic flags applied. |
boolean |
isBold()
Returns true if boldface is enabled for this style. |
boolean |
isItalic()
Returns true if italics is enabled for this style. |
boolean |
isPlain()
Returns true if no font styles are enabled. |
void |
setGraphicsFlags(Graphics gfx,
Font font)
Sets the foreground color and font of the specified graphics context to that specified in this style. |
String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SyntaxStyle(Color color,
boolean italic,
boolean bold)
color - The text coloritalic - True if the text should be italicsbold - True if the text should be bold| Method Detail |
|---|
public Color getColor()
public String getColorAsHexString()
public boolean isPlain()
public boolean isItalic()
public boolean isBold()
public Font getStyledFont(Font font)
public FontMetrics getFontMetrics(Font font)
public void setGraphicsFlags(Graphics gfx,
Font font)
gfx - The graphics contextfont - The font to add the styles topublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||