|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extension interface for ITextViewer
. Extends ITextViewer
with the explicit
concept of model and widget coordinates. For example, a selection returned by the text viewer's control is
a widget selection. A widget selection always maps to a certain range of the viewer's document. This
range is considered the model selection.
This general concepts replaces the notion of visible region
.
Method Summary | |
IRegion |
getModelCoverage()
Returns the minimal region of the viewer's document that completely comprises everything that is visible in the viewer's widget. |
int |
modelLine2WidgetLine(int modelLine)
Returns the widget line that corresponds to the given line of the viewer's document or -1 if there is no such line. |
int |
modelOffset2WidgetOffset(int modelOffset)
Returns the widget offset that corresponds to the given offset in the viewer's document or -1 if there is no such offset |
IRegion |
modelRange2WidgetRange(IRegion modelRange)
Returns the minimal region of the viewer's widget that completely comprises the given region of the viewer's document or null if there is no such region. |
int |
widgetLineOfWidgetOffset(int widgetOffset)
Returns the widget line of the given widget offset. |
int |
widgetlLine2ModelLine(int widgetLine)
Returns the line of the viewer's document that corresponds to the given widget line or -1 if there is no such line. |
int |
widgetOffset2ModelOffset(int widgetOffset)
Returns the offset of the viewer's document that corresponds to the given widget offset or -1 if there is no such offset |
IRegion |
widgetRange2ModelRange(IRegion widgetRange)
Returns the minimal region of the viewer's document that completely comprises the given widget region or null if there is no such region. |
Method Detail |
public IRegion getModelCoverage()
public int modelLine2WidgetLine(int modelLine)
-1
if there is no such line.modelLine
- the line of the viewer's document-1
public int modelOffset2WidgetOffset(int modelOffset)
-1
if there is no such offsetmodelOffset
- the offset in the viewer's document-1
public IRegion modelRange2WidgetRange(IRegion modelRange)
null
if there is no such region.modelRange
- the region of the viewer's documentmodelRange
or null
public int widgetOffset2ModelOffset(int widgetOffset)
-1
if there is no such offsetwidgetOffset
- the widget offset-1
public IRegion widgetRange2ModelRange(IRegion widgetRange)
null
if there is no such region.widgetRange
- the widget regionwidgetlRange
or null
public int widgetlLine2ModelLine(int widgetLine)
-1
if there is no such line.widgetLine
- the widget line-1
public int widgetLineOfWidgetOffset(int widgetOffset)
widgetOffset
- the widget offset
|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |