logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r928577 - /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
Date Mon, 29 Mar 2010 03:04:39 GMT
Author: sdeboy
Date: Mon Mar 29 03:04:38 2010
New Revision: 928577

URL: http://svn.apache.org/viewvc?rev=928577&view=rev
Log:
Vertically offset the thumbnail panel by table header + scrollbar width (which should be same
as height) - causing the thumbnail panel to line up with the table

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java?rev=928577&r1=928576&r2=928577&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java Mon Mar 29
03:04:38 2010
@@ -1077,7 +1077,8 @@ public class LogPanel extends DockablePa
     eventsAndStatusPanel.add(eventsPane, BorderLayout.CENTER);
     JPanel rightPanel = new JPanel();
     rightPanel.setLayout(new BoxLayout(rightPanel, BoxLayout.Y_AXIS));
-    rightPanel.add(Box.createVerticalStrut(table.getTableHeader().getMinimumSize().height));
+    //assuming 'thumb' height & width are same as scrollbar width, so we can offset vertically
to make indicators line up with table contents        
+    rightPanel.add(Box.createVerticalStrut(table.getTableHeader().getMinimumSize().height
+ ((Integer)UIManager.get("ScrollBar.width")).intValue()));
     JPanel thumbNailPanel = new EventMatchThumbnail();
     thumbNailPanel.setPreferredSize(new Dimension(10, -1));
     rightPanel.add(thumbNailPanel);



Mime
View raw message