Package jsyntaxpane

Class SyntaxStyle

java.lang.Object
jsyntaxpane.SyntaxStyle

public final class SyntaxStyle extends Object
This class represents the Style for a TokenType. This class is responsible for actually drawing a Token on the View.
  • Constructor Details

    • SyntaxStyle

      public SyntaxStyle()
    • SyntaxStyle

      public SyntaxStyle(Color color, boolean bold, boolean italic)
    • SyntaxStyle

      public SyntaxStyle(Color color, int fontStyle)
    • SyntaxStyle

      public SyntaxStyle(String str)
  • Method Details

    • isBold

      public boolean isBold()
    • setBold

      public void setBold(Boolean bold)
    • getColorString

      public String getColorString()
    • setColorString

      public void setColorString(String color)
    • isItalic

      public Boolean isItalic()
    • setItalic

      public void setItalic(Boolean italic)
    • getFontStyle

      public int getFontStyle()
    • getColor

      public Color 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 text
      x - - the X origin >= 0
      y - - the Y origin >= 0
      graphics - - the graphics context
      e - - 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: