|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.margin.AbstractMarginSupport com.jidesoft.margin.AbstractRowMarginSupport com.jidesoft.margin.TableRowMarginSupport
public class TableRowMarginSupport
TableRowMarginSupport
provides the margin support for JTable and its subclasses.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.jidesoft.margin.MarginSupport |
---|
MarginSupport.ModelChangedCallback, MarginSupport.RepaintCallback |
Field Summary | |
---|---|
protected JTable |
_table
|
Fields inherited from class com.jidesoft.margin.AbstractMarginSupport |
---|
_listener, _scrollPane |
Constructor Summary | |
---|---|
TableRowMarginSupport(JTable table,
JScrollPane scrollPane)
|
Method Summary | |
---|---|
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. |
JTable |
getTable()
|
void |
installListeners(MarginSupport.RepaintCallback repaintCallback,
MarginSupport.ModelChangedCallback modelChangedCallback)
Installs the listener to the component so that the RepaintCallback will be triggered when a repaint
is needed, and the ModelChangedCallback will be triggered when the model is changed. |
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. |
void |
uninstallListeners(MarginSupport.RepaintCallback repaintCallback,
MarginSupport.ModelChangedCallback modelChangedCallback)
Uninstalls all the listeners installed in MarginSupport.installListeners(com.jidesoft.margin.MarginSupport.RepaintCallback,
com.jidesoft.margin.MarginSupport.ModelChangedCallback) . |
Methods inherited from class com.jidesoft.margin.AbstractRowMarginSupport |
---|
actualRowToVisualRow, visualRowToActualRow |
Methods inherited from class com.jidesoft.margin.AbstractMarginSupport |
---|
getViewPosition, getViewSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jidesoft.margin.MarginSupport |
---|
getViewPosition, getViewSize |
Field Detail |
---|
protected JTable _table
Constructor Detail |
---|
public TableRowMarginSupport(JTable table, JScrollPane scrollPane)
Method Detail |
---|
public JTable getTable()
public int getRowCount()
RowMarginSupport
public void scrollTo(int beginRow, int endRow, boolean select)
RowMarginSupport
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.public int getRowHeight(int row)
RowMarginSupport
row
- the row index.
public int positionToRow(int position)
RowMarginSupport
position
- the position on the margin.
public int rowToPosition(int row)
RowMarginSupport
row
- the actual row index
public int getBaselineAdjustment()
RowMarginSupport
getBaselineAdjustment
in interface RowMarginSupport
getBaselineAdjustment
in class AbstractRowMarginSupport
public void installListeners(MarginSupport.RepaintCallback repaintCallback, MarginSupport.ModelChangedCallback modelChangedCallback)
MarginSupport
RepaintCallback
will be triggered when a repaint
is needed, and the ModelChangedCallback
will be triggered when the model is changed.
installListeners
in interface MarginSupport
installListeners
in class AbstractMarginSupport
repaintCallback
- the callback when a repaint is needed.modelChangedCallback
- the callback when the model of the component is changed. By default, the parameter is
null unless the MarginComponent overrides the AbstractMargin.createModelChangedCallback()
method is overridden to return a valid callback.public void uninstallListeners(MarginSupport.RepaintCallback repaintCallback, MarginSupport.ModelChangedCallback modelChangedCallback)
MarginSupport
MarginSupport.installListeners(com.jidesoft.margin.MarginSupport.RepaintCallback,
com.jidesoft.margin.MarginSupport.ModelChangedCallback)
.
uninstallListeners
in interface MarginSupport
uninstallListeners
in class AbstractMarginSupport
repaintCallback
- the callback when a repaint is needed.modelChangedCallback
- the callback when the model of the component is changed. By default, the parameter is
null unless the MarginComponent overrides the AbstractMargin.createModelChangedCallback()
method is overridden to return a valid callback.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |