1 /***
2 * TableColumnModelMemento.java
3 *
4 * This file is part of the creme library.
5 * The creme library intends to ease the development effort of large
6 * applications by providing easy to use support classes.
7 *
8 * Copyright (C) 2003 Denis Bregeon
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 * contact information: dbregeon@sourceforge.net
25 */
26 package org.jcreme.swing.table.state;
27
28 import javax.swing.table.TableColumnModel;
29
30 import org.jcreme.state.Memento;
31
32 /***
33 *
34 * @author $Author: dbregeon $
35 * @version $Revision: 1.2 $
36 */
37 public interface TableColumnModelMemento extends Memento {
38 /***
39 * This method enables to set the TableColumnModel for which this Memento
40 * will record the state.
41 *
42 * @param model
43 * the TableColumnModel to remember.
44 * @throws IllegalArgumentException
45 * if the provided model is not supported by this instance.
46 */
47 public void setTableColumnModel(TableColumnModel model)
48 throws IllegalArgumentException;
49
50 /***
51 * This method enables to recover a TableColumnModel that matches the data
52 * stored in this Memento.
53 *
54 * @param model
55 * the current TableColumnModel. It is used to remove columns
56 * that do not exist anymore or to add new columns.
57 * @return The TableColumnModel remembered by the Memento.
58 */
59 public TableColumnModel getTableColumnModel(TableColumnModel model);
60 }