ix.ip2
Class ObjectWhiteboard

java.lang.Object
  extended by ix.ip2.ObjectWhiteboard
All Implemented Interfaces:
ProcessStatusListener, StateViewer, java.util.EventListener

public class ObjectWhiteboard
extends java.lang.Object
implements StateViewer


Constructor Summary
  ObjectWhiteboard(Ip2 ip2)
          Create a viewer for the indicated agent.
protected ObjectWhiteboard(Ip2 ip2, java.util.SortedMap nameToViews)
          Create a viewer for the indicated agent with references to any existing views.
 
Method Summary
 ObjectView getObjectView()
           
 ObjectView getObjectView(java.lang.String name)
           
 java.awt.Component getView(PanelFrame panelFrame)
          Return the GUI component that should be placed in the agent's main user-interface frame.
 void newBindings(ProcessStatusEvent event, java.util.Map bindings)
          Ignored by this viewer.
 java.util.SortedMap readViews(java.lang.String directoryName)
          Tries to read an ObjectView from each file in the indicated directory that might contain one.
 void reset()
          Sets the viewer back to its initial state (or a reasonable approximation).
 void setObjectView(ObjectView view)
           
 void setObjectView(java.lang.String name)
           
 void setVisible(boolean v)
           
 void stateChange(ProcessStatusEvent event, java.util.Map delta)
           
 void stateDeletion(ProcessStatusEvent event, java.util.Map delta)
           
 void statusUpdate(ProcessStatusEvent event)
          Ignored by this viewer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectWhiteboard

public ObjectWhiteboard(Ip2 ip2)
Create a viewer for the indicated agent.


ObjectWhiteboard

protected ObjectWhiteboard(Ip2 ip2,
                           java.util.SortedMap nameToViews)
Create a viewer for the indicated agent with references to any existing views.

Method Detail

setVisible

public void setVisible(boolean v)

getView

public java.awt.Component getView(PanelFrame panelFrame)
Description copied from interface: StateViewer
Return the GUI component that should be placed in the agent's main user-interface frame. The frame is passed as a parameter in case different objects must be returned for different frame classes.

Specified by:
getView in interface StateViewer

reset

public void reset()
Description copied from interface: StateViewer
Sets the viewer back to its initial state (or a reasonable approximation).

Specified by:
reset in interface StateViewer

statusUpdate

public void statusUpdate(ProcessStatusEvent event)
Ignored by this viewer.

Specified by:
statusUpdate in interface ProcessStatusListener

newBindings

public void newBindings(ProcessStatusEvent event,
                        java.util.Map bindings)
Ignored by this viewer.

Specified by:
newBindings in interface ProcessStatusListener

stateChange

public void stateChange(ProcessStatusEvent event,
                        java.util.Map delta)
Specified by:
stateChange in interface ProcessStatusListener

stateDeletion

public void stateDeletion(ProcessStatusEvent event,
                          java.util.Map delta)
Specified by:
stateDeletion in interface ProcessStatusListener

getObjectView

public ObjectView getObjectView()

getObjectView

public ObjectView getObjectView(java.lang.String name)

setObjectView

public void setObjectView(java.lang.String name)

setObjectView

public void setObjectView(ObjectView view)

readViews

public java.util.SortedMap readViews(java.lang.String directoryName)
Tries to read an ObjectView from each file in the indicated directory that might contain one. If any view does not have a name, it is given the name of the corresponding file. View names must be unique within the directory. Returns a map from names to ObjectViews.