Example #1
0
 public void unpinTabs() {
   for (int i = 0; i < this.getTabCount(); i++) {
     Component tabCom = this.getTabComponentAt(i);
     if (tabCom != null && tabCom instanceof TabbedPanelTab && tabCom.isVisible()) {
       TabbedPanelTab jp = (TabbedPanelTab) tabCom;
       jp.setPinned(false);
       this.saveTabState(jp.getAbstractPanel());
     }
   }
 }
Example #2
0
 /**
  * Temporarily lock/unlock the specified tab, eg if its active and mustnt be closed. Locked
  * (AbstractPanel) tabs will not have the pin/close tab buttons displayed
  *
  * @param panel
  * @param hideable
  */
 public void setTabLocked(AbstractPanel panel, boolean lock) {
   for (int i = 0; i < this.getTabCount(); i++) {
     Component tabCom = this.getTabComponentAt(i);
     if (tabCom != null && tabCom instanceof TabbedPanelTab && tabCom.isVisible()) {
       TabbedPanelTab jp = (TabbedPanelTab) tabCom;
       if (panel.equals(jp.getAbstractPanel())) {
         jp.setLocked(!lock);
       }
     }
   }
 }