]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.event/src/org/simantics/event/view/Constants.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.event / src / org / simantics / event / view / Constants.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2011 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.event.view;\r
13 \r
14 import org.eclipse.jface.resource.ColorDescriptor;\r
15 import org.eclipse.swt.graphics.RGB;\r
16 import org.simantics.event.ontology.EventResource;\r
17 \r
18 /**\r
19  * @author Tuukka Lehtonen\r
20  */\r
21 public class Constants {\r
22 \r
23     public static final int             EVENT_SEVERITY_STEP      = 100;\r
24 \r
25     public static final int             EVENT_SEVERITY_INFO      = 600;\r
26     public static final int             EVENT_SEVERITY_WARNING   = 700;\r
27     public static final int             EVENT_SEVERITY_ERROR     = 1000;\r
28     public static final int             EVENT_SEVERITY_FATAL     = 1200;\r
29 \r
30     public static final ColorDescriptor RETURN_EVENT_FG          = ColorDescriptor.createFrom(new RGB(160, 160, 160));\r
31     //public static final ColorDescriptor MILESTONE_BG             = ColorDescriptor.createFrom(new RGB(240, 240, 240));\r
32     //public static final ColorDescriptor BASELINE_BG              = ColorDescriptor.createFrom(new RGB(200, 200, 200));\r
33 \r
34     // Available columns in the events view\r
35 \r
36     public static final String          COLUMN_TIMESTAMP         = "timestamp";\r
37 \r
38     /**\r
39      * A hidden data meant for time-wise sorting of events.\r
40      */\r
41     public static final String          COLUMN_TIMESTAMP_NUMERIC = "timestampNumeric";\r
42 \r
43     public static final String          COLUMN_EVENT_INDEX       = "index";\r
44 \r
45     /**\r
46      * Thin column, normally empty. If an event is selected as a milestone then\r
47      * this column will show a black milestone diamond icon with numbering. If\r
48      * it is also the baseline, the diamond will be gray.\r
49      */\r
50     public static final String          COLUMN_MILESTONE         = "milestone";\r
51 \r
52     /**\r
53      * Shows an icon and text describing the event type.\r
54      */\r
55     public static final String          COLUMN_EVENT_TYPE        = "eventType";\r
56 \r
57     /**\r
58      * Only shows an icon describing whether the state described by the event\r
59      * has been returned or not. Also interpretable as the "completion" of an\r
60      * event.\r
61      * \r
62      * Events expected to return are marked with an X and returned events with a\r
63      * check mark.\r
64      * \r
65      * @see EventResource#Returns\r
66      * @see EventResource#ReturnedBy\r
67      * @see EventResource#NoReturn\r
68      */\r
69     public static final String          COLUMN_RETURNED          = "returned";\r
70 \r
71     /**\r
72      * Tag describing the event.\r
73      */\r
74     public static final String          COLUMN_TAG_NAME          = "tag";\r
75 \r
76     /**\r
77      * Message contained by the event.\r
78      */\r
79     public static final String          COLUMN_MESSAGE           = "message";\r
80 \r
81     /**\r
82      * Message contained by the event.\r
83      */\r
84     public static final String          COLUMN_RETURN_TIME       = "returnTime";\r
85 \r
86     public static final String          COLUMN_RETURN_TIME_NUMERIC = "returnTimeNumeric";\r
87 \r
88     /**\r
89      * Name of the event source.\r
90      */\r
91     public static final String          COLUMN_SOURCE_NAME       = "sourceName";\r
92 \r
93     public static final String[]        COLUMN_KEYS              = {\r
94         COLUMN_EVENT_INDEX,\r
95         COLUMN_TIMESTAMP,\r
96         COLUMN_TIMESTAMP_NUMERIC,\r
97         COLUMN_MILESTONE,\r
98         COLUMN_EVENT_TYPE,\r
99         COLUMN_RETURNED,\r
100         COLUMN_TAG_NAME,\r
101         COLUMN_MESSAGE,\r
102         COLUMN_RETURN_TIME,\r
103         COLUMN_RETURN_TIME_NUMERIC,\r
104         COLUMN_SOURCE_NAME\r
105     };\r
106 \r
107 }\r