in progress
[jalview.git] / forester / java / src / org / forester / archaeopteryx / ControlPanel.java
index 9729cb8..4945ec2 100644 (file)
@@ -109,6 +109,7 @@ final class ControlPanel extends JPanel implements ActionListener {
     private JComboBox            _show_sequence_relations;
     private JComboBox            _sequence_relation_type_box;
     private JCheckBox            _show_vector_data_cb;
+    private JCheckBox            _show_properties_cb;
     private JLabel               _click_to_label;
     private JLabel               _zoom_label;
     private JLabel               _domain_display_label;
@@ -274,10 +275,10 @@ final class ControlPanel extends JPanel implements ActionListener {
             tp.requestFocus();
         }
         catch ( final Exception ex ) {
-            Util.unexpectedException( ex );
+            AptxUtil.unexpectedException( ex );
         }
         catch ( final Error err ) {
-            Util.unexpectedError( err );
+            AptxUtil.unexpectedError( err );
         }
     }
 
@@ -329,7 +330,7 @@ final class ControlPanel extends JPanel implements ActionListener {
         _zoom_in_y.setToolTipText( "To zoom in vertically [Shift+Up]" );
         _zoom_out_x.setToolTipText( "To zoom out horizontally [Shift+Left]" );
         _zoom_out_y.setToolTipText( "To zoom out vertically [Shift+Down]" );
-        if ( getConfiguration().isUseNativeUI() && Util.isMac() ) {
+        if ( getConfiguration().isUseNativeUI() && AptxUtil.isMac() ) {
             _zoom_out_x.setPreferredSize( new Dimension( 55, 10 ) );
             _zoom_in_x.setPreferredSize( new Dimension( 55, 10 ) );
         }
@@ -396,11 +397,6 @@ final class ControlPanel extends JPanel implements ActionListener {
                 addJCheckBox( _show_node_names, ch_panel );
                 add( ch_panel );
                 break;
-            case Configuration.show_tax_code:
-                _show_taxo_code = new JCheckBox( title );
-                addJCheckBox( _show_taxo_code, ch_panel );
-                add( ch_panel );
-                break;
             case Configuration.show_taxonomy_scientific_names:
                 _show_taxo_scientific_names = new JCheckBox( title );
                 addJCheckBox( _show_taxo_scientific_names, ch_panel );
@@ -411,6 +407,11 @@ final class ControlPanel extends JPanel implements ActionListener {
                 addJCheckBox( _show_taxo_common_names, ch_panel );
                 add( ch_panel );
                 break;
+            case Configuration.show_tax_code:
+                _show_taxo_code = new JCheckBox( title );
+                addJCheckBox( _show_taxo_code, ch_panel );
+                add( ch_panel );
+                break;
             case Configuration.show_taxonomy_images:
                 _show_taxo_images_cb = new JCheckBox( title );
                 addJCheckBox( _show_taxo_images_cb, ch_panel );
@@ -495,6 +496,11 @@ final class ControlPanel extends JPanel implements ActionListener {
                 addJCheckBox( _show_vector_data_cb, ch_panel );
                 add( ch_panel );
                 break;
+            case Configuration.show_properties:
+                _show_properties_cb = new JCheckBox( title );
+                addJCheckBox( _show_properties_cb, ch_panel );
+                add( ch_panel );
+                break;
             default:
                 throw new RuntimeException( "unknown checkbox: " + which );
         }
@@ -645,6 +651,10 @@ final class ControlPanel extends JPanel implements ActionListener {
         return _color_branches_cb;
     }
 
+    public JCheckBox getColorAccSpeciesCb() {
+        return _color_acc_species;
+    }
+
     Configuration getConfiguration() {
         return _configuration;
     }
@@ -816,6 +826,10 @@ final class ControlPanel extends JPanel implements ActionListener {
         return ( ( _show_vector_data_cb != null ) && _show_vector_data_cb.isSelected() );
     }
 
+    public boolean isShowProperties() {
+        return ( ( _show_properties_cb != null ) && _show_properties_cb.isSelected() );
+    }
+
     boolean isShowGeneSymbols() {
         return ( ( _show_gene_symbols != null ) && _show_gene_symbols.isSelected() );
     }
@@ -828,10 +842,6 @@ final class ControlPanel extends JPanel implements ActionListener {
         return ( ( _show_node_names != null ) && _show_node_names.isSelected() );
     }
 
-    boolean isShowProperty() {
-        return ( ( _show_annotation != null ) && _show_annotation.isSelected() );
-    }
-
     boolean isShowSequenceAcc() {
         return ( ( _show_sequence_acc != null ) && _show_sequence_acc.isSelected() );
     }
@@ -990,11 +1000,6 @@ final class ControlPanel extends JPanel implements ActionListener {
                     _show_node_names.setSelected( state );
                 }
                 break;
-            case Configuration.show_tax_code:
-                if ( _show_taxo_code != null ) {
-                    _show_taxo_code.setSelected( state );
-                }
-                break;
             case Configuration.show_taxonomy_scientific_names:
                 if ( _show_taxo_scientific_names != null ) {
                     _show_taxo_scientific_names.setSelected( state );
@@ -1005,6 +1010,11 @@ final class ControlPanel extends JPanel implements ActionListener {
                     _show_taxo_common_names.setSelected( state );
                 }
                 break;
+            case Configuration.show_tax_code:
+                if ( _show_taxo_code != null ) {
+                    _show_taxo_code.setSelected( state );
+                }
+                break;
             case Configuration.show_taxonomy_images:
                 if ( _show_taxo_images_cb != null ) {
                     _show_taxo_images_cb.setSelected( state );
@@ -1065,6 +1075,11 @@ final class ControlPanel extends JPanel implements ActionListener {
                     _show_vector_data_cb.setSelected( state );
                 }
                 break;
+            case Configuration.show_properties:
+                if ( _show_properties_cb != null ) {
+                    _show_properties_cb.setSelected( state );
+                }
+                break;
             case Configuration.show_sequence_acc:
                 if ( _show_sequence_acc != null ) {
                     _show_sequence_acc.setSelected( state );
@@ -1579,6 +1594,10 @@ final class ControlPanel extends JPanel implements ActionListener {
                          _configuration.getDisplayTitle( Configuration.show_vector_data ) );
             setCheckbox( Configuration.show_vector_data, _configuration.doCheckOption( Configuration.show_vector_data ) );
         }
+        if ( _configuration.doDisplayOption( Configuration.show_properties ) ) {
+            addCheckbox( Configuration.show_properties, _configuration.getDisplayTitle( Configuration.show_properties ) );
+            setCheckbox( Configuration.show_properties, _configuration.doCheckOption( Configuration.show_properties ) );
+        }
     }
 
     void setupSearchTools() {