package nl.tudelft.simulation.introspection.table; import javax.swing.table.TableModel; /** * An interface that defines methods for adding and deleting rows from a tablemodel. *

* copyright (c) 2002-2018 Delft University of Technology.
* BSD-style license. See DSOL License.
* @author Peter Jacobs. * @author Alexander Verbraeck. * @author Niels Lang. * @since 1.5 */ public interface DynamicTableModel extends TableModel { /** * Deletes a specific row from the TableModel. * @param index The (TableModel) index of the row to be deleted */ void deleteRow(int index); /** * Deletes a specific set of rows from the TableModel. * @param indices The (TableModel) indices of the rows to be deleted */ void deleteRows(int[] indices); /** * Creates a new row at the end of the TableModel. */ void createRow(); /** * Creates a number of new rows at the end of the TableModel * @param amount The number of rows to be created. */ void createRows(int amount); /** * @return whether or not the rows in this model can be edited. If false, calls to create and delete methods will * have no final result. */ public boolean isRowEditable(); }