public class SyntaxStyle
A simple text style class. It can specify the color, italic flag, and bold flag of a run of text.
Constructor and description |
---|
SyntaxStyle
(java.awt.Color color, boolean italic, boolean bold) Creates a new SyntaxStyle. |
Type Params | Return Type | Name and description |
---|---|---|
|
public java.awt.Color |
getColor() Returns the color specified in this style. |
|
public java.awt.FontMetrics |
getFontMetrics(java.awt.Font font) Returns the font metrics for the styled font. |
|
public java.awt.Font |
getStyledFont(java.awt.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(java.awt.Graphics gfx, java.awt.Font font) Sets the foreground color and font of the specified graphics context to that specified in this style. |
|
public java.lang.String |
toString() Returns a string representation of this object. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Creates a new SyntaxStyle.
color
- The text coloritalic
- True if the text should be italicsbold
- True if the text should be boldReturns the color specified in this style.
Returns the font metrics for the styled font.
Returns the specified font, but with the style's bold and italic flags applied.
Returns true if boldface is enabled for this style.
Returns true if italics is enabled for this style.
Returns true if no font styles are enabled.
Sets the foreground color and font of the specified graphics context to that specified in this style.
gfx
- The graphics contextfont
- The font to add the styles toReturns a string representation of this object.
ReadyAPI functional (soapui) SDK 3.57.0