Package DisplayProject

Examples of DisplayProject.TabInfo


      // TF:12/07/2010:(Thanks for VVH): Changed the index to "index" instead of getTabCount()
//      super.insertTab(title, icon, component, tip, getTabCount());
      super.insertTab(title, icon, component, tip, index);
    } else {//PM:14/01/2009:Otherwise add the page to the hidden pages list
            ((JPanel)component).putClientProperty(IS_TAB_VISIBLE_PROPERTY, false);
      TabInfo ti = (TabInfo)((JComponent)component).getClientProperty(TAB_INFO_PROPERTY);
            if (ti == null) {
              ti = new TabInfo(title, null, index, (JPanel)component);
            }
            getHiddenPages().put(component, ti);
    }
   
    List<JPanel> pages = getAllPages();
View Full Code Here


        List<JPanel> allPages = getAllPages();
        Map<Component, TabInfo> hiddenPages = getHiddenPages();
        int index = allPages.indexOf(page);
        String caption = getTitleAt(indexOfComponent(page));
        TabInfo ti = (TabInfo)page.getClientProperty(TAB_INFO_PROPERTY);
        if (ti == null) {
          ti = new TabInfo(caption, null, index, page);
        }
        hiddenPages.put(page, ti);
        super.remove(page);
        _log.debug("Setting Tab Invisible: " + caption  );
      }
View Full Code Here

        page.setVisible(true);//PM:14/01/2009:set to be visible
        page.putClientProperty(IS_TAB_VISIBLE_PROPERTY, true);

        List<JPanel> allPages = getAllPages();
        Map<Component, TabInfo> hiddenPages = getHiddenPages();
        TabInfo ti = (TabInfo) hiddenPages.get(page);
        //PM:22/07/2008: fixed tab order
        int insertIndex = 0;
        JPanel lastVisible = null;
        for (JPanel tab : allPages){
          if (tab == page)
            break;
          if (isTabVisible(tab))
            lastVisible = tab;
        }
        insertIndex = indexOfComponent(lastVisible) + 1;
        super.insertTab(ti.getCaption(), ti.getIcon(), page,
          page.getToolTipText(), insertIndex);
        hiddenPages.remove(page);
        _log.debug("Setting Tab Visible: " + ti.getCaption() );
      }
    }
View Full Code Here

    if (WidgetState.get((JPanel)component) != Constants.FS_INVISIBLE) {//PM:14/01/2009: Only add the page if it is visible
      ((JPanel)component).putClientProperty(IS_TAB_VISIBLE_PROPERTY, true);
      super.insertTab(title, icon, component, tip, getTabCount());
    } else {//PM:14/01/2009:Otherwise add the page to the hidden pages list
            ((JPanel)component).putClientProperty(IS_TAB_VISIBLE_PROPERTY, false);
      TabInfo ti = (TabInfo)((JComponent)component).getClientProperty(TAB_INFO_PROPERTY);
            if (ti == null) {
              ti = new TabInfo(title, null, index, (JPanel)component);
            }
            getHiddenPages().put(component, ti);
    }
   
    List<JPanel> pages = getAllPages();
View Full Code Here

        List<JPanel> allPages = getAllPages();
        Map<Component, TabInfo> hiddenPages = getHiddenPages();
        int index = allPages.indexOf(page);
        String caption = getTitleAt(indexOfComponent(page));
        TabInfo ti = (TabInfo)page.getClientProperty(TAB_INFO_PROPERTY);
        if (ti == null) {
          ti = new TabInfo(caption, null, index, page);
        }
        hiddenPages.put(page, ti);
        super.remove(page);
        _log.debug("Setting Tab Invisible: " + caption  );
      }
View Full Code Here

        page.setVisible(true);//PM:14/01/2009:set to be visible
        page.putClientProperty(IS_TAB_VISIBLE_PROPERTY, true);

        List<JPanel> allPages = getAllPages();
        Map<Component, TabInfo> hiddenPages = getHiddenPages();
        TabInfo ti = (TabInfo) hiddenPages.get(page);
        //PM:22/07/2008: fixed tab order
        int insertIndex = 0;
        JPanel lastVisible = null;
        for (JPanel tab : allPages){
          if (tab == page)
            break;
          if (isTabVisible(tab))
            lastVisible = tab;
        }
        insertIndex = indexOfComponent(lastVisible) + 1;
        super.insertTab(ti.getCaption(), ti.getIcon(), page,
          page.getToolTipText(), insertIndex);
        hiddenPages.remove(page);
        _log.debug("Setting Tab Visible: " + ti.getCaption() );
      }
    }
View Full Code Here

TOP

Related Classes of DisplayProject.TabInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.