Search in sources :

Example 1 with SWTListMultiColumn

use of edu.cmu.cs.hcii.cogtool.view.SWTListMultiColumn in project cogtool by cogtool.

the class SEDemoUI method updateView.

/**
     * Update the view: Set the View's List with the current ScriptSteps
     */
@Override
protected void updateView() {
    Iterator<DefaultModelGeneratorState> states = script.getStepStates().iterator();
    SWTListMultiColumn swtList = view.getScriptEditorList();
    swtList.setListContents(states);
    swtList.addListItem(script.getDemonstration().getResultFrame());
    TableItem item = selection.getSelectedStateRow();
    Table t = view.getHistoryTable();
    if (item == null) {
        TableItem[] items = t.getItems();
        if (items.length > 0) {
            t.showItem(t.getItem(items.length - 1));
        }
    } else {
        t.showItem(item);
    }
}
Also used : Table(org.eclipse.swt.widgets.Table) TableItem(org.eclipse.swt.widgets.TableItem) SWTListMultiColumn(edu.cmu.cs.hcii.cogtool.view.SWTListMultiColumn) DefaultModelGeneratorState(edu.cmu.cs.hcii.cogtool.model.DefaultModelGeneratorState)

Aggregations

DefaultModelGeneratorState (edu.cmu.cs.hcii.cogtool.model.DefaultModelGeneratorState)1 SWTListMultiColumn (edu.cmu.cs.hcii.cogtool.view.SWTListMultiColumn)1 Table (org.eclipse.swt.widgets.Table)1 TableItem (org.eclipse.swt.widgets.TableItem)1