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
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.event.view;
\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
19 * @author Tuukka Lehtonen
\r
21 public class Constants {
\r
23 public static final int EVENT_SEVERITY_STEP = 100;
\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
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
34 // Available columns in the events view
\r
36 public static final String COLUMN_TIMESTAMP = "timestamp";
\r
39 * A hidden data meant for time-wise sorting of events.
\r
41 public static final String COLUMN_TIMESTAMP_NUMERIC = "timestampNumeric";
\r
43 public static final String COLUMN_EVENT_INDEX = "index";
\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
50 public static final String COLUMN_MILESTONE = "milestone";
\r
53 * Shows an icon and text describing the event type.
\r
55 public static final String COLUMN_EVENT_TYPE = "eventType";
\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
62 * Events expected to return are marked with an X and returned events with a
\r
65 * @see EventResource#Returns
\r
66 * @see EventResource#ReturnedBy
\r
67 * @see EventResource#NoReturn
\r
69 public static final String COLUMN_RETURNED = "returned";
\r
72 * Tag describing the event.
\r
74 public static final String COLUMN_TAG_NAME = "tag";
\r
77 * Message contained by the event.
\r
79 public static final String COLUMN_MESSAGE = "message";
\r
82 * Message contained by the event.
\r
84 public static final String COLUMN_RETURN_TIME = "returnTime";
\r
86 public static final String COLUMN_RETURN_TIME_NUMERIC = "returnTimeNumeric";
\r
89 * Name of the event source.
\r
91 public static final String COLUMN_SOURCE_NAME = "sourceName";
\r
93 public static final String[] COLUMN_KEYS = {
\r
96 COLUMN_TIMESTAMP_NUMERIC,
\r
102 COLUMN_RETURN_TIME,
\r
103 COLUMN_RETURN_TIME_NUMERIC,
\r