Package jsyntaxpane
Class SyntaxStyle
java.lang.Object
jsyntaxpane.SyntaxStyle
This class represents the Style for a TokenType. This class is responsible
for actually drawing a Token on the View.
-
Constructor Summary
ConstructorsConstructorDescriptionSyntaxStyle(Color color, boolean bold, boolean italic) SyntaxStyle(Color color, int fontStyle) SyntaxStyle(String str) -
Method Summary
Modifier and TypeMethodDescriptionintdrawText(Segment segment, int x, int y, Graphics graphics, TabExpander e, int startOffset) Draw text.getColor()intbooleanisBold()isItalic()voidvoidsetColorString(String color) void
-
Constructor Details
-
SyntaxStyle
public SyntaxStyle() -
SyntaxStyle
-
SyntaxStyle
-
SyntaxStyle
-
-
Method Details
-
isBold
public boolean isBold() -
setBold
-
getColorString
-
setColorString
-
isItalic
-
setItalic
-
getFontStyle
public int getFontStyle() -
getColor
-
drawText
public int drawText(Segment segment, int x, int y, Graphics graphics, TabExpander e, int startOffset) Draw text. This can directly call the Utilities.drawTabbedText. Sub-classes can override this method to provide any other decorations.- Parameters:
segment- - the source of the textx- - the X origin >= 0y- - the Y origin >= 0graphics- - the graphics contexte- - how to expand the tabs. If this value is null, tabs will be expanded as a space character.startOffset- - starting offset of the text in the document >= 0- Returns:
-