Examples of TreeNodeAttribute


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

        while (enumChildren.hasMoreElements())
        {
            DefaultMutableTreeNode node = (DefaultMutableTreeNode) enumChildren.nextElement();
            if (node instanceof TreeNodeAttribute)
            {
                TreeNodeAttribute tnAttribute = (TreeNodeAttribute) node;
                // it must be selected in the threeTable in the col 1 (checkbox "saved")
                if (((TreeNodeAttribute) node).isSaved())
                {
                    // attribute is selected -> add it in the vector
                    String strAttributeName = tnAttribute.getAttributePath();
                    vect.add(strAttributeName);
                }
            }
        }
        return vect;
View Full Code Here

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

        {
            //find all treenodemembers
            DefaultMutableTreeNode node = (DefaultMutableTreeNode) enumChildren.nextElement();
            if (node instanceof TreeNodeAttribute)
            {
                TreeNodeAttribute tnAttribute = (TreeNodeAttribute) node;
                //uncheck all checkbox corresponding to this node
                m_model.setValueAt(new Boolean(false), tnAttribute, 1);
            }
        }
    }
View Full Code Here

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

                            }
                            // 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());
                            // get member node
                            String strDeviceMember = vectAttribute.elementAt(2).toString();
                            memberNode = familyNode.getNodeMember(strDeviceMember);
                            if (memberNode != null)
                            {

                                TreeNodeAttribute attributeNode = memberNode.getNodeAttribute(vectAttribute
                                        .elementAt(3).toString());
                                if (attributeNode != null)
                                {
                                    // check this node
                                    // check corresponding column of this node
View Full Code Here

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

    private void expandSelectedNodes(Vector vecSelectedNodes)
    {
        // iteration on this vector
        for (int i=0 ; i<vecSelectedNodes.size() ; i++)
        {
            TreeNodeAttribute tn = (TreeNodeAttribute) vecSelectedNodes.elementAt(i);
            TreePath tp = new TreePath(tn.getPath());
            m_treeTable.getTree().setSelectionPath(tp);
            m_treeTable.getTree().addSelectionPath(m_treeTable.getTree().getSelectionPath());
        }
    }
View Full Code Here

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

            //the second column represented the value "Pre" associated to this node
            case 1:
            {
                if (currentNode instanceof TreeNodeAttribute)
                {
                    TreeNodeAttribute attributeNode = (TreeNodeAttribute) currentNode;
                    return new Boolean (attributeNode.isSaved());
                } else {
                    return null;
                }
            }
        }
View Full Code Here

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

            return;
        }
        //set value only for node TreeNodeMember
        if (node instanceof TreeNodeAttribute)
        {
            TreeNodeAttribute nodeAttribute = (TreeNodeAttribute) node;
            boolean bSelected = new Boolean(aValue.toString()).booleanValue();
            switch(iCol)
            {
                //the first column of the table represents the value "Pre" associated to the node
                case 1 :
                    nodeAttribute.setSaved(bSelected);
                    break;
            }
        }
    }
View Full Code Here

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

        Enumeration enumChildren = ((DefaultMutableTreeNode) m_treeTable.getTree().getModel().getRoot())
        .preorderEnumeration();
        while (enumChildren.hasMoreElements()) {
            DefaultMutableTreeNode node = (DefaultMutableTreeNode) enumChildren.nextElement();
            if (node instanceof TreeNodeAttribute) {
                TreeNodeAttribute tnAttribute = (TreeNodeAttribute) node;
                // it must be selected in the threeTable in the col 1 (checkbox "saved")
                if (((TreeNodeAttribute) node).isSaved()) {
                    // attribute is selected -> add it in the vector
                    String strAttributeName = tnAttribute.getAttributePath();
                    vect.add(strAttributeName);
                }
            }
        }
        return vect;
View Full Code Here

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

        .preorderEnumeration();
        while (enumChildren.hasMoreElements()) {
            // find all treenodemembers
            DefaultMutableTreeNode node = (DefaultMutableTreeNode) enumChildren.nextElement();
            if (node instanceof TreeNodeAttribute) {
                TreeNodeAttribute tnAttribute = (TreeNodeAttribute) node;
                // uncheck all checkbox corresponding to this node
                m_model.setValueAt(new Boolean(false), tnAttribute, 1);
            }
        }
    }
View Full Code Here

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

                                    }
                                }
                                // 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());
                                // get member node
                                String strDeviceMember = vectAttribute.elementAt(2).toString();
                                memberNode = familyNode.getNodeMember(strDeviceMember);
                                if (memberNode != null) {

                                    TreeNodeAttribute attributeNode = memberNode.getNodeAttribute(vectAttribute
                                            .elementAt(3).toString());
                                    if (attributeNode != null) {
                                        // check this node
                                        // check corresponding column of this node
                                        m_model.setValueAt(new Boolean(true), attributeNode, 1);
View Full Code Here

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

     * @param Vector vecSelectedNodes, vector which contains these nodes
     */
    private void expandSelectedNodes(Vector vecSelectedNodes) {
        // iteration on this vector
        for (int i = 0; i < vecSelectedNodes.size(); i++) {
            TreeNodeAttribute tn = (TreeNodeAttribute) vecSelectedNodes.elementAt(i);
            TreePath tp = new TreePath(tn.getPath());
            m_treeTable.getTree().setSelectionPath(tp);
            m_treeTable.getTree().addSelectionPath(m_treeTable.getTree().getSelectionPath());
        }
    }
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.