/** * Determines the width of the given token list taking tabs * into consideration. This is implemented in a 1.1 style coordinate * system where ints are used and 72dpi is assumed.<p> * * @param tokenList The token list list representing the text. * @param textArea The text area in which this token list resides. * @param e The tab expander. This value cannot be <code>null</code>. * @param x0 The x-pixel coordinate of the start of the token list. * @return The width of the token list, in pixels. * @see #getTokenListWidthUpTo */ public static float getTokenListWidth(final Token tokenList, RSyntaxTextArea textArea, TabExpander e, float x0) { float width = x0; for (Token t=tokenList; t!=null&&t.isPaintable(); t=t.getNextToken()) { width += t.getWidth(textArea, e, width); } return width - x0; }
x0+width); width += t.getWidth(textArea, e, x0+width);
x0 += t.getWidth(textArea, e, x0); t = t.getNextToken();
float tokenWidth = t.getWidth(textArea, this, x0); if (tokenWidth>currentWidth) {
x0+width); width += t.getWidth(textArea, e, x0+width);
/** * Determines the width of the given token list taking tabs * into consideration. This is implemented in a 1.1 style coordinate * system where ints are used and 72dpi is assumed.<p> * * @param tokenList The token list list representing the text. * @param textArea The text area in which this token list resides. * @param e The tab expander. This value cannot be <code>null</code>. * @param x0 The x-pixel coordinate of the start of the token list. * @return The width of the token list, in pixels. * @see #getTokenListWidthUpTo */ public static float getTokenListWidth(final Token tokenList, RSyntaxTextArea textArea, TabExpander e, float x0) { float width = x0; for (Token t=tokenList; t!=null&&t.isPaintable(); t=t.getNextToken()) { width += t.getWidth(textArea, e, width); } return width - x0; }
x0+width); width += t.getWidth(textArea, e, x0+width);
/** * Determines the width of the given token list taking tabs * into consideration. This is implemented in a 1.1 style coordinate * system where ints are used and 72dpi is assumed.<p> * * @param tokenList The token list list representing the text. * @param textArea The text area in which this token list resides. * @param e The tab expander. This value cannot be <code>null</code>. * @param x0 The x-pixel coordinate of the start of the token list. * @return The width of the token list, in pixels. * @see #getTokenListWidthUpTo */ public static final float getTokenListWidth(final Token tokenList, RSyntaxTextArea textArea, TabExpander e, float x0) { float width = x0; for (Token t=tokenList; t!=null&&t.isPaintable(); t=t.getNextToken()) { width += t.getWidth(textArea, e, width); } return width - x0; }
x0+width); width += t.getWidth(textArea, e, x0+width);
/** * Determines the width of the given token list taking tabs * into consideration. This is implemented in a 1.1 style coordinate * system where ints are used and 72dpi is assumed.<p> * * @param tokenList The token list list representing the text. * @param textArea The text area in which this token list resides. * @param e The tab expander. This value cannot be <code>null</code>. * @param x0 The x-pixel coordinate of the start of the token list. * @return The width of the token list, in pixels. * @see #getTokenListWidthUpTo */ public static final float getTokenListWidth(final Token tokenList, RSyntaxTextArea textArea, TabExpander e, float x0) { float width = x0; for (Token t=tokenList; t!=null&&t.isPaintable(); t=t.getNextToken()) { width += t.getWidth(textArea, e, width); } return width - x0; }
x0 += t.getWidth(textArea, e, x0); t = t.getNextToken();
float tokenWidth = t.getWidth(textArea, this, x0); if (tokenWidth>currentWidth) {
x0 += t.getWidth(textArea, e, x0); t = t.getNextToken();
float tokenWidth = t.getWidth(textArea, this, x0); if (tokenWidth>currentWidth) {
x0 += t.getWidth(textArea, e, x0); t = t.getNextToken();
float tokenWidth = t.getWidth(textArea, this, x0); if (tokenWidth>currentWidth) {