frysk.gui.monitor.observers
Class ObserverRoot

java.lang.Object
  extended by frysk.gui.monitor.GuiObject
      extended by frysk.gui.monitor.observers.ObserverRoot
All Implemented Interfaces:
SaveableXXX, Observer, TaskObserver
Direct Known Subclasses:
TaskObserverRoot

public class ObserverRoot
extends GuiObject
implements TaskObserver, SaveableXXX

A more sophisticated implementer of Observer. provides name and tool tip strings for GUI display purposes. Takes Action objects that can be used by clients to customize behaviour.


Nested Class Summary
 
Nested classes/interfaces inherited from interface frysk.proc.TaskObserver
TaskObserver.Cloned, TaskObserver.Code, TaskObserver.Execed, TaskObserver.Forked, TaskObserver.Instruction, TaskObserver.Signaled, TaskObserver.Syscalls, TaskObserver.Terminated, TaskObserver.Terminating, TaskObserver.Watch
 
Field Summary
 GenericActionPoint genericActionPoint
           
 
Fields inherited from class frysk.gui.monitor.GuiObject
propertiesChanged
 
Method Summary
 void addedTo(Object observable)
          Acknowledge the request to add this Observer from Object's set of observers was successful.
 void addFailed(Object o, Throwable w)
          Notify that the attempt to add to the specified observer failed.
 void deletedFrom(Object observable)
          Acknowledge the request to delete this Observer from Object's set of observers was successful (or that the Observer was spontaneously deleted, e.g., due to a task exit).
 ObservableLinkedList getActionPoints()
           
 String getBaseName()
           
 Action getCurrentAction()
           
 ObservableLinkedList getCurrentActionCombos()
          Returns combo objects representing the currently applied actions.
 ObservableLinkedList getCurrentFilterCombos()
          Returns combo objects representing the currently applied filters.
 ObservableLinkedList getFilterPoints()
           
 String getInfo()
          Could be called by an action during the update call to get print generic information about the event that just occurred format (as currently used by logger): PID 123 did action ACTION on Host HOST
 void load(Element node)
          To load a stored property one does this: String someString = node.getAttributeValue("someString"); To load @link frysk.gui.monitor.SaveableXXX one gets the appropriet node and tells that object to load itself from that node.
 void save(Element node)
          Save object to the given node Saving Conventions: If this object has a property such as a String, char, int, etc, that is saved by using node.setAttribute("someProperty", someProperty); If this object contains composing @link frysk.gui.monitor.SaveableXXX then a node is created for that and that object is told to save itself to that node.
 void setReturnAction(Action action)
          Used to set which action is taken by the observer with respect to resuming execution of the observed thread after all the actions are executed.
 
Methods inherited from class frysk.gui.monitor.GuiObject
dontSaveObject, doSaveObject, getName, getSummary, getToolTip, setName, setSummay, setToolTip, shouldSaveObject, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface frysk.gui.monitor.SaveableXXX
dontSaveObject, doSaveObject, shouldSaveObject
 

Field Detail

genericActionPoint

public GenericActionPoint genericActionPoint
Method Detail

addFailed

public void addFailed(Object o,
                      Throwable w)
Description copied from interface: Observer
Notify that the attempt to add to the specified observer failed.

Specified by:
addFailed in interface Observer

getInfo

public String getInfo()
Could be called by an action during the update call to get print generic information about the event that just occurred format (as currently used by logger): PID 123 did action ACTION on Host HOST


getFilterPoints

public ObservableLinkedList getFilterPoints()

getActionPoints

public ObservableLinkedList getActionPoints()

getBaseName

public String getBaseName()

save

public void save(Element node)
Description copied from interface: SaveableXXX
Save object to the given node Saving Conventions: If this object has a property such as a String, char, int, etc, that is saved by using node.setAttribute("someProperty", someProperty); If this object contains composing @link frysk.gui.monitor.SaveableXXX then a node is created for that and that object is told to save itself to that node. Example: Element filtersNode = new Element("filtersList"); this.filtersList.save(filtersNode); node.addContent(filtersNode); Be careful some times one wants to save the objects name rather than the object itself, and then use the name to later recreate that object via a managers. Like observers for instance. Perhaps objects such as these should be smart enough to use a manager to save/load themselves, that way an api client doesnt have to worry ... one day :).

Specified by:
save in interface SaveableXXX
Overrides:
save in class GuiObject

load

public void load(Element node)
Description copied from interface: SaveableXXX
To load a stored property one does this: String someString = node.getAttributeValue("someString"); To load @link frysk.gui.monitor.SaveableXXX one gets the appropriet node and tells that object to load itself from that node. Example: Element filtersNode = node.getChild("filtersList"); this.filtersList.load(filtersNode);

Specified by:
load in interface SaveableXXX
Overrides:
load in class GuiObject

getCurrentFilterCombos

public ObservableLinkedList getCurrentFilterCombos()
Returns combo objects representing the currently applied filters.

Returns:
List of combos.
See Also:
Combo.

getCurrentActionCombos

public ObservableLinkedList getCurrentActionCombos()
Returns combo objects representing the currently applied actions.

Returns:
List of combos.
See Also:
Combo.

setReturnAction

public void setReturnAction(Action action)
Used to set which action is taken by the observer with respect to resuming execution of the observed thread after all the actions are executed. acceptable values are Action.BLOCK to block the process. Action.CONTINUE to continue the process. and null to pop-up a dialog and ask the user for action.


getCurrentAction

public Action getCurrentAction()

addedTo

public void addedTo(Object observable)
Description copied from interface: Observer
Acknowledge the request to add this Observer from Object's set of observers was successful.

Specified by:
addedTo in interface Observer

deletedFrom

public void deletedFrom(Object observable)
Description copied from interface: Observer
Acknowledge the request to delete this Observer from Object's set of observers was successful (or that the Observer was spontaneously deleted, e.g., due to a task exit).

Specified by:
deletedFrom in interface Observer