Examples of IHierarchyComponent


Examples of info.unipax.bina.visualization.model.IHierarchyComponent

    {
      if (!controller.getVisualization().getGraph().getSelectedNodes().isEmpty())
      {       
        activeNode = controller.getVisualization().getGraph().getSelectedNodes().getFirst();//node or group that is selected 
           
        IHierarchyComponent group = null;         
       
        INodeComponent node = controller.getRegistry().getNodeComponent(activeNode);
         
        if (node instanceof IHierarchyComponent )//if a group was chosen 
        {
          group = (IHierarchyComponent) node;
          actualPathwayString = ((INodeComponentUI) group.getUI()).getLabel();
         
          for (IComponent c : group.getChildren())
          {               
            if (c instanceof INodeComponent)
            {
              Collection<String> externalIdentifier = c.getExternalIdentifier("NCBI-GeneID");
              if (c.getExternalIdentifier("NCBI-GeneID") != null)
              {
                for (String eI : externalIdentifier)
                {
                  id = eI;
                }
              }                                               
            }
          }                   
        }
       
        else if (node.getParent() != null && node.getParent() != node.getMappingModel().getRootComponent())
        {         
         
          group = node.getParent()
          actualPathwayString = ((INodeComponentUI) group.getUI()).getLabel();
          if(actualPathwayString.isEmpty())
          {
            actualPathwayString = null;
          }
          for (String eI : node.getExternalIdentifier("NCBI-GeneID"))
View Full Code Here

Examples of info.unipax.bina.visualization.model.IHierarchyComponent

  {
    if (!groupList.isEmpty())
    {
      for (Entry<IHierarchyComponent, Integer> entry : groupList.entrySet())
      {
        IHierarchyComponent group = entry.getKey();
        Integer c = entry.getValue();
        //System.out.println("test color" + group+" "+c);
        ((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.BLACK);
        switch (c)
        {
        case 0:
          Color myWHITE = new Color(255, 255, 255, 5);
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myWHITE);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(myWHITE);
          break;
        case 1:
          Color myYELLOW = new Color(255, 255, 0, 50);
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myYELLOW);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.YELLOW);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.YELLOW);
          break;
        case 2:
          Color myCYAN = new Color(0, 255, 255, 50);
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myCYAN);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.CYAN);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.CYAN);
          break;
        case 3:
          Color myMAGENTA = new Color(255, 0, 255, 50);       
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myMAGENTA);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.MAGENTA);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.MAGENTA);
          break;
        case 4:
          Color myBLUE = new Color(0, 0, 255, 50);
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myBLUE);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.BLUE);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.BLUE);
          break;       
        case 8:
          Color myLIGHT_GRAY = new Color(192, 192, 192, 50);
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myLIGHT_GRAY);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.LIGHT_GRAY);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.LIGHT_GRAY);
          break;
        case 6:
          Color myORANGE = new Color(255, 102, 0, 50);
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myORANGE);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.ORANGE);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.ORANGE);
          break;
        case 7:
          Color myRED = new Color(255, 0, 0, 50);
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myRED);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.RED);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.RED);
          break;
        case 5:
          Color myGREEN = new Color(0, 255, 0, 50);
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myGREEN);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.GREEN);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.GREEN);
          break;
        case 9:
          Color myPINK = new Color(255, 175, 175, 50);
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(myPINK);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.PINK);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.PINK);
          break;
        case 10:
          ((BasicNodeComponentUI) group.getUI()).setBackgroundColor(Color.GRAY);
          ((BasicNodeComponentUI) group.getUI()).setBorderColor(Color.GRAY);
          //((BasicNodeComponentUI) group.getUI()).setLabelColor(Color.GRAY);
          break;
        default:       
          break;
        }       
View Full Code Here

Examples of info.unipax.bina.visualization.model.IHierarchyComponent

          java.util.Collection<IComponent> components =controller.getMappingModel().getRootComponent().getChildren();
          for (IComponent c : components)
          {
            if (c instanceof IHierarchyComponent)
            {         
              IHierarchyComponent group = ((IHierarchyComponent) c);
              groupList.add(group);;
            }
          }     
     
          for (IHierarchyComponent g : groupList)           
View Full Code Here

Examples of info.unipax.bina.visualization.model.IHierarchyComponent

    java.util.Collection<IComponent> components = controller.getMappingModel().getRootComponent().getChildren();
    for (IComponent c : components)
    {
      if ((c instanceof IHierarchyComponent) && !(c instanceof ProteinComplexComponent) & !(c instanceof ProteinFamilyComponent))
      {         
        IHierarchyComponent group = ((IHierarchyComponent) c);       
        groupList.add(group);       
      }
    }         
    for (IHierarchyComponent g : groupList)
    {
View Full Code Here

Examples of info.unipax.bina.visualization.model.IHierarchyComponent

      }     
    }
 
    try
    {     
      IHierarchyComponent group = ModelOperations.group(components.toArray(new IComponent[0]));
     
      if (group != null)
      {       
        ((INodeComponentUI) group.getUI()).setLabel(entry.getKey().getFirstName());
        groupList.put(group, c);
        mapToDrawC.put(entry.getKey(), (INodeComponentUI) group.getUI());
      }
      else
      {
        System.out.println("The pathway "+entry.getKey().getFirstName()+" cannot be grouped!!!");
      }
View Full Code Here

Examples of info.unipax.bina.visualization.model.IHierarchyComponent

      java.util.Collection<IComponent> components =  controller.getMappingModel().getRootComponent().getChildren();
      for (IComponent c : components)
      {
        if (c instanceof IHierarchyComponent)
        {         
          IHierarchyComponent group = ((IHierarchyComponent) c);       
          groupList.add(group);       
        }
      }         
      for (IHierarchyComponent g : groupList)
      {
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.