[hg] main-silver: #234437 - [dark] Red alert is not readable in ...

  • From: Ondrej Vrabec < >
  • To:
  • Subject: [hg] main-silver: #234437 - [dark] Red alert is not readable in ...
  • Date: Thu, 15 Aug 2013 10:59:42 -0700

changeset 70b65b9a973f in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/70b65b9a973f
description:
        #234437 - [dark] Red alert is not readable in Create Task Repository 
dialog

diffstat:

 
bugtracking/src/org/netbeans/modules/bugtracking/ui/selectors/RepositoryFormPanel.java
 |  11 ++++++-
 bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.form    
          |   2 +-
 bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.java    
          |  10 ++++++-
 bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.form             
          |   4 +-
 bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.java             
          |   3 +-
 bugzilla/src/org/netbeans/modules/bugzilla/options/BugzillaOptionsPanel.java 
          |   4 +-
 bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.java             
          |   3 +-
 bugzilla/src/org/netbeans/modules/bugzilla/util/BugzillaUtil.java            
          |  15 ++++++++++
 8 files changed, 42 insertions(+), 10 deletions(-)

diffs (193 lines):

diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/ui/selectors/RepositoryFormPanel.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/ui/selectors/RepositoryFormPanel.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/ui/selectors/RepositoryFormPanel.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/ui/selectors/RepositoryFormPanel.java
@@ -59,6 +59,7 @@
 import org.openide.util.NbBundle;
 import static java.lang.Character.MAX_RADIX;
 import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
 import org.netbeans.modules.bugtracking.RepositoryImpl;
 import org.netbeans.modules.bugtracking.team.TeamRepositoryPanel;
 import org.netbeans.modules.bugtracking.team.spi.TeamUtil;
@@ -86,6 +87,14 @@
     private final List<ChangeListener> listeners = new 
ArrayList<ChangeListener>(4);
     private final ChangeEvent changeEvent = new ChangeEvent(this);
     private JPanel emptyPanel;
+    private static final Color ERROR_COLOR;
+    static {
+        Color c = UIManager.getColor("nb.errorForeground"); //NOI18N
+        if (c == null) {
+            c = new Color(153, 0, 0);
+        }
+        ERROR_COLOR = c;
+    }
 
     public RepositoryFormPanel() {
         initComponents();
@@ -101,7 +110,7 @@
         cardsPanel = new JPanel(new CardLayout());
 
         errorLabel = new JLabel();
-        errorLabel.setForeground(new Color(153, 0, 0));
+        errorLabel.setForeground(ERROR_COLOR);
         errorLabel.setIcon(new ImageIcon(ImageUtilities.loadImage(
                 
"org/netbeans/modules/bugtracking/ui/resources/error.gif")));   //NOI18N
         updateErrorMessage(" ");                                        
//NOI18N
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.form 
b/bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.form
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.form
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.form
@@ -1,4 +1,4 @@
-<?xml version="1.1" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 
 <Form version="1.5" maxVersion="1.7" 
type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   <AuxValues>
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/util/SaveQueryPanel.java
@@ -52,6 +52,7 @@
 import java.awt.Image;
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
+import javax.swing.UIManager;
 import javax.swing.event.DocumentEvent;
 import javax.swing.event.DocumentListener;
 import org.openide.DialogDescriptor;
@@ -68,7 +69,14 @@
     private static JButton ok;
     private DialogDescriptor descriptor;
     private QueryNameValidator validator;
-    private static final Color ERROR_COLOR = new Color(153,0,0);
+    private static final Color ERROR_COLOR;
+    static {
+        Color c = UIManager.getColor("nb.errorForeground"); //NOI18N
+        if (c == null) {
+            c = new Color(153, 0, 0);
+        }
+        ERROR_COLOR = c;
+    }
 
     /** Creates new form SavePanel */
     private SaveQueryPanel() {
diff --git a/bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.form 
b/bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.form
--- a/bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.form
+++ b/bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.form
@@ -124,8 +124,8 @@
     </Component>
     <Component class="javax.swing.JLabel" name="errorLabel">
       <Properties>
-        <Property name="foreground" type="java.awt.Color" 
editor="org.netbeans.beaninfo.editors.ColorEditor">
-          <Color blue="0" green="0" red="99" type="rgb"/>
+        <Property name="foreground" type="java.awt.Color" 
editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
+          <Connection code="BugzillaUtil.getErrorForegroundColor()" 
type="code"/>
         </Property>
         <Property name="icon" type="javax.swing.Icon" 
editor="org.netbeans.modules.form.editors2.IconEditor">
           <Image iconType="3" 
name="/org/netbeans/modules/bugzilla/resources/error.gif"/>
diff --git a/bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.java 
b/bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.java
--- a/bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.java
+++ b/bugzilla/src/org/netbeans/modules/bugzilla/api/NBLoginPanel.java
@@ -60,6 +60,7 @@
 import org.netbeans.modules.bugzilla.Bugzilla;
 import org.netbeans.modules.bugzilla.repository.BugzillaRepository;
 import org.netbeans.modules.bugzilla.repository.NBRepositorySupport;
+import org.netbeans.modules.bugzilla.util.BugzillaUtil;
 import org.openide.DialogDescriptor;
 import org.openide.DialogDisplayer;
 import org.openide.awt.HtmlBrowser.URLDisplayer;
@@ -130,7 +131,7 @@
 
         
passwordField.setText(org.openide.util.NbBundle.getMessage(NBLoginPanel.class,
 "NBLoginPanel.passwordField.text")); // NOI18N
 
-        errorLabel.setForeground(new java.awt.Color(153, 0, 0));
+        errorLabel.setForeground(BugzillaUtil.getErrorForegroundColor());
         errorLabel.setIcon(new 
javax.swing.ImageIcon(getClass().getResource("/org/netbeans/modules/bugzilla/resources/error.gif")));
 // NOI18N
         
errorLabel.setText(org.openide.util.NbBundle.getMessage(NBLoginPanel.class, 
"NBLoginPanel.errorLabel.text")); // NOI18N
 
diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/options/BugzillaOptionsPanel.java
 
b/bugzilla/src/org/netbeans/modules/bugzilla/options/BugzillaOptionsPanel.java
--- 
a/bugzilla/src/org/netbeans/modules/bugzilla/options/BugzillaOptionsPanel.java
+++ 
b/bugzilla/src/org/netbeans/modules/bugzilla/options/BugzillaOptionsPanel.java
@@ -43,10 +43,10 @@
  */
 package org.netbeans.modules.bugzilla.options;
 
-import java.awt.Color;
 import java.awt.Image;
 import javax.swing.ImageIcon;
 import org.netbeans.api.options.OptionsDisplayer;
+import org.netbeans.modules.bugzilla.util.BugzillaUtil;
 import org.netbeans.spi.options.OptionsPanelController;
 import org.openide.util.ImageUtilities;
 
@@ -60,7 +60,7 @@
     /** Creates new form SvnOptionsPanel */
     public BugzillaOptionsPanel() {
         initComponents();
-        errorLabel.setForeground(new Color(153,0,0));
+        errorLabel.setForeground(BugzillaUtil.getErrorForegroundColor());
         Image img = 
ImageUtilities.loadImage("org/netbeans/modules/bugzilla/resources/error.gif");
 //NOI18N
         errorLabel.setIcon(new ImageIcon(img));
         errorLabel.setVisible(false);
diff --git a/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.java 
b/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.java
--- a/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.java
+++ b/bugzilla/src/org/netbeans/modules/bugzilla/query/QueryPanel.java
@@ -74,7 +74,6 @@
     final ExpandablePanel byDetails;
     final ExpandablePanel byPeople;
     final ExpandablePanel byLastChange;
-    private static final Color ERROR_COLOR = new Color(153,0,0);
     private final Color defaultTextColor;
 
     /** Creates new form QueryPanel */
@@ -1358,7 +1357,7 @@
                 tableSummaryLabel.setVisible(false);
                 tableFieldsPanel.setVisible(false);
                 if (text != null) {
-                    noContentLabel.setForeground(ERROR_COLOR);
+                    
noContentLabel.setForeground(BugzillaUtil.getErrorForegroundColor());
                     noContentLabel.setText(text);
                 }
             }
diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/util/BugzillaUtil.java 
b/bugzilla/src/org/netbeans/modules/bugzilla/util/BugzillaUtil.java
--- a/bugzilla/src/org/netbeans/modules/bugzilla/util/BugzillaUtil.java
+++ b/bugzilla/src/org/netbeans/modules/bugzilla/util/BugzillaUtil.java
@@ -42,6 +42,7 @@
 
 package org.netbeans.modules.bugzilla.util;
 
+import java.awt.Color;
 import java.util.Collections;
 import java.util.MissingResourceException;
 import org.netbeans.modules.bugtracking.util.ListValuePicker;
@@ -49,6 +50,7 @@
 import javax.swing.JButton;
 import javax.swing.JPanel;
 import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
 import org.eclipse.core.runtime.CoreException;
 import org.netbeans.modules.bugtracking.api.Repository;
 import org.netbeans.modules.bugtracking.spi.RepositoryProvider;
@@ -74,6 +76,15 @@
  */
 public class BugzillaUtil {
 
+    private static final Color ERROR_COLOR;
+    static {
+        Color c = UIManager.getColor("nb.errorForeground"); //NOI18N
+        if (c == null) {
+            c = new Color(153, 0, 0);
+        }
+        ERROR_COLOR = c;
+    }
+
     public static boolean show(JPanel panel, String title, String okName) {
         return show(panel, title, okName, new HelpCtx(panel.getClass()));
     }
@@ -201,4 +212,8 @@
             SwingUtilities.invokeLater(r);
         }
     }
+
+    public static Color getErrorForegroundColor () {
+        return ERROR_COLOR;
 }
+}

[hg] main-silver: #234437 - [dark] Red alert is not readable in ...

Ondrej Vrabec 08/15/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close