--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2011 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.event.view;\r
+\r
+import org.eclipse.jface.resource.ColorDescriptor;\r
+import org.eclipse.swt.graphics.RGB;\r
+import org.simantics.event.ontology.EventResource;\r
+\r
+/**\r
+ * @author Tuukka Lehtonen\r
+ */\r
+public class Constants {\r
+\r
+ public static final int EVENT_SEVERITY_STEP = 100;\r
+\r
+ public static final int EVENT_SEVERITY_INFO = 600;\r
+ public static final int EVENT_SEVERITY_WARNING = 700;\r
+ public static final int EVENT_SEVERITY_ERROR = 1000;\r
+ public static final int EVENT_SEVERITY_FATAL = 1200;\r
+\r
+ public static final ColorDescriptor RETURN_EVENT_FG = ColorDescriptor.createFrom(new RGB(160, 160, 160));\r
+ //public static final ColorDescriptor MILESTONE_BG = ColorDescriptor.createFrom(new RGB(240, 240, 240));\r
+ //public static final ColorDescriptor BASELINE_BG = ColorDescriptor.createFrom(new RGB(200, 200, 200));\r
+\r
+ // Available columns in the events view\r
+\r
+ public static final String COLUMN_TIMESTAMP = "timestamp";\r
+\r
+ /**\r
+ * A hidden data meant for time-wise sorting of events.\r
+ */\r
+ public static final String COLUMN_TIMESTAMP_NUMERIC = "timestampNumeric";\r
+\r
+ public static final String COLUMN_EVENT_INDEX = "index";\r
+\r
+ /**\r
+ * Thin column, normally empty. If an event is selected as a milestone then\r
+ * this column will show a black milestone diamond icon with numbering. If\r
+ * it is also the baseline, the diamond will be gray.\r
+ */\r
+ public static final String COLUMN_MILESTONE = "milestone";\r
+\r
+ /**\r
+ * Shows an icon and text describing the event type.\r
+ */\r
+ public static final String COLUMN_EVENT_TYPE = "eventType";\r
+\r
+ /**\r
+ * Only shows an icon describing whether the state described by the event\r
+ * has been returned or not. Also interpretable as the "completion" of an\r
+ * event.\r
+ * \r
+ * Events expected to return are marked with an X and returned events with a\r
+ * check mark.\r
+ * \r
+ * @see EventResource#Returns\r
+ * @see EventResource#ReturnedBy\r
+ * @see EventResource#NoReturn\r
+ */\r
+ public static final String COLUMN_RETURNED = "returned";\r
+\r
+ /**\r
+ * Tag describing the event.\r
+ */\r
+ public static final String COLUMN_TAG_NAME = "tag";\r
+\r
+ /**\r
+ * Message contained by the event.\r
+ */\r
+ public static final String COLUMN_MESSAGE = "message";\r
+\r
+ /**\r
+ * Message contained by the event.\r
+ */\r
+ public static final String COLUMN_RETURN_TIME = "returnTime";\r
+\r
+ public static final String COLUMN_RETURN_TIME_NUMERIC = "returnTimeNumeric";\r
+\r
+ /**\r
+ * Name of the event source.\r
+ */\r
+ public static final String COLUMN_SOURCE_NAME = "sourceName";\r
+\r
+ public static final String[] COLUMN_KEYS = {\r
+ COLUMN_EVENT_INDEX,\r
+ COLUMN_TIMESTAMP,\r
+ COLUMN_TIMESTAMP_NUMERIC,\r
+ COLUMN_MILESTONE,\r
+ COLUMN_EVENT_TYPE,\r
+ COLUMN_RETURNED,\r
+ COLUMN_TAG_NAME,\r
+ COLUMN_MESSAGE,\r
+ COLUMN_RETURN_TIME,\r
+ COLUMN_RETURN_TIME_NUMERIC,\r
+ COLUMN_SOURCE_NAME\r
+ };\r
+\r
+}\r