Package de.netsysit.model

Examples of de.netsysit.model.PersonalTreeNode


        policyUseTokenCheck.setSelected(currentPolicy.isUseToken());
    }

    private void fillTree() {
        PersonalTreeNode root = new PersonalTreeNode("root", true);
        DefaultTreeModel tm = new DefaultTreeModel(root);
        PolicyModel p1 = currentPolicy;

        boolean parentexists = true;
        while (parentexists) {
            parentexists = false;
            for (PolicyModel p2 : currentPolicies) {
                if (p2.getFallback() == p1) {
                    p1 = p2;
                    parentexists = true;
                }
            }
        }

        PersonalTreeNode tn1 = null;
        if (p1 == currentPolicy) {
            tn1 = addNode(root, p1, true, tm);
        } else {
            tn1 = addNode(root, p1, false, tm);
        }

        PersonalTreeNode parent = tn1;
        PolicyModel p2 = null;
        PolicyModel fb = p1.getFallback();
        if (fb != null) {
            while (fb != null) {
                for (PolicyModel temp : currentPolicies) {
                    if (temp == fb) {
                        p2 = temp;
                    }
                }

                PersonalTreeNode tn = null;
                if (p2 == currentPolicy) {
                    tn = addNode(parent, p2, true, tm);
                } else {
                    tn = addNode(parent, p2, false, tm);
                }
View Full Code Here


    }

    private PersonalTreeNode addNode(PersonalTreeNode parent,
            PolicyModel child, boolean active, DefaultTreeModel tm) {

        PersonalTreeNode childNode = new PersonalTreeNode(child.getName(), active);

        tm.insertNodeInto(childNode, parent,
                parent.getChildCount());
        //policyTree.scrollPathToVisible(new TreePath(childNode.getPath()));
View Full Code Here

    }
   
    private void clearPolicyGUI() {
        policyNameTxt.setText("");
        policyFallBackLbl2.setText("");
        policyTree.setModel(new DefaultTreeModel(new PersonalTreeNode("root", true)));
       
        switch(dbModel.getActiveLevel()) {
            case A:
                policyAlgorithmCombo.setSelectedItem(Algorithms.NOTDEFINEDA);
                break;           
View Full Code Here

                        expanded,
                        leaf,
                        row,
                        hasFocus);
       
        PersonalTreeNode node = (PersonalTreeNode) value;
        setIcon(null);
       
        setSize(new Dimension(200, 23));
        setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
    
       
        if(node.isactive()) {
            setFont(getFont().deriveFont(Font.BOLD));
        } else setFont(getFont().deriveFont(Font.PLAIN));
        return this;
    }
View Full Code Here

TOP

Related Classes of de.netsysit.model.PersonalTreeNode

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.