public final class PaintManager extends Object implements KeyListener, MouseListener, ISelectionChangedListener, ITextListener, ITextInputListener
IPainter object registered with an
ITextViewer.
Clients usually instantiate and configure objects of this type.
| Constructor and Description |
|---|
PaintManager(ITextViewer textViewer)
Creates a new paint manager for the given text viewer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPainter(IPainter painter)
Adds the given painter to the list of painters managed by this paint manager.
|
void |
dispose()
Disposes this paint manager.
|
void |
inputDocumentAboutToBeChanged(IDocument oldInput,
IDocument newInput)
Called before the input document is replaced.
|
void |
inputDocumentChanged(IDocument oldInput,
IDocument newInput)
Called after the input document has been replaced.
|
void |
keyPressed(KeyEvent e)
Sent when a key is pressed on the system keyboard.
|
void |
keyReleased(KeyEvent e)
Sent when a key is released on the system keyboard.
|
void |
mouseDoubleClick(MouseEvent e)
Sent when a mouse button is pressed twice within the
(operating system specified) double click period.
|
void |
mouseDown(MouseEvent e)
Sent when a mouse button is pressed.
|
void |
mouseUp(MouseEvent e)
Sent when a mouse button is released.
|
void |
removePainter(IPainter painter)
Removes the given painter from the list of painters managed by this
paint manager.
|
void |
selectionChanged(SelectionChangedEvent event)
Notifies that the selection has changed.
|
void |
textChanged(TextEvent event)
The visual representation of a text viewer this listener is registered with
has been changed.
|
public PaintManager(ITextViewer textViewer)
textViewer - the text viewer associated to this newly created paint managerpublic void addPainter(IPainter painter)
painter - the painter to be addedpublic void removePainter(IPainter painter)
painter - the painter to be removedpublic void dispose()
public void keyPressed(KeyEvent e)
KeyListenerkeyPressed in interface KeyListenere - an event containing information about the key presspublic void keyReleased(KeyEvent e)
KeyListenerkeyReleased in interface KeyListenere - an event containing information about the key releasepublic void mouseDoubleClick(MouseEvent e)
MouseListenermouseDoubleClick in interface MouseListenere - an event containing information about the mouse double clickDisplay.getDoubleClickTime()public void mouseDown(MouseEvent e)
MouseListenermouseDown in interface MouseListenere - an event containing information about the mouse button presspublic void mouseUp(MouseEvent e)
MouseListenermouseUp in interface MouseListenere - an event containing information about the mouse button releasepublic void selectionChanged(SelectionChangedEvent event)
ISelectionChangedListenerselectionChanged in interface ISelectionChangedListenerevent - event object describing the changepublic void textChanged(TextEvent event)
ITextListenertextChanged in interface ITextListenerevent - the description of the changepublic void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput)
ITextInputListenerinputDocumentAboutToBeChanged in interface ITextInputListeneroldInput - the text viewer's previous input documentnewInput - the text viewer's new input documentpublic void inputDocumentChanged(IDocument oldInput, IDocument newInput)
ITextInputListenerinputDocumentChanged in interface ITextInputListeneroldInput - the text viewer's previous input documentnewInput - the text viewer's new input documentGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.