/** * Sets the starting line's line number. The default value is * <code>1</code>. Applications can call this method to change this value * if they are displaying a subset of lines in a file, for example. * * @param index The new index. * @see #getLineNumberingStartIndex() */ public void setLineNumberingStartIndex(int index) { if (index!=lineNumberingStartIndex) { lineNumberingStartIndex = index; lineNumberList.setLineNumberingStartIndex(index); } }
@Override protected void init() { super.init(); // Initialize currentLine; otherwise, the current line won't start // off as highlighted. currentLine = 0; setLineNumberingStartIndex(1); visibleRect = new Rectangle(); // Must be initialized addMouseListener(this); addMouseMotionListener(this); aaHints = RSyntaxUtilities.getDesktopAntiAliasHints(); }
/** * Sets the starting line's line number. The default value is * <code>1</code>. Applications can call this method to change this value * if they are displaying a subset of lines in a file, for example. * * @param index The new index. * @see #getLineNumberingStartIndex() */ public void setLineNumberingStartIndex(int index) { lineNumberList.setLineNumberingStartIndex(index); }
/** * Sets the starting line's line number. The default value is * <code>1</code>. Applications can call this method to change this value * if they are displaying a subset of lines in a file, for example. * * @param index The new index. * @see #getLineNumberingStartIndex() */ public void setLineNumberingStartIndex(int index) { lineNumberList.setLineNumberingStartIndex(index); }
/** * Sets the starting line's line number. The default value is * <code>1</code>. Applications can call this method to change this value * if they are displaying a subset of lines in a file, for example. * * @param index The new index. * @see #getLineNumberingStartIndex() */ public void setLineNumberingStartIndex(int index) { if (index!=lineNumberingStartIndex) { lineNumberingStartIndex = index; lineNumberList.setLineNumberingStartIndex(index); } }
lineNumberList.setFont(getLineNumberFont()); lineNumberList.setForeground(getLineNumberColor()); lineNumberList.setLineNumberingStartIndex( getLineNumberingStartIndex());
@Override protected void init() { super.init(); // Initialize currentLine; otherwise, the current line won't start // off as highlighted. currentLine = 0; setLineNumberingStartIndex(1); visibleRect = new Rectangle(); // Must be initialized addMouseListener(this); addMouseMotionListener(this); aaHints = RSyntaxUtilities.getDesktopAntiAliasHints(); }
/** * Constructs a new <code>LineNumberList</code>. * * @param textArea The text component for which line numbers will be * displayed. * @param numberColor The color to use for the line numbers. */ public LineNumberList(RTextArea textArea, Color numberColor) { super(textArea); if (numberColor!=null) { setForeground(numberColor); } else { setForeground(Color.GRAY); } // Initialize currentLine; otherwise, the current line won't start // off as highlighted. currentLine = 0; setLineNumberingStartIndex(1); visibleRect = new Rectangle(); // Must be initialized addMouseListener(this); addMouseMotionListener(this); }
/** * Constructs a new <code>LineNumberList</code>. * * @param textArea The text component for which line numbers will be * displayed. * @param numberColor The color to use for the line numbers. */ public LineNumberList(RTextArea textArea, Color numberColor) { super(textArea); if (numberColor!=null) { setForeground(numberColor); } else { setForeground(Color.GRAY); } // Initialize currentLine; otherwise, the current line won't start // off as highlighted. currentLine = 0; setLineNumberingStartIndex(1); visibleRect = new Rectangle(); // Must be initialized addMouseListener(this); addMouseMotionListener(this); }
lineNumberList.setFont(getLineNumberFont()); lineNumberList.setForeground(getLineNumberColor()); lineNumberList.setLineNumberingStartIndex( getLineNumberingStartIndex());