one.toys
Class Counter2

java.lang.Object
  |
  +--one.world.core.Component
        |
        +--one.gui.Application
              |
              +--one.toys.Counter2
All Implemented Interfaces:
Serializable

public final class Counter2
extends Application

Implementation of a counter. This class is a re-implementation of the counter application discussed in the one.world tutorial. Unlike the original counter, it uses the synchronous timer interface and the application base class, which greatly simplifies this re-implementation.

Usage:

    Counter2
 

Version:
$Revision: 1.4 $
See Also:
Timer, Application, Serialized Form

Inner classes inherited from class one.gui.Application
Application.Window
 
Inner classes inherited from class one.world.core.Component
Component.HandlerReference, Component.Importer
 
Fields inherited from class one.gui.Application
ACTIVATING, ACTIVE, appName, height, INACTIVE, locationX, locationY, lock, main, mainWindow, operation, request, status, timer, width
 
Constructor Summary
Counter2(Environment env)
          Create a new instance of Counter2.
 
Method Summary
 void acquire()
          Acquire the resources needed by the counter application.
 Application.Window createMainWindow()
          Create the counter's main window.
static void init(Environment env, Object closure)
          Initialize the counter.
 void release()
          Release the resources used by the counter application.
 
Methods inherited from class one.gui.Application
createMainHandler, getDescriptor, signalError, start, stop
 
Methods inherited from class one.world.core.Component
declareExported, declareImported, equals, eventHandlers, getDescriptor, getEnvironment, getLinkedHandlers, getLinkedNumber, getTimer, hasEventHandler, hashCode, isFullyLinked, isLinked, isSealed, link, link, run, seal, unbox, undeclare, unlink, wrap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Counter2

public Counter2(Environment env)
Create a new instance of Counter2.
Parameters:
env - The environment for the new instance.
Method Detail

acquire

public void acquire()
Acquire the resources needed by the counter application.
Overrides:
acquire in class Application

release

public void release()
Release the resources used by the counter application.
Overrides:
release in class Application

createMainWindow

public Application.Window createMainWindow()
Create the counter's main window.
Overrides:
createMainWindow in class Application
Following copied from class: one.gui.Application
Returns:
The application's main window, or null if the application does not have a main window.

init

public static void init(Environment env,
                        Object closure)
Initialize the counter.
Parameters:
env - The environment.
closure - The closure, which is ignored.


(C) Copyright 2001 UW CSE