lineArea = tokenList.listOffsetToView( (RSyntaxTextArea)getContainer(), this, pos, tabBase, lineArea);
t = subList.tokenList; rect = t.listOffsetToView(textArea, e, p1, x0, rect); return rect;
/** * Provides a mapping from the document model coordinate space * to the coordinate space of the view mapped to it. * * @param pos the position to convert >= 0 * @param a the allocated region to render into * @return the bounding box of the given position * @exception BadLocationException if the given position does not * represent a valid location in the associated document * @see View#modelToView */ public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException { // line coordinates Element map = getElement(); RSyntaxDocument doc = (RSyntaxDocument)getDocument(); int lineIndex = map.getElementIndex(pos); Rectangle lineArea = lineToRect(a, lineIndex); tabBase = lineArea.x; // Used by listOffsetToView(). Token tokenList = doc.getTokenListForLine(lineIndex); //int x = (int)RSyntaxUtilities.getTokenListWidthUpTo(tokenList, // (RSyntaxTextArea)getContainer(), // this, 0, pos); // We use this method instead as it returns the actual bounding box, // not just the x-coordinate. lineArea = tokenList.listOffsetToView( (RSyntaxTextArea)getContainer(), this, pos, tabBase, lineArea); return lineArea; }
t = subList.tokenList; rect = t.listOffsetToView(textArea, e, p1, x0, rect); return rect;
rect = t.listOffsetToView(textArea, e, p1, x0, rect); return rect;
/** * Provides a mapping from the document model coordinate space * to the coordinate space of the view mapped to it. * * @param pos the position to convert >= 0 * @param a the allocated region to render into * @return the bounding box of the given position * @exception BadLocationException if the given position does not * represent a valid location in the associated document * @see View#modelToView */ public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException { // line coordinates Element map = getElement(); RSyntaxDocument doc = (RSyntaxDocument)getDocument(); int lineIndex = map.getElementIndex(pos); Rectangle lineArea = lineToRect(a, lineIndex); tabBase = lineArea.x; // Used by listOffsetToView(). Token tokenList = doc.getTokenListForLine(lineIndex); //int x = (int)RSyntaxUtilities.getTokenListWidthUpTo(tokenList, // (RSyntaxTextArea)getContainer(), // this, 0, pos); // We use this method instead as it returns the actual bounding box, // not just the x-coordinate. lineArea = tokenList.listOffsetToView( (RSyntaxTextArea)getContainer(), this, pos, tabBase, lineArea); return lineArea; }
lineArea = tokenList.listOffsetToView( (RSyntaxTextArea)getContainer(), this, pos, tabBase, lineArea);
rect = t.listOffsetToView(textArea, e, p1, x0, rect); return rect;