logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r942857 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: ChainsawConstants.java color/ColorPanel.java
Date Mon, 10 May 2010 19:16:20 GMT
Author: sdeboy
Date: Mon May 10 19:16:20 2010
New Revision: 942857

URL: http://svn.apache.org/viewvc?rev=942857&view=rev
Log:
Update to search and alternating row colors to be subtle but noticeably different from eachother
Minor change to ensure a non-selected row in the color filter table doesn't trigger an index-out-of-bounds
exception

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawConstants.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawConstants.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawConstants.java?rev=942857&r1=942856&r2=942857&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawConstants.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawConstants.java
Mon May 10 19:16:20 2010
@@ -36,10 +36,10 @@ public class ChainsawConstants {
   public static final Color COLOR_DEFAULT_FOREGROUND = Color.BLACK;
 
   public static final int DEFAULT_ROW_HEIGHT = 20;
-  public static final Color FIND_LOGGER_BACKGROUND = new Color(197, 193, 170);
+  public static final Color FIND_LOGGER_BACKGROUND = new Color(213, 226, 235);
   public static final Color FIND_LOGGER_FOREGROUND = Color.BLACK;
 
-  public static final Color COLOR_ODD_ROW = new Color(215, 215, 215);
+  public static final Color COLOR_ODD_ROW = new Color(227, 227, 227);
   public static final Color COLOR_EVEN_ROW = COLOR_DEFAULT_BACKGROUND;
 
   public static final URL WELCOME_URL = ChainsawConstants.class.getClassLoader().getResource(

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java?rev=942857&r1=942856&r2=942857&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/color/ColorPanel.java Mon
May 10 19:16:20 2010
@@ -712,8 +712,12 @@ public class ColorPanel extends JPanel {
           repaint();
         } else {
           box.setBackground(Color.white);
-          colorChooser.setColor((Color)table.getValueAt(table.getSelectedRow(), table.getSelectedColumn()));
-          lastColor = (Color)table.getValueAt(table.getSelectedRow(), table.getSelectedColumn());
+          int selectedRow = table.getSelectedRow();
+          int selectedColumn = table.getSelectedColumn();
+          if (selectedRow != -1 && selectedColumn != -1) {
+              colorChooser.setColor((Color)table.getValueAt(selectedRow, selectedColumn));
+              lastColor = (Color)table.getValueAt(selectedRow, selectedColumn);
+          }
           dialog.setVisible(true);
         }
       }



Mime
View raw message