use of de.jaret.util.ui.table.model.DefaultHierarchicalTableViewState in project translationstudio8 by heartsome.
the class JaretTable method setTableModel.
/**
* Set a hierarchical table model. This will internally create a StdHierrahicalTableModel that is a normal
* TbaleModel incluuding only the expanded rows.
*
* @param hmodel hierarchical model to display
*/
public void setTableModel(IHierarchicalJaretTableModel hmodel) {
if (_model != null) {
_model.removeJaretTableModelListener(this);
}
if (_tvs != null) {
_tvs.removeTableViewStateListener(this);
}
_tvs = new DefaultHierarchicalTableViewState();
_tvs.addTableViewStateListener(this);
_model = new StdHierarchicalTableModel(hmodel, (IHierarchicalTableViewState) _tvs);
_model.addJaretTableModelListener(this);
_hierarchicalModel = hmodel;
updateColumnList();
registerRowsForOptimization();
updateRowList();
updateColumnList();
updateYScrollBar();
updateXScrollBar();
redraw();
}
Aggregations