|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.JFaceTextUtil
A collection of JFace Text functions.
This class is neither intended to be instantiated nor instantiated.
Method Summary | |
---|---|
static int |
computeLineHeight(StyledText textWidget,
int startLine,
int endLine,
int lineCount)
Computes the line height for the given line range. |
static int |
getBottomIndex(StyledText widget)
Returns the last fully visible line of the widget. |
static int |
getHiddenTopLinePixels(StyledText textWidget)
Returns the number of hidden pixels of the first partially visible line. |
static int |
getLineIndex(StyledText textWidget,
int y)
|
static int |
getLinePixel(StyledText textWidget,
int line)
|
static int |
getPartialBottomIndex(ITextViewer viewer)
Returns the last, possibly partially, visible line in the view port. |
static int |
getPartialBottomIndex(StyledText widget)
Returns the index of the last (possibly only partially) visible line of the widget |
static int |
getPartialTopIndex(ITextViewer viewer)
Returns the line index of the first visible model line in the viewer. |
static int |
getPartialTopIndex(StyledText widget)
Returns the index of the first (possibly only partially) visible line of the widget |
static ILineRange |
getVisibleModelLines(ITextViewer viewer)
Returns the range of lines that is visible in the viewer, including any partially visible lines. |
static boolean |
isShowingEntireContents(StyledText widget)
Returns true if the widget displays the entire contents, i.e. it cannot
be vertically scrolled. |
static int |
modelLineToWidgetLine(ITextViewer viewer,
int modelLine)
Converts a model (i.e. |
static int |
widgetLine2ModelLine(ITextViewer viewer,
int widgetLine)
Converts a widget line into a model (i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int computeLineHeight(StyledText textWidget, int startLine, int endLine, int lineCount)
textWidget
- the StyledText
widgetstartLine
- the start lineendLine
- the end line (exclusive)lineCount
- the line count used by the old API
startLine
and ending above endLime
public static int getBottomIndex(StyledText widget)
widget
- the widget
public static int getPartialTopIndex(StyledText widget)
widget
- the widget
public static int getPartialBottomIndex(StyledText widget)
widget
- the text widget
public static int getPartialTopIndex(ITextViewer viewer)
viewer
- the text viewer
public static int getPartialBottomIndex(ITextViewer viewer)
viewer
- the text viewer
public static ILineRange getVisibleModelLines(ITextViewer viewer)
viewer
- the viewer
null
if no lines are
visiblepublic static int widgetLine2ModelLine(ITextViewer viewer, int widgetLine)
IDocument
) line using the
ITextViewerExtension5
if available, otherwise by adapting the widget line to the
viewer's visible region
.
viewer
- the viewerwidgetLine
- the widget line to convert.
widgetLine
or -1 to signal that there
is no corresponding model linepublic static int modelLineToWidgetLine(ITextViewer viewer, int modelLine)
IDocument
) line into a widget line using the
ITextViewerExtension5
if available, otherwise by adapting the model line to the
viewer's visible region
.
viewer
- the viewermodelLine
- the model line to convert.
modelLine
or -1 to signal that there
is no corresponding widget linepublic static int getHiddenTopLinePixels(StyledText textWidget)
textWidget
- the widget
public static int getLinePixel(StyledText textWidget, int line)
public static int getLineIndex(StyledText textWidget, int y)
public static boolean isShowingEntireContents(StyledText widget)
true
if the widget displays the entire contents, i.e. it cannot
be vertically scrolled.
widget
- the widget
true
if the widget displays the entire contents, i.e. it cannot
be vertically scrolled, false
otherwise
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.