Interface TokenPainter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      float paint​(Token token, java.awt.Graphics2D g, float x, float y, RSyntaxTextArea host, javax.swing.text.TabExpander e)
      Paints this token.
      float paint​(Token token, java.awt.Graphics2D g, float x, float y, RSyntaxTextArea host, javax.swing.text.TabExpander e, float clipStart)
      Paints this token.
      float paint​(Token token, java.awt.Graphics2D g, float x, float y, RSyntaxTextArea host, javax.swing.text.TabExpander e, float clipStart, boolean paintBG)
      Paints this token.
      float paintSelected​(Token token, java.awt.Graphics2D g, float x, float y, RSyntaxTextArea host, javax.swing.text.TabExpander e, boolean useSTC)
      Paints this token as it should appear in a selected region of text (assuming painting with a selection-foreground color is enabled in the parent RSyntaxTextArea).
      float paintSelected​(Token token, java.awt.Graphics2D g, float x, float y, RSyntaxTextArea host, javax.swing.text.TabExpander e, float clipStart, boolean useSTC)
      Paints this token as it should appear in a selected region of text (assuming painting with a selection-foreground color is enabled in the parent RSyntaxTextArea).
    • Method Detail

      • paint

        float paint​(Token token,
                    java.awt.Graphics2D g,
                    float x,
                    float y,
                    RSyntaxTextArea host,
                    javax.swing.text.TabExpander e)
        Paints this token.
        Parameters:
        token - The token to render.
        g - The graphics context in which to paint.
        x - The x-coordinate at which to paint.
        y - The y-coordinate at which to paint.
        host - The text area this token is in.
        e - How to expand tabs.
        Returns:
        The x-coordinate representing the end of the painted text.
      • paint

        float paint​(Token token,
                    java.awt.Graphics2D g,
                    float x,
                    float y,
                    RSyntaxTextArea host,
                    javax.swing.text.TabExpander e,
                    float clipStart)
        Paints this token.
        Parameters:
        token - The token to render.
        g - The graphics context in which to paint.
        x - The x-coordinate at which to paint.
        y - The y-coordinate at which to paint.
        host - The text area this token is in.
        e - How to expand tabs.
        clipStart - The left boundary of the clip rectangle in which we're painting. This optimizes painting by allowing us to not paint when this token is "to the left" of the clip rectangle.
        Returns:
        The x-coordinate representing the end of the painted text.
      • paint

        float paint​(Token token,
                    java.awt.Graphics2D g,
                    float x,
                    float y,
                    RSyntaxTextArea host,
                    javax.swing.text.TabExpander e,
                    float clipStart,
                    boolean paintBG)
        Paints this token.
        Parameters:
        token - The token to render.
        g - The graphics context in which to paint.
        x - The x-coordinate at which to paint.
        y - The y-coordinate at which to paint.
        host - The text area this token is in.
        e - How to expand tabs.
        clipStart - The left boundary of the clip rectangle in which we're painting. This optimizes painting by allowing us to not paint when this token is "to the left" of the clip rectangle.
        paintBG - Whether to paint the background.
        Returns:
        The x-coordinate representing the end of the painted text.
      • paintSelected

        float paintSelected​(Token token,
                            java.awt.Graphics2D g,
                            float x,
                            float y,
                            RSyntaxTextArea host,
                            javax.swing.text.TabExpander e,
                            boolean useSTC)
        Paints this token as it should appear in a selected region of text (assuming painting with a selection-foreground color is enabled in the parent RSyntaxTextArea).
        Parameters:
        token - The token to render.
        g - The graphics context in which to paint.
        x - The x-coordinate at which to paint.
        y - The y-coordinate at which to paint.
        host - The text area this token is in.
        e - How to expand tabs.
        useSTC - Whether to use the text area's "selected text color."
        Returns:
        The x-coordinate representing the end of the painted text.
      • paintSelected

        float paintSelected​(Token token,
                            java.awt.Graphics2D g,
                            float x,
                            float y,
                            RSyntaxTextArea host,
                            javax.swing.text.TabExpander e,
                            float clipStart,
                            boolean useSTC)
        Paints this token as it should appear in a selected region of text (assuming painting with a selection-foreground color is enabled in the parent RSyntaxTextArea).
        Parameters:
        token - The token to render.
        g - The graphics context in which to paint.
        x - The x-coordinate at which to paint.
        y - The y-coordinate at which to paint.
        host - The text area this token is in.
        e - How to expand tabs.
        clipStart - The left boundary of the clip rectangle in which we're painting. This optimizes painting by allowing us to not paint when this token is "to the left" of the clip rectangle.
        useSTC - Whether to use the text area's "selected text color."
        Returns:
        The x-coordinate representing the end of the painted text.