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 Fri, 02 May 2003 07:40:11 GMT
psmith      2003/05/02 00:40:11

  Modified:    src/java/org/apache/log4j/chainsaw LogUI.java
  Log:
  changed Pause checkbox/label to an Icon.
  
  Revision  Changes    Path
  1.17      +11 -8     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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- LogUI.java	2 May 2003 05:14:27 -0000	1.16
  +++ LogUI.java	2 May 2003 07:40:10 -0000	1.17
  @@ -84,6 +84,7 @@
   import javax.swing.Action;
   import javax.swing.BorderFactory;
   import javax.swing.ButtonGroup;
  +import javax.swing.ImageIcon;
   import javax.swing.JButton;
   import javax.swing.JCheckBox;
   import javax.swing.JCheckBoxMenuItem;
  @@ -117,6 +118,7 @@
   import javax.swing.table.TableModel;
   
   import org.apache.log4j.LogManager;
  +import org.apache.log4j.chainsaw.icons.ChainsawIcons;
   
   
   /**
  @@ -258,7 +260,7 @@
     private void createToolbar(FileMenu fileMenu) {
       toolbar = new JToolBar(JToolBar.HORIZONTAL);
       toolbar.setFloatable(false);
  -    toolbar.setRollover(false);
  +    toolbar.setRollover(true);
       
       Insets buttonMargins = new Insets(1,1,1,1);
       
  @@ -828,13 +830,11 @@
         final DetailThread detailThread = new DetailThread(detail, tableModel);
         detailThread.start();
   
  -      final JCheckBox cb = new JCheckBox();
         Action pauseAction = new AbstractAction("Pause") {
             boolean paused = false;
   
             public void actionPerformed(ActionEvent evt) {
               paused = !paused;
  -            cb.getModel().setSelected(paused);
               if (paused) {
                 if (!pausedList.contains(ident)) {
                   pausedList.add(ident);
  @@ -849,10 +849,13 @@
         pauseAction.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_P));
         pauseAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("F12"));
         pauseAction.putValue(Action.SHORT_DESCRIPTION, "Halts the display, while still allowing
events to stream in the background");
  +      pauseAction.putValue(Action.SMALL_ICON, new ImageIcon(ChainsawIcons.PAUSE));
   
  -      cb.setAction(pauseAction);
  -      cb.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F12"),pauseAction.getValue(Action.NAME)
);
  -      cb.getActionMap().put(pauseAction.getValue(Action.NAME), pauseAction);
  +      final JButton pauseButton = new JButton(pauseAction);
  +      pauseButton.setText("");
  +      
  +      pauseButton.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F12"),pauseAction.getValue(Action.NAME)
);
  +      pauseButton.getActionMap().put(pauseAction.getValue(Action.NAME), pauseAction);
   
         GridBagLayout gridbag = new GridBagLayout();
         GridBagConstraints gbc = new GridBagConstraints();
  @@ -863,8 +866,8 @@
         gbc.gridx = 0;
         gbc.gridy = 0;
         gbc.weightx = 0;
  -      gridbag.setConstraints(cb, gbc);
  -      upperPanel.add(cb);
  +      gridbag.setConstraints(pauseButton, gbc);
  +      upperPanel.add(pauseButton);
   
         final JLabel filterLabel = new JLabel("Filter: ");
         gbc.gridx = 1;
  
  
  

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