Examples of ISectionComponent


Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent

      if (sectionComps != null && !sectionComps.isEmpty()) {
        try {
          String componentUID = compOpened.getUid();
          if (contains(componentUID)) {
            if (compOpened instanceof TCComponentQuery) {
              ISectionComponent tempSectComp = getSectionComponent(componentUID);
              if (tempSectComp != null && tempSectComp.getTitle().equals(info[0])) {
                toAdd = false;
              }
            } else {
              toAdd = false;
            }
          }
        } catch (Exception ex) {

        }
      }

      if (toAdd) {
        Icon icon = TCTypeRenderer.getIcon(compOpened);
        ISectionComponent c = null;

        if (compOpened instanceof TCComponentCCSearchContext) {
          return;
        }
        if (compOpened instanceof TCComponentQuery) {
          // Create the query section component
          if (info != null) {
            c = QuerySectionComponent.createQuerySectionComponent(compOpened, this, (String) info[0], (String[]) info[1], (String[]) info[2]);
            if (info.length == 5) {
              ((QuerySectionComponent) c).setMultiLevelSearch(((Boolean) info[4]).booleanValue());
            }
          }
          // Set the icon on the section component
          icon = Registry.getRegistry(this).getImageIcon("TcQuery.ICON");
        } else {
          c = SectionComponent.createSectionComponent(compOpened, this);
          c.setUseDefaultOpenCommand(false);
        }
        if (c != null) {
          // Set the icon on the section component
          c.setIcon(icon);

          c.setImage(getImageForComponent(compOpenedArray[0]));

          // Set tooltip
          String tooltip = e.getToolTip();

          if (tooltip != null && tooltip.length() > 0) {
            c.setToolTipText(tooltip);
          }

          sectionComps.add(c);
        }
      }
View Full Code Here

Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent

      }
    }

    if (toAdd) {
      Icon icon = TCTypeRenderer.getIcon(compOpenedArray[0]);
      ISectionComponent c;
      c = SectionComponent.createSectionComponent(componentStr, componentStr, this);
      c.setUseDefaultOpenCommand(false);

      // Set the icon on the section component
      c.setIcon(icon);

      c.setImage(getImageForComponent(compOpenedArray[0]));

      // Set tooltip
      String tooltip = e.getToolTip();

      if (tooltip != null && tooltip.length() > 0) {
        c.setToolTipText(tooltip);
      }

      sectionComps.add(c);

      ISectionComponent[] finalList = sectionComps.toArray(new ISectionComponent[sectionComps.size()]);
View Full Code Here

Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent

      return;
    }

    InterfaceAIFComponent tempComp;
    String tempId;
    ISectionComponent updateSecComp = null;
    for (ISectionComponent element : openedComps) {
      tempComp = element.getTCComponent();
      tempId = element.getID();
      if (targetId != null && targetId.equals(tempId)) {
        updateSecComp = element;
        break;
      } else if (targetComp != null && tempComp == targetComp) {
        updateSecComp = element;
        break;
      }
    }
    if (updateSecComp == null) {
      return; // couldn't find a match
    }

    if (e.getPropName() != null && e.getPropName().equalsIgnoreCase(SectionComponentChangeEvent.TOOLTIP)) {
      updateSecComp.setToolTipText(e.getNewValue() == null ? "" : e.getNewValue().toString());
    }

    ISectionComponent[] finalList = getSectionComponents();

    ApplicationTaskPaneSectionChangeEvent evt = new ApplicationTaskPaneSectionChangeEvent(this, this.getID(), finalList, null);
View Full Code Here

Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent

   * @unpublished
   */
  public void removeQuerySectionComponent(String id, String title) {
    if (sectionComponents != null && sectionComponents.size() > 0) {
      for (int inx = 0; sectionComponents != null && inx < sectionComponents.size(); inx++) {
        ISectionComponent secCmp = sectionComponents.get(inx);
        if (secCmp.getID().equals(id) && secCmp.getTitle().equals(title)) {
          if (secCmp instanceof QuerySectionComponent) {
            if (AIFUtility.getActiveDesktop().getLeftHandNavigationPane() != null) {
              AIFUtility.getActiveDesktop().getLeftHandNavigationPane().removeOpenedQueryChangeListener((QuerySectionComponent) secCmp);
            }
          }
View Full Code Here

Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent

        List<ISectionComponent> containedSections = getContainedSections(aifComponentChangeEvent.getComponent());
        if (containedSections == null)
          continue;
        Iterator<ISectionComponent> containedSectionsIterator = containedSections.iterator();
        while (containedSectionsIterator.hasNext()) {
          ISectionComponent sectionComponent = (ISectionComponent) containedSectionsIterator.next();
          sectionComponent.setTitle(aifComponentChangeEvent.getComponent().toString());
        }
      }
    }
  }
View Full Code Here

Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent

  }


  public ISectionComponent getSectionComponent(String arg0) {
    for (int i = 0; (this.sectionComponents != null) && (i < this.sectionComponents.size()); i++) {
      ISectionComponent sectionComponent = (ISectionComponent) this.sectionComponents.get(i);
      if (!sectionComponent.getID().equals(arg0))
        continue;
      return sectionComponent;
    }
    return null;
  }
View Full Code Here

Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent

      if ((sectionComponentRegistryMap == null) || (sectionComponentRegistryMap.size() <= 0)) {
        loadDefaultSectionComponents(this.sectionComponentIds);
      } else {
        for (int i = 0; (this.sectionComponentIds != null) && (i < this.sectionComponentIds.length); i++) {
          String str = this.sectionComponentIds[i];
          ISectionComponent sectionComponent = null;
          if (!sectionComponentRegistryMap.containsKey(str)) {
            sectionComponent = getDefaultSectionComponent(str);
          } else {
            IConfigurationElement configurationElement = (IConfigurationElement) sectionComponentRegistryMap.get(str);
            sectionComponent = SectionComponent.createSectionComponent(str, this, configurationElement);
View Full Code Here

Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent

  public void removeSectionComponents(String[] arg0) {
    if ((arg0 != null) && (arg0.length > 0) && (this.sectionComponents != null) && (this.sectionComponents.size() > 0)) {
      for (String str : arg0) {
        Iterator<ISectionComponent> sectionComponentsIterator = this.sectionComponents.iterator();
        while (sectionComponentsIterator.hasNext()) {
          ISectionComponent sectionComponent = (ISectionComponent) sectionComponentsIterator.next();
          if ((sectionComponent.getID() == null) || (sectionComponent.getID().equals(""))) {
            if (sectionComponent.getCommandId().equals(str))
              sectionComponentsIterator.remove();
          } else if (sectionComponent.getID().equals(str))
            sectionComponentsIterator.remove();
        }
      }
    }
  }
View Full Code Here

Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent


  public void setSectionComponents(ISectionComponent[] arg0) {
    List<ISectionComponent> sectionComponents = new ArrayList<ISectionComponent>();
    for (int i = 0; (arg0 != null) && (i < arg0.length); i++) {
      ISectionComponent sectionComponent = arg0[i];
      ISectionComponent retreivedSectionComponent = null;
      if ((sectionComponent.getID() == null) || (sectionComponent.getID().equals("")))
        retreivedSectionComponent = getSectionComponentByCommandId(sectionComponent.getCommandId());
      else
        retreivedSectionComponent = getSectionComponent(sectionComponent.getID(), sectionComponent.getTitle());
      if (retreivedSectionComponent == null) {
        retreivedSectionComponent = sectionComponent.cloneSectionComponent(this);
      } else if ((retreivedSectionComponent.getIcon() == null) && (retreivedSectionComponent.getImage() == null) && ((sectionComponent.getIcon() != null) || (sectionComponent.getImage() != null))) {
        retreivedSectionComponent.setIcon(sectionComponent.getIcon());
        retreivedSectionComponent.setImage(sectionComponent.getImage());
      }
      sectionComponents.add(retreivedSectionComponent);
    }
    this.sectionComponents = sectionComponents;
  }
View Full Code Here

Examples of com.teamcenter.rac.aif.navigationpane.ISectionComponent

      dummyAifComponent = findItem("006969", "Item");

      List<ISectionComponent> sectionComponents = new ArrayList<ISectionComponent>();

      ImageIcon localImageIcon = TCTypeRenderer.getIcon(dummyAifComponent);
      ISectionComponent sectionComponent = SectionComponent.createSectionComponent(dummyAifComponent, this);
      sectionComponent.setUseDefaultOpenCommand(false);
      sectionComponent.setIcon(localImageIcon);
      sectionComponent.setImage(getImageForComponent(dummyAifComponent));

      sectionComponents.add(sectionComponent);

      setSectionComponents((ISectionComponent[]) sectionComponents.toArray(new ISectionComponent[sectionComponents.size()]));
      if ((this.appTaskPane != null) && (this.appTaskPane.getLeftHandNavigationPane() != 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.