package com.sptci.echo2demo;

import nextapp.echo2.app.ApplicationInstance;
import nextapp.echo2.app.Window;

import com.sptci.echo2.Styles;

/**
 * The <code>ApplicationInstance</code> implementation required for
 * the <b>Echo2</b> event-driven web development framework.
 *
 * <p>Copyright 2006 Sans Pareil Technologies, Inc.</p>
 * @author Rakesh Vidyadharan 2006-01-21
 * @version $Id: Application.java,v 1.2 2006/02/15 00:47:01 rakesh Exp $
 */
public class Application extends ApplicationInstance
{
  /**
   * The <code>Window</code> instance that will be controlled by this
   * application.
   */
  private Window window;

  /**
   * The mandatory initialisation method.  Initialises {@link #window}
   * and returns it.
   *
   * @return Window The properly initialised {@link #window}.
   */
  public Window init()
  {
    setStyleSheet( Styles.DEFAULT_STYLE_SHEET );
    window = new Window();
    window.setTitle( 
        Configuration.getString( "Application.Title.Window" ) );
    window.setContent( new InputForm() );
    return window;
  }
}
