psmith      2003/09/08 19:57:01

  Modified:    src/java/org/apache/log4j/chainsaw ReceiversPanel.java
  Log:
  seems more appropriate to have Radio buttons here, since
  the user can only select one.
  
  Revision  Changes    Path
  1.11      +9 -8      
jakarta-log4j/src/java/org/apache/log4j/chainsaw/ReceiversPanel.java
  
  Index: ReceiversPanel.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/ReceiversPanel.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ReceiversPanel.java       5 Sep 2003 06:11:11 -0000       1.10
  +++ ReceiversPanel.java       9 Sep 2003 02:57:01 -0000       1.11
  @@ -114,6 +114,7 @@
   import javax.swing.JOptionPane;
   import javax.swing.JPanel;
   import javax.swing.JPopupMenu;
  +import javax.swing.JRadioButtonMenuItem;
   import javax.swing.JScrollPane;
   import javax.swing.JTextField;
   import javax.swing.JToolBar;
  @@ -710,18 +711,18 @@
        addSeparator();
        
          final Receiver r = getCurrentlySelectedReceiver();
  -       add(createLevelCheckBoxMenuItem(r, Level.DEBUG));
  -       add(createLevelCheckBoxMenuItem(r, Level.INFO));
  -       add(createLevelCheckBoxMenuItem(r, Level.WARN));
  -       add(createLevelCheckBoxMenuItem(r, Level.ERROR));
  +       add(createLevelRadioButton(r, Level.DEBUG));
  +       add(createLevelRadioButton(r, Level.INFO));
  +       add(createLevelRadioButton(r, Level.WARN));
  +       add(createLevelRadioButton(r, Level.ERROR));
          addSeparator();
  -       add(createLevelCheckBoxMenuItem(r, Level.OFF));
  -       add(createLevelCheckBoxMenuItem(r, Level.ALL));
  +       add(createLevelRadioButton(r, Level.OFF));
  +       add(createLevelRadioButton(r, Level.ALL));
          
       }
   
   
  -     private JCheckBoxMenuItem createLevelCheckBoxMenuItem(final Receiver r, final 
Level l) {
  +     private JRadioButtonMenuItem createLevelRadioButton(final Receiver r, final 
Level l) {
                Map levelIconMap = LevelIconFactory.getInstance().getLevelToIconMap();
   
                Action action = new 
AbstractAction(l.toString(),(Icon)levelIconMap.get(l.toString())){
  @@ -733,7 +734,7 @@
                                        }
                                }
                };
  -             JCheckBoxMenuItem item = new JCheckBoxMenuItem(action);
  +             JRadioButtonMenuItem item = new JRadioButtonMenuItem(action);
                item.setSelected(r.getThreshold() == l);
                return item;
        }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to