1// BEGIN LICENSE BLOCK 2// Version: CMPL 1.1 3// 4// The contents of this file are subject to the Cisco-style Mozilla Public 5// License Version 1.1 (the "License"); you may not use this file except 6// in compliance with the License. You may obtain a copy of the License 7// at www.eclipse-clp.org/license. 8// 9// Software distributed under the License is distributed on an "AS IS" 10// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 11// the License for the specific language governing rights and limitations 12// under the License. 13// 14// The Original Code is CPViz Constraint Visualization System 15// The Initial Developer of the Original Code is Helmut Simonis 16// Portions created by the Initial Developer are 17// Copyright (C) 2009-2010 Helmut Simonis 18// 19// Contributor(s): Helmut Simonis, 4C, Univerity College Cork, Cork 20// 21// 22// END LICENSE BLOCK 23// ---------------------------------------------------------------------- 24package ie.ucc.cccc.viz; 25/** 26 * Utility class to hold the predefined color values as enum instances. 27 * Uses a string attribute to hold the string itself. In the code the enum is used 28 * throughout, when the enum is printed, it prints its string attribute value 29 * @author hsimonis 30 * 31 */ 32public enum Colors { 33 /** 34 * Tree color scheme 35 * color used for the text in unexplored nodes 36 */ 37 UNEXPLORED_NODE_TEXT_COLOR("#0000FF"), 38 /** 39 * color used for completely explored nodes 40 */ 41 EXPLORED_NODE_TEXT_COLOR("#000000"), 42 /** 43 * color used for small info text in sub tree abstraction 44 */ 45 NODE_INFO_TEXT_COLOR("#000000"), 46 /** 47 * color used for the failure node circles 48 */ 49 FAILED_NODE_COLOR("#FF0000"), 50 /** 51 * color used for the success node circles 52 */ 53 SUCC_NODE_COLOR("#00FF00"), 54 /** 55 * color used for the links between nodes in the tree 56 */ 57 LAST_NODE_COLOR("#0000FF"), 58 /** 59 * color used to mark unfinished part of tree 60 */ 61 LINK_COLOR("#000000"), 62 /** 63 * color used to mark forced assignments in tree, if shown at all 64 */ 65 FIXED_LINK_COLOR("#FFFF00"), 66 /** 67 * color used for the value text printed next to the links 68 */ 69 VALUE_TEXT_COLOR("#000000"), 70 /** 71 * overall color used for border of nodes 72 */ 73 NODE_BORDER_COLOR("#000000"), 74 75 /** 76 * Visualizer color scheme 77 * color used for border of cells 78 */ 79 BORDER_COLOR("#000000"), 80 /** 81 * color used for lines in grid 82 */ 83 GRID_COLOR("#000000"), 84 /** 85 * color used for zero value in binary domains 86 */ 87 ZERO_COLOR("#FFFFFF"), 88 OLD_ZERO_COLOR("#C8C8C8"), 89 /** 90 * color used for value one in binary domains 91 */ 92 ONE_COLOR("#000000"), 93 OLD_ONE_COLOR("#505050"), 94 /** 95 * color used to show allowed range of values 96 */ 97 ALLOWED_COLOR("#00FF00"), 98 /** 99 * color used to show not allowed range of values 100 */ 101 NOT_ALLOWED_COLOR("#FFFF00"), 102 /** 103 * color used to show value is too low 104 */ 105 TOO_LOW_COLOR("#808000"), 106 /** 107 * color used to show value is too high 108 */ 109 TOO_HIGH_COLOR("#800000"), 110 /** 111 * color used to show capacity is used up 112 */ 113 FULL_COLOR("#000080"), 114 /** 115 * color used to show removed values 116 */ 117 REMOVED_VALUE_COLOR("#008080"), 118 /** 119 * Color used to mark removed values in domains 120 */ 121 REMOVED_VALUE_TEXT_COLOR("#FF0000"), 122 /** 123 * color used to show value is too high 124 */ 125 FIXED_COLOR("#C0C0C0"), 126 /** 127 * color used to show value is too high 128 */ 129 POSSIBLE_COLOR("#0000C0"), 130 /** 131 * color used for text labels 132 */ 133 LABEL_TEXT_COLOR("#0000FF"), 134 /** 135 * color used for cells marking fixed assignment 136 */ 137 FIXED_ASSIGNMENT_COLOR("#FFE0E0"), 138 /** 139 * color used for failed assignment markers 140 */ 141 FAILED_COLOR("#FF0000"), 142 /** 143 * color used for text in failed assignment cells 144 */ 145 FAILED_TEXT_COLOR("#0000FF"), 146 /** 147 * color used to mark unknown visualizers 148 */ 149 UNKNOWN_COLOR("#808000"), 150 /** 151 * color used to mark constant values 152 */ 153 CONSTANT_COLOR("#000080"), 154 /** 155 * color used to draw items on top of each other (0 < opacity < 1) 156 */ 157 COMPARE1_COLOR("#00C000"), 158 /** 159 * color used to draw items on top of each other (0 < opacity < 1) 160 */ 161 COMPARE2_COLOR("#0000C0"), 162 /** 163 * color used to mark assigned values 164 */ 165 ASSIGN_COLOR("#FF0000"), 166 OLD_ASSIGN_COLOR("#FF8080"), 167 /** 168 * color used to mark text in assigned cells 169 */ 170 ASSIGNED_TEXT_COLOR("#0000FF"), 171 /** 172 * color used to mark text in unassigned cells 173 */ 174 UNASSIGNED_TEXT_COLOR("#000000"), 175 /** 176 * color used for cells which are not assigned 177 */ 178 UNASSIGNED_COLOR("#C0FFC0"), 179 /** 180 * color used by invariant checker to mark missing propagation 181 */ 182 MISSING_PROPAGATION_COLOR("#0000FF"), 183 /** 184 * color used by invariant checker to mark inconsistent partial assignment 185 */ 186 INCONSISTENT_COLOR("#FFFF00"), 187 /** 188 * color used by invariant checker to mark inconsistent ground assignment 189 */ 190 FALSE_COLOR("#FF0000"), 191 /** 192 * color used by invariant checker to mark an interesting state 193 */ 194 INTERESTING_COLOR("#C0C0C0"), 195 /** 196 * colors used in the softprec constraint 197 */ 198 SOFTPREC_COLOR("#0000FF"), 199 SOFTPREC_OLD_COLOR("#00C0C0"), 200 HARDPREC_UNKNOWN_COLOR("#C0FFC0"), 201 HARDPREC_ZERO_COLOR("#FFFFFF"), 202 HARDPREC_OLD_ZERO_COLOR("#C8C8C8"), 203 HARDPREC_ONE_COLOR("#000000"), 204 HARDPREC_OLD_ONE_COLOR("#505050"), 205 COMPONENT_COLOR("#808080"), 206 COMPONENT_COLOR0("#FF0000"), 207 COMPONENT_COLOR1("#00FF00"), 208 COMPONENT_COLOR2("#0000FF"), 209 COMPONENT_COLOR3("#FFFF00"), 210 COMPONENT_COLOR4("#FF00FF"), 211 COMPONENT_COLOR5("#00FFFF"), 212 /** 213 * color used for focus marker 214 */ 215 UNCHANGED_COLOR("#C0C0C0"), 216 CHANGED_MINMAX_COLOR("#00FFFF"), 217 CHANGED_MIN_COLOR("#0000FF"), 218 CHANGED_MAX_COLOR("#00FF00"), 219 CHANGED_SIZE_COLOR("#008080"), 220 FOCUS_COLOR("#FFFF00"), 221 WHITE_COLOR("#FFFFFF"), 222 /** 223 * color used for focus marker of blocks instead of single variables 224 */ 225 BLOCK_FOCUS_COLOR("#0000FF"); 226 227 private String string; 228 229 Colors(String string){ 230 this.string = string; 231 } 232 233 /** 234 * used to print out enums as string values 235 */ 236 @Override public String toString() { 237 return this.string; 238 } 239 240} 241