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