diff --git a/xdoc/src/main/org/apache/maven/NavBean.java b/xdoc/src/main/org/apache/maven/NavBean.java index 48deb708..bd90ca4b 100644 --- a/xdoc/src/main/org/apache/maven/NavBean.java +++ b/xdoc/src/main/org/apache/maven/NavBean.java @@ -64,7 +64,7 @@ import org.dom4j.tree.DefaultElement; /** * @author Ben Walding - * @version $Id: NavBean.java,v 1.5 2003/07/17 09:33:12 bwalding Exp $ + * @version $Id: NavBean.java,v 1.6 2003/07/17 10:44:05 bwalding Exp $ */ public class NavBean { @@ -96,16 +96,6 @@ public class NavBean return getAttribute(elem, "href", null); } - /** - * 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. diff --git a/xdoc/src/plugin-resources/css/maven.css b/xdoc/src/plugin-resources/css/maven.css index 3178d83c..f3d53920 100644 --- a/xdoc/src/plugin-resources/css/maven.css +++ b/xdoc/src/plugin-resources/css/maven.css @@ -98,3 +98,8 @@ h3, h4 { margin-top: 1em; margin-bottom: 0; } + +img.handle { + border: 0; + padding-right: 2px; +} \ No newline at end of file diff --git a/xdoc/src/plugin-resources/images/collapsed.png b/xdoc/src/plugin-resources/images/collapsed.png new file mode 100644 index 00000000..96be0fa5 Binary files /dev/null and b/xdoc/src/plugin-resources/images/collapsed.png differ diff --git a/xdoc/src/plugin-resources/images/expanded.png b/xdoc/src/plugin-resources/images/expanded.png new file mode 100644 index 00000000..1dedf8a8 Binary files /dev/null and b/xdoc/src/plugin-resources/images/expanded.png differ diff --git a/xdoc/src/test/org/apache/maven/NavBeanTest.java b/xdoc/src/test/org/apache/maven/NavBeanTest.java index 4ba72b4d..71bc9842 100644 --- a/xdoc/src/test/org/apache/maven/NavBeanTest.java +++ b/xdoc/src/test/org/apache/maven/NavBeanTest.java @@ -64,11 +64,10 @@ import junit.framework.TestCase; import org.dom4j.Document; import org.dom4j.Node; import org.dom4j.io.SAXReader; -import org.dom4j.tree.DefaultElement; /** * @author Ben Walding - * @version $Id: NavBeanTest.java,v 1.3 2003/07/17 09:33:12 bwalding Exp $ + * @version $Id: NavBeanTest.java,v 1.4 2003/07/17 10:44:03 bwalding Exp $ */ public class NavBeanTest extends TestCase { @@ -133,24 +132,4 @@ public class NavBeanTest extends TestCase 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)); - } }