More
Nodes Example Now
we extend the first example by adding all the remaining nodes to our tree. Each
node sub level is built using a parent - child relationship, this gives the ability
for unlimited sub-levels. Notice how all top level nodes have thier parent node
as "root". In addition to adding the remaining nodes we also add icon
images to the nodes. The images are supplied to the applet via the imageN parameter
and then each node simply references the image names. We havn't yet added any
url functionality to the nodes, this will be demonstrated by the next example.
And
here is the html code (new code marked in blue),
<applet code="TreeApplet" width="250" height="300"
archive="Treemenu.jar">
<!--
Tree Properties --> <param name="nodeOffset" value="25">
<!-- Images --> <param name="image1"
value="closed|./IconImages/closedfolder.gif"> <param name="image2"
value="open|./IconImages/openfolder.gif"> <param name="image3"
value="document|./IconImages/document.gif"> <param name="image4"
value="point|./IconImages/point.gif"> <!--
Nodes --> <param name="node1" value="products|root|Products
and Services|Helvetica|N|10|0|0|0|true|closed|open"> <param name="node2"
value="company|root|Company Information|Helvetica|N|10|0|0|0|true|closed|open">
<param name="node3"
value="Applets|products|Applets|Helvetica|N|10|0|0|0|true|closed|open">
<param name="node4" value="Collections|products|Collections|Helvetica|N|10|0|0|0|true|closed|open">
<param name="node5" value="Custom|products|Custom|Helvetica|N|10|0|0|0|false|document">
<param name="node6" value="Free Applet|products|Free Applet|Helvetica|N|10|0|0|0|false|document">
<param name="node7" value="Freeware|products|Freeware|Helvetica|N|10|0|0|0|false|document">
<param name="node8" value="Help|products|Help|Helvetica|N|10|0|0|0|false|document">
<param name="node9"
value="BarChart|Applets|Bar Chart|Helvetica|N|10|0|0|0|false|document">
<param name="node10" value="ColumnChart|Applets|Column Chart|Helvetica|N|10|0|0|0|false|document">
<param name="node11" value="StackedColumn Chart|Applets|Stacked
Column Chart|Helvetica|N|10|0|0|0|false|document"> <param name="node12"
value="LineChart|Applets|Line Chart|Helvetica|N|10|0|0|0|false|document">
<param name="node13" value="PieChart|Applets|Pie Chart|Helvetica|N|10|0|0|0|false|document">
<param name="node14" value="AdvancedTreeExplorer|Applets|Advanced
Tree Explorer|Helvetica|N|10|0|0|0|false|document"> <param name="node15"
value="HorizontalMenu|Applets|Horizontal Menu|Helvetica|N|10|0|0|0|false|document">
<param name="node16" value="VerticalMenu|Applets|Vertical Menu|Helvetica|N|10|0|0|0|false|document">
<param name="node17" value="FadingImages|Applets|Fading Images|Helvetica|N|10|0|0|0|false|document">
<param name="node18"
value="Navigation|Collections|Navigation|Helvetica|N|10|0|0|0|false|document">
<param name="node19" value="Graphing|Collections|Graphing|Helvetica|N|10|0|0|0|false|document">
<param name="node20" value="SpecialEffects|Collections|Special
Effects|Helvetica|N|10|0|0|0|false|document"> <param
name="node21" value="About|company|About|Helvetica|N|10|0|0|0|true|closed|open">
<param name="node22" value="Contacts|company|Contacts|Helvetica|N|10|0|0|0|false|document">
<param name="node23"
value="General|About|General Information|Helvetica|N|10|0|0|0|false|document">
<param name="node24" value="Ordering|About|Ordering|Helvetica|N|10|0|0|0|false|document">
<param name="node25" value="Secure|About|Secure Shopping|Helvetica|N|10|0|0|0|false|document"> </applet>
Please Note:
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems,
Inc. in the U.S. and other countries.
[Copyright © 1997 - 2001 Sirius Computer
Consultants Limited - All rights reserved. ] |