/** * ************************************************************************* * * Get the list of * table rows * */ private List<RelationDirTableModel.TableRow> initTableRows() { ArrayList<RelationDirTableModel.TableRow> retval = new ArrayList<RelationDirTableModel.TableRow>(); EditableTable.TableModel<RelationDirTableModel.TableRow> ecdtm = est_.getModel(); Iterator<FabricLink.AugRelation> ceit = reducedMap_.keySet().iterator(); while (ceit.hasNext()) { FabricLink.AugRelation aug = ceit.next(); RelationDirTableModel.TableRow tr = ecdtm.constructARow(); tr.relation = aug.relation; tr.isDir = reducedMap_.get(aug); retval.add(tr); } return (retval); }
/** * ************************************************************************* * * Stash our results * for later interrogation. * */ protected boolean stashForOK() { if (getFromFile_) { reducedMap_.clear(); return (true); } EditableTable.TableModel<RelationDirTableModel.TableRow> ecdtm = est_.getModel(); List<RelationDirTableModel.TableRow> vals = ecdtm.getValuesFromTable(); int numVals = vals.size(); for (int i = 0; i < numVals; i++) { RelationDirTableModel.TableRow tr = vals.get(i); reducedMap_.put(new FabricLink.AugRelation(tr.relation, false), tr.isDir); } return (true); }
/** * ************************************************************************* * * Mass * check/uncheck * */ void doMassUpdate(boolean select) { Boolean isDir = new Boolean(select); EditableTable.TableModel<RelationDirTableModel.TableRow> ecdtm = est_.getModel(); List<RelationDirTableModel.TableRow> vals = ecdtm.getValuesFromTable(); int numVals = vals.size(); ArrayList<RelationDirTableModel.TableRow> upVals = new ArrayList<RelationDirTableModel.TableRow>(); for (int i = 0; i < numVals; i++) { RelationDirTableModel.TableRow tr = vals.get(i); RelationDirTableModel.TableRow trc = ecdtm.constructARow(); trc.relation = tr.relation; trc.isDir = isDir; upVals.add(trc); } est_.updateTable(true, upVals); return; }