1
2
3
4
5
6
7
8
9
10
11 package de.jaret.util.ui.table.addon;
12
13 import org.eclipse.ui.IMemento;
14
15 import de.jaret.util.ui.table.JaretTable;
16
17 /***
18 * Interface describing a service to store the viewstate of a jaret table in an IMemento, thus alowing easy save/restore
19 * of changes to the viewstate made by the user.
20 *
21 * @author Peter Kliem
22 * @version $Id: IViewstateSaver.java 341 2007-04-03 21:04:08Z olk $
23 */
24 public interface IViewstateSaver {
25 /***
26 * Save the viewstate of a jaret table.
27 *
28 * @param jaretTable table to save the viewstate of
29 * @param id additional id for structuring (may be <code>null</code> if not needed)
30 * @param memento memento to store the viewstate in
31 */
32 void saveViewstate(JaretTable jaretTable, String id, IMemento memento);
33
34 /***
35 * Restore the viewstate of a table.
36 *
37 * @param jaretTable table to set the viewstate on
38 * @param id additional id (may be <code>null</code>)
39 * @param memento memento to read from
40 */
41 void restoreViewstate(JaretTable jaretTable, String id, IMemento memento);
42
43 }