bwalding    2003/07/17 03:44:05

  Modified:    src/plugins-build/xdoc/src/test/org/apache/maven
                        NavBeanTest.java
               src/plugins-build/xdoc/src/plugin-resources/css maven.css
               src/plugins-build/xdoc/src/main/org/apache/maven
                        NavBean.java
  Added:       src/plugins-build/xdoc/src/plugin-resources/images
                        expanded.png collapsed.png
  Log:
  o Unallow the nav bean to count children.  Turns out it was simpler to do it in 
jelly.
  o Add new style for img.handle (no border, little bit of right padding)
  o Update the templates to draw handles
  
  I'm still not 100% on drawing an expanded handle on an uncollapsible node.
  I think we could do to remove the little - in front of every item too.
  PR: MAVEN-579
  
  Revision  Changes    Path
  1.4       +1 -22     
maven/src/plugins-build/xdoc/src/test/org/apache/maven/NavBeanTest.java
  
  Index: NavBeanTest.java
  ===================================================================
  RCS file: 
/home/cvs/maven/src/plugins-build/xdoc/src/test/org/apache/maven/NavBeanTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NavBeanTest.java  17 Jul 2003 09:33:12 -0000      1.3
  +++ NavBeanTest.java  17 Jul 2003 10:44:03 -0000      1.4
  @@ -64,7 +64,6 @@
   import org.dom4j.Document;
   import org.dom4j.Node;
   import org.dom4j.io.SAXReader;
  -import org.dom4j.tree.DefaultElement;
   
   /**
    * @author <a href="[EMAIL PROTECTED]">Ben Walding</a>
  @@ -132,25 +131,5 @@
           
           String s = "At location " + location + ", looking to generate link to " + 
href + ", expecting collapse = " + expected;
           assertEquals(s, expected, nb.isCollapsed(node));
  -    }
  -    
  -    public void testCountChildren() throws Exception
  -    {
  -        testCountChildren("/alpha/index.html", 2);
  -        testCountChildren("/alpha/one/index.html", 0);
  -        testCountChildren("/alpha/two/index.html", 0);
  -        
  -        testCountChildren("/beta/index.html", 2);
  -        testCountChildren("/beta/one/index.html", 0);
  -        testCountChildren("/beta/two/index.html", 0);
  -    }
  -
  -    public void testCountChildren(String href, int expected)
  -    {
  -        Node node = nb.getFirstNodeByHREF(href);
  -        assertNotNull(node);
  -    
  -        String s = "At location " + href + ",  expecting countChildren = " + 
expected;
  -        assertEquals(s, expected, nb.countChildren((DefaultElement) node));
       }
   }
  
  
  
  1.1                  
maven/src/plugins-build/xdoc/src/plugin-resources/images/expanded.png
  
        <<Binary file>>
  
  
  1.1                  
maven/src/plugins-build/xdoc/src/plugin-resources/images/collapsed.png
  
        <<Binary file>>
  
  
  1.3       +5 -0      maven/src/plugins-build/xdoc/src/plugin-resources/css/maven.css
  
  Index: maven.css
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/xdoc/src/plugin-resources/css/maven.css,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- maven.css 4 Jul 2003 08:39:04 -0000       1.2
  +++ maven.css 17 Jul 2003 10:44:05 -0000      1.3
  @@ -98,3 +98,8 @@
    margin-top: 1em;
    margin-bottom: 0;
    }
  +
  +img.handle {
  + border: 0;
  + padding-right: 2px;
  +}
  \ No newline at end of file
  
  
  
  1.6       +1 -11     
maven/src/plugins-build/xdoc/src/main/org/apache/maven/NavBean.java
  
  Index: NavBean.java
  ===================================================================
  RCS file: 
/home/cvs/maven/src/plugins-build/xdoc/src/main/org/apache/maven/NavBean.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NavBean.java      17 Jul 2003 09:33:12 -0000      1.5
  +++ NavBean.java      17 Jul 2003 10:44:05 -0000      1.6
  @@ -97,16 +97,6 @@
       }
       
       /**
  -     * Assumes that the node is visible.
  -     * @param o
  -     * @return the number of children for this node
  -     */
  -    public int countChildren(DefaultElement elem)  {
  -        List l = elem.selectNodes("./item");
  -        return l.size();
  -    }
  -
  -    /**
        * Determines if the given node is collapsed.  If a parent of this node is
        * collapsed, this will give spurious results.
        * @param o
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to