Examples of TabInfo


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

Examples of DisplayProject.TabInfo

        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

Examples of DisplayProject.TabInfo

        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

Examples of DisplayProject.TabInfo

    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

Examples of DisplayProject.TabInfo

        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

Examples of DisplayProject.TabInfo

        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

Examples of cofh.core.gui.element.TabInfo

  @Override
  public void initGui() {

    super.initGui();
    addTab(new TabInfo(this, INFO));

    tbNameX = guiLeft + 8 + 4;
    tbNameY = guiTop + 15 + 2;

    taX = guiLeft + 8;
View Full Code Here

Examples of com.alkacon.acacia.shared.TabInfo

            }, 200);
            AttributeHandler.setResizeHandler(tabSizeHandler);
            tabbedPanel.addSelectionHandler(new TabSelectionHandler(tabbedPanel));
            tabbedPanel.getElement().getStyle().setBorderWidth(0, Unit.PX);
            Iterator<TabInfo> tabIt = tabInfos.iterator();
            TabInfo currentTab = tabIt.next();
            TabInfo nextTab = tabIt.next();
            FlowPanel tabPanel = createTab();
            tabbedPanel.addNamed(tabPanel, currentTab.getTabName(), currentTab.getTabId());
            I_Type entityType = m_vie.getType(entity.getTypeName());
            List<String> attributeNames = entityType.getAttributeNames();
            AttributeValueView lastCompactView = null;
            boolean collapsed = currentTab.isCollapsed()
                && ((nextTab != null) && attributeNames.get(1).endsWith("/" + nextTab.getStartName()));
            for (final String attributeName : attributeNames) {
                if ((nextTab != null) && attributeName.endsWith("/" + nextTab.getStartName())) {
                    currentTab = nextTab;
                    nextTab = tabIt.hasNext() ? tabIt.next() : null;
                    tabPanel = createTab();
                    tabbedPanel.addNamed(tabPanel, currentTab.getTabName(), currentTab.getTabId());
                    // check if the tab content may be collapsed
                    if (currentTab.isCollapsed()) {
                        int currentIndex = attributeNames.indexOf(attributeName);
                        collapsed = ((currentIndex + 1) == attributeNames.size())
                            || ((nextTab != null) && attributeNames.get(currentIndex + 1).endsWith(
                                "/" + nextTab.getStartName()));
                    }
                    if (lastCompactView != null) {
                        // previous widget was set to first column mode,
                        // revert that as no following widget will occupy the second column
                        lastCompactView.setCompactMode(AttributeValueView.COMPACT_MODE_WIDE);
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.TabInfo

    assertThat(tabSet.getWidgets()).isEmpty();
    assertThat(tabSet.getTabs().size()).isEqualTo(2);
    // check bounds
    Insets insets = tabSet.getTabInsets();
    int barThickness = tabSet.getTabBarThickness();
    TabInfo selectedTab = tabSet.getSelectedTab();
    Rectangle tabSetBounds = tabSet.getModelBounds();
    assertThat(selectedTab.getModelBounds()).isEqualTo(
        new Rectangle(insets.left, barThickness + insets.right, tabSetBounds.width
            - insets.getWidth(), tabSetBounds.height - barThickness - insets.getHeight()));
    //
    AbstractArrayObjectInfo objectTabsInfo =
        tabSet.getChildren(AbstractArrayObjectInfo.class).get(0);
View Full Code Here

Examples of com.gwtplatform.mvp.client.annotations.TabInfo

    Integer tabPriority = null;
    String tabLabel = null;
    TabInfoFunctionDescription tabInfoFunctionDescription = null;
    String tabNameToken = null;
    if (proxyInterface.isAssignableTo(tabContentProxyClass)) {
      TabInfo tabInfoAnnotation = proxyInterface.getAnnotation(TabInfo.class);
      tabInfoFunctionDescription = findTabInfoFunction(
          logger, presenterClass, presenterClassName, ginjectorClassName,
          ginjectorClass);
     
      // Ensure @TabInfo is there exactly once
      if (tabInfoAnnotation != null && tabInfoFunctionDescription != null) {
        logger.log(TreeLogger.ERROR, "Presenter " + presenterClassName
            + " contains both a proxy and a method annotated with @' +"
            + TabInfo.class.getSimpleName() + ". This is illegal.", null);
        throw new UnableToCompleteException();
      }
      if (tabInfoFunctionDescription != null) {
        tabInfoAnnotation = tabInfoFunctionDescription.annotation;
      }     
      if (tabInfoAnnotation == null) {
        logger.log(TreeLogger.ERROR, "The proxy for '" + presenterClassName
            + "' is a TabContentProxy, but is not annotated with @' +"
            + TabInfo.class.getSimpleName()
            + " and its presenter has no method annotated with it either.", null);
        throw new UnableToCompleteException();
      }
     
      // Extract the label if its in TabInfo
      if (tabInfoAnnotation.label().length() > 0) {
        tabLabel = tabInfoAnnotation.label();
      }
      if (tabLabel != null && tabInfoFunctionDescription != null) {
        logger.log(TreeLogger.ERROR, "The @" + TabInfo.class.getSimpleName()
            + " in " + presenterClassName + " defines the 'label' parameter and"
            + " annotates a method, this is not permitted.", null);
        throw new UnableToCompleteException();
      }
      if (tabLabel == null && tabInfoFunctionDescription == null) {
        logger.log(TreeLogger.ERROR, "The @" + TabInfo.class.getSimpleName()
            + " in " + presenterClassName + " does not define the 'label' parameter and"
            + " does not annotate a method, this is not permitted.", null);
        throw new UnableToCompleteException();
      }

      // Extract the label if its in TabInfo (it is a negative integer if not set)
      if (tabInfoAnnotation.priority() >= 0) {
        tabPriority = tabInfoAnnotation.priority();
      }
      if (tabPriority != null &&
          tabInfoFunctionDescription != null && !tabInfoFunctionDescription.returnString) {
        logger.log(TreeLogger.ERROR, "The @" + TabInfo.class.getSimpleName()
            + " in " + presenterClassName + " defines the 'priority' parameter and"
            + " annotates a method returning TabData, this is not permitted.", null);
        throw new UnableToCompleteException();
      }
      if (tabPriority == null &&
          (tabInfoFunctionDescription == null || tabInfoFunctionDescription.returnString)) {
        logger.log(TreeLogger.ERROR, "The @" + TabInfo.class.getSimpleName()
            + " in " + presenterClassName + " does not define the 'priority' parameter and"
            + " does not annotate a method returning TabData, this is not permitted.", null);
        throw new UnableToCompleteException();
      }
     
      // Find the container
      tabContainerClass = oracle.findType(tabInfoAnnotation.container().getCanonicalName());
      if (tabContainerClass == null) {
        logger.log(TreeLogger.ERROR, "The container '"
            + tabInfoAnnotation.container().getCanonicalName()
            + "' in the proxy annotation for '" + presenterClassName
            + "' was not found.", null);
        throw new UnableToCompleteException();
      }
      tabContainerClassName = tabContainerClass.getParameterizedQualifiedSourceName();
     
      // Find the name token to use when the tab is clicked
      if (tabInfoAnnotation.nameToken().length() > 0) {
        tabNameToken = tabInfoAnnotation.nameToken();
      }
      if (tabNameToken != null && nameToken != null) {
        logger.log(TreeLogger.ERROR, "The @" + TabInfo.class.getSimpleName()
            + " in " + presenterClassName + " defines the 'nameToken' parameter but"
            + " its proxy is a place, this is not permitted.", null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.