Beispiel #1
0
 public void recordCurrentLayout() {
   if (tabbedPane != null) {
     tp_selectedTab = tabbedPane.getSelectedIndex();
     if (tp_selectedTab >= 0) selectedTabName = tabbedPane.getTitleAt(tp_selectedTab);
     else selectedTabName = null;
   }
 }
Beispiel #2
0
  private void removeStatsTabs() {
    for (int i = tabbedPane.getTabCount() - 1; i >= 0; i--) {
      String name = tabbedPane.getTitleAt(i);

      if (name.equals("DAG Model Statistics")) {
        tabbedPane.removeTabAt(i);
      } else if (name.equals("DAG in pattern")) {
        tabbedPane.removeTabAt(i);
      }
    }
  }
Beispiel #3
0
 private void setSelectedTab(int id, String name) {
   if (tabbedPane == null) return;
   int selectId = id;
   if (name != null) {
     for (int k = 0; k < tabbedPane.getTabCount(); k++) {
       String tabName = tabbedPane.getTitleAt(k);
       if (name.equals(tabName)) {
         selectId = k;
         break;
       }
     }
   }
   if (selectId >= 0 && selectId < tabbedPane.getTabCount()) tabbedPane.setSelectedIndex(selectId);
 }
Beispiel #4
0
 private void tabChanged() {
   if (bChangeTool) return;
   int index = -1;
   previous_selectedTab = 0;
   if (tabbedPane.getTabCount() > 1) {
     index = tabbedPane.getSelectedIndex();
     Component comp = tabbedPane.getSelectedComponent();
     if (comp != null && (comp instanceof PushpinIF)) {
       PushpinIF pobj = (PushpinIF) comp;
       if (!pobj.isPopup()) previous_selectedTab = index;
     }
   }
   updateSelectedObj();
   if (index >= 0) {
     if (Util.getRQPanel() != null) {
       Util.getRQPanel().updatePopup(tabbedPane.getTitleAt(index));
     }
   }
 }