X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FTreeColorSet.java;h=7e115777d077240682d89c0f63ca7ca9aa2c9c51;hb=3d6a64e0371ffedf725bf8467211ed860f298550;hp=b99a27b77b5f11f6ad03d7b61a7071595aff527a;hpb=ccf4c584032d16ed0ed8d0678f01305887724f96;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java b/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java index b99a27b..7e11577 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java +++ b/forester/java/src/org/forester/archaeopteryx/TreeColorSet.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2010 Burnham Institute for Medical Research // Copyright (C) 2003-2010 Ethalinda K.S. Cannon // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,13 +16,13 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // 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.archaeopteryx; @@ -34,15 +34,32 @@ import org.forester.util.ForesterUtil; /* * Maintains the color schemes and a set of colors for drawing a tree. */ -final class TreeColorSet { - - static final String[] SCHEME_NAMES = { "Default", "Black", "Black & White", "Silver", "The Matrix", - "White & Blue", "Cyan", "Clockwork", "Blue", "Blue & White", "Neon" }; - static final String[] COLOR_FIELDS = { "Background", "Background Gradient Bottom", "Sequence", "Taxonomy", - "Confidence", "Branch Length", "Branch", "Node Box", "Collapsed", "Matching Nodes", "Duplication", - "Speciation", "Duplication or Specation", "Domains", "Binary Domain Combinations", "Annotation", "Overview" }; +public final class TreeColorSet { + + public static final String OVERVIEW = "Overview"; + public static final String ANNOTATION = "Annotation"; + public static final String BINARY_DOMAIN_COMBINATIONS = "Binary Domain Combinations"; + public static final String DOMAINS = "Domains"; + public static final String DUPLICATION_OR_SPECATION = "Duplication or Specation"; + public static final String SPECIATION = "Speciation"; + public static final String DUPLICATION = "Duplication"; + public static final String MATCHING_NODES = "Matching Nodes"; + public static final String COLLAPSED = "Collapsed"; + public static final String NODE_BOX = "Node Box"; + public static final String BRANCH = "Branch"; + public static final String BRANCH_LENGTH = "Branch Length"; + public static final String CONFIDENCE = "Confidence"; + public static final String TAXONOMY = "Taxonomy"; + public static final String SEQUENCE = "Sequence"; + public static final String BACKGROUND_GRADIENT_BOTTOM = "Background Gradient Bottom"; + public static final String BACKGROUND = "Background"; + static final String[] SCHEME_NAMES = { "Default", "Black", "Black & White", "Silver", + "The Matrix", "White & Blue", "Cyan", "Clockwork", "Blue", "Blue & White", "Neon" }; + static final String[] COLOR_FIELDS = { BACKGROUND, BACKGROUND_GRADIENT_BOTTOM, SEQUENCE, + TAXONOMY, CONFIDENCE, BRANCH_LENGTH, BRANCH, NODE_BOX, COLLAPSED, MATCHING_NODES, DUPLICATION, SPECIATION, + DUPLICATION_OR_SPECATION, DOMAINS, BINARY_DOMAIN_COMBINATIONS, ANNOTATION, OVERVIEW }; // All the color sets; better be the same # of sets as there are names! - private final Color[][] _color_schemes = { { new Color( 0, 0, 0 ), // background_color + private final Color[][] _color_schemes = { { new Color( 0, 0, 0 ), // background_color new Color( 0, 100, 100 ), // background_color_gradient_bottom new Color( 220, 220, 220 ), // sequence __ Default (same as Black) new Color( 180, 180, 180 ), // taxonomy @@ -58,7 +75,7 @@ final class TreeColorSet { new Color( 123, 104, 238 ), // domains_color new Color( 65, 105, 255 ), // binary_domain_combinations_color new Color( 173, 255, 47 ) // annotation - , new Color( 130, 130, 130 ) // overview + , new Color( 130, 130, 130 ) // overview }, { new Color( 0, 0, 0 ), // background_color new Color( 0, 255, 255 ), // background_color_gradient_bottom new Color( 220, 220, 220 ), // sequence __ Black @@ -229,34 +246,34 @@ final class TreeColorSet { new Color( 27, 255, 0 ), // binary_domain_combinations_color new Color( 27, 255, 0 ) // annotation , new Color( 77, 77, 255 ) // ov - } }; + } }; // Color schemes: - private int _color_scheme; + private int _color_scheme; // The drawing colors - private Color seq_color; - private Color taxonomy_color; - private Color bootstrap_color; - private Color branch_length_color; - private Color branch_color; - private Color box_color; - private Color background_color; - private Color background_color_gradient_bottom; - private Color dup_box_color; - private Color spec_box_color; - private Color collapse_fill_color; - private Color found_color; - private Color duplication_or_specation_color; - private Color domains_color; - private Color binary_domain_combinations_color; - private Color annotation_color; - private Color ov_color; + private Color seq_color; + private Color taxonomy_color; + private Color bootstrap_color; + private Color branch_length_color; + private Color branch_color; + private Color box_color; + private Color background_color; + private Color background_color_gradient_bottom; + private Color dup_box_color; + private Color spec_box_color; + private Color collapse_fill_color; + private Color found_color; + private Color duplication_or_specation_color; + private Color domains_color; + private Color binary_domain_combinations_color; + private Color annotation_color; + private Color ov_color; private TreeColorSet() { // Hidden constructor. } void cycleColorScheme() { - if ( getCurrentColorScheme() >= _color_schemes.length - 1 ) { + if ( getCurrentColorScheme() >= ( _color_schemes.length - 1 ) ) { setColorSchema( 0 ); } else {