frysk.gui.monitor
Interface SaveableXXX

All Known Implementing Classes:
Action, ActionPoint, AddTaskObserverAction, CaptureStackTraceAction, Combo, CoreDebugDataModel, CoreDebugLogRecord, DebugProcess, Event, EventViewerWidget, EventViewerWidgetList, ExitNotificationObserver, Filter, FilterPoint, GenericAction, GenericActionPoint, GuiCoreObjectWrapper, GuiObject, GuiProc, GuiTask, IntFilter, IntFilterPoint, LiaisonItem, LiaisonPoint, LogAction, NotifyUserAction, ObservableLinkedList, ObserverRoot, PrintProc, PrintTask, PrintTaskBacktrace, ProcAction, ProcCommandLineFilter, ProcFilter, ProcFilterPoint, ProcNameFilter, ProcParentNameFilter, ProcPathFilter, ProgramObserver, Resume, RunExternal, Session, ShowMemWin, ShowRegWin, ShowSourceWin, Stop, Tag, Tagset, TaskAction, TaskActionPoint, TaskCloneObserver, TaskExecObserver, TaskFilter, TaskFilterPoint, TaskForkedObserver, TaskObserverRoot, TaskProcCommandLineFilter, TaskProcNameFilter, TaskProcParentNameFilter, TaskProcPathFilter, TaskSignaledObserver, TaskSyscallObserver, TaskTerminatingObserver, TimeLineEndEvent, TimeLineStartEvent, WatchList

public interface SaveableXXX

An iterface for objects that can be save/loaded from XML. Implementors of this object need to have a no argument constuctor to be used when it is being reconstructed from disk. The heavy lifting that would normally be in the constructor should then me moved to load().


Method Summary
 void dontSaveObject()
          object will not be saved if save is called
 void doSaveObject()
          Object will be savable if save is called
 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.
 boolean shouldSaveObject()
          queried to see if this object should be saved or not
 

Method Detail

save

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. 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 :).

Parameters:
node -

load

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. Example: Element filtersNode = node.getChild("filtersList"); this.filtersList.load(filtersNode);

Parameters:
node -

shouldSaveObject

boolean shouldSaveObject()
queried to see if this object should be saved or not

Returns:
wether this object should be saved or not

doSaveObject

void doSaveObject()
Object will be savable if save is called


dontSaveObject

void dontSaveObject()
object will not be saved if save is called