X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FTreeColorSet.java;h=9ab1846141086a86b30299bafc5aec42a764ca82;hb=693353f5ea85d3e50a77f9b1cd9d87711d23412b;hp=2906ae737010af00c970004cc6b8a400273eb313;hpb=7e567e18a5ba32035a8db4ca041023c9e862d25b;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java b/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java index 2906ae7..9ab1846 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java +++ b/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java @@ -57,14 +57,14 @@ public final class TreeColorSet { TAXONOMY, CONFIDENCE, BRANCH_LENGTH, BRANCH, NODE_BOX, COLLAPSED, MATCHING_NODES_A, MATCHING_NODES_B, MATCHING_NODES_A_AND_B, DUPLICATION, SPECIATION, DUPLICATION_OR_SPECATION, DOMAIN_LABEL, DOMAIN_BASE, BINARY_DOMAIN_COMBINATIONS, ANNOTATION, OVERVIEW }; - static final String[] SCHEME_NAMES = { "Default", "Black", "Black & White", "Silver", "Green", + static final String[] SCHEME_NAMES = { "Default", "Black", "Black & White", "Simple", "Silver", "Green", "White & Blue", "Cyan", "Orange", "Blue", "Blue & White", "Neon" }; private int _color_scheme; private final Color[][] _color_schemes = { { new Color( 0, 0, 0 ), // background_color new Color( 0, 100, 100 ), // background_color_gradient_bottom new Color( 230, 230, 230 ), // sequence __ Default (same as Black) new Color( 180, 180, 180 ), // taxonomy - new Color( 180, 180, 180 ), // support + new Color( 180, 180, 180 ), // support new Color( 140, 140, 140 ), // branch_length_color new Color( 255, 255, 255 ), // branch_color new Color( 255, 255, 255 ), // box_color @@ -75,16 +75,16 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 230, 230, 230 ), // domain_label - new Color( 100, 100, 100 ), // domains_base - new Color( 65, 105, 255 ), // binary_domain_combinations_color + new Color( 230, 230, 230 ), // domain_label + new Color( 100, 100, 100 ), // domains_base + new Color( 65, 105, 255 ), // binary_domain_combinations_color new Color( 173, 255, 47 ) // annotation , new Color( 130, 130, 130 ) // overview }, { new Color( 0, 0, 0 ), // background_color - new Color( 0, 255, 255 ), // background_color_gradient_bottom + new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 230, 230, 230 ), // sequence __ Black new Color( 180, 180, 180 ), // taxonomy - new Color( 180, 180, 180 ), // support + new Color( 180, 180, 180 ), // support new Color( 140, 140, 140 ), // branch_length_color new Color( 255, 255, 255 ), // branch_color new Color( 255, 255, 255 ), // box_color @@ -95,8 +95,8 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 230, 230, 230 ), // domain_label - new Color( 100, 100, 100 ), // domains_base + new Color( 230, 230, 230 ), // domain_label + new Color( 100, 100, 100 ), // domains_base new Color( 65, 105, 255 ), // binary_domain_combinations_color new Color( 173, 255, 47 ) // annotation , new Color( 130, 130, 130 ) // ov @@ -104,7 +104,7 @@ public final class TreeColorSet { new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 0, 0, 0 ), // sequence __ Black & White new Color( 0, 0, 0 ), // taxonomy - new Color( 0, 0, 0 ), // support + new Color( 0, 0, 0 ), // support new Color( 0, 0, 0 ), // branch_length_color new Color( 0, 0, 0 ), // branch_color new Color( 0, 0, 0 ), // box_color @@ -115,16 +115,49 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 0, 0, 0 ), // domain_label - new Color( 100, 100, 100 ), // domains_base + new Color( 0, 0, 0 ), // domain_label + new Color( 100, 100, 100 ), // domains_base new Color( 0, 0, 0 ), // binary_domain_combinations_color new Color( 0, 0, 0 ) // annotation , new Color( 220, 220, 220 ) // ov - }, { new Color( 0, 0, 0 ), // background_color + }, + + + + + { new Color( 255, 255, 255 ), // background_color + new Color( 0, 255, 255 ), // background_color_gradient_bottom + new Color( 0, 0, 153 ), //sequence __ NEW + new Color( 0, 0, 102 ), // taxonomy + new Color( 0, 0, 204 ), // support + new Color( 0, 51, 255 ), // branch_length_color + new Color( 0, 0, 0 ), // branch_color + new Color( 0, 51, 255 ), // box_color + new Color( 0, 51, 255 ), // collapesed_fill_color + new Color( 0, 0, 255 ), // found_color 0 + new Color( 0, 255, 0 ), // found_color 1 + new Color( 0, 255, 255 ), // found_color 0 + 1 + new Color( 102, 51, 255 ), // duplication_box_color + new Color( 153, 153, 153 ), // speciation_box_color + new Color( 255, 255, 0 ), // duplication_speciation_color + new Color( 51, 51, 51), // domain_label + new Color( 51, 51, 51 ), // domains_base + new Color( 0, 0, 153 ), // binary_domain_combinations_color + new Color( 0, 0, 153 ),// annotation + new Color( 51, 51, 51 ) // ov + } , + + + + + + + + { new Color( 0, 0, 0 ), // background_color new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 220, 220, 220 ), // sequence __ Silver new Color( 180, 180, 180 ), // taxonomy - new Color( 140, 140, 140 ), // support + new Color( 140, 140, 140 ), // support new Color( 140, 140, 140 ), // branch_length_color new Color( 240, 240, 240 ), // branch_color new Color( 140, 140, 140 ), // box_color @@ -135,8 +168,8 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 230, 230, 230 ), // domain_label - new Color( 100, 100, 100 ), // domains_base + new Color( 230, 230, 230 ), // domain_label + new Color( 100, 100, 100 ), // domains_base new Color( 180, 180, 180 ), // binary_domain_combinations_color new Color( 140, 140, 140 ) // annotation , new Color( 40, 40, 40 ) // ov @@ -144,7 +177,7 @@ public final class TreeColorSet { new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 0, 255, 0 ), // sequence __ the Matrix new Color( 30, 200, 30 ), // taxonomy - new Color( 0, 155, 0 ), // support + new Color( 0, 155, 0 ), // support new Color( 0, 100, 0 ), // branch_length_color new Color( 0, 155, 0 ), // branch_color new Color( 0, 255, 0 ), // box_color @@ -155,8 +188,8 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 230, 230, 230 ), // domain_label - new Color( 100, 100, 100 ), // domains_base + new Color( 230, 230, 230 ), // domain_label + new Color( 100, 100, 100 ), // domains_base new Color( 0, 235, 0 ), // binary_domain_combinations_color new Color( 0, 235, 0 ) // annotation , new Color( 40, 40, 40 ) // ov @@ -164,7 +197,7 @@ public final class TreeColorSet { new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 0, 0, 0 ), //sequence __ White & Blue new Color( 40, 40, 40 ), // taxonomy - new Color( 0, 125, 0 ), // support + new Color( 0, 125, 0 ), // support new Color( 70, 70, 0 ), // branch_length_color new Color( 0, 20, 200 ), // branch_color new Color( 0, 20, 200 ), // box_color @@ -175,8 +208,8 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 0, 0, 0 ), // domain_label - new Color( 50, 50, 50 ), // domains_base + new Color( 0, 0, 0 ), // domain_label + new Color( 50, 50, 50 ), // domains_base new Color( 65, 105, 225 ), // binary_domain_combinations_color new Color( 173, 255, 47 ) // annotation , new Color( 220, 220, 220 ) // ov @@ -184,7 +217,7 @@ public final class TreeColorSet { new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 255, 255, 255 ), // sequence __ Cyan new Color( 200, 200, 200 ), // taxonomy - new Color( 255, 255, 255 ), // support + new Color( 255, 255, 255 ), // support new Color( 200, 200, 200 ), // branch_length_color new Color( 0, 255, 255 ), // branch_color new Color( 0, 255, 255 ), // box_color @@ -195,8 +228,8 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 230, 230, 230 ), // domain_label - new Color( 100, 100, 100 ), // domains_base + new Color( 230, 230, 230 ), // domain_label + new Color( 100, 100, 100 ), // domains_base new Color( 65, 105, 225 ), // binary_domain_combinations_color new Color( 173, 255, 47 ) // annotation , new Color( 0, 120, 120 ) // ov @@ -204,7 +237,7 @@ public final class TreeColorSet { new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 255, 200, 0 ), // sequence __ Clockwork new Color( 255, 200, 0 ), // taxonomy - new Color( 255, 200, 0 ), // support + new Color( 255, 200, 0 ), // support new Color( 255, 200, 0 ), // branch_length_color new Color( 255, 200, 0 ), // branch_color new Color( 255, 200, 0 ), // box_color @@ -215,8 +248,8 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 255, 200, 0 ), // domain_label - new Color( 255, 200, 0 ), // domains_base + new Color( 255, 200, 0 ), // domain_label + new Color( 255, 200, 0 ), // domains_base new Color( 150, 150, 150 ), // binary_domain_combinations_color new Color( 150, 150, 150 ) // annotation , new Color( 150, 150, 150 ) // ov @@ -224,7 +257,7 @@ public final class TreeColorSet { new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 255, 255, 255 ), // sequence __ Blue new Color( 255, 255, 255 ), // taxonomy - new Color( 255, 0, 0 ), // support + new Color( 255, 0, 0 ), // support new Color( 255, 0, 0 ), // branch_length_color new Color( 255, 0, 0 ), // branch_color new Color( 255, 0, 0 ), // box_color @@ -235,8 +268,8 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 255, 255, 255 ), // domain_label - new Color( 100, 100, 100 ), // domains_base + new Color( 255, 255, 255 ), // domain_label + new Color( 100, 100, 100 ), // domains_base new Color( 255, 255, 255 ), // binary_domain_combinations_color new Color( 255, 255, 255 ) // annotation , new Color( 77, 77, 255 ) // ov @@ -244,7 +277,7 @@ public final class TreeColorSet { new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 255, 255, 255 ), // sequence __ blue & white new Color( 255, 255, 255 ), // taxonomy - new Color( 255, 255, 255 ), // support + new Color( 255, 255, 255 ), // support new Color( 0, 191, 255 ), // branch_length_color new Color( 0, 191, 255 ), // branch_color new Color( 0, 191, 255 ), // box_color @@ -255,8 +288,8 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 255, 255, 255 ), // domain_label - new Color( 150, 150, 150 ), // domains_base + new Color( 255, 255, 255 ), // domain_label + new Color( 150, 150, 150 ), // domains_base new Color( 255, 255, 255 ), // binary_domain_combinations_color new Color( 255, 255, 255 ) // annotation , new Color( 170, 187, 204 ) // ov @@ -264,7 +297,7 @@ public final class TreeColorSet { new Color( 255, 255, 0 ), // background_color_gradient_bottom new Color( 127, 255, 0 ), // sequence __ Neon new Color( 255, 110, 199 ), // taxonomy - new Color( 234, 173, 234 ), // support + new Color( 234, 173, 234 ), // support new Color( 77, 77, 255 ), // branch_length_color new Color( 234, 173, 234 ), // branch_color new Color( 77, 77, 255 ), // box_color @@ -275,8 +308,8 @@ public final class TreeColorSet { new Color( 255, 0, 0 ), // duplication_box_color new Color( 0, 255, 0 ), // speciation_box_color new Color( 255, 255, 0 ), // duplication_speciation_color - new Color( 127, 255, 0 ), // domain_label - new Color( 234, 173, 234 ), // domains_base + new Color( 127, 255, 0 ), // domain_label + new Color( 234, 173, 234 ), // domains_base new Color( 27, 255, 0 ), // binary_domain_combinations_color new Color( 27, 255, 0 ) // annotation , new Color( 77, 77, 255 ) // ov @@ -307,6 +340,18 @@ public final class TreeColorSet { // Hidden constructor. } + public Color getDomainBaseColor() { + return domain_base_color; + } + + public Color getDomainLabelColor() { + return domain_label_color; + } + + private void setColorForDefault( final int i, final Color color ) { + _color_schemes[ 0 ][ i ] = color; + } + void cycleColorScheme() { if ( getCurrentColorScheme() >= ( _color_schemes.length - 1 ) ) { setColorSchema( 0 ); @@ -329,7 +374,7 @@ public final class TreeColorSet { } Color getBinaryDomainCombinationsColor() { - if ( Constants.SPECIAL_CUSTOM ) { + if ( AptxConstants.SPECIAL_CUSTOM ) { return new Color( 50, 50, 50 ); } return binary_domain_combinations_color; @@ -339,7 +384,7 @@ public final class TreeColorSet { return box_color; } - Color getBranchColor() { + public Color getBranchColor() { return branch_color; } @@ -371,14 +416,6 @@ public final class TreeColorSet { return SCHEME_NAMES[ getCurrentColorScheme() ]; } - public Color getDomainBaseColor() { - return domain_base_color; - } - - public Color getDomainLabelColor() { - return domain_label_color; - } - Color getDuplicationBoxColor() { return dup_box_color; } @@ -387,15 +424,15 @@ public final class TreeColorSet { return duplication_or_specation_color; } - Color getFoundColor0() { + public Color getFoundColor0() { return found_color_0; } - Color getFoundColor0and1() { + public Color getFoundColor0and1() { return found_color_0_and_1; } - Color getFoundColor1() { + public Color getFoundColor1() { return found_color_1; } @@ -471,10 +508,6 @@ public final class TreeColorSet { _color_scheme = color_scheme; } - private void setColorForDefault( final int i, final Color color ) { - _color_schemes[ 0 ][ i ] = color; - } - static TreeColorSet createInstance() { final TreeColorSet tcs = new TreeColorSet(); tcs.setColorSchema( 0 ); @@ -492,7 +525,7 @@ public final class TreeColorSet { tcs.setColorforDefault( field, color ); } catch ( final IllegalArgumentException ex ) { - ForesterUtil.printWarningMessage( Constants.PRG_NAME, ex.getMessage() ); + ForesterUtil.printWarningMessage( AptxConstants.PRG_NAME, ex.getMessage() ); } } }