de.jaret.util.ui.timebars.addon
Interface IViewstateSaver

All Known Implementing Classes:
ViewstateSaver

public interface IViewstateSaver

Interface for a service saving and restoring the viewstate of a timebarviewer. When dealing with hierarchical models a HierarchyIdService is needed for identifying the nodes.

Version:
$Id: IViewstateSaver.java 340 2007-04-02 21:52:03Z olk $
Author:
kliem

Method Summary
 void restoreViewstate(de.jaret.util.ui.timebars.swt.TimeBarViewer timeBarViewer, IHierarchyIdService idService, java.lang.String id, org.eclipse.ui.IMemento memento)
          Restore the viewstate.
 void saveViewstate(de.jaret.util.ui.timebars.swt.TimeBarViewer timeBarViewer, IHierarchyIdService idService, java.lang.String id, org.eclipse.ui.IMemento memento)
          Save the viewstate.
 

Method Detail

saveViewstate

void saveViewstate(de.jaret.util.ui.timebars.swt.TimeBarViewer timeBarViewer,
                   IHierarchyIdService idService,
                   java.lang.String id,
                   org.eclipse.ui.IMemento memento)
Save the viewstate. Previously saved state will be overwritten.

Parameters:
timeBarViewer - viewer to save state of
idService - HierarchyIdService needed when handling hierarchical models. May be null when dealing with a flat model
id - id used to create a child memento when not null
memento - memento to write to

restoreViewstate

void restoreViewstate(de.jaret.util.ui.timebars.swt.TimeBarViewer timeBarViewer,
                      IHierarchyIdService idService,
                      java.lang.String id,
                      org.eclipse.ui.IMemento memento)
Restore the viewstate. Will not fail if no state can be found in the memento.

Parameters:
timeBarViewer - viewer to restore state of
idService - HierarchyIdService needed when handling hierarchical models. May be null when dealing with a flat model
id - id of a child memento to read from. May be null.
memento - memento to read from


Copyright © 2012. All Rights Reserved.