Class PaintManager

    • Constructor Detail

      • 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 Detail

      • 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
      • 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
      • 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
      • 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