Search in sources :

Example 1 with DefaultHierarchicalTableViewState

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();
}
Also used : DefaultHierarchicalTableViewState(de.jaret.util.ui.table.model.DefaultHierarchicalTableViewState) StdHierarchicalTableModel(de.jaret.util.ui.table.model.StdHierarchicalTableModel) IHierarchicalTableViewState(de.jaret.util.ui.table.model.IHierarchicalTableViewState)

Aggregations

DefaultHierarchicalTableViewState (de.jaret.util.ui.table.model.DefaultHierarchicalTableViewState)1 IHierarchicalTableViewState (de.jaret.util.ui.table.model.IHierarchicalTableViewState)1 StdHierarchicalTableModel (de.jaret.util.ui.table.model.StdHierarchicalTableModel)1