1
2
3
4
5
6
7 package nl.tudelft.simulation.introspection.table;
8
9 import javax.swing.table.TableModel;
10
11 /***
12 * An interface that defines methods for adding and deleting rows from a
13 * tablemodel.
14 * <p>
15 * (c) copyright 2002-2005-2004 <a href="http://www.simulation.tudelft.nl">Delft
16 * University of Technology </a>, the Netherlands. <br>
17 * See for project information <a
18 * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
19 * License of use: <a href="http://www.gnu.org/copyleft/lesser.html">Lesser
20 * General Public License (LGPL) </a>, no warranty.
21 *
22 * @author <a
23 * href="http://web.eur.nl/fbk/dep/dep1/Introduction/Staff/People/Lang">Niels
24 * Lang </a><a href="http://www.peter-jacobs.com/index.htm">Peter
25 * Jacobs </a>
26 * @version 1.1 Apr 15, 2004
27 * @since 1.5
28 */
29 public interface DynamicTableModel extends TableModel
30 {
31 /***
32 * Deletes a specific row from the TableModel.
33 *
34 * @param index The (TableModel) index of the row to be deleted
35 */
36 void deleteRow(int index);
37
38 /***
39 * Deletes a specific set of rows from the TableModel.
40 *
41 * @param indices The (TableModel) indices of the rows to be deleted
42 */
43 void deleteRows(int[] indices);
44
45 /***
46 * Creates a new row at the end of the TableModel.
47 */
48 void createRow();
49
50 /***
51 * Creates a number of new rows at the end of the TableModel
52 *
53 * @param amount The number of rows to be created.
54 */
55 void createRows(int amount);
56
57 /***
58 * @return whether or not the rows in this model can be edited. If false,
59 * calls to create and delete methods will have no final result.
60 */
61 public boolean isRowEditable();
62 }