public void setMetricsResults(MetricDisplaySpecification displaySpecification, MetricsRun run) {
   final MetricCategory[] categories = MetricCategory.values();
   for (final MetricCategory category : categories) {
     final JTable table = tables.get(category);
     final String type = MetricsCategoryNameUtil.getShortNameForCategory(category);
     final MetricTableSpecification tableSpecification =
         displaySpecification.getSpecification(category);
     final MetricsResult results = run.getResultsForCategory(category);
     final MetricTableModel model = new MetricTableModel(results, type, tableSpecification);
     table.setModel(model);
     final Container tab = table.getParent().getParent();
     if (model.getRowCount() == 0) {
       tabbedPane.remove(tab);
       continue;
     }
     final String longName = MetricsCategoryNameUtil.getLongNameForCategory(category);
     tabbedPane.add(tab, longName);
     final MyColumnListener columnListener = new MyColumnListener(tableSpecification, table);
     final TableColumnModel columnModel = table.getColumnModel();
     columnModel.addColumnModelListener(columnListener);
     final int columnCount = columnModel.getColumnCount();
     for (int i = 0; i < columnCount; i++) {
       final TableColumn column = columnModel.getColumn(i);
       column.addPropertyChangeListener(columnListener);
     }
     setRenderers(table, type);
     setColumnWidths(table, tableSpecification);
   }
 }
  /** Refreshes the currently visible editor with new info. */
  public void refreshEditors(DXEntry entry, DataBrokerQueryInterface ds) {
    if (currentEditor != null) {
      this.entry = entry; // TE: make sure everything is in sink.
      dataSource = ds;

      currentEditor.getDataSink().displayEntry(entry, ds); // checks for unsaved changes...

      // check that the editor hasn't changed display component
      JComponent display = currentEditor.getDisplayComponent();

      // XXX hack alert - some editor writers change their display component
      // XXX mid-flight, and expect JX to magically notice, and change the
      // XXX the display.  This code attempts to do this.

      if (indexOfComponent(display) == -1) // we have a problem - the display component has changed
      {
        String title = currentEditor.getName();
        ImageIcon icon = currentEditor.getIcon();
        String toolTip = currentEditor.getToolTip();

        int index =
            getSelectedIndex(); // find the index of the editor (XXX - this relies on the
                                // activeEditor vector tracking the inherent tab pane order)

        super.remove(index);
        super.insertTab(title, icon, display, toolTip, index);
        super.setSelectedIndex(index);
      }
    } else log.warning("internal error - no editor available in AttributeDisplay");
  }
  public void remove(int index) {
    if (activeEditors.size() == 0)
      return; // it can get a bit excitable about removing element 0 ...

    PluggableEditor ed = (PluggableEditor) activeEditors.remove(index);
    ed.unload();
    super.remove(index);
  }
 public void removeDiffOverlay(MetricDisplaySpecification displaySpecification) {
   final MetricCategory[] categories = MetricCategory.values();
   for (final MetricCategory category : categories) {
     final JTable table = tables.get(category);
     final MetricTableModel model = (MetricTableModel) table.getModel();
     model.setPrevResults(null);
     final Container tab = table.getParent().getParent();
     if (model.getRowCount() == 0) {
       tabbedPane.remove(tab);
       continue;
     }
     final String longName = MetricsCategoryNameUtil.getLongNameForCategory(category);
     tabbedPane.add(tab, longName);
     final String shortName = MetricsCategoryNameUtil.getShortNameForCategory(category);
     setRenderers(table, shortName);
     final MetricTableSpecification specification =
         displaySpecification.getSpecification(category);
     setColumnWidths(table, specification);
   }
   hasOverlay = false;
 }
 /**
  * Method for removing a Panel by object reference
  *
  * @param object The object to remove
  */
 public void removePanel(GPropertiesPanel object) {
   pane.remove(object);
   objects.remove(object);
 }
 /**
  * Method for removing a Panel by index reference
  *
  * @param index The index of the object to remove
  */
 public void removePanel(int index) {
   pane.remove((GPropertiesPanel) objects.get(index));
   objects.remove(index);
 }
 public void unloadThread(String strThreadID) {
   PanelThreadMonitor pnlThrMonitor = getPanelThreadMonitor(strThreadID);
   pnlThread.remove(pnlThrMonitor);
 }