Class LineNumbersRuler

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, CaretListener, DocumentListener

public class LineNumbersRuler extends JPanel implements CaretListener, DocumentListener, PropertyChangeListener
See Also:
  • Field Details

  • Constructor Details

    • LineNumbersRuler

      public LineNumbersRuler()
  • Method Details

    • getScrollPane

      public JScrollPane getScrollPane(JTextComponent editorPane)
      Returns the JScrollPane that contains this EditorPane, or null if no JScrollPane is the parent of this editor
    • installEditor

      public static LineNumbersRuler installEditor(JEditorPane editor)
    • plafChanged

      public void plafChanged()
    • install

      public void install(JEditorPane editor)
    • deinstall

      public void deinstall(JEditorPane editor)
    • getMinimumDisplayDigits

      public int getMinimumDisplayDigits()
      Gets the minimum display digits
      Returns:
      the minimum display digits
    • setMinimumDisplayDigits

      public void setMinimumDisplayDigits(int minimumDisplayDigits)
      Specify the minimum number of digits used to calculate the preferred width of the component. Default is 3.
      Parameters:
      minimumDisplayDigits - the number digits used in the preferred width calculation
    • paintComponent

      public void paintComponent(Graphics g)
      Draw the line numbers
      Overrides:
      paintComponent in class JComponent
    • caretUpdate

      public void caretUpdate(CaretEvent e)
      Specified by:
      caretUpdate in interface CaretListener
    • changedUpdate

      public void changedUpdate(DocumentEvent e)
      Specified by:
      changedUpdate in interface DocumentListener
    • insertUpdate

      public void insertUpdate(DocumentEvent e)
      Specified by:
      insertUpdate in interface DocumentListener
    • removeUpdate

      public void removeUpdate(DocumentEvent e)
      Specified by:
      removeUpdate in interface DocumentListener
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Implement PropertyChangeListener interface
      Specified by:
      propertyChange in interface PropertyChangeListener