logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psm...@apache.org
Subject cvs commit: jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw LogUI.java
Date Tue, 06 May 2003 09:56:04 GMT
psmith      2003/05/06 02:56:04

  Modified:    src/java/org/apache/log4j/chainsaw LogUI.java
  Log:
  fixed JDK1.4 dependency, but at the same time this breaks the double
  click-tab-to-undock functionality.  So this fix will allow compilation
  under JDK1.3, but at the expense of that functionality.
  
  Revision  Changes    Path
  1.31      +6 -2      jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java
  
  Index: LogUI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- LogUI.java	6 May 2003 07:52:02 -0000	1.30
  +++ LogUI.java	6 May 2003 09:56:04 -0000	1.31
  @@ -58,6 +58,7 @@
   import java.awt.Point;
   import java.awt.event.ActionEvent;
   import java.awt.event.ActionListener;
  +import java.awt.event.InputEvent;
   import java.awt.event.KeyEvent;
   import java.awt.event.KeyListener;
   import java.awt.event.MouseAdapter;
  @@ -242,8 +243,11 @@
           public void mouseClicked(MouseEvent e) {
             super.mouseClicked(e);
   
  -          if ((e.getClickCount() > 1) && (e.getButton() == MouseEvent.BUTTON1))
{
  -            int tabIndex = tabbedPane.indexAtLocation(e.getX(), e.getY());
  +          if ((e.getClickCount() > 1) && (e.getModifiers() == InputEvent.BUTTON1_MASK))
{
  +            Component componentAt = tabbedPane.getComponentAt(e.getX(), e.getY());
  +            if(componentAt == null) return;
  +//            TODO THIS DOESN'T WORK UNDER JDK1.3
  +            int tabIndex = tabbedPane.indexOfComponent(componentAt);
   
               if (
                 (tabIndex != -1) && (tabIndex == tabbedPane.getSelectedIndex()))
{
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Mime
View raw message