コード例 #1
0
 private void updateTables() {
   if (frame.getTabbedPane().getTabCount() == 0) {
     return;
   }
   for (int i = 0; i < frame.getTabbedPane().getTabCount(); i++) {
     frame.getTabbedPane().getComponentAt(i);
   }
 }
コード例 #2
0
  /**
   * Cycle through all databases, and make sure everything is updated with the new type
   * customization. This includes making sure all entries have a valid type, that no obsolete entry
   * editors are around, and that the right-click menus' change type menu is up-to-date.
   */
  private void updateTypesForEntries(String typeName) {
    if (frame.getTabbedPane().getTabCount() == 0) {
      return;
    }
    for (int i = 0; i < frame.getTabbedPane().getTabCount(); i++) {
      BasePanel bp = (BasePanel) frame.getTabbedPane().getComponentAt(i);

      // Invalidate associated cached entry editor
      bp.entryEditors.remove(typeName);

      for (BibtexEntry entry : bp.database().getEntries()) {
        entry.updateType();
      }
    }
  }
コード例 #3
0
 @Override
 public void actionPerformed(ActionEvent e) {
   databases = frame.getTabbedPane().getTabCount();
   saved = 0;
   frame.output(Localization.lang("Saving all databases..."));
   Spin.off(this);
   run();
   frame.output(Localization.lang("Save all finished."));
 }
コード例 #4
0
 @Override
 public void run() {
   for (int i = 0; i < databases; i++) {
     if (i < frame.getTabbedPane().getTabCount()) {
       // System.out.println("Base "+i);
       BasePanel panel = frame.baseAt(i);
       if (panel.getFile() == null) {
         frame.showBaseAt(i);
       }
       panel.runCommand("save");
       // TODO: can we find out whether the save was actually done or not?
       saved++;
     }
   }
 }