View Javadoc

1   /*
2    *  File: IViewstateSaver.java 
3    *  Copyright (c) 2004-2007  Peter Kliem (Peter.Kliem@jaret.de)
4    *  A commercial license is available, see http://www.jaret.de.
5    *
6    * All rights reserved. This program and the accompanying materials
7    * are made available under the terms of the Common Public License v1.0
8    * which accompanies this distribution, and is available at
9    * http://www.eclipse.org/legal/cpl-v10.html
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  }