Fixes and updates

This commit is contained in:
Nico committed 2021-03-07 15:22:55 +01:00
1 parent d1710ea6a5
commit fb4da77359
211 files changed
+45363 -45571

No files matched your search

@@ -11,129 +11,99 @@ import java.awt.Graphics2D;
import javax.swing.text.TabExpander;
/**
* Renders tokens in an instance of {@link RSyntaxTextArea}. One instance
* may render tokens "regularly," another may render visible whitespace, for
* Renders tokens in an instance of {@link RSyntaxTextArea}. One instance may
* render tokens "regularly," another may render visible whitespace, for
* example.
*
* @author Robert Futrell
* @version 1.0
*/
interface TokenPainter {
/**
* Paints this token.
*
* @param token
* The token to render.
* @param g
* The graphics context in which to paint.
* @param x
* The x-coordinate at which to paint.
* @param y
* The y-coordinate at which to paint.
* @param host
* The text area this token is in.
* @param e
* How to expand tabs.
* @param token The token to render.
* @param g The graphics context in which to paint.
* @param x The x-coordinate at which to paint.
* @param y The y-coordinate at which to paint.
* @param host The text area this token is in.
* @param e How to expand tabs.
* @return The x-coordinate representing the end of the painted text.
*/
float paint(Token token, Graphics2D g, float x, float y, RSyntaxTextArea host, TabExpander e);
/**
* Paints this token.
*
* @param token
* The token to render.
* @param g
* The graphics context in which to paint.
* @param x
* The x-coordinate at which to paint.
* @param y
* The y-coordinate at which to paint.
* @param host
* The text area this token is in.
* @param e
* How to expand tabs.
* @param clipStart
* The left boundary of the clip rectangle in which we're
* painting. This optimizes painting by allowing us to not paint
* paint when this token is "to the left" of the clip rectangle.
* @param token The token to render.
* @param g The graphics context in which to paint.
* @param x The x-coordinate at which to paint.
* @param y The y-coordinate at which to paint.
* @param host The text area this token is in.
* @param e How to expand tabs.
* @param clipStart The left boundary of the clip rectangle in which we're
* painting. This optimizes painting by allowing us to not
* paint paint when this token is "to the left" of the clip
* rectangle.
* @return The x-coordinate representing the end of the painted text.
*/
float paint(Token token, Graphics2D g, float x, float y, RSyntaxTextArea host, TabExpander e, float clipStart);
/**
* Paints this token.
*
* @param token
* The token to render.
* @param g
* The graphics context in which to paint.
* @param x
* The x-coordinate at which to paint.
* @param y
* The y-coordinate at which to paint.
* @param host
* The text area this token is in.
* @param e
* How to expand tabs.
* @param clipStart
* The left boundary of the clip rectangle in which we're
* painting. This optimizes painting by allowing us to not paint
* paint when this token is "to the left" of the clip rectangle.
* @param paintBG
* Whether to paint the background.
* @param token The token to render.
* @param g The graphics context in which to paint.
* @param x The x-coordinate at which to paint.
* @param y The y-coordinate at which to paint.
* @param host The text area this token is in.
* @param e How to expand tabs.
* @param clipStart The left boundary of the clip rectangle in which we're
* painting. This optimizes painting by allowing us to not
* paint paint when this token is "to the left" of the clip
* rectangle.
* @param paintBG Whether to paint the background.
* @return The x-coordinate representing the end of the painted text.
*/
float paint(Token token, Graphics2D g, float x, float y, RSyntaxTextArea host, TabExpander e, float clipStart, boolean paintBG);
float paint(Token token, Graphics2D g, float x, float y, RSyntaxTextArea host, TabExpander e, float clipStart,
boolean paintBG);
/**
* 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 <code>RSyntaxTextArea</code>).
* 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
* <code>RSyntaxTextArea</code>).
*
* @param token
* The token to render.
* @param g
* The graphics context in which to paint.
* @param x
* The x-coordinate at which to paint.
* @param y
* The y-coordinate at which to paint.
* @param host
* The text area this token is in.
* @param e
* How to expand tabs.
* @param useSTC
* Whether to use the text area's "selected text color."
* @param token The token to render.
* @param g The graphics context in which to paint.
* @param x The x-coordinate at which to paint.
* @param y The y-coordinate at which to paint.
* @param host The text area this token is in.
* @param e How to expand tabs.
* @param useSTC Whether to use the text area's "selected text color."
* @return The x-coordinate representing the end of the painted text.
*/
float paintSelected(Token token, Graphics2D g, float x, float y, RSyntaxTextArea host, TabExpander e, boolean useSTC);
float paintSelected(Token token, Graphics2D g, float x, float y, RSyntaxTextArea host, 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 <code>RSyntaxTextArea</code>).
* 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
* <code>RSyntaxTextArea</code>).
*
* @param token
* The token to render.
* @param g
* The graphics context in which to paint.
* @param x
* The x-coordinate at which to paint.
* @param y
* The y-coordinate at which to paint.
* @param host
* The text area this token is in.
* @param e
* How to expand tabs.
* @param clipStart
* The left boundary of the clip rectangle in which we're
* painting. This optimizes painting by allowing us to not paint
* paint when this token is "to the left" of the clip rectangle.
* @param useSTC
* Whether to use the text area's "selected text color."
* @param token The token to render.
* @param g The graphics context in which to paint.
* @param x The x-coordinate at which to paint.
* @param y The y-coordinate at which to paint.
* @param host The text area this token is in.
* @param e How to expand tabs.
* @param clipStart The left boundary of the clip rectangle in which we're
* painting. This optimizes painting by allowing us to not
* paint paint when this token is "to the left" of the clip
* rectangle.
* @param useSTC Whether to use the text area's "selected text color."
* @return The x-coordinate representing the end of the painted text.
*/
float paintSelected(Token token, Graphics2D g, float x, float y, RSyntaxTextArea host, TabExpander e, float clipStart, boolean useSTC);
float paintSelected(Token token, Graphics2D g, float x, float y, RSyntaxTextArea host, TabExpander e,
float clipStart, boolean useSTC);
}