Class JSyntaxStyleManager

java.lang.Object
net.thevpc.jeep.editor.JSyntaxStyleManager

public class JSyntaxStyleManager extends Object
The STyles to use for each TokenType. The defaults are created here, and then the resource META-INF/services/syntaxstyles.properties is read and merged. You can also pass a properties instance and merge your preferred styles into the default styles
Author:
Ayman
  • Constructor Details

    • JSyntaxStyleManager

      public JSyntaxStyleManager()
  • Method Details

    • getTokensFormat

      public JTokensStringFormat getTokensFormat()
    • getDefaultFont

      public static Font getDefaultFont()
    • isUseDefaultFont

      public boolean isUseDefaultFont()
    • setUseDefaultFont

      public JSyntaxStyleManager setUseDefaultFont(boolean useDefaultFont)
    • getFont

      public Font getFont()
    • setFont

      public JSyntaxStyleManager setFont(Font font)
    • getCaretColor

      public Color getCaretColor()
    • setCaretColor

      public JSyntaxStyleManager setCaretColor(Color caretColor)
    • setTokenIdStyle

      public void setTokenIdStyle(int type, JSyntaxStyle style)
    • getRightMarginColor

      public Color getRightMarginColor()
    • setRightMarginColor

      public JSyntaxStyleManager setRightMarginColor(Color rightMarginColor)
    • setGraphicsStyle

      @Deprecated public void setGraphicsStyle(Graphics g, int type)
      Deprecated.
      Set the graphics font and others to the style for the given token
      Parameters:
      g -
      type -
    • getTokenIdStyle

      public JSyntaxStyle getTokenIdStyle(JToken token)
    • getTokenIdStyle

      public JSyntaxStyle getTokenIdStyle(int type)
      Return the style for the given TokenType
      Parameters:
      type -
      Returns:
    • drawText

      public int drawText(Segment segment, int x, int y, Graphics graphics, TabExpander e, JToken token)
      Draw the given Token. This will simply find the proper JSyntaxStyle for the TokenType and then asks the proper Style to draw the text of the Token.
      Parameters:
      segment -
      x -
      y -
      graphics -
      e -
      token -
      Returns: