// Copyright 2001-2005, Danger, Inc.  All Rights Reserved.
// This file is subject to the Danger, Inc. Sample Code License,
// which is provided in the file SAMPLE_CODE_LICENSE.
// Copies are also available from http://developer.danger.com/

/*
	Todo: Rename the package for your application.
	This package name should be replaced with your company domain
    (ie. com.danger for applications Danger writes).
	To do this you need to:
	1. Move all the java source files from com/example to the new path.
	2. Change the package declaration in all the java source files.
	3. Change the package declaration in all the .rsrc files.
	3. Change the path in the interface and events declarations in all the .rsrc files.
*/
package com.example.helloworld;

import danger.app.Application;
import danger.util.DEBUG;

/**
 * Implements the main application class.
 */
public class HelloWorld
		extends Application
		implements Resources, Commands {
	static private MainWindow mWindow;

	//*	--------------------	helloworld

	/**
	 * Creates the main application class.
	 */
	public HelloWorld() {
		//	Create our application's main window
		mWindow = new MainWindow();

		// Set its title.
		mWindow.setTitle(getString(ID_STRING_HELLO_WORLD));
        mWindow.setSubTitle(getString(ID_VERSION));
 
		// Show it (make if visible).
		mWindow.show();

		System.err.println("Use this to print debug messages...");
		DEBUG.p("Another way to print debug messages...");
	}


	//*	--------------------	launch

	/**
	 * Handles the launch event. Called once whenever the application is
	 * launched.
	 */
	public void launch() {
		DEBUG.p("HelloWorld: launch");
	}

	//*	--------------------	resume

	/**
	 * Handles the resume event. Called automatically whenever the
	 * application is resumed.
	 */
	public void resume() {
		DEBUG.p("HelloWorld: resume");
	}

	//*	--------------------	Suspend

	/**
	 * Handles the Suspend event. Called automatically whenever the
	 * application is suspended.
	 */
	public void suspend() {
		DEBUG.p("Helloworld: suspend");
	}
}
