source: tmcsimulator-scriptbuilder/trunk/src/scriptbuilder/gui/ScriptBuilderGuiConstants.java @ 32

Revision 32, 3.6 KB checked in by bmcguffin, 9 years ago (diff)

Added a constant representing the maximum simulation length in seconds. Also altered the left-margin position of the tick timeline by a few pixels so that ticks will line up with the time values they represent. (Was 119, now 116)

Line 
1package scriptbuilder.gui;
2
3import java.awt.Color;
4import java.awt.Cursor;
5import java.awt.Font;
6import java.awt.Point;
7import java.awt.Toolkit;
8import images.*;
9
10/**
11 * Global constants for the script builder.
12 *
13 * @author Greg Eddington <geddingt@calpoly.edu>
14 */
15public class ScriptBuilderGuiConstants
16{
17    public static int       PIXEL_WIDTH_PER_HORIZONTAL_TICK = 24;
18    public static final int HORIZONTAL_TICK_RESOLUTION = 60,
19                            TIMELINE_TOP_MARGIN = 25,
20                            MAX_NUMBER_OF_SCRIPT_EVENT_ICON = 10,
21                            SCRIPT_EVENT_ICON_TOP_MARGIN = 55,
22                            SCRIPT_EVENT_ICON_STEP = 24,
23                            EVENT_ICON_WIDTH = 10,
24                            TIMELINE_EVENT_ICON_MARGIN = 35,
25                            CURSOR_ICON_HORIZONTAL_CENTER = 10,
26                            CURSOR_TIMESTAMP_TOP_MARGIN = 1,
27                            CURSOR_TIMESTAMP_HEIGHT = 13,
28                            CURSOR_TIMESTAMP_HORIZONTAL_CENTER = 23,
29                            CURSOR_TIMESTAMP_BORDER_TOP_MARGIN = 0,
30                            CURSOR_TIMESTAMP_BORDER_HEIGHT = 15,
31                            CURSOR_TIMESTAMP_BORDER_HORIZONTAL_CENTER = 25,
32                            CURSOR_TIMESTAMP_ICON_CENTER = 10,
33                            CURSOR_TIMESTAMP_ICON_TOP_MARGIN = 16,
34                            CURSOR_TIMESTAMP_TEXT_CENTER = 18,
35                            CURSOR_TIMESTAMP_TEXT_TOP_MARGIN = 11,
36                            TIMELINE_HEIGHT = 3,
37                            TICK_TIMELINE_TOP_MARGIN = 50,
38                            TICK_TIMELINE_LEFT_MARGIN = 116,
39                            TICK_TIMELINE_SMALLEST_LENGTH = 800,
40                            TICK_TIMELINE_HEIGHT = 0,
41                            TICK_TOP_MARGIN = 0,
42                            TICK_HEIGHT = 3400,
43                            TICK_WIDTH = 1,
44                            TIMELINE_COLLAPSED_HEIGHT = 50,
45                            TIMELINE_OPENED_HEIGHT = 320,
46                            INCIDENT_NUMBER_WIDTH = 100,
47                            INCIDENT_NUMBER_TOP_MARGIN = 35,
48                            INCIDENT_NUMBER_LEFT_MARGIN = 60,
49                            TICKS_PER_MAJOR_TICK = 15,
50                            COLLEX_BUTTON_X = 25,
51                            COLLEX_BUTTON_Y = 18,
52                            COLLEX_BUTTON_WIDTH = 20,
53                            COLLEX_BUTTON_HEIGHT = 20,
54                            MAX_SIMULATION_LENGTH = 999999;
55
56    public static final Color   CURSOR_TIMESTAMP_BORDER_COLOR = Color.BLACK,
57                                CURSOR_TIMESTAMP_ACTIVE_COLOR = Color.YELLOW,
58                                CURSOR_TIMESTAMP_LOCKED_COLOR = Color.LIGHT_GRAY,
59                                CURSOR_TIMESTAMP_TEXT_COLOR   = Color.BLACK,
60                                TIMELINE_TICK_COLOR           = Color.BLACK,
61                                MINOR_TICK_COLOR              = new Color(0xDADADA);
62
63    public static final Font    INCIDENT_NUMBER_FONT          =
64                                    new Font("Arial", Font.BOLD, 20),
65                                INCIDENT_NAME_FONT          =
66                                    new Font("Arial", Font.BOLD, 12),
67                                TIMELINE_TICK_TIME_FONT       =
68                                    new Font("Arial", Font.BOLD, 14);
69
70    public static final Cursor RADIO_CURSOR = Toolkit.getDefaultToolkit().createCustomCursor(
71                        Toolkit.getDefaultToolkit().getImage(Images.getImage("Radio.png")),
72                        new Point(0, 0), "Radio");
73}
Note: See TracBrowser for help on using the repository browser.