|
From: <be...@us...> - 2006-10-23 21:19:45
|
Revision: 54
http://svn.sourceforge.net/jtreemap/?rev=54&view=rev
Author: benoitx
Date: 2006-10-23 14:19:24 -0700 (Mon, 23 Oct 2006)
Log Message:
-----------
Moved remotely
Added Paths:
-----------
trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/TreeMapNodeBuilder.java
Removed Paths:
-------------
trunk/JTreeMap/src/main/java/org/jense/swing/jtreemap/TreeMapNodeBuilder.java
Copied: trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/TreeMapNodeBuilder.java (from rev 53, trunk/JTreeMap/src/main/java/org/jense/swing/jtreemap/TreeMapNodeBuilder.java)
===================================================================
--- trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/TreeMapNodeBuilder.java (rev 0)
+++ trunk/JTreeMap/src/main/java/net/sf/jtreemap/swing/TreeMapNodeBuilder.java 2006-10-23 21:19:24 UTC (rev 54)
@@ -0,0 +1,63 @@
+package org.jense.swing.jtreemap;
+
+/**
+ * Tree builder for a JTreeMap.
+ *
+ * @author Laurent Dutheil
+ */
+
+public class TreeMapNodeBuilder {
+ private TreeMapNode root;
+
+ /**
+ * Add a branch to the tree. <BR>
+ * If the parent is null, the build node become the root if and only if the
+ * tree have no root yet. If the parent is null and if the root is already
+ * build, the node will NOT be added to the tree.
+ *
+ * @param label label of the node
+ * @param parent father of the node
+ * @return the created node
+ */
+ public TreeMapNode buildBranch(String label, TreeMapNode parent) {
+ TreeMapNode node = new TreeMapNode(label);
+ if (parent != null) {
+ parent.add(node);
+ } else if (this.root == null) {
+ this.root = node;
+ }
+ return node;
+ }
+
+ /**
+ * add a leaf to the tree. <BR>
+ * If the parent is null, the build node become the root if and only if the
+ * tree have no root yet. If the parent is null and if the root is already
+ * build, the node will NOT be added to the tree.
+ *
+ * @param label label of the leaf
+ * @param weight weight of the leaf
+ * @param value Value of the leaf
+ * @param parent father of the leaf
+ * @return the created node
+ */
+ public TreeMapNode buildLeaf(String label, double weight, Value value,
+ TreeMapNode parent) {
+ TreeMapNode node = new TreeMapNode(label, weight, value);
+ if (parent != null) {
+ parent.add(node);
+ } else if (this.root == null) {
+ this.root = node;
+ }
+ return node;
+ }
+
+ /**
+ * get the build tree.
+ *
+ * @return the root of the tree
+ */
+ public TreeMapNode getRoot() {
+ return this.root;
+ }
+}
Deleted: trunk/JTreeMap/src/main/java/org/jense/swing/jtreemap/TreeMapNodeBuilder.java
===================================================================
--- trunk/JTreeMap/src/main/java/org/jense/swing/jtreemap/TreeMapNodeBuilder.java 2006-10-23 21:18:29 UTC (rev 53)
+++ trunk/JTreeMap/src/main/java/org/jense/swing/jtreemap/TreeMapNodeBuilder.java 2006-10-23 21:19:24 UTC (rev 54)
@@ -1,63 +0,0 @@
-package org.jense.swing.jtreemap;
-
-/**
- * Tree builder for a JTreeMap.
- *
- * @author Laurent Dutheil
- */
-
-public class TreeMapNodeBuilder {
- private TreeMapNode root;
-
- /**
- * Add a branch to the tree. <BR>
- * If the parent is null, the build node become the root if and only if the
- * tree have no root yet. If the parent is null and if the root is already
- * build, the node will NOT be added to the tree.
- *
- * @param label label of the node
- * @param parent father of the node
- * @return the created node
- */
- public TreeMapNode buildBranch(String label, TreeMapNode parent) {
- TreeMapNode node = new TreeMapNode(label);
- if (parent != null) {
- parent.add(node);
- } else if (this.root == null) {
- this.root = node;
- }
- return node;
- }
-
- /**
- * add a leaf to the tree. <BR>
- * If the parent is null, the build node become the root if and only if the
- * tree have no root yet. If the parent is null and if the root is already
- * build, the node will NOT be added to the tree.
- *
- * @param label label of the leaf
- * @param weight weight of the leaf
- * @param value Value of the leaf
- * @param parent father of the leaf
- * @return the created node
- */
- public TreeMapNode buildLeaf(String label, double weight, Value value,
- TreeMapNode parent) {
- TreeMapNode node = new TreeMapNode(label, weight, value);
- if (parent != null) {
- parent.add(node);
- } else if (this.root == null) {
- this.root = node;
- }
- return node;
- }
-
- /**
- * get the build tree.
- *
- * @return the root of the tree
- */
- public TreeMapNode getRoot() {
- return this.root;
- }
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|