logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psm...@apache.org
Subject cvs commit: logging-log4j/src/java/org/apache/log4j/chainsaw CommonActions.java
Date Fri, 14 May 2004 02:41:26 GMT
psmith      2004/05/13 19:41:26

  Added:       src/java/org/apache/log4j/chainsaw CommonActions.java
  Log:
  Added a CommonActions class to hold some Common actions.  Haven't moved any here yet, but
hope to
  to make some of the source a bit easier to read.
  
  Revision  Changes    Path
  1.1                  logging-log4j/src/java/org/apache/log4j/chainsaw/CommonActions.java
  
  Index: CommonActions.java
  ===================================================================
  package org.apache.log4j.chainsaw;
  
  import java.awt.event.ActionEvent;
  
  import javax.swing.AbstractAction;
  import javax.swing.Action;
  
  import org.apache.log4j.chainsaw.help.HelpManager;
  
  
  /**
   * @author psmith
   *
   */
  class CommonActions
  {
      private static CommonActions instance = null;
      private static Action SHOW_RELEASE_NOTE; 
      
      
      private void initActions() {
          SHOW_RELEASE_NOTE = new AbstractAction("Release Notes") {
  
              public void actionPerformed(ActionEvent e)
              {
                  HelpManager.getInstance().setHelpURL(ChainsawConstants.RELEASE_NOTES_URL);
                  
              }};
      }
      
      static synchronized CommonActions getInstance() {
          if(instance==null) {
              instance = new CommonActions();
          }
          return instance;
      }
      
      /**
       * 
       */
      private CommonActions()
      {
          initActions();
      }
  
      /**
       * @return
       */
      public Action getShowReleaseNotes()
      {
          return SHOW_RELEASE_NOTE;
      }
  
  }
  
  
  

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


Mime
View raw message