mirror of https://github.com/rusefi/RomRaider.git
added warn level to dash tab
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@448 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
c92403ae67
commit
52da440fb8
|
@ -41,6 +41,7 @@ public final class PlainGauge extends Gauge implements ActionListener {
|
||||||
private static final Color GREEN = new Color(34, 139, 34);
|
private static final Color GREEN = new Color(34, 139, 34);
|
||||||
private static final Color DARK_GREY = new Color(40, 40, 40);
|
private static final Color DARK_GREY = new Color(40, 40, 40);
|
||||||
private static final Color LIGHT_GREY = new Color(56, 56, 56);
|
private static final Color LIGHT_GREY = new Color(56, 56, 56);
|
||||||
|
private static final Color LIGHTER_GREY = new Color(120, 120, 120);
|
||||||
private static final String BLANK = "";
|
private static final String BLANK = "";
|
||||||
private static final String ABOVE = "above";
|
private static final String ABOVE = "above";
|
||||||
private static final String BELOW = "below";
|
private static final String BELOW = "below";
|
||||||
|
@ -138,16 +139,21 @@ public final class PlainGauge extends Gauge implements ActionListener {
|
||||||
JPanel warnPanel = new JPanel();
|
JPanel warnPanel = new JPanel();
|
||||||
warnPanel.setBackground(BLACK);
|
warnPanel.setBackground(BLACK);
|
||||||
JPanel warnFormPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
|
JPanel warnFormPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
|
||||||
warnFormPanel.setPreferredSize(new Dimension(220, 34));
|
warnFormPanel.setPreferredSize(new Dimension(222, 34));
|
||||||
warnFormPanel.setBackground(BLACK);
|
warnFormPanel.setBackground(BLACK);
|
||||||
warnFormPanel.setBorder(new LineBorder(LIGHT_GREY, 1));
|
warnFormPanel.setBorder(new LineBorder(LIGHT_GREY, 1));
|
||||||
warnCheckBox.setBackground(BLACK);
|
|
||||||
warnCheckBox.setForeground(WHITE);
|
|
||||||
warnCheckBox.setFont(getFont().deriveFont(PLAIN, 10F));
|
warnCheckBox.setFont(getFont().deriveFont(PLAIN, 10F));
|
||||||
|
warnCheckBox.setBackground(BLACK);
|
||||||
|
warnCheckBox.setForeground(LIGHTER_GREY);
|
||||||
warnCheckBox.setSelected(false);
|
warnCheckBox.setSelected(false);
|
||||||
warnCheckBox.addActionListener(this);
|
warnCheckBox.addActionListener(this);
|
||||||
warnType.setFont(getFont().deriveFont(PLAIN, 10F));
|
warnType.setFont(getFont().deriveFont(PLAIN, 10F));
|
||||||
|
warnType.setBackground(BLACK);
|
||||||
|
warnType.setForeground(LIGHTER_GREY);
|
||||||
warnTextField.setColumns(4);
|
warnTextField.setColumns(4);
|
||||||
|
warnTextField.setBackground(BLACK);
|
||||||
|
warnTextField.setForeground(LIGHTER_GREY);
|
||||||
|
warnTextField.setCaretColor(LIGHTER_GREY);
|
||||||
warnFormPanel.add(warnCheckBox);
|
warnFormPanel.add(warnCheckBox);
|
||||||
warnFormPanel.add(warnType);
|
warnFormPanel.add(warnType);
|
||||||
warnFormPanel.add(warnTextField);
|
warnFormPanel.add(warnTextField);
|
||||||
|
|
|
@ -30,6 +30,7 @@ public final class LookAndFeelManager {
|
||||||
private static final String OS_VERSION = "os.version";
|
private static final String OS_VERSION = "os.version";
|
||||||
private static final String MAC_OS_X = "Mac OS X";
|
private static final String MAC_OS_X = "Mac OS X";
|
||||||
private static final String LINUX = "Linux";
|
private static final String LINUX = "Linux";
|
||||||
|
private static final boolean USE_RESTRICTED_PLATFORM_ON_MAC = false; // dev. setting only
|
||||||
|
|
||||||
private LookAndFeelManager() {
|
private LookAndFeelManager() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
@ -43,7 +44,9 @@ public final class LookAndFeelManager {
|
||||||
System.setProperty("apple.awt.window.position.forceSafeCreation", "true");
|
System.setProperty("apple.awt.window.position.forceSafeCreation", "true");
|
||||||
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Enginuity");
|
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Enginuity");
|
||||||
System.setProperty("apple.awt.brushMetalLook", "true");
|
System.setProperty("apple.awt.brushMetalLook", "true");
|
||||||
// setRestrictedPlatformLookAndFeel("Windows", "5.1");
|
if (USE_RESTRICTED_PLATFORM_ON_MAC) {
|
||||||
|
setRestrictedPlatformLookAndFeel("Windows", "5.1");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Linux has issues with the gtk look and feel themes. If linux is detected, ignore UIManager detail.
|
// Linux has issues with the gtk look and feel themes. If linux is detected, ignore UIManager detail.
|
||||||
|
@ -65,12 +68,8 @@ public final class LookAndFeelManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setRestrictedPlatformLookAndFeel(final String osName, final String osVersion) throws Exception {
|
private static void setRestrictedPlatformLookAndFeel(final String osName, final String osVersion) throws Exception {
|
||||||
String originalOsName = System.getProperties().getProperty(OS_NAME);
|
|
||||||
String originalOsVersion = System.getProperties().getProperty(OS_VERSION);
|
|
||||||
System.setProperty(OS_NAME, osName);
|
System.setProperty(OS_NAME, osName);
|
||||||
System.setProperty(OS_VERSION, osVersion);
|
System.setProperty(OS_VERSION, osVersion);
|
||||||
setLookAndFeel(getSystemLookAndFeelClassName());
|
setLookAndFeel(getSystemLookAndFeelClassName());
|
||||||
System.setProperty(OS_NAME, originalOsName);
|
|
||||||
System.setProperty(OS_VERSION, originalOsVersion);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue