Package symantec.itools.awt

Examples of symantec.itools.awt.TreeNode


                if (restrict) {
                    // new mode is more restrictive; delete undesired children
                    for (int j=0; j<linkarray.length; ++j) {
                        if (!shouldDisplay (linkarray[j].getStatus())) {
                            TreeNode child = findNode (linkarray[j]);
                            if (child != null)
                                remove (child);
                        }
                    }
                }
                else {
                    // new mode is less restrictive; add children
                    for (int j=0; j<linkarray.length; ++j) {
                        update (linkarray[j]); // update() will check shouldDisplay()
                    }
                }
            }
           
            TreeNode c = n.getChild();
            if (c != null)
                reFilter (c, restrict);
        }
    }
View Full Code Here


    void reRender (TreeNode n) {
        for (; n != null; n = n.getSibling ()) {
            update (n);
           
            TreeNode c = n.getChild();
            if (c != null)
                reRender (c);
        }
    }
View Full Code Here

     */
    public synchronized void update (Link link) {
        if (!shouldDisplay (link.getStatus ()))
            return;

        TreeNode n = findNode (link);
        if (n == null)
            add (link);
        else
            update (n);

View Full Code Here

        redraw ();
    }

    synchronized void add (Link link) {
        TreeNode n = new TreeNode ("");
        n.setDataObject (link);

        Page source = link.getSource ();
        Link origin = source.getOrigin ();
        TreeNode parent = findNode (origin);

        if (parent == null) {
            update (n);
            append (n);
        }
        else {
            update (n);
            insert (n, parent, CHILD);
            parent.expand ();
        }
        links.put (link, n);
    }
View Full Code Here

        }
    }

    public boolean handleEvent (Event event) {
        if (event.id == Event.ACTION_EVENT) {
            TreeNode n = (TreeNode)getSelectedNode();
            if (n != null)
                fireEvent ((Link)n.getDataObject());
        }
        else if (event.id == Event.MOUSE_DOWN && event.metaDown())
            showControlPanel ();
        else
            return super.handleEvent (event);
View Full Code Here

            return super.handleEvent (event);
        return true;
    }
   
    public Link getSelectedLink () {
        TreeNode n = getSelectedNode();
        if (n != null)
            return (Link)n.getDataObject();
           
        return null;
    }
View Full Code Here

TOP

Related Classes of symantec.itools.awt.TreeNode

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.