/* File: ViewColor.java * Contains: ACP3 Viewer Colors, etc. * Author: Austin Tate * Created: Thu Jan 15 16:39:25 1998 * Updated: Wed Jul 18 02:51:54 2001 by Jeff Dalton * Copyright: (c) 1998, AIAI, University of Edinburgh */ package ix.util; import java.awt.*; public class ViewColor { public static final Color statusColor[] = { new Color(0xFFFFFF), // white new Color(0x99FFFF), // blue new Color(0x99FF99), // green new Color(0xFFCC66), // orange new Color(0xFF6699), // red new Color(0xCCCCCC), // light gray new Color(0x999999) // dark gray }; public static final String statusName[] = { "", "Complete", "Executing", "Possible", "Impossible", "N/A", "" }; public static final int STATUS_BLANK = 0, STATUS_COMPLETE = 1, STATUS_EXECUTING = 2, STATUS_POSSIBLE = 3, STATUS_IMPOSSIBLE = 4, STATUS_NA = 5, STATUS_TBD = 6; public static final Color backgroundColor = new Color(0xFFFFFF); public static void ViewColor () { } public static int statusValue(String name) { for (int i = 0; i < statusName.length; i++) if (statusName[i].equalsIgnoreCase(name)) return i; throw new IllegalArgumentException ("Unknown status name: \"" + name + "\""); } /** * Priority colors */ public static final Color priorityColor[] = { new Color(0xffccdd), // low new Color(0xffffff), // none new Color(0xFFaacc), // medium new Color(0xFF6699) // high }; public static final String priorityName[] = { "Low", "None", "Medium", "High" }; public static int priorityValue(String name) { for (int i = 0; i < priorityName.length; i++) if (priorityName[i].equalsIgnoreCase(name)) return i; throw new IllegalArgumentException ("Unknown priority name: \"" + name + "\""); } }