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