source: trunk/src_apollo/org/apollo/widgets/TrackWidgetCommons.java@ 315

Last change on this file since 315 was 315, checked in by bjn8, 16 years ago

Apollo spin-off added

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