User: ko5tik  
  Date: 02/04/05 08:50:33

  Modified:    src/java/xdocletgui/swing TreeFactoryScratch.java
                        XDocletGuiTreeCellRenderer.java
  Added:       src/java/xdocletgui/swing ClassFamilyTreeNode.java
                        ClassTreeNode.java DocTreeNode.java
                        MethodTreeNode.java TagFamilyTreeNode.java
                        TagTreeNode.java UnknownTagNodeData.java
                        UnknownTagTreeNode.java UnknownTagsTreeNode.java
  Removed:     src/java/xdocletgui/swing ClassFamily.java
  Log:
  refactored tree display stuff. created couple of
  ***TreeNode classes
  
  Missing icons are commented out.
  
  Revision  Changes    Path
  1.6       +63 -38    xdocletgui/src/java/xdocletgui/swing/TreeFactoryScratch.java
  
  Index: TreeFactoryScratch.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/TreeFactoryScratch.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -r1.5 -r1.6
  --- TreeFactoryScratch.java   4 Apr 2002 17:13:39 -0000       1.5
  +++ TreeFactoryScratch.java   5 Apr 2002 16:50:32 -0000       1.6
  @@ -43,6 +43,9 @@
   import xtags.TagFamily;
   
   import xtags.Tag;
  +
  +import java.util.TreeMap;
  +import java.util.Iterator;
   /**
    * Describe what this class does
    *
  @@ -74,12 +77,12 @@
                        ConditionFactory configurationFactory = new ConditionFactory();
                        TagFamilies tagFamilies = 
configurationFactory.createConfigurations();
                        // Find Entity Beans
  -                     addClasses(classes, root, new ClassFamily("Entity Beans", "EJB 
entity beans"), "javax.ejb.EntityBean", tagFamilies);
  -                     addClasses(classes, root, new ClassFamily("Session Beans", 
"EJB session beans"), "javax.ejb.SessionBean", tagFamilies);
  -                     addClasses(classes, root, new ClassFamily("Message Driven 
Beans", "EJB message driven beans"), "javax.ejb.MessageDrivenBean", tagFamilies);
  -                     addClasses(classes, root, new ClassFamily("WebWork Actions", 
"Webwork action classes"), "webwork.action.Action", tagFamilies);
  -                     addClasses(classes, root, new ClassFamily("JSP Tags", "JSP tag 
implementation classes"), "javax.servlet.jsp.tagext.Tag", tagFamilies);
  -                     addClasses(classes, root, new ClassFamily("HTTP Servlets", 
"HTTP servlet classes"), "javax.servlet.http.HttpServlet", tagFamilies);
  +                     addClasses(classes, root, "Entity Beans", "EJB entity beans", 
"javax.ejb.EntityBean", tagFamilies);
  +                     addClasses(classes, root, "Session Beans", "EJB session 
beans", "javax.ejb.SessionBean", tagFamilies);
  +                     addClasses(classes, root, "Message Driven Beans", "EJB message 
driven beans", "javax.ejb.MessageDrivenBean", tagFamilies);
  +                     addClasses(classes, root, "WebWork Actions", "Webwork action 
classes", "webwork.action.Action", tagFamilies);
  +                     addClasses(classes, root, "JSP Tags", "JSP tag implementation 
classes", "javax.servlet.jsp.tagext.Tag", tagFamilies);
  +                     addClasses(classes, root, "HTTP Servlets", "HTTP servlet 
classes", "javax.servlet.http.HttpServlet", tagFamilies);
   
                        return new DefaultTreeModel(root);
                } catch (Exception e) {
  @@ -100,50 +103,72 @@
         */
        private static void addTags(DefaultMutableTreeNode node, TagFamilies 
tagFamilies, XProgramElement element) {
                XDoc doc = element.doc();
  -             // walk through tag families
  -             for (int j = 0; j < tagFamilies.size(); j++) {
  -                     TagFamily tagFamily = tagFamilies.get(j);
   
  +             // create node for comment and add it first
  +             DocTreeNode docTreeNode = new DocTreeNode(doc);
  +             node.add(docTreeNode);
  +
  +             // walk through tag families and create nodes for them if the are 
applicable
  +             // to program element
  +             TreeMap familyMap = new TreeMap();
  +             for (int i = 0; i < tagFamilies.size(); i++) {
  +                     TagFamily tagFamily = tagFamilies.get(i);
                        if (tagFamily.supports(element)) {
  -                             DefaultMutableTreeNode tfn = new 
DefaultMutableTreeNode(tagFamily);
  -                             node.add(tfn);
  -                             // walk through tag family tags
  -                             for (int i = 0; i < tagFamily.size(); i++) {
  -                                     Tag tag = tagFamily.getTag(i);
  -                                     if (tag.supports(element)) {
  -                                             // big question, whether we shall also 
look in superclasses.
  -                                             // say yes for now...
  -                                             XTag[] xtags = doc.tags(tag.getName(), 
true);
  +                             familyMap.put(tagFamily.getName(), new 
TagFamilyTreeNode(tagFamily));
  +                     }
  +             }
  +
  +             // create node for tags which do not fit into any family
  +             UnknownTagsTreeNode unknownTags = new UnknownTagsTreeNode();
  +             // walk through tags and put them where appropriate
  +             XTag[] xtags = doc.tags();
   
                                                for (int t = 0; t < xtags.length; t++) 
{
  -                                                     DefaultMutableTreeNode tagNode 
= new DefaultMutableTreeNode(new TagNodeData(tag, xtags[t]));
  -                                                     tfn.add(tagNode);
  +
  +                     // locate tag inside one of our families
  +                     TagFamily tf = null;
  +
  +                     Iterator familyIterator = familyMap.values().iterator();
  +                     while (familyIterator.hasNext()) {
  +                             TagFamily tfScratch = 
((TagFamilyTreeNode)familyIterator.next()).getTagFamily();
  +                             if (tfScratch.hasTag(xtags[t].name())) {
  +                                     tf = tfScratch;
  +                                     break;
  +                             }
                                                }
  +                     if (tf != null) {
  +                             
((TagFamilyTreeNode)familyMap.get(tf.getName())).add(new 
TagTreeNode(tf.getTag(xtags[t].name()), xtags[t]));
                                        }
  +                     else {
  +                             unknownTags.add(new UnknownTagTreeNode(xtags[t]));
                                }
                        }
  +
  +             // tags are added. add tag families
  +             Iterator tfIterator = familyMap.values().iterator();
  +             while (tfIterator.hasNext()) {
  +                     node.add((TagFamilyTreeNode)tfIterator.next());
                }
  +             node.add(unknownTags);
  +
        }
   
   
  +
        /**
  -      * Describe the method
  +      * add classes to class family node
         *
  -      * @param className Describe the method parameter
  -      * @param root Describe the method parameter
  -      * @param classes Describe the method parameter
  +      * @param className superclass of included classes
  +      * @param root root node
  +      * @param classes classes array to be scanned
         * @param tagFamilies Describe the method parameter
  -      * @param classFamily Describe the method parameter
  -      * @todo-javadoc Describe the method parameter
  -      * @todo-javadoc Describe the method parameter
  -      * @todo-javadoc Describe the method parameter
  -      * @todo-javadoc Describe the method parameter
  -      * @todo-javadoc Describe the method
  +      * @param classFamilyName Describe the method parameter
  +      * @param classFamilyDescription Describe the method parameter
         * @todo-javadoc Describe the method parameter
         * @todo-javadoc Describe the method parameter
         */
  -     private static void addClasses(XClass[] classes, DefaultMutableTreeNode root, 
ClassFamily classFamily, String className, TagFamilies tagFamilies) {
  -             DefaultMutableTreeNode classType = new 
DefaultMutableTreeNode(classFamily);
  +     private static void addClasses(XClass[] classes, DefaultMutableTreeNode root, 
String classFamilyName, String classFamilyDescription, String className, TagFamilies 
tagFamilies) {
  +             ClassFamilyTreeNode classType = new 
ClassFamilyTreeNode(classFamilyName, classFamilyDescription);
                root.add(classType);
   
                //allow creation of empty tree model
  @@ -152,13 +177,13 @@
                }
                for (int i = 0; i < classes.length; i++) {
                        if (classes[i].isA(className)) {
  -                             DefaultMutableTreeNode clazz = new 
DefaultMutableTreeNode(classes[i]);
  +                             ClassTreeNode clazz = new ClassTreeNode(classes[i]);
                                classType.add(clazz);
                                // add applicable tags
                                addTags(clazz, tagFamilies, classes[i]);
                                XMethod[] methods = classes[i].methods();
                                for (int m = 0; m < methods.length; m++) {
  -                                     DefaultMutableTreeNode method = new 
DefaultMutableTreeNode(methods[m]);
  +                                     MethodTreeNode method = new 
MethodTreeNode(methods[m]);
                                        clazz.add(method);
                                        addTags(method, tagFamilies, methods[m]);
   
  
  
  
  1.4       +47 -89    
xdocletgui/src/java/xdocletgui/swing/XDocletGuiTreeCellRenderer.java
  
  Index: XDocletGuiTreeCellRenderer.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/XDocletGuiTreeCellRenderer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- XDocletGuiTreeCellRenderer.java   4 Apr 2002 17:13:39 -0000       1.3
  +++ XDocletGuiTreeCellRenderer.java   5 Apr 2002 16:50:32 -0000       1.4
  @@ -86,6 +86,21 @@
        ImageIcon xtagIcon;
   
        /**
  +      * icon image for comment
  +      */
  +     ImageIcon commentIcon;
  +
  +     /**
  +      * icon image for unknown tags
  +      */
  +     ImageIcon unknownTagsIcon;
  +
  +     /**
  +      * icon image for unknown tag
  +      */
  +     ImageIcon unknownTagIcon;
  +
  +     /**
         * Get static reference to Log4J Logger
         */
        private static org.apache.log4j.Category _log = 
org.apache.log4j.Category.getInstance(XDocletGuiTreeCellRenderer.class.getName());
  @@ -117,6 +132,15 @@
                myUrl = 
XDocletGuiTreeCellRenderer.class.getResource("images/XTagIcon.gif");
                xtagIcon = new ImageIcon(myUrl);
   
  +             myUrl = 
XDocletGuiTreeCellRenderer.class.getResource("images/CommentIcon.gif");
  +             //commentIcon = new ImageIcon(myUrl);
  +
  +             myUrl = 
XDocletGuiTreeCellRenderer.class.getResource("images/UnknownTagsIcon.gif");
  +             //unknownTagsIcon = new ImageIcon(myUrl);
  +
  +             myUrl = 
XDocletGuiTreeCellRenderer.class.getResource("images/UnknownTagIcon.gif");
  +             //unknownTagIcon = new ImageIcon(myUrl);
  +
        }
   
   
  @@ -154,29 +178,41 @@
                                expanded, leaf, row,
                                hasFocus);
                // set appropriate icon image
  -             if (isRootNode(value)) {
  +             if (((DefaultMutableTreeNode)value).isRoot()) {
                        setIcon(rootIcon);
                }
  -             else if (isClassFamilyNode(value)) {
  +             else if (value instanceof ClassFamilyTreeNode) {
                        setIcon(classFamilyIcon);
  -                     
setToolTipText(((ClassFamily)((DefaultMutableTreeNode)value).getUserObject()).getDescription());
  +                     setToolTipText(((ClassFamilyTreeNode)value).getDescription());
                }
  -             else if (isClassNode(value)) {
  +             else if (value instanceof ClassTreeNode) {
                        setIcon(classIcon);
  -                     
setToolTipText(((XProgramElement)((DefaultMutableTreeNode)value).getUserObject()).doc().firstSentence());
  +                     
setToolTipText(((ClassTreeNode)value).getXClass().doc().firstSentence());
                }
  -             else if (isMethodNode(value)) {
  +             else if (value instanceof MethodTreeNode) {
                        setIcon(methodIcon);
  -                     
setToolTipText(((XProgramElement)((DefaultMutableTreeNode)value).getUserObject()).doc().firstSentence());
  +                     
setToolTipText(((MethodTreeNode)value).getXMethod().doc().firstSentence());
                }
   
  -             else if (isTagFamilyNode(value)) {
  +             else if (value instanceof TagFamilyTreeNode) {
                        setIcon(xtagFamilyIcon);
  -                     
setToolTipText(((TagFamily)((DefaultMutableTreeNode)value).getUserObject()).getUsage());
  +                     
setToolTipText(((TagFamilyTreeNode)value).getTagFamily().getUsage());
                }
  -             else if (isTagNode(value)) {
  +             else if (value instanceof TagTreeNode) {
                        setIcon(xtagIcon);
  -                     
setToolTipText(((TagNodeData)((DefaultMutableTreeNode)value).getUserObject()).getTag().getUsage());
  +                     setToolTipText(((TagTreeNode)value).getTag().getUsage());
  +             }
  +             else if (value instanceof DocTreeNode) {
  +                     setIcon(commentIcon);
  +                     setToolTipText("Description");
  +             }
  +             else if (value instanceof UnknownTagsTreeNode) {
  +                     setIcon(unknownTagsIcon);
  +                     setToolTipText("Undocumented tags");
  +             }
  +             else if (value instanceof UnknownTagTreeNode) {
  +                     setIcon(unknownTagIcon);
  +                     setToolTipText("Undocumented tag");
                }
                else {
                        setToolTipText(null);
  @@ -184,84 +220,6 @@
                }
   
                return this;
  -     }
  -
  -
  -     /**
  -      * Gets the RootNode attribute of the XDocletGuiTreeCellRenderer object
  -      *
  -      * @param value Describe what the parameter does
  -      * @return The RootNode value
  -      * @todo-javadoc Write javadocs for method parameter
  -      */
  -     boolean isRootNode(Object value) {
  -             DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
  -
  -             return node == node.getRoot();
  -     }
  -
  -
  -     /**
  -      * whether given object is class family node
  -      *
  -      * @param value node to check
  -      * @return whether given object is class family node
  -      */
  -     boolean isClassFamilyNode(Object value) {
  -             DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
  -             return node.getUserObject() instanceof ClassFamily;
  -     }
  -
  -
  -     /**
  -      * Gets the ClassNode attribute of the XDocletGuiTreeCellRenderer object
  -      *
  -      * @param value Describe what the parameter does
  -      * @return The ClassNode value
  -      * @todo-javadoc Write javadocs for method parameter
  -      */
  -     boolean isClassNode(Object value) {
  -             DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
  -             return node.getUserObject() instanceof XClass;
  -     }
  -
  -
  -     /**
  -      * Gets the MethodNode attribute of the XDocletGuiTreeCellRenderer object
  -      *
  -      * @param value Describe what the parameter does
  -      * @return The MethodNode value
  -      * @todo-javadoc Write javadocs for method parameter
  -      */
  -     boolean isMethodNode(Object value) {
  -             DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
  -             return node.getUserObject() instanceof XMethod;
  -     }
  -
  -
  -     /**
  -      * Gets the TagFamilyNode attribute of the XDocletGuiTreeCellRenderer object
  -      *
  -      * @param value Describe what the parameter does
  -      * @return The TagFamilyNode value
  -      * @todo-javadoc Write javadocs for method parameter
  -      */
  -     boolean isTagFamilyNode(Object value) {
  -             DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
  -             return node.getUserObject() instanceof TagFamily;
  -     }
  -
  -
  -     /**
  -      * Gets the TagNode attribute of the XDocletGuiTreeCellRenderer object
  -      *
  -      * @param value Describe what the parameter does
  -      * @return The TagNode value
  -      * @todo-javadoc Write javadocs for method parameter
  -      */
  -     boolean isTagNode(Object value) {
  -             DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
  -             return node.getUserObject() instanceof TagNodeData;
        }
   
   }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/ClassFamilyTreeNode.java
  
  Index: ClassFamilyTreeNode.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  
  import javax.swing.tree.DefaultMutableTreeNode;
  
  /**
   * Tree node determining class family
   *
   * @author kostik
   * @created April 3, 2002
   * @todo-javadoc Write javadocs
   */
  public class ClassFamilyTreeNode extends DefaultMutableTreeNode {
  
        /**
         * short name of class family
         */
        String _name;
  
        /**
         * description of class family
         */
        String _description;
  
  
        /**
         * Create class family object
         *
         * @param name short class family name
         * @param description class family description
         */
        public ClassFamilyTreeNode(String name, String description) {
                super();
                _name = name;
                _description = description;
        }
  
  
        /**
         * description of class family
         *
         * @return description of class family
         */
        public String getDescription() {
                return _description;
        }
  
  
        /**
         * string representation of object
         *
         * @return string representation of object
         * @todo-javadoc Write javadocs for method
         * @todo-javadoc Write javadocs for return value
         */
        public String toString() {
                return _name;
        }
  }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/ClassTreeNode.java
  
  Index: ClassTreeNode.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  
  import javax.swing.tree.DefaultMutableTreeNode;
  
  import xjavadoc.XClass;
  
  /**
   * Tree node determining class
   *
   * @author kostik
   * @created April 3, 2002
   * @todo-javadoc Write javadocs
   */
  public class ClassTreeNode extends DefaultMutableTreeNode {
  
        /**
         * @todo-javadoc Describe the field
         */
        private XClass _xclass;
  
  
        /**
         * Describe what the ClassTreeNode constructor does
         *
         * @param xclass Describe what the parameter does
         * @todo-javadoc Write javadocs for constructor
         * @todo-javadoc Write javadocs for method parameter
         */
        public ClassTreeNode(XClass xclass) {
                super(xclass);
                _xclass = xclass;
        }
  
  
        /**
         * Gets the XClass attribute of the ClassTreeNode object
         *
         * @return The XClass value
         */
        public XClass getXClass() {
                return _xclass;
        }
  
  
        /**
         * Describe what the method does
         *
         * @return Describe the return value
         * @todo-javadoc Write javadocs for method
         * @todo-javadoc Write javadocs for return value
         */
        public String toString() {
                return _xclass.toString();
        }
  }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/DocTreeNode.java
  
  Index: DocTreeNode.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  import javax.swing.tree.DefaultMutableTreeNode;
  import xjavadoc.XDoc;
  
  /**
   * Describe what this class does
   *
   * @author kostik
   * @created April 5, 2002
   * @todo-javadoc Write javadocs
   */
  public class DocTreeNode extends DefaultMutableTreeNode {
  
        /**
         * @todo-javadoc Describe the field
         */
        private XDoc _xdoc;
  
  
        /**
         * Describe what the DocNodeData constructor does
         *
         * @param xdoc Describe what the parameter does
         * @todo-javadoc Write javadocs for constructor
         * @todo-javadoc Write javadocs for method parameter
         */
        public DocTreeNode(XDoc xdoc) {
                super();
                _xdoc = xdoc;
        }
  
  
        /**
         * Gets the XDoc attribute of the DocNodeData object
         *
         * @return The XDoc value
         */
        public XDoc getXDoc() {
                return _xdoc;
        }
  
  
        /**
         * Describe what the method does
         *
         * @return Describe the return value
         * @todo-javadoc Write javadocs for method
         * @todo-javadoc Write javadocs for return value
         */
        public String toString() {
                return "comment";
        }
  }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/MethodTreeNode.java
  
  Index: MethodTreeNode.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  
  import javax.swing.tree.DefaultMutableTreeNode;
  
  import xjavadoc.XMethod;
  
  /**
   * Tree node determining class method
   *
   * @author kostik
   * @created April 3, 2002
   * @todo-javadoc Write javadocs
   */
  public class MethodTreeNode extends DefaultMutableTreeNode {
  
        /**
         * @todo-javadoc Describe the field
         */
        private XMethod _xmethod;
  
  
        /**
         * Describe what the MethodTreeNode constructor does
         *
         * @param xmethod Describe what the parameter does
         * @todo-javadoc Write javadocs for constructor
         * @todo-javadoc Write javadocs for method parameter
         */
        public MethodTreeNode(XMethod xmethod) {
                super(xmethod);
                _xmethod = xmethod;
        }
  
  
        /**
         * Gets the XMethod attribute of the MethodTreeNode object
         *
         * @return The XMethod value
         */
        public XMethod getXMethod() {
                return _xmethod;
        }
  
  
        /**
         * Describe what the method does
         *
         * @return Describe the return value
         * @todo-javadoc Write javadocs for method
         * @todo-javadoc Write javadocs for return value
         */
        public String toString() {
                return _xmethod.toString();
        }
  }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/TagFamilyTreeNode.java
  
  Index: TagFamilyTreeNode.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  
  import javax.swing.tree.DefaultMutableTreeNode;
  
  import xtags.TagFamily;
  
  /**
   * Describe what this class does
   *
   * @author kostik
   * @created April 5, 2002
   * @todo-javadoc Write javadocs
   */
  public class TagFamilyTreeNode extends DefaultMutableTreeNode {
        /**
         * @todo-javadoc Describe the field
         */
        TagFamily _tagFamily;
  
  
        /**
         * Describe what the TagFamilyTreeNode constructor does
         *
         * @param tagFamily Describe what the parameter does
         * @todo-javadoc Write javadocs for constructor
         * @todo-javadoc Write javadocs for method parameter
         */
        public TagFamilyTreeNode(TagFamily tagFamily) {
                super();
                _tagFamily = tagFamily;
        }
  
  
        /**
         * Gets the TagFamily attribute of the TagFamilyTreeNode object
         *
         * @return The TagFamily value
         */
        public TagFamily getTagFamily() {
                return _tagFamily;
        }
  
  
        /**
         * Describe what the method does
         *
         * @return Describe the return value
         * @todo-javadoc Write javadocs for method
         * @todo-javadoc Write javadocs for return value
         */
        public String toString() {
                return _tagFamily.getName();
        }
  
  }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/TagTreeNode.java
  
  Index: TagTreeNode.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  
  import javax.swing.tree.DefaultMutableTreeNode;
  
  import xjavadoc.XTag;
  import xtags.Tag;
  
  /**
   * Describe what this class does
   *
   * @author kostik
   * @created April 5, 2002
   * @todo-javadoc Write javadocs
   */
  public class TagTreeNode extends UnknownTagTreeNode {
  
        /**
         * @todo-javadoc Describe the field
         */
        Tag _tag;
  
  
        /**
         * Describe what the TagNodeData constructor does
         *
         * @param tag Describe what the parameter does
         * @param xtag Describe what the parameter does
         * @todo-javadoc Write javadocs for constructor
         * @todo-javadoc Write javadocs for method parameter
         * @todo-javadoc Write javadocs for method parameter
         */
        public TagTreeNode(Tag tag, XTag xtag) {
                super(xtag);
                _tag = tag;
        }
  
  
        /**
         * Gets the Tag attribute of the TagNodeData object
         *
         * @return The Tag value
         */
        public Tag getTag() {
                return _tag;
        }
  
  
  
        /**
         * Describe what the method does
         *
         * @return Describe the return value
         * @todo-javadoc Write javadocs for return value
         * @todo-javadoc Write javadocs for method
         */
        public String toString() {
                return getTag().toString();
        }
  }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/UnknownTagNodeData.java
  
  Index: UnknownTagNodeData.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  
  import xjavadoc.XTag;
  import xtags.Tag;
  /**
   * Describe what this class does
   *
   * @author kostik
   * @created April 4, 2002
   * @todo-javadoc Write javadocs
   */
  public class UnknownTagNodeData {
  
        /**
         * @todo-javadoc Describe the field
         */
        XTag _xtag;
  
  
        /**
         * Describe what the TagNodeData constructor does
         *
         * @param xtag Describe what the parameter does
         * @todo-javadoc Write javadocs for constructor
         * @todo-javadoc Write javadocs for method parameter
         * @todo-javadoc Write javadocs for method parameter
         */
        public UnknownTagNodeData(XTag xtag) {
                _xtag = xtag;
        }
  
  
  
        /**
         * Gets the XTag attribute of the TagNodeData object
         *
         * @return The XTag value
         */
        public XTag getXTag() {
                return _xtag;
        }
  
  
        /**
         * Describe what the method does
         *
         * @return Describe the return value
         * @todo-javadoc Write javadocs for return value
         * @todo-javadoc Write javadocs for method
         */
        public String toString() {
                return getXTag().name();
        }
  }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/UnknownTagTreeNode.java
  
  Index: UnknownTagTreeNode.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  
  import javax.swing.tree.DefaultMutableTreeNode;
  
  import xjavadoc.XTag;
  
  /**
   * Describe what this class does
   *
   * @author kostik
   * @created April 5, 2002
   * @todo-javadoc Write javadocs
   */
  public class UnknownTagTreeNode extends DefaultMutableTreeNode {
  
        /**
         * @todo-javadoc Describe the field
         */
        XTag _xtag;
  
  
        /**
         * Describe what the TagNodeData constructor does
         *
         * @param xtag Describe what the parameter does
         * @todo-javadoc Write javadocs for constructor
         * @todo-javadoc Write javadocs for method parameter
         * @todo-javadoc Write javadocs for method parameter
         */
        public UnknownTagTreeNode(XTag xtag) {
                super();
                _xtag = xtag;
        }
  
  
  
        /**
         * Gets the XTag attribute of the TagNodeData object
         *
         * @return The XTag value
         */
        public XTag getXTag() {
                return _xtag;
        }
  
  
        /**
         * Describe what the method does
         *
         * @return Describe the return value
         * @todo-javadoc Write javadocs for return value
         * @todo-javadoc Write javadocs for method
         */
        public String toString() {
                return getXTag().name();
        }
  }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/UnknownTagsTreeNode.java
  
  Index: UnknownTagsTreeNode.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  
  import javax.swing.tree.DefaultMutableTreeNode;
  
  /**
   * Describe what this class does
   *
   * @author kostik
   * @created April 5, 2002
   * @todo-javadoc Write javadocs
   */
  public class UnknownTagsTreeNode extends DefaultMutableTreeNode {
  
        /**
         * Describe what the UnknownTagsTreeNode constructor does
         *
         * @todo-javadoc Write javadocs for constructor
         */
        public UnknownTagsTreeNode() {
                super("unknown");
        }
  }
  
  
  

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to