Package jade.tools.gui
Class ACLSytntaxStyle
- java.lang.Object
-
- jade.tools.gui.ACLSytntaxStyle
-
public class ACLSytntaxStyle extends Object
A simple text style class. It can specify the color, italic flag, and bold flag of a run of text. The original file is written by Slava Pestov (www.gjt.org) and altered to fit ACL/SL.- Author:
- Chris van Aart - Acklin B.V., the Netherlands & Slava Pestov
-
-
Constructor Summary
Constructors Constructor Description ACLSytntaxStyle(Color color, boolean italics, boolean bold, JComponent theComp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetColor()Returns the color specified in this style.FontMetricsgetFontMetrics(Font font)Returns the font metrics for the styled font.FontgetStyledFont(Font font)Returns the specified font, but with the style's bold and italic flags applied.booleanisBold()Returns true if boldface is enabled for this style.booleanisItalics()Returns true if italics is enabled for this style.voidsetGraphicsFlags(Graphics gfx, Font font)Sets the foreground color and font of the specified graphics context to that specified in this style.StringtoString()Returns a string representation of this object.
-
-
-
Constructor Detail
-
ACLSytntaxStyle
public ACLSytntaxStyle(Color color, boolean italics, boolean bold, JComponent theComp)
-
-
Method Detail
-
getColor
public Color getColor()
Returns the color specified in this style.- Returns:
- The Color value
-
isItalics
public boolean isItalics()
Returns true if italics is enabled for this style.- Returns:
- The Italics value
-
isBold
public boolean isBold()
Returns true if boldface is enabled for this style.- Returns:
- The Bold value
-
getStyledFont
public Font getStyledFont(Font font)
Returns the specified font, but with the style's bold and italic flags applied.- Parameters:
font- Description of Parameter- Returns:
- The StyledFont value
-
getFontMetrics
public FontMetrics getFontMetrics(Font font)
Returns the font metrics for the styled font.- Parameters:
font- Description of Parameter- Returns:
- The FontMetrics value
-
setGraphicsFlags
public void setGraphicsFlags(Graphics gfx, Font font)
Sets the foreground color and font of the specified graphics context to that specified in this style.- Parameters:
gfx- The graphics contextfont- The font to add the styles to
-
-