Examples of INodeComponent


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

      {       
        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"))
          {
            id = eI;
          }         
        } 
     
        if(actualPathwayString == null) //if ungrouped node was choosen
        {
          IComponentUI ui = node.getUI();
          if (ui instanceof BasicNodeComponentUI)
          {
            BasicNodeComponentUI n = (BasicNodeComponentUI) ui;
            if (!mapToDrawE.isEmpty())
            {
              pathways = mapToDrawE.getKeys(n);
            }
            else
            {
              pathways = mapToDraw.getKeys(n);
            }
           
            if (pathways.size() > 0)
            {
              String[] pathList= new String[pathways.size()];
              int number=0;
              for (Pathway path : pathways)
              {
                pathList[number]= path.getFirstName();
                number=number+1;
              }
             
              final JList list = new JList(pathList);
             
              JLabel label = new JLabel("Please select pathway you are interested in: ");
              
              JOptionPane optionPane = new JOptionPane(new Object[] { label, new JScrollPane(list) }, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION);
              final JDialog dialog = optionPane.createDialog(null, "Input");
              dialog.setVisible(true);
             
              actualPathwayString = (String) list.getSelectedValue()
              for (String eI : node.getExternalIdentifier("NCBI-GeneID"))
              {
                id = eI;
             
            }           
          }
View Full Code Here

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

     
      LinkedList<Node> nodesOnGraph = new LinkedList<Node>();
      nodesOnGraph = controller.getVisualization().getGraph().getNodes();     
      for (Node n2 : nodesOnGraph)
      {
        INodeComponent inode = controller.getRegistry().getNodeComponent(n2);       
        if (!useList.contains(n2)&&!avoidList.contains(n2)&&(inode instanceof ProteinComponent))
        {
          if (n2 != null)
          {
            avoidList.add(n2);
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.