source: trunk/src/org/apollo/widgets/TrackWidgetCommons.java@ 1102

Last change on this file since 1102 was 1102, checked in by davidb, 6 years ago

Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING

File size: 1.6 KB
Line 
1package org.apollo.widgets;
2
3import org.expeditee.core.Colour;
4import org.expeditee.core.Font;
5
6public final class TrackWidgetCommons {
7
8 /** Static-only class. */
9 private TrackWidgetCommons()
10 {
11 }
12
13 /** For parsing metadata */
14 public static final String META_NAME_TAG = "name=";
15 public static final String META_INITIATIONTIME_TAG = "it=";
16 public static final String META_RUNNINGMSTIME_TAG = "rt=";
17 public static final String META_LAST_WIDTH_TAG = "lw=";
18 public static final String META_OMIT_LAYOUT_TAG = "dontlayout";
19
20 public static final int CACHE_DEPTH = 1;
21
22 public static final Colour FREESPACE_TRACKNAME_TEXT_COLOR = Colour.WHITE;
23 public static final Font FREESPACE_TRACKNAME_FONT = new Font("Arial", Font.Style.BOLD, 20);
24
25 public static final int POPUP_LIFETIME = 1500;
26
27 public static final Colour STANDARD_TRACK_EDGE_COLOR = Colour.BLACK;
28 public static final Colour MUTED_TRACK_EDGE_COLOR = Colour.GREY;
29 public static final Colour SOLO_TRACK_EDGE_COLOR = Colour.RED;
30 public static final Colour MUTED_SOLO_TRACK_EDGE_COLOR = Colour.FromRGB255(255, 168, 168);
31
32 public static final float STOPPED_TRACK_EDGE_THICKNESS = 1.0f;
33 public static final float PLAYING_TRACK_EDGE_THICKNESS = 4.0f;
34
35
36 public static Colour getBorderColor(boolean isSolo, boolean isMuted) {
37
38 Colour newC = null;
39
40 if (isSolo && isMuted) {
41 newC = TrackWidgetCommons.MUTED_SOLO_TRACK_EDGE_COLOR;
42 } else if (isSolo) {
43 newC = TrackWidgetCommons.SOLO_TRACK_EDGE_COLOR;
44 } else if (isMuted) {
45 newC = TrackWidgetCommons.MUTED_TRACK_EDGE_COLOR;
46 } else {
47 newC = TrackWidgetCommons.STANDARD_TRACK_EDGE_COLOR;
48 }
49
50 return newC;
51
52 }
53}
Note: See TracBrowser for help on using the repository browser.