in progress
[jalview.git] / forester / java / src / org / forester / phylogeny / data / PhylogenyDataUtil.java
index f430477..76d60b7 100644 (file)
@@ -21,7 +21,7 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 //
 // Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
 
 package org.forester.phylogeny.data;
 
@@ -35,6 +35,9 @@ import org.forester.util.ForesterUtil;
 
 public final class PhylogenyDataUtil {
 
+    /** Value of -99.0 is used as default value. */
+    public final static double BRANCH_LENGTH_DEFAULT = -1024.0;
+
     public static void appendClose( final Writer w, final String element_name ) throws IOException {
         w.write( "</" );
         w.write( element_name );
@@ -101,6 +104,18 @@ public final class PhylogenyDataUtil {
 
     public static void appendElement( final Writer w,
                                       final String element_name,
+                                      final String value,
+                                      final String attribute1_name,
+                                      final String attribute1_value,
+                                      final String attribute2_name,
+                                      final String attribute2_value ) throws IOException {
+        appendOpen( w, element_name, attribute1_name, attribute1_value, attribute2_name, attribute2_value );
+        w.write( replaceIllegalXmlCharacters( value ) );
+        appendClose( w, element_name );
+    }
+
+    public static void appendElement( final Writer w,
+                                      final String element_name,
                                       final String attribute1_name,
                                       final String attribute1_value,
                                       final String attribute2_name,
@@ -356,12 +371,6 @@ public final class PhylogenyDataUtil {
                     org.forester.util.ForesterUtil.roundToInt( y2 ) );
     }
 
-    public static void drawString( final String str, final double x, final double y, final Graphics g ) {
-        g.drawString( str,
-                      org.forester.util.ForesterUtil.roundToInt( x ),
-                      org.forester.util.ForesterUtil.roundToInt( y ) );
-    }
-
     public static String replaceIllegalXmlCharacters( final String value ) {
         String v = value.replaceAll( "&", "&amp;" );
         v = v.replaceAll( "<", "&lt;" );