net.sourceforge.spark.framework
Class Atom

java.lang.Object
  extended bynet.sourceforge.spark.framework.Widget
      extended bynet.sourceforge.spark.framework.Atom
All Implemented Interfaces:
CommandHolder, org.w3c.dom.events.EventListener, Subject

public abstract class Atom
extends Widget
implements Subject

The Atom class is a widget type that may contain no other widgets. It is the most basic and primitive widget type. It is generally contained within a Container widget class.

An example of an Atom widget is a Radiobutton.

The Atom widget implements the Subject interface.

$Source: /cvsroot/spark/spark/source/java/net/sourceforge/spark/framework/Atom.java,v $
 $Log: Atom.java,v $
 Revision 1.2  2005/07/24 04:03:28  afettes
 no message

 Revision 1.1  2005/07/24 03:55:32  afettes
 Initial commit to CVS.
 

Version:
$Revision: 1.2 $ - $Date: 2005/07/24 04:03:28 $
Author:
$Author: afettes $, Alastair Fettes
See Also:
Widget, Subject, Observer

Field Summary
private  java.util.Vector m_vpObservers
          List of this atoms Observers.
 
Fields inherited from class net.sourceforge.spark.framework.Widget
ID, TYPE
 
Constructor Summary
Atom(java.lang.String id, java.lang.String type)
          Create a new Atom object with the given id.
 
Method Summary
 void attach(Observer in_observer)
          The observer to be attached.
 void detach(Observer in_observer)
          The observer to be detached.
protected  void notifyObservers()
          Notify all observers of the state change.
 
Methods inherited from class net.sourceforge.spark.framework.Widget
addCommand, getState, handleEvent, removeCommand, runCommands, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_vpObservers

private java.util.Vector m_vpObservers
List of this atoms Observers.

Constructor Detail

Atom

public Atom(java.lang.String id,
            java.lang.String type)
Create a new Atom object with the given id.

Parameters:
id - The id for the widget.
Method Detail

attach

public void attach(Observer in_observer)
The observer to be attached. It will now be observering this subject.

Specified by:
attach in interface Subject
Parameters:
in_observer - The observer to add.

detach

public void detach(Observer in_observer)
The observer to be detached. It will no longer be observering this subject.

Specified by:
detach in interface Subject
Parameters:
in_observer - The observer to remove.

notifyObservers

protected void notifyObservers()
Notify all observers of the state change.