com.jidesoft.grid
Class TreeTableRowMarginSupport
java.lang.Object
com.jidesoft.margin.AbstractMarginSupport
com.jidesoft.margin.AbstractRowMarginSupport
com.jidesoft.margin.TableRowMarginSupport
com.jidesoft.grid.TreeTableRowMarginSupport
- All Implemented Interfaces:
- MarginSupport, RowMarginSupport, EventListener, TableModelListener
public class TreeTableRowMarginSupport
- extends TableRowMarginSupport
- implements TableModelListener
TreeTableRowMarginSupport
provides the margin support for TreeTable and its subclasses.
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. |
void |
scrollTo(int beginRow,
int endRow,
boolean select)
Selects the rows. |
void |
tableChanged(TableModelEvent e)
|
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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_rows
protected List _rows
_treeTable
protected TreeTable _treeTable
TreeTableRowMarginSupport
public TreeTableRowMarginSupport(TreeTable table,
JScrollPane scrollPane)
tableChanged
public void tableChanged(TableModelEvent e)
- Specified by:
tableChanged
in interface TableModelListener
scrollTo
public void scrollTo(int beginRow,
int endRow,
boolean select)
- Description copied from interface:
RowMarginSupport
- 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.
- Specified by:
scrollTo
in interface RowMarginSupport
- Overrides:
scrollTo
in class TableRowMarginSupport
- Parameters:
beginRow
- the beginning row indexendRow
- the end row indexselect
- to select the rows. True to select the row. False to scroll the rows visible only without
selecting them.
visualRowToActualRow
public int visualRowToActualRow(int visualRow)
- Description copied from interface:
RowMarginSupport
- Converts the visual row index as in the view to the actual row index as in the model.
- Specified by:
visualRowToActualRow
in interface RowMarginSupport
- Overrides:
visualRowToActualRow
in class AbstractRowMarginSupport
- Parameters:
visualRow
- the visual row index in the view.
- Returns:
- the actual row index in the model.
actualRowToVisualRow
public int actualRowToVisualRow(int actualRow)
- Description copied from interface:
RowMarginSupport
- Converts the actual row index as in the model to the visual row index as in the view.
- Specified by:
actualRowToVisualRow
in interface RowMarginSupport
- Overrides:
actualRowToVisualRow
in class AbstractRowMarginSupport
- Parameters:
actualRow
- the actual row index as in the model.
- Returns:
- the visual row index in the view.
getBaselineAdjustment
public int getBaselineAdjustment()
- Description copied from interface:
RowMarginSupport
- 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.
- Specified by:
getBaselineAdjustment
in interface RowMarginSupport
- Overrides:
getBaselineAdjustment
in class TableRowMarginSupport
- Returns:
- the baseline adjustment.