Ejemplo n.º 1
0
 // {{{ processKeyEvent() method
 private void pluginListUpdated() {
   Component selected = tabPane.getSelectedComponent();
   if (selected == installer || selected == updater) {
     installer.updateModel();
     updater.updateModel();
   }
 } // }}}
Ejemplo n.º 2
0
  protected void deleteCurrentPanel() {
    JComponent tabPane = (JComponent) tabbedPane.getSelectedComponent();
    if (tabPane == null) return;

    WMSPanel wmsPanel = (WMSPanel) tabPane.getClientProperty(Constants.FEATURE_OWNER_PROPERTY);

    if (tabbedPane.getTabCount()
        > 2) // actually remove the tab only if there is more than one (plus the "+" tab)
    tabbedPane.remove(tabPane);
    else tabbedPane.setTitleAt(1, "New Server");

    if (wmsPanel != null) wmsPanel.clearPanel();
  }