|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.viewers.Viewer
org.eclipse.jface.text.TextViewer
org.eclipse.jface.text.source.SourceViewer
org.eclipse.ui.console.TextConsoleViewer
public class TextConsoleViewer
Default viewer used to display a TextConsole.
Clients may subclass this class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jface.text.source.SourceViewer |
|---|
SourceViewer.RulerLayout |
| Nested classes/interfaces inherited from class org.eclipse.jface.text.TextViewer |
|---|
TextViewer.TextHoverKey, TextViewer.WidgetCommand |
| Nested classes/interfaces inherited from interface org.eclipse.jface.text.ITextViewerExtension8 |
|---|
ITextViewerExtension8.EnrichMode |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.jface.text.source.SourceViewer |
|---|
_SELECTION_POSITION_CATEGORY, fAnnotationHover, fContentAssistant, fContentAssistantInstalled, fContentFormatter, fInformationPresenter, fOverviewRulerAnnotationHover, fPresentationReconciler, fQuickAssistAssistant, fQuickAssistAssistantInstalled, fReconciler, fSelectionCategory, fSelections, fSelectionUpdater, GAP_SIZE, GAP_SIZE_1, MODEL_ANNOTATION_MODEL |
| Fields inherited from class org.eclipse.jface.viewers.Viewer |
|---|
WIDGET_DATA_KEY |
| Fields inherited from interface org.eclipse.jface.text.source.ISourceViewer |
|---|
CONTENTASSIST_CONTEXT_INFORMATION, CONTENTASSIST_PROPOSALS, FORMAT, INFORMATION, QUICK_ASSIST |
| Fields inherited from interface org.eclipse.jface.text.ITextViewerExtension2 |
|---|
DEFAULT_HOVER_STATE_MASK |
| Fields inherited from interface org.eclipse.jface.text.ITextOperationTarget |
|---|
COPY, CUT, DELETE, PASTE, PREFIX, PRINT, REDO, SELECT_ALL, SHIFT_LEFT, SHIFT_RIGHT, STRIP_PREFIX, UNDO |
| Constructor Summary | |
|---|---|
TextConsoleViewer(Composite parent,
TextConsole console)
Constructs a new viewer in the given parent for the specified console. |
|
| Method Summary | |
|---|---|
protected IDocumentAdapter |
createDocumentAdapter()
Factory method to create the document adapter to be used by this viewer. |
protected Cursor |
getHandCursor()
Returns the hand cursor. |
IHyperlink |
getHyperlink()
Returns the currently active hyperlink or null if none. |
IHyperlink |
getHyperlink(int offset)
Returns the hyperlink at the specified offset, or null if
none. |
protected Cursor |
getTextCursor()
Returns the text cursor. |
protected void |
handleDispose()
Frees all resources allocated by this viewer. |
protected void |
internalRevealRange(int start,
int end)
Reveals the given range of the visible document. |
void |
lineGetBackground(LineBackgroundEvent event)
This method is called when a line is about to be drawn in order to get its background color. |
void |
lineGetStyle(LineStyleEvent event)
This method is called when a line is about to be drawn in order to get the line's style information. |
protected void |
linkEntered(IHyperlink link)
Notification a hyperlink has been entered. |
protected void |
linkExited(IHyperlink link)
Notification a link was exited. |
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 |
mouseEnter(MouseEvent e)
Sent when the mouse pointer passes into the area of the screen covered by a control. |
void |
mouseExit(MouseEvent e)
Sent when the mouse pointer passes out of the area of the screen covered by a control. |
void |
mouseHover(MouseEvent e)
Sent when the mouse pointer hovers (that is, stops moving for an (operating system specified) period of time) over a control. |
void |
mouseMove(MouseEvent e)
Sent when the mouse moves. |
void |
mouseUp(MouseEvent e)
Sent when a mouse button is released. |
protected void |
revealEndOfDocument()
Positions the cursor at the end of the document. |
void |
setConsoleWidth(int width)
Sets the console to have a fixed character width. |
void |
setFont(Font font)
Sets the font used by this viewer. |
void |
setTabWidth(int tabWidth)
Sets the tab width used by this viewer. |
protected void |
updateLinks(int offset)
The cursor has just be moved to the given offset, the mouse has hovered over the given offset. |
protected void |
updateTextListeners(TextViewer.WidgetCommand cmd)
Informs all registered text listeners about the change specified by the widget command. |
| Methods inherited from class org.eclipse.jface.viewers.Viewer |
|---|
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider |
|---|
addSelectionChangedListener, removeSelectionChangedListener, setSelection |
| Constructor Detail |
|---|
public TextConsoleViewer(Composite parent,
TextConsole console)
parent - containing widgetconsole - text console| Method Detail |
|---|
public void setTabWidth(int tabWidth)
tabWidth - the tab width used by this viewerpublic void setFont(Font font)
font - the font used by this viewerprotected void revealEndOfDocument()
public void lineGetStyle(LineStyleEvent event)
LineStyleListenerThe following event fields are used:
lineGetStyle in interface LineStyleListenerevent - the given eventLineStyleEventpublic void lineGetBackground(LineBackgroundEvent event)
LineBackgroundListenerThe following event fields are used:
lineGetBackground in interface LineBackgroundListenerevent - the given eventLineBackgroundEventprotected Cursor getHandCursor()
protected Cursor getTextCursor()
protected void linkEntered(IHyperlink link)
link - the link that was enteredprotected void linkExited(IHyperlink link)
link - the link that was exitedpublic void mouseEnter(MouseEvent e)
MouseTrackListener
mouseEnter in interface MouseTrackListenere - an event containing information about the mouse enterpublic void mouseExit(MouseEvent e)
MouseTrackListener
mouseExit in interface MouseTrackListenere - an event containing information about the mouse exitpublic void mouseHover(MouseEvent e)
MouseTrackListener
mouseHover in interface MouseTrackListenere - an event containing information about the hoverpublic void mouseMove(MouseEvent e)
MouseMoveListener
mouseMove in interface MouseMoveListenere - an event containing information about the mouse moveprotected void updateLinks(int offset)
offset - public IHyperlink getHyperlink()
null if none.
null if nonepublic IHyperlink getHyperlink(int offset)
null if
none.
offset - offset at which a hyperlink has been requested
null if nonepublic void mouseDoubleClick(MouseEvent e)
MouseListener
mouseDoubleClick in interface MouseListenere - an event containing information about the mouse double clickDisplay.getDoubleClickTime()public void mouseDown(MouseEvent e)
MouseListener
mouseDown in interface MouseListenere - an event containing information about the mouse button presspublic void mouseUp(MouseEvent e)
MouseListener
mouseUp in interface MouseListenere - an event containing information about the mouse button releaseprotected IDocumentAdapter createDocumentAdapter()
TextViewer
createDocumentAdapter in class TextViewerpublic void setConsoleWidth(int width)
width - fixed character width of the console, or -1protected void handleDispose()
TextViewer
handleDispose in class SourceViewerprotected void updateTextListeners(TextViewer.WidgetCommand cmd)
TextViewer
updateTextListeners in class TextViewercmd - the widget command translated into a text event sent to all text listeners
protected void internalRevealRange(int start,
int end)
TextViewer
internalRevealRange in class TextViewerstart - the start offset of the rangeend - the end offset of the range
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.