Class PaintManager

java.lang.Object
org.eclipse.jface.text.PaintManager
All Implemented Interfaces:
EventListener, ITextInputListener, ITextListener, ISelectionChangedListener, KeyListener, MouseListener, SWTEventListener

public final class PaintManager extends Object implements KeyListener, MouseListener, ISelectionChangedListener, ITextListener, ITextInputListener
Manages the IPainter object registered with an ITextViewer.

Clients usually instantiate and configure objects of this type.

Since:
2.1
  • Constructor Details

    • PaintManager

      public PaintManager(ITextViewer textViewer)
      Creates a new paint manager for the given text viewer.
      Parameters:
      textViewer - the text viewer associated to this newly created paint manager
  • Method Details

    • addPainter

      public void addPainter(IPainter painter)
      Adds the given painter to the list of painters managed by this paint manager. If the painter is already registered with this paint manager, this method is without effect.
      Parameters:
      painter - the painter to be added
    • removePainter

      public void removePainter(IPainter painter)
      Removes the given painter from the list of painters managed by this paint manager. If the painter has not previously been added to this paint manager, this method is without effect.
      Parameters:
      painter - the painter to be removed
    • dispose

      public void dispose()
      Disposes this paint manager. The paint manager uninstalls itself and clears all registered painters. This method is also called when the last painter is removed from the list of managed painters.
    • keyPressed

      public void keyPressed(KeyEvent e)
      Description copied from interface: KeyListener
      Sent when a key is pressed on the system keyboard.
      Specified by:
      keyPressed in interface KeyListener
      Parameters:
      e - an event containing information about the key press
    • keyReleased

      public void keyReleased(KeyEvent e)
      Description copied from interface: KeyListener
      Sent when a key is released on the system keyboard.
      Specified by:
      keyReleased in interface KeyListener
      Parameters:
      e - an event containing information about the key release
    • mouseDoubleClick

      public void mouseDoubleClick(MouseEvent e)
      Description copied from interface: MouseListener
      Sent when a mouse button is pressed twice within the (operating system specified) double click period.
      Specified by:
      mouseDoubleClick in interface MouseListener
      Parameters:
      e - an event containing information about the mouse double click
      See Also:
    • mouseDown

      public void mouseDown(MouseEvent e)
      Description copied from interface: MouseListener
      Sent when a mouse button is pressed.
      Specified by:
      mouseDown in interface MouseListener
      Parameters:
      e - an event containing information about the mouse button press
    • mouseUp

      public void mouseUp(MouseEvent e)
      Description copied from interface: MouseListener
      Sent when a mouse button is released.
      Specified by:
      mouseUp in interface MouseListener
      Parameters:
      e - an event containing information about the mouse button release
    • selectionChanged

      public void selectionChanged(SelectionChangedEvent event)
      Description copied from interface: ISelectionChangedListener
      Notifies that the selection has changed.
      Specified by:
      selectionChanged in interface ISelectionChangedListener
      Parameters:
      event - event object describing the change
    • textChanged

      public void textChanged(TextEvent event)
      Description copied from interface: ITextListener
      The visual representation of a text viewer this listener is registered with has been changed.
      Specified by:
      textChanged in interface ITextListener
      Parameters:
      event - the description of the change
    • inputDocumentAboutToBeChanged

      public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput)
      Description copied from interface: ITextInputListener
      Called before the input document is replaced.
      Specified by:
      inputDocumentAboutToBeChanged in interface ITextInputListener
      Parameters:
      oldInput - the text viewer's previous input document
      newInput - the text viewer's new input document
    • inputDocumentChanged

      public void inputDocumentChanged(IDocument oldInput, IDocument newInput)
      Description copied from interface: ITextInputListener
      Called after the input document has been replaced.
      Specified by:
      inputDocumentChanged in interface ITextInputListener
      Parameters:
      oldInput - the text viewer's previous input document
      newInput - the text viewer's new input document