@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(); }
@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); }