MCPcopy Create free account
hub / github.com/GateNLP/gate-core / init

Method init

src/main/java/gate/swing/XJTable.java:585–600  ·  view source on GitHub ↗
(TableModel sourceModel)

Source from the content-addressed store, hash-verified

583 }
584
585 protected void init(TableModel sourceModel){
586 if(this.sourceModel != null)
587 this.sourceModel.removeTableModelListener(this);
588 this.sourceModel = sourceModel;
589 //start with the identity order
590 int size = sourceModel.getRowCount();
591 sourceToTarget = new int[size];
592 targetToSource = new int[size];
593 for(int i = 0; i < size; i++) {
594 sourceToTarget[i] = i;
595 targetToSource[i] = i;
596 }
597 sourceModel.addTableModelListener(this);
598 if(isSortable() && sortedColumn == -1) setSortedColumn(0);
599 componentSizedProperly = false;
600 }
601
602 /**
603 * This gets events from the source model and forwards them to the UI

Callers 2

SortingModelMethod · 0.95
tableChangedMethod · 0.95

Calls 3

isSortableMethod · 0.80
setSortedColumnMethod · 0.80
getRowCountMethod · 0.45

Tested by

no test coverage detected