/** * Called to initialize the outline by setting the top level bookmark. * * @param bookmark top level bookmark. */ public void setFirstBookmark(final Bookmark bookmark) { final Vector activeVector = getActiveVector(); synchronized (activeVector) { final Hashtable parentMap = getParentMap(); parentMap.clear(); final Vector pagenoVector = getPagenoVector(); pagenoVector.setSize(0); getDepthMap().clear(); mapChildren(bookmark, parentMap, pagenoVector, new Integer(0)); activeVector.setSize(0); activeVector.addElement(bookmark); setCheckedItem(0, true); } }
public AttributiveCellTableModel(int numRows, int numColumns) { Vector names = new Vector(numColumns); names.setSize(numColumns); setColumnIdentifiers(names); dataVector = new Vector(); setNumRows(numRows); cellAtt = new DefaultCellAttribute(numRows, numColumns); }
public void insertRow(int row, Vector rowData) { if (rowData == null) { rowData = new Vector(getColumnCount()); } else { rowData.setSize(getColumnCount()); } dataVector.insertElementAt(rowData, row); // cellAtt.insertRow(row); newRowsAdded( new TableModelEvent(this, row, row, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT)); }
public void addRow(Vector rowData) { Vector newData = null; if (rowData == null) { newData = new Vector(getColumnCount()); } else { rowData.setSize(getColumnCount()); } dataVector.addElement(newData); // cellAtt.addRow(); newRowsAdded( new TableModelEvent( this, getRowCount() - 1, getRowCount() - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT)); }