/* File: StatusChange.java * Contains: A class for descriptions of status changes * Author: Jeff Dalton * Created: March 1998 * Updated: Sun May 20 17:12:29 2001 by Jeff Dalton * Copyright: (c) 1998, 2000, 2001, AIAI, University of Edinburgh */ package ix.ileed; import ix.icore.process.StatusValues; import ix.util.ViewColor; /** * A StatusChange describes a change in the execution status of an * action in a process. It is sent to an implementation of ProcessViewer * as an element of the statusChanges field of a ProcessStatusUpdate.

* * The coa field can have as its value a COA number, COA_NONE, * or COA_OVERALL. COA_OVERALL indicates a collective status * "across" all COAs. COA_NONE is for nodes that occur only * once in the entire process, rather than once per COA. * * @see ProcessModel * @see ProcessStatusUpdate * @see ProcessViewer */ public class StatusChange implements StatusValues { public static final int COA_NONE = -1; public static final int COA_OVERALL = 0; public String action; public int coa; // NONE, OVERALL, or a coa number >= 1 public int iteration; public int status; public int planLevel = -1; public String text = null; public StatusChange() { } public String statusText() { if (text != null) return text; else if (status == STATUS_NA) return "N/A"; // else if (planLevel > -1) // return "L = " + planLevel; else if (iteration > 1) // return "i = " + iteration; return String.valueOf(iteration); else return null; } public String toString() { return "#"; } }