psmith      2003/06/17 18:55:41

  Modified:    src/java/org/apache/log4j/chainsaw FileSaveAction.java
                        FileLoadAction.java ChainsawToolBarAndMenus.java
                        FileMenu.java
  Log:
  Changes so that a couple of other GUI elements got notified
  of the L&F change.
  
  Also changed File load/save action to include the "..." text indicating
  that it takes you to another window/dialog as per L&F standards.
  
  Revision  Changes    Path
  1.8       +7 -2      
jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/FileSaveAction.java
  
  Index: FileSaveAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/FileSaveAction.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FileSaveAction.java       17 Jun 2003 20:06:50 -0000      1.7
  +++ FileSaveAction.java       18 Jun 2003 01:55:41 -0000      1.8
  @@ -71,6 +71,7 @@
   import javax.swing.ImageIcon;
   import javax.swing.JFileChooser;
   import javax.swing.KeyStroke;
  +import javax.swing.SwingUtilities;
   
   
   /**
  @@ -91,7 +92,7 @@
      *
      */
     public FileSaveAction(LogUI parent) {
  -    super("Save");
  +    super("Save...");
   
       Thread chooserConstructionThread =
         new Thread(
  @@ -119,7 +120,11 @@
       putValue(Action.SMALL_ICON, new ImageIcon(ChainsawIcons.FILE_SAVE_AS));
       this.parent = parent;
     }
  -
  +  
  +  void lookAndFeelUpdated() {
  +    SwingUtilities.updateComponentTreeUI(chooser);
  +  }
  +  
     /*
      * When the user chooses the Save action,
      * a File chooser is presented to allow them to
  
  
  
  1.10      +4 -0      
jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/FileLoadAction.java
  
  Index: FileLoadAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/FileLoadAction.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FileLoadAction.java       17 Jun 2003 20:06:50 -0000      1.9
  +++ FileLoadAction.java       18 Jun 2003 01:55:41 -0000      1.10
  @@ -68,6 +68,7 @@
   import javax.swing.ImageIcon;
   import javax.swing.JFileChooser;
   import javax.swing.KeyStroke;
  +import javax.swing.SwingUtilities;
   import javax.swing.filechooser.FileFilter;
   
   
  @@ -187,5 +188,8 @@
           e1.printStackTrace();
         }
       }
  +  }
  +  void lookAndFeelUpdated() {
  +    SwingUtilities.updateComponentTreeUI(chooser);
     }
   }
  
  
  
  1.40      +1 -0      
jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java
  
  Index: ChainsawToolBarAndMenus.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- ChainsawToolBarAndMenus.java      18 Jun 2003 01:43:13 -0000      1.39
  +++ ChainsawToolBarAndMenus.java      18 Jun 2003 01:55:41 -0000      1.40
  @@ -412,6 +412,7 @@
   
     void lookAndFeelUpdated() {
       SwingUtilities.updateComponentTreeUI(receiversWindow);
  +    fileMenu.lookAndFeelUpdated();
     }
   
     private Action createClearAction() {
  
  
  
  1.10      +8 -2      
jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/FileMenu.java
  
  Index: FileMenu.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/FileMenu.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FileMenu.java     3 Jun 2003 06:32:58 -0000       1.9
  +++ FileMenu.java     18 Jun 2003 01:55:41 -0000      1.10
  @@ -35,8 +35,8 @@
       super("File");
       setMnemonic(KeyEvent.VK_F);
       
  -    loadLog4JAction = new FileLoadAction(logUI, "org.apache.log4j.xml.XMLDecoder", 
"Load Log4J File");
  -    loadUtilLoggingAction = new FileLoadAction(logUI, 
"org.apache.log4j.xml.UtilLoggingXMLDecoder", "Load Java Util File");
  +    loadLog4JAction = new FileLoadAction(logUI, "org.apache.log4j.xml.XMLDecoder", 
"Load Log4J File...");
  +    loadUtilLoggingAction = new FileLoadAction(logUI, 
"org.apache.log4j.xml.UtilLoggingXMLDecoder", "Load Java Util File...");
       saveAction = new FileSaveAction(logUI);
       
       JMenuItem loadLog4JFile = new JMenuItem(loadLog4JAction);
  @@ -62,6 +62,12 @@
       add(saveFile);
       add(new JSeparator());
       add(menuItemExit);
  +  }
  +  
  +  void lookAndFeelUpdated() {
  +    ((FileSaveAction)saveAction).lookAndFeelUpdated();
  +    ((FileLoadAction)loadLog4JAction).lookAndFeelUpdated();
  +    ((FileLoadAction)loadUtilLoggingAction).lookAndFeelUpdated();
     }
     
     Action getLog4JFileOpenAction() { return loadLog4JAction;}
  
  
  

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

Reply via email to