Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.javatools.editor
Interface RowMap


public interface RowMap

A RowMap is an interface for accessing the row structure information of a BasicEditorPane. This allows clients to determine the row that an offset is on, the starting and ending offset of a specific row, and the total number of rows in the BasicEditorPane. This interface is somewhat analogous to the LineMap interface for a TextBuffer, except that it applies to a visible "row" of the editor view, instead of a "line" in the buffer model.

Client Usage Notes:

See Also:
LineMap, BasicEditorPane

Method Summary
 BasicEditorPane getEditorPane()
          Fetches the underlying BasicEditorPane that this row map applies to.
 int getRowCount()
          Fetches the number of rows in the view of this BasicEditorPane.
 int getRowEndOffset(int row)
          Given a specified row in the editor view, returns the offset from the beginning of a TextBuffer that the row ends at.
 int getRowFromOffset(int offset)
          Given an offset from the beginning of the underlying TextBuffer (data model), fetches the row number containing that offset using a Forward bias.
 int getRowStartLine(int row)
          Given a specified row in the editor view, returns the TextBuffer line which contains the starting offset (Forward bias) of the row.
 int getRowStartOffset(int row)
          Given a specified row in the editor view, returns the offset from the beginning of the TextBuffer (data model) for the start of the row.

 

Method Detail

getEditorPane

BasicEditorPane getEditorPane()
Fetches the underlying BasicEditorPane that this row map applies to.
Returns:
the editor pane

getRowCount

int getRowCount()
Fetches the number of rows in the view of this BasicEditorPane. For example, a 5-row editor view has rows 0 through 4.
Returns:
number of rows in the editor view

getRowFromOffset

int getRowFromOffset(int offset)
Given an offset from the beginning of the underlying TextBuffer (data model), fetches the row number containing that offset using a Forward bias. This means if row A starts with offset B, and previous row A-1 ends with offset B, getRowFromOffset(B) will return row A.
Returns:
the row containing an offset

getRowStartOffset

int getRowStartOffset(int row)
Given a specified row in the editor view, returns the offset from the beginning of the TextBuffer (data model) for the start of the row.
Parameters:
row - a row in the editor view
Returns:
the starting offset of the specified row

getRowEndOffset

int getRowEndOffset(int row)
Given a specified row in the editor view, returns the offset from the beginning of a TextBuffer that the row ends at.
Parameters:
row - a row in the editor view
the - ending offset of the specified row

getRowStartLine

int getRowStartLine(int row)
Given a specified row in the editor view, returns the TextBuffer line which contains the starting offset (Forward bias) of the row.
Parameters:
row - a row in the editor view
Returns:
the line containing the start of the specified row

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


Copyright © 1997, 2012, Oracle. All rights reserved.