?
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Mon, 12 Sep 2011 23:19:26 +0000 (23:19 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Mon, 12 Sep 2011 23:19:26 +0000 (23:19 +0000)
forester/java/src/org/forester/archaeopteryx/Configuration.java
forester/java/src/org/forester/archaeopteryx/MainPanel.java
forester/java/src/org/forester/archaeopteryx/Options.java
forester/java/src/org/forester/phylogeny/PhylogenyMethods.java

index ffc9104..11183b0 100644 (file)
@@ -218,7 +218,7 @@ public final class Configuration {
         }
     }
 
-    Configuration( final String cf, final boolean is_url, final boolean is_applet ) {
+    public Configuration( final String cf, final boolean is_url, final boolean is_applet ) {
         if ( ForesterUtil.isEmpty( cf ) ) {
             config_filename = default_config_filename;
         }
index 6044baf..238fc6a 100644 (file)
@@ -70,7 +70,7 @@ public class MainPanel extends JPanel implements ComponentListener {
     MainPanel() {
     }
 
-    MainPanel( final Configuration configuration, final MainFrame parent ) {
+    public MainPanel( final Configuration configuration, final MainFrame parent ) {
         if ( configuration == null ) {
             throw new IllegalArgumentException( "configuration is null" );
         }
@@ -299,7 +299,7 @@ public class MainPanel extends JPanel implements ComponentListener {
         return getCurrentScrollPane().getViewport().getExtentSize();
     }
 
-    JTabbedPane getTabbedPane() {
+    public JTabbedPane getTabbedPane() {
         return _tabbed_pane;
     }
 
index 4b75521..083a6b1 100644 (file)
@@ -436,7 +436,7 @@ final public class Options {
         _show_default_node_shapes = show_default_node_shapes;
     }
 
-    final static Options createInstance( final Configuration configuration ) {
+    public final static Options createInstance( final Configuration configuration ) {
         final Options instance = createDefaultInstance();
         if ( configuration != null ) {
             instance.setAntialiasScreen( configuration.isAntialiasScreen() );
index 2d238a2..2b7fd29 100644 (file)
@@ -1013,16 +1013,16 @@ public class PhylogenyMethods {
                 }
             }
             if ( !match && ( node.getNodeData().getBinaryCharacters() != null ) ) {
-                final String[] bcp_ary = node.getNodeData().getBinaryCharacters().getPresentCharactersAsStringArray();
-                I: for( final String bc : bcp_ary ) {
-                    if ( match( bc, query, case_sensitive, partial ) ) {
+                Iterator<String> it = node.getNodeData().getBinaryCharacters().getPresentCharacters().iterator();
+                I: while ( it.hasNext() ) {
+                    if ( match( it.next(), query, case_sensitive, partial ) ) {
                         match = true;
                         break I;
                     }
                 }
-                final String[] bcg_ary = node.getNodeData().getBinaryCharacters().getGainedCharactersAsStringArray();
-                I: for( final String bc : bcg_ary ) {
-                    if ( match( bc, query, case_sensitive, partial ) ) {
+                it = node.getNodeData().getBinaryCharacters().getGainedCharacters().iterator();
+                I: while ( it.hasNext() ) {
+                    if ( match( it.next(), query, case_sensitive, partial ) ) {
                         match = true;
                         break I;
                     }
@@ -1112,22 +1112,36 @@ public class PhylogenyMethods {
                     }
                 }
                 if ( !match && ( node.getNodeData().getBinaryCharacters() != null ) ) {
-                    final String[] bcp_ary = node.getNodeData().getBinaryCharacters()
-                            .getPresentCharactersAsStringArray();
-                    I: for( final String bc : bcp_ary ) {
-                        if ( match( bc, query, case_sensitive, partial ) ) {
+                    Iterator<String> it = node.getNodeData().getBinaryCharacters().getPresentCharacters().iterator();
+                    I: while ( it.hasNext() ) {
+                        if ( match( it.next(), query, case_sensitive, partial ) ) {
                             match = true;
                             break I;
                         }
                     }
-                    final String[] bcg_ary = node.getNodeData().getBinaryCharacters()
-                            .getGainedCharactersAsStringArray();
-                    I: for( final String bc : bcg_ary ) {
-                        if ( match( bc, query, case_sensitive, partial ) ) {
+                    it = node.getNodeData().getBinaryCharacters().getGainedCharacters().iterator();
+                    I: while ( it.hasNext() ) {
+                        if ( match( it.next(), query, case_sensitive, partial ) ) {
                             match = true;
                             break I;
                         }
                     }
+                    //                    final String[] bcp_ary = node.getNodeData().getBinaryCharacters()
+                    //                            .getPresentCharactersAsStringArray();
+                    //                    I: for( final String bc : bcp_ary ) {
+                    //                        if ( match( bc, query, case_sensitive, partial ) ) {
+                    //                            match = true;
+                    //                            break I;
+                    //                        }
+                    //                    }
+                    //                    final String[] bcg_ary = node.getNodeData().getBinaryCharacters()
+                    //                            .getGainedCharactersAsStringArray();
+                    //                    I: for( final String bc : bcg_ary ) {
+                    //                        if ( match( bc, query, case_sensitive, partial ) ) {
+                    //                            match = true;
+                    //                            break I;
+                    //                        }
+                    //                    }
                 }
                 if ( !match ) {
                     all_matched = false;