Beispiel #1
0
 /** Creates a table model for the new table and returns it. */
 private DefaultTableModel updateModel() {
   TimeWindowConfigurationStorage storage = null;
   // if not first call, get configuration
   if (sorter != null) {
     storage = getTableConfiguration();
   }
   DefaultTableModel model = new MindmapTableModel();
   model.addColumn(COLUMN_DATE);
   model.addColumn(COLUMN_TEXT);
   model.addColumn(COLUMN_ICONS);
   model.addColumn(COLUMN_CREATED);
   model.addColumn(COLUMN_MODIFIED);
   model.addColumn(COLUMN_NOTES);
   MindMapNode node = getMindMapController().getMap().getRootNode();
   updateModel(model, node);
   timeTableModel = model;
   mFlatNodeTableFilterModel =
       new FlatNodeTableFilterModel(timeTableModel, NODE_TEXT_COLUMN, NODE_NOTES_COLUMN);
   if (sorter == null) {
     sorter = new TableSorter(mFlatNodeTableFilterModel);
     timeTable.setModel(sorter);
   } else {
     sorter.setTableModel(mFlatNodeTableFilterModel);
   }
   if (storage != null) {
     setTableConfiguration(storage);
   }
   try {
     String text = getRegularExpression(getText(mFilterTextSearchField.getDocument()));
     mFlatNodeTableFilterModel.setFilter(text);
   } catch (BadLocationException e) {
     freemind.main.Resources.getInstance().logException(e);
   }
   return model;
 }
Beispiel #2
0
 private void replace(IReplaceInputInformation info) {
   try {
     String searchString = getText(mFilterTextSearchField.getDocument());
     String replaceString = getText(mFilterTextReplaceField.getDocument());
     replace(info, searchString, replaceString);
     timeTableModel.fireTableDataChanged();
     mFlatNodeTableFilterModel.resetFilter();
     mFilterTextSearchField.setText("");
   } catch (BadLocationException e) {
     freemind.main.Resources.getInstance().logException(e);
   }
 }