Exemplo n.º 1
0
 public void recordCurrentLayout() {
   if (tabbedPane != null) {
     tp_selectedTab = tabbedPane.getSelectedIndex();
     if (tp_selectedTab >= 0) selectedTabName = tabbedPane.getTitleAt(tp_selectedTab);
     else selectedTabName = null;
   }
 }
Exemplo n.º 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);
      }
    }
  }
Exemplo n.º 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);
 }
Exemplo n.º 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));
     }
   }
 }