if (colorDescriptions == null) { colorDescriptions = new Hashtable(); colorDescriptions.put(CSMARTConsole.busyStatus, "extremely busy"); colorDescriptions.put(CSMARTConsole.highBusyStatus, "very busy"); colorDescriptions.put(CSMARTConsole.mediumHighBusyStatus, "busy"); colorDescriptions.put(CSMARTConsole.mediumBusyStatus, "somewhat busy"); colorDescriptions.put(CSMARTConsole.mediumLowBusyStatus, "somewhat idle"); colorDescriptions.put(CSMARTConsole.lowBusyStatus, "idle"); colorDescriptions.put(CSMARTConsole.idleStatus, "node created"); colorDescriptions.put(CSMARTConsole.errorStatus, "node destroyed"); colorDescriptions.put(CSMARTConsole.noAnswerStatus, "no answer"); colorDescriptions.put(CSMARTConsole.unknownStatus, "unknown"); colorDescriptions.put(CSMARTConsole.stdErrStatus, "error"); colorDescriptions.put(CSMARTConsole.notifyStatus, "notify"); }
  public ConsoleNodeListener(CSMARTConsole console,			     NodeComponent nodeComponent,			     String logFileName, 			     JRadioButton statusButton,                             ConsoleTextPane textPane) throws IOException {    this.console = console;    this.nodeComponent = nodeComponent;    nodeName = nodeComponent.toString();    // status button for node on console display    this.statusButton = statusButton;			           // wrap and capture to a log    this.logFile = new BufferedWriter(new FileWriter(logFileName));    // save the GUI text pane    this.textPane = textPane;    // create our attributes    // stdout is black, stderr is red, heartbeat messages are green,    // others (what?) are blue    atts = new SimpleAttributeSet[4];    atts[0] = new SimpleAttributeSet();    StyleConstants.setForeground(atts[0], Color.black);    atts[1] = new SimpleAttributeSet();    StyleConstants.setForeground(atts[1], Color.red);    atts[2] = new SimpleAttributeSet();    StyleConstants.setForeground(atts[2], Color.green);    atts[3] = new SimpleAttributeSet();    StyleConstants.setForeground(atts[3], Color.blue);    if (colorDescriptions == null) {      colorDescriptions = new Hashtable();      colorDescriptions.put(CSMARTConsole.busyStatus, "extremely busy");      colorDescriptions.put(CSMARTConsole.highBusyStatus, "very busy");      colorDescriptions.put(CSMARTConsole.mediumHighBusyStatus, "busy");      colorDescriptions.put(CSMARTConsole.mediumBusyStatus, "somewhat busy");      colorDescriptions.put(CSMARTConsole.mediumLowBusyStatus, "somewhat idle");      colorDescriptions.put(CSMARTConsole.lowBusyStatus, "idle");      colorDescriptions.put(CSMARTConsole.idleStatus, "node created");      colorDescriptions.put(CSMARTConsole.errorStatus, "node destroyed");      colorDescriptions.put(CSMARTConsole.noAnswerStatus, "no answer");      colorDescriptions.put(CSMARTConsole.unknownStatus, "unknown");      colorDescriptions.put(CSMARTConsole.stdErrStatus, "error");      colorDescriptions.put(CSMARTConsole.notifyStatus, "notify");    }  }