|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.editor.SyntaxStyle
public class SyntaxStyle
A simple text style class. It can specify the color, italic flag, and bold flag of a run of text.
| Field Summary |
|---|
| Fields inherited from interface com.jidesoft.editor.EffectStyle |
|---|
EFFECT_BORDERED, EFFECT_NONE, EFFECT_STRIKE_THROUGH, EFFECT_UNDERLINE, EFFECT_WAVED |
| Constructor Summary | |
|---|---|
SyntaxStyle()
|
|
SyntaxStyle(Color background)
|
|
SyntaxStyle(Color background,
Color foreground)
|
|
SyntaxStyle(Color background,
Color foreground,
Color stripeColor)
|
|
SyntaxStyle(Color foreground,
int fontStyle)
Creates a new SyntaxStyle. |
|
SyntaxStyle(int effect,
Color effectColor)
|
|
SyntaxStyle(int effect,
Color effectColor,
Color stripeColor)
|
|
| Method Summary | |
|---|---|
Color |
getBackground()
Gets the background. |
int |
getEffect()
Gets the effect. |
Color |
getEffectColor()
Gets the effect color. |
FontMetrics |
getFontMetrics(Font font,
Graphics g)
Returns the font metrics for the styled font. |
int |
getFontStyle()
Gets the font style. |
Color |
getForeground()
Returns the color specified in this style. |
Color |
getStripeColor()
Gets the stripe color. |
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 font style is not bold nor italic. |
void |
paintMarker(Graphics g,
int x1,
int x2,
int y,
FontMetrics fm)
|
void |
setBackground(Color background)
Sets the background. |
void |
setEffect(int effect)
Sets the effect. |
void |
setEffectColor(Color effectColor)
Sets the color of the effect. |
void |
setFontStyle(int fontStyle)
Sets the font style. |
void |
setForeground(Color foreground)
Sets the foreground. |
void |
setGraphicsFlags(Graphics gfx,
Font font)
Sets the foreground color and font of the specified graphics context to that specified in this style. |
void |
setStripeColor(Color stripeColor)
Sets the stripe color. |
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()
public SyntaxStyle(Color foreground,
int fontStyle)
foreground - The text colorfontStyle - as defined in Font.
public SyntaxStyle(int effect,
Color effectColor)
public SyntaxStyle(int effect,
Color effectColor,
Color stripeColor)
public SyntaxStyle(Color background)
public SyntaxStyle(Color background,
Color foreground)
public SyntaxStyle(Color background,
Color foreground,
Color stripeColor)
| Method Detail |
|---|
public Color getForeground()
getForeground in interface ColorStylepublic void setForeground(Color foreground)
ColorStyle
setForeground in interface ColorStyleforeground - the new foreground.public int getFontStyle()
getFontStyle in interface FontStylepublic void setFontStyle(int fontStyle)
setFontStyle in interface FontStylefontStyle - the font stylepublic boolean isItalic()
public boolean isBold()
isPlain()public boolean isPlain()
public Color getBackground()
ColorStyle
getBackground in interface ColorStylepublic void setBackground(Color background)
ColorStyle
setBackground in interface ColorStylebackground - the new background.public Color getEffectColor()
EffectStyle
getEffectColor in interface EffectStylepublic void setEffectColor(Color effectColor)
EffectStyle
setEffectColor in interface EffectStyleeffectColor - the new effect color.public int getEffect()
EffectStyle
getEffect in interface EffectStylepublic void setEffect(int effect)
EffectStyle
setEffect in interface EffectStyleeffect - the new effect.public Color getStripeColor()
EffectStyle
getStripeColor in interface EffectStylepublic void setStripeColor(Color stripeColor)
EffectStyle
setStripeColor in interface EffectStylestripeColor - the new stripe color. Null if you don't want to show any stripe for this effect.public Font getStyledFont(Font font)
font - the current font
public FontMetrics getFontMetrics(Font font,
Graphics g)
font - the fontg - the graphics
public void setGraphicsFlags(Graphics gfx,
Font font)
gfx - The graphics contextfont - The font to add the styles topublic String toString()
toString in class Object
public void paintMarker(Graphics g,
int x1,
int x2,
int y,
FontMetrics fm)
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||