Package fr.soleil.comete.bean.technicaldata.full.genericclasses.treeutil

Examples of fr.soleil.comete.bean.technicaldata.full.genericclasses.treeutil.TreeNodeDomain


                //get vector which contains : domain, family, member
                Vector vectDevice = Utils.breakUp(strDeviceName, "/");
                //get device's domain
                String strDeviceDomain = vectDevice.elementAt(0).toString();
                //get device domain node
                TreeNodeDomain domainNode = (TreeNodeDomain) TreeUtilities.getANode(m_treeTable.getTree(), strDeviceDomain);
                if(domainNode != null)
                {
                    //test if node domain has been built
                    if(domainNode.isBuilt())
                    {
                        //get family node
                        TreeNodeFamily familyNode = domainNode.getNodeFamily(vectDevice.elementAt(1).toString());
                        if(familyNode != null)
                        {
                            if (! familyNode.isBuilt())
                            {
                                //create all memeber nodes
                                familyNode.addMembers(false);
                                SpRecordingDevices.updateRecordabilityNodes(familyNode.children());
                                familyNode.setBuilt(true);
                            }
                            // get the good member node and check it
                            String strDeviceMember = vectDevice.elementAt(2).toString();
                            TreeNodeMember memberNode = familyNode.getNodeMember(strDeviceMember);
                            if(memberNode != null)
                            {
                                //check this node
                                //check corresponding column of this node
                                m_model.setValueAt(new Boolean(true), memberNode, iCol);
                                //add this node in vector selectedNodes
                                vectSelectedNodes.add(memberNode);
                            }
                        }
                    }

                    /** Create all families*/
                    /** Create all members of the good family */
                    /** Check the good member node */
                    else
                    {
                        //add families to domain node
                        domainNode.addFamilies();
                        domainNode.setBuilt(true);
                        //get family name
                        String strDeviceFamily = vectDevice.elementAt(1).toString();
                        //get family node which contains member node
                        TreeNodeFamily familyNode = domainNode.getNodeFamily(strDeviceFamily);
                        if(familyNode != null)
                        {
                            //add members to family node
                            familyNode.addMembers(false);
                            familyNode.setBuilt(true);
View Full Code Here


                //get vector which contains : domain, family, member
                Vector vectAttribute = Utils.breakUp(strAttributePath, "/");
                //get device's domain
                String strDeviceDomain = vectAttribute.elementAt(0).toString();
                //get device domain node
                TreeNodeDomain domainNode = (TreeNodeDomain) TreeUtilities.getANode(m_treeTable.getTree(), strDeviceDomain);
                TreeNodeMember memberNode = null;
                if(domainNode != null)
                {
                    //test if node domain has been built
                    if(domainNode.isBuilt())
                    {
                        //get family node
                        TreeNodeFamily familyNode = domainNode.getNodeFamily(vectAttribute.elementAt(1).toString());
                        if(familyNode != null)
                        {
                            if(familyNode.isBuilt())
                            {
                                memberNode = familyNode.getNodeMember(vectAttribute.elementAt(2).toString());
                                if(memberNode != null)
                                {
                                    if(!memberNode.isBuilt())
                                    {
                                        try
                                        {
                                            memberNode.addAttributes();
                                            memberNode.setBuilt(true);
                                        }
                                        catch (DevFailed e)
                                        {
                                            System.out.println("Device " + memberNode.getDeviceName() + " is not alive." );
                                            memberNode.setBuilt(true);
                                        }
                                    }
                                }
                            }

                            else
                            {
                                familyNode.addMembers(true);
                                familyNode.setBuilt(true);

                                memberNode = familyNode.getNodeMember(vectAttribute.elementAt(2).toString());
                                if(memberNode != null)
                                {
                                    if(!memberNode.isBuilt())
                                    {
                                        try
                                        {
                                            memberNode.addAttributes();
                                            memberNode.setBuilt(true);
                                        }
                                        catch (DevFailed e)
                                        {
                                            System.out.println("Device " + memberNode.getDeviceName() + " is not alive." );
                                        }
                                    }
                                }
                            }
                            // get the good attribute node and check it
                            String strAttribute = vectAttribute.elementAt(3).toString();
                            if(memberNode != null)
                            {
                                TreeNodeAttribute attributeNode = memberNode.getNodeAttribute(strAttribute);
                                if(attributeNode != null)
                                {
                                    //check this node
                                    //check corresponding column of this node
                                    m_model.setValueAt(new Boolean(true), attributeNode, 1);
                                    //add this node in vector selectedNodes
                                    vectSelectedNodes.add(attributeNode);
                                }
                            }
                        }
                    }

                    /** Create all families*/
                    /** Create all members of the good family */
                    /** Check the good member node */
                    else
                    {
                        //add families to domain node
                        domainNode.addFamilies();
                        domainNode.setBuilt(true);
                        //get family name
                        String strDeviceFamily = vectAttribute.elementAt(1).toString();
                        //get family node which contains member node
                        TreeNodeFamily familyNode = domainNode.getNodeFamily(strDeviceFamily);
                        if(familyNode != null)
                        {
                            //add members to family node
                            familyNode.addMembers(true);
                            familyNode.setBuilt(true);
View Full Code Here

          public void treeExpanded(TreeExpansionEvent event) {
            // add node families or member
            if (event.getPath().getLastPathComponent() != null) {
              if (event.getPath().getLastPathComponent() instanceof TreeNodeDomain) {
                // add family nodes
                TreeNodeDomain domainNode = (TreeNodeDomain) event
                    .getPath().getLastPathComponent();
                if (!domainNode.isBuilt()) {
                  domainNode.addFamilies();
                  domainNode.setBuilt(true);
                  m_model.reload(domainNode);
                }
              }

              else if (event.getPath().getLastPathComponent() instanceof TreeNodeFamily) {
View Full Code Here

    // get domains from tango database
    String[] tabDomains = TangoDataBaseManager.getDomains(isDeviceTree);

    for (String domain : tabDomains) {
      // create node TreeNodeDomain
      TreeNodeDomain tnDomain = new TreeNodeDomain(domain, isDeviceTree);
      // add this node to rootNode
      m_rootNode.add(tnDomain);
    }
  }
View Full Code Here

                if( event.getPath().getLastPathComponent() != null)
                {
                    if(event.getPath().getLastPathComponent() instanceof TreeNodeDomain)
                    {
                        // add family nodes
                        TreeNodeDomain domainNode = (TreeNodeDomain) event.getPath().getLastPathComponent();
                        if(!domainNode.isBuilt())
                        {
                            domainNode.addFamilies();
                            domainNode.setBuilt(true);
                            m_model.reload(domainNode);
                        }
                    }

                    else if (event.getPath().getLastPathComponent() instanceof TreeNodeFamily)
View Full Code Here

        //get domains from tango database
        String[] tabDomains = TangoDataBaseManager.getDomains(isDeviceTree);

        for (String domain : tabDomains) {
            // create node TreeNodeDomain
            TreeNodeDomain tnDomain = new TreeNodeDomain(domain, isDeviceTree);
            // add this node to rootNode
            m_rootNode.add(tnDomain);
        }
    }
View Full Code Here

                //get vector which contains : domain, family, member
                Vector vectDevice = Utils.breakUp(strDeviceName, "/");
                //get device's domain
                String strDeviceDomain = vectDevice.elementAt(0).toString();
                //get device domain node
                TreeNodeDomain domainNode = (TreeNodeDomain) TreeUtilities.getANode(m_treeTable.getTree(), strDeviceDomain);
                if(domainNode != null)
                {
                    //test if node domain has been built
                    if(domainNode.isBuilt())
                    {
                        //get family node
                        TreeNodeFamily familyNode = domainNode.getNodeFamily(vectDevice.elementAt(1).toString());
                        if(familyNode != null)
                        {
                            if (! familyNode.isBuilt())
                            {
                                //create all memeber nodes
                                familyNode.addMembers(false);
                                SpRecordingDevices.updateRecordabilityNodes(familyNode.children());
                                familyNode.setBuilt(true);
                            }
                            // get the good member node and check it
                            String strDeviceMember = vectDevice.elementAt(2).toString();
                            TreeNodeMember memberNode = familyNode.getNodeMember(strDeviceMember);
                            if(memberNode != null)
                            {
                                //check this node
                                //check corresponding column of this node
                                m_model.setValueAt(new Boolean(true), memberNode, iCol);
                                //add this node in vector selectedNodes
                                vectSelectedNodes.add(memberNode);
                            }
                        }
                    }

                    /** Create all families*/
                    /** Create all members of the good family */
                    /** Check the good member node */
                    else
                    {
                        //add families to domain node
                        domainNode.addFamilies();
                        domainNode.setBuilt(true);
                        //get family name
                        String strDeviceFamily = vectDevice.elementAt(1).toString();
                        //get family node which contains member node
                        TreeNodeFamily familyNode = domainNode.getNodeFamily(strDeviceFamily);
                        if(familyNode != null)
                        {
                            //add members to family node
                            familyNode.addMembers(false);
                            familyNode.setBuilt(true);
View Full Code Here

                Vector vectAttribute = Utils.breakUp(strAttributePath, "/");
                if ((vectAttribute != null) && (vectAttribute.size() > 3)) {
                    // get device's domain
                    String strDeviceDomain = vectAttribute.elementAt(0).toString();
                    // get device domain node
                    TreeNodeDomain domainNode = (TreeNodeDomain) TreeUtilities.getANode(m_treeTable.getTree(),
                            strDeviceDomain);
                    TreeNodeMember memberNode = null;
                    if (domainNode != null) {
                        // test if node domain has been built
                        if (domainNode.isBuilt()) {
                            // get family node
                            TreeNodeFamily familyNode = domainNode.getNodeFamily(vectAttribute.elementAt(1).toString());
                            if (familyNode != null) {
                                if (familyNode.isBuilt()) {
                                    memberNode = familyNode.getNodeMember(vectAttribute.elementAt(2).toString());
                                    if (memberNode != null) {
                                        if (!memberNode.isBuilt()) {
                                            try {
                                                memberNode.addAttributes();
                                                memberNode.setBuilt(true);
                                            } catch (DevFailed e) {
                                                System.out.println("Device " + memberNode.getDeviceName()
                                                        + " is not alive.");
                                                memberNode.setBuilt(true);
                                            }
                                        }
                                    }
                                }

                                else {
                                    familyNode.addMembers(true);
                                    familyNode.setBuilt(true);

                                    memberNode = familyNode.getNodeMember(vectAttribute.elementAt(2).toString());
                                    if (memberNode != null) {
                                        if (!memberNode.isBuilt()) {
                                            try {
                                                memberNode.addAttributes();
                                                memberNode.setBuilt(true);
                                            } catch (DevFailed e) {
                                                System.out.println("Device " + memberNode.getDeviceName()
                                                        + " is not alive.");
                                            }
                                        }
                                    }
                                }
                                // get the good attribute node and check it
                                String strAttribute = vectAttribute.elementAt(3).toString();
                                if (memberNode != null) {
                                    TreeNodeAttribute attributeNode = memberNode.getNodeAttribute(strAttribute);
                                    if (attributeNode != null) {
                                        // check this node
                                        // check corresponding column of this node
                                        m_model.setValueAt(new Boolean(true), attributeNode, 1);
                                        // add this node in vector selectedNodes
                                        vectSelectedNodes.add(attributeNode);
                                    }
                                }
                            }
                        }

                        /** Create all families */
                        /** Create all members of the good family */
                        /** Check the good member node */
                        else {
                            // add families to domain node
                            domainNode.addFamilies();
                            domainNode.setBuilt(true);
                            // get family name
                            String strDeviceFamily = vectAttribute.elementAt(1).toString();
                            // get family node which contains member node
                            TreeNodeFamily familyNode = domainNode.getNodeFamily(strDeviceFamily);
                            if (familyNode != null) {
                                // add members to family node
                                familyNode.addMembers(true);
                                familyNode.setBuilt(true);
                                SpRecordingDevices.updateRecordabilityNodes(familyNode.children());
View Full Code Here

                if( event.getPath().getLastPathComponent() != null)
                {
                    if(event.getPath().getLastPathComponent() instanceof TreeNodeDomain)
                    {
                        // add family nodes
                        TreeNodeDomain domainNode = (TreeNodeDomain) event.getPath().getLastPathComponent();
                        if(!domainNode.isBuilt())
                        {
                            domainNode.addFamilies();
                            domainNode.setBuilt(true);
                            m_model.reload(domainNode);
                        }
                    }
                    else if (event.getPath().getLastPathComponent() instanceof TreeNodeFamily)
                    {
View Full Code Here

        //get domains from tango database
        String[] tabDomains = TangoDataBaseManager.getDomains(isDeviceTree);

        for (String domain : tabDomains) {
            // create node TreeNodeDomain
            TreeNodeDomain tnDomain = new TreeNodeDomain(domain, isDeviceTree);
            // add this node to rootNode
            m_rootNode.add(tnDomain);
        }
    }
View Full Code Here

TOP

Related Classes of fr.soleil.comete.bean.technicaldata.full.genericclasses.treeutil.TreeNodeDomain

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.