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 07:52:03 GMT
psmith      2003/05/06 00:52:03

  Modified:    src/java/org/apache/log4j/chainsaw LogUI.java
  Log:
  changes to the way the Welcome Panel is added.
  
  Revision  Changes    Path
  1.30      +41 -74    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.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- LogUI.java	6 May 2003 04:27:44 -0000	1.29
  +++ LogUI.java	6 May 2003 07:52:02 -0000	1.30
  @@ -49,9 +49,6 @@
   
   package org.apache.log4j.chainsaw;
   
  -import org.apache.log4j.LogManager;
  -import org.apache.log4j.UtilLoggingLevel;
  -
   import java.awt.BorderLayout;
   import java.awt.Component;
   import java.awt.Dimension;
  @@ -68,13 +65,11 @@
   import java.awt.event.MouseMotionAdapter;
   import java.awt.event.WindowAdapter;
   import java.awt.event.WindowEvent;
  -
   import java.io.BufferedInputStream;
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.IOException;
   import java.io.ObjectInputStream;
  -
   import java.util.ArrayList;
   import java.util.HashMap;
   import java.util.HashSet;
  @@ -88,7 +83,7 @@
   import javax.swing.Action;
   import javax.swing.BorderFactory;
   import javax.swing.ButtonGroup;
  -import javax.swing.JButton;
  +import javax.swing.ImageIcon;
   import javax.swing.JCheckBox;
   import javax.swing.JCheckBoxMenuItem;
   import javax.swing.JComboBox;
  @@ -107,7 +102,6 @@
   import javax.swing.JTable;
   import javax.swing.JTextField;
   import javax.swing.JToolBar;
  -import javax.swing.KeyStroke;
   import javax.swing.ListSelectionModel;
   import javax.swing.SwingUtilities;
   import javax.swing.border.TitledBorder;
  @@ -118,6 +112,10 @@
   import javax.swing.table.TableColumn;
   import javax.swing.table.TableModel;
   
  +import org.apache.log4j.LogManager;
  +import org.apache.log4j.UtilLoggingLevel;
  +import org.apache.log4j.chainsaw.icons.ChainsawIcons;
  +
   
   /**
    * The main entry point for Chainsaw, this class represents the first frame
  @@ -259,7 +257,7 @@
           }
         });
   
  -    tabbedPane.add("Welcome", new WelcomePanel());
  +    addWelcomePanel();
       panePanel.add(tabbedPane);
   
       getContentPane().add(toolbar, BorderLayout.NORTH);
  @@ -275,6 +273,14 @@
       setVisible(true);
     }
   
  +  void addWelcomePanel() {
  +    tabbedPane.addANewTab("Welcome", new WelcomePanel(), new ImageIcon(ChainsawIcons.ABOUT),
"Welcome/Help");
  +  }
  +  
  +  void removeWelcomePanel() {
  +    tabbedPane.removeTabAt(tabbedPane.indexOfTab("Welcome"));
  +  }
  +  
     /**
      * Shutsdown by ensuring the Appender gets a chance to close.
      */
  @@ -890,52 +896,6 @@
   
         upperPanel.add(filterText);
   
  -      //			JLabel findLabel = new JLabel("Find: ");
  -      //			gbc.gridx = 5;
  -      //			gbc.gridy = 0;
  -      //			gbc.weightx = 0;
  -      //			gridbag.setConstraints(findLabel, gbc);
  -      //			upperPanel.add(findLabel);
  -      //
  -      //			final JTextField findText = new JTextField();
  -      //
  -      //			gbc.gridx = 6;
  -      //			gbc.gridy = 0;
  -      //			gbc.weightx = 1;
  -      //			gbc.fill = GridBagConstraints.HORIZONTAL;
  -      //			gridbag.setConstraints(findText, gbc);
  -      //			findText.setToolTipText(
  -      //				"Performs a case-insensitive search across all columns");
  -      //			upperPanel.add(findText);
  -      //
  -      //			findText.getDocument().addDocumentListener(new DocumentListener() {
  -      //				public void insertUpdate(DocumentEvent e) {
  -      //					find();
  -      //				}
  -      //
  -      //				public void removeUpdate(DocumentEvent e) {
  -      //					find();
  -      //				}
  -      //
  -      //				public void changedUpdate(DocumentEvent e) {
  -      //					find();
  -      //				}
  -      //
  -      //				public void find() {
  -      //					final int row = tableModel.find(0, findText.getText());
  -      //
  -      //					if (findText.getDocument().getLength() == 0) {
  -      //						scrollToBottom.bypass(false);
  -      //					} else {
  -      //						scrollToBottom.bypass(true);
  -      //					}
  -      //
  -      //					table.scrollToRow(
  -      //						row,
  -      //						table.columnAtPoint(
  -      //							table.getVisibleRect().getLocation()));
  -      //				}
  -      //			});
         gbc.gridx = 7;
         gbc.gridy = 0;
         gbc.weightx = 0;
  @@ -1101,6 +1061,7 @@
               displayFilter.enableToolTips(menuItemToggleToolTips.isSelected());
             }
           });
  +       menuItemToggleToolTips.setIcon(new ImageIcon(ChainsawIcons.TOOL_TIP));
   
         final JMenuItem menuDefineCustomFilter =
           new JMenuItem("Custom filter from mouse location");
  @@ -1139,7 +1100,8 @@
               scrollToBottom.scroll(menuItemScrollBottom.isSelected());
             }
           });
  -
  +      menuItemScrollBottom.setIcon(new ImageIcon(ChainsawIcons.SCROLL_TO_BOTTOM));
  +      
         JMenuItem menuItemRecoverPanes = new JMenuItem("Recover closed panes");
         menuItemRecoverPanes.addActionListener(
           new ActionListener() {
  @@ -1208,43 +1170,48 @@
         final JPopupMenu p = new JPopupMenu();
   
         p.add(menuItemToggleDock);
  -
  -      JMenuItem menuItemToggleDetails = new JMenuItem("Toggle Detail Pane");
  +      p.add(new JSeparator());
  +      
  +      final JCheckBoxMenuItem menuItemToggleDetails = new JCheckBoxMenuItem("Show Detail
Pane");
         menuItemToggleDetails.addActionListener(
           new ActionListener() {
             public void actionPerformed(ActionEvent e) {
               toggleDetailPanel();
  +            menuItemToggleDetails.getModel().setSelected(isDetailPaneVisible());
             }
           });
  -
  +      menuItemToggleDetails.setIcon(new ImageIcon(ChainsawIcons.INFO));
  +      menuItemToggleDetails.getModel().setSelected(isDetailPaneVisible());
  +      menuItemToggleDetails.addChangeListener(tbms);
  +      
         p.add(menuItemToggleDetails);
  -      p.add(new JSeparator());
  +      p.add(menuItemToggleToolTips);
  +      p.add(menuItemScrollBottom);
   
  -      p.add(menuItemDisplayFilter);
  -      p.add(menuColumnDisplayFilter);
  -      p.add(menuColumnColorFilter);
         p.add(new JSeparator());
   
         p.add(menuDefineCustomFilter);
         p.add(new JSeparator());
   
  -      p.add(menuItemColumnSelector);
  -      p.add(menuItemDetailFieldSelector);
  + 
  +      p.add(menuItemDisplayFilter);
  +      p.add(menuColumnDisplayFilter);
  +      p.add(menuColumnColorFilter);
         p.add(new JSeparator());
   
  -      p.add(menuItemToggleToolTips);
  -      p.add(new JSeparator());
  +      JMenu removeSubMenu = new JMenu("Remove");
  +      JMenu selectSubMenu = new JMenu("Select");
   
  -      p.add(menuItemScrollBottom);
  -      p.add(new JSeparator());
  +      selectSubMenu.add(menuItemColumnSelector);
  +      selectSubMenu.add(menuItemDetailFieldSelector);
   
  -      p.add(menuItemRemoveColorFilter);
  -      p.add(menuItemRemoveDisplayFilter);
  -      p.add(new JSeparator());
  +      removeSubMenu.add(menuItemRemoveColorFilter);
  +      removeSubMenu.add(menuItemRemoveDisplayFilter);
  +      
  +      p.add(selectSubMenu);
  +      p.add(removeSubMenu);
   
  -      //			p.add(menuItemClear);
  -      //			p.add(new JSeparator());
  -      p.add(menuItemRecoverPanes);
  +      
   
         final PopupListener popupListener = new PopupListener(p);
   
  
  
  

---------------------------------------------------------------------
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