avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craft...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/examples/src/java/org/apache/excalibur/fortress/examples/swing Main.java swing.java
Date Thu, 04 Jul 2002 12:06:58 GMT
crafterm    2002/07/04 05:06:58

  Modified:    fortress/examples/bin run.bat run.sh
  Added:       fortress/examples/src/java/org/apache/excalibur/fortress/examples/swing
                        Main.java
  Removed:     fortress/examples/src/java/org/apache/excalibur/fortress/examples/swing
                        swing.java
  Log:
  Replaced dummy swing.java class with a better Main class.
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-avalon-excalibur/fortress/examples/bin/run.bat
  
  Index: run.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/examples/bin/run.bat,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- run.bat	4 Jul 2002 09:43:24 -0000	1.3
  +++ run.bat	4 Jul 2002 12:06:57 -0000	1.4
  @@ -48,7 +48,7 @@
   
   
   set _LIBJARS=
  -for %%i in (%EXAMPLE_HOME%\..\commonlib\*.jar) do call %EXAMPLE_HOME%\bin\cpappend.bat
%%i
  +for %%i in (%EXAMPLE_HOME%\..\lib\*.jar) do call %EXAMPLE_HOME%\bin\cpappend.bat %%i
   if not "%_LIBJARS%" == "" goto run
   
   echo Unable to set CLASSPATH dynamically.
  @@ -58,6 +58,6 @@
   set CP=%CP%%_LIBJARS%
   
   rem Run the example application
  -%EXAMPLE_JAVACMD% -Djava.compiler="NONE" -classpath "%CP%" org.apache.excalibur.fortress.examples.simple.simple
%1 %2 %3 %4 %5 %6 %7 %8 %9
  +%EXAMPLE_JAVACMD% -Djava.compiler="NONE" -classpath "%CP%" org.apache.excalibur.fortress.examples.simple.Main
%1 %2 %3 %4 %5 %6 %7 %8 %9
   
   :end
  
  
  
  1.3       +1 -1      jakarta-avalon-excalibur/fortress/examples/bin/run.sh
  
  Index: run.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/examples/bin/run.sh,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- run.sh	4 Jul 2002 09:43:24 -0000	1.2
  +++ run.sh	4 Jul 2002 12:06:57 -0000	1.3
  @@ -37,5 +37,5 @@
   echo $CP
   
   # Run the example application
  -$JAVACMD -classpath $CP org.apache.excalibur.fortress.examples.swing.swing $@
  +$JAVACMD -classpath $CP org.apache.excalibur.fortress.examples.swing.Main $@
   
  
  
  
  1.1                  jakarta-avalon-excalibur/fortress/examples/src/java/org/apache/excalibur/fortress/examples/swing/Main.java
  
  Index: Main.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.excalibur.fortress.examples.swing;
  
  import org.apache.avalon.framework.component.ComponentManager;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
  import org.apache.avalon.framework.context.Context;
  import org.apache.avalon.framework.context.DefaultContext;
  import org.apache.avalon.framework.logger.LogKitLogger;
  import org.apache.avalon.framework.logger.Logger;
  import org.apache.excalibur.fortress.Container;
  import org.apache.excalibur.fortress.ContainerManager;
  import org.apache.excalibur.fortress.DefaultContainerManager;
  import org.apache.excalibur.fortress.util.ContextBuilder;
  import org.apache.excalibur.fortress.util.ContextManager;
  
  /**
   * Fortress container example.
   *
   * @author <a href="mailto:crafterm@apache.org">Marcus Crafter</a>
   * @version $Id: Main.java,v 1.1 2002/07/04 12:06:57 crafterm Exp $
   */
  public final class Main
  {
      // container reference
      private static Container m_container;
  
      /**
       * Start the show. Creates a <code>SwingContainer</code>.
       *
       * @param args a <code>String[]</code> array of command line arguments
       * @exception Exception if an error occurs
       */
      public static void main( String[] args )
          throws Exception
      {
          ContextBuilder contextBuilder = new ContextBuilder();
          contextBuilder.setContainerClass( "org.apache.excalibur.fortress.examples.swing.SwingContainer"
);
          contextBuilder.setContextDirectory( "./" );
          contextBuilder.setWorkDirectory( "./" );
          contextBuilder.setContainerConfiguration( "resource://org/apache/excalibur/fortress/examples/swing/SwingContainer.xconf"
);
          contextBuilder.setLoggerManagerConfiguration( "resource://org/apache/excalibur/fortress/examples/swing/SwingContainer.xlog"
);
          contextBuilder.setRoleManagerConfiguration( "resource://org/apache/excalibur/fortress/examples/swing/SwingContainer.roles"
);
  
          ContextManager contextManager = new ContextManager( contextBuilder.getContext(),
null );
          contextManager.initialize();
  
          ContainerManager cm = new DefaultContainerManager( contextManager );
          cm.initialize();
  
          m_container = ( Container ) cm.getContainer();
      }
  }
  
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message