JIDE 3.5.15

com.jidesoft.margin
Interface RowMarginSupport

All Superinterfaces:
MarginSupport
All Known Implementing Classes:
AbstractRowMarginSupport, CodeEditorRowMarginSupport, ListRowMarginSupport, TableRowMarginSupport, TextAreaRowMarginSupport, TreeRowMarginSupport, TreeTableRowMarginSupport

public interface RowMarginSupport
extends MarginSupport

RowMarginSupport extends MarginSupport to provide the support for the margin support for the components that have rows, such as table, tree, list etc.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jidesoft.margin.MarginSupport
MarginSupport.ModelChangedCallback, MarginSupport.RepaintCallback
 
Method Summary
 int actualRowToVisualRow(int actualRow)
          Converts the actual row index as in the model to the visual row index as in the view.
 int getBaselineAdjustment()
          Gets the baseline adjustment so that the text on the margin aligns properly with the text on the component.
 int getRowCount()
          Gets the total row count in the component.
 int getRowHeight(int row)
          Gets the row height.
 int positionToRow(int position)
          Gets the actual row index corresponding to the position the margin.
 int rowToPosition(int row)
          Gets the position on the margin corresponding to the actual row index.
 void scrollTo(int beginRow, int endRow, boolean select)
          Selects the rows.
 int visualRowToActualRow(int visualRow)
          Converts the visual row index as in the view to the actual row index as in the model.
 
Methods inherited from interface com.jidesoft.margin.MarginSupport
getViewPosition, getViewSize, installListeners, uninstallListeners
 

Method Detail

getRowCount

int getRowCount()
Gets the total row count in the component.

Returns:
the total row count.

getRowHeight

int getRowHeight(int row)
Gets the row height.

Parameters:
row - the row index.
Returns:
the row height.

positionToRow

int positionToRow(int position)
Gets the actual row index corresponding to the position the margin.

Parameters:
position - the position on the margin.
Returns:
the row index corresponding to the position the margin.

rowToPosition

int rowToPosition(int row)
Gets the position on the margin corresponding to the actual row index.

Parameters:
row - the actual row index
Returns:
the position on the margin corresponding to the row index. Integer.MIN_VALUE if the row is not visible.

scrollTo

void scrollTo(int beginRow,
              int endRow,
              boolean select)
Selects the rows. Note the beginning row index is not always less than the ending index. It depends on the mouse dragging direction. If user presses and drags upward on the margin, the end index will be smaller than the beginning index. In the implementation of this method, it should try to make the end index visible so that the dragging on the margin will auto-scroll when dragging outside the boundary.

Parameters:
beginRow - the beginning row index
endRow - the end row index
select - to select the rows. True to select the row. False to scroll the rows visible only without selecting them.

visualRowToActualRow

int visualRowToActualRow(int visualRow)
Converts the visual row index as in the view to the actual row index as in the model.

Parameters:
visualRow - the visual row index in the view.
Returns:
the actual row index in the model.

actualRowToVisualRow

int actualRowToVisualRow(int actualRow)
Converts the actual row index as in the model to the visual row index as in the view.

Parameters:
actualRow - the actual row index as in the model.
Returns:
the visual row index in the view.

getBaselineAdjustment

int getBaselineAdjustment()
Gets the baseline adjustment so that the text on the margin aligns properly with the text on the component. You can override it to adjust the value if you notice the texts don't align.

Returns:
the baseline adjustment.

JIDE 3.5.15