Package slash.navigation.routes.impl
Class RoutesTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
slash.navigation.routes.impl.RoutesTableModel
- All Implemented Interfaces:
Serializable,TableModel
- Author:
- Christian Pesch
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRoute(RouteModel route) voiddeleteRoute(RouteModel route) intintgetIndex(RouteModel route) getRoute(int rowIndex) intgetValueAt(int rowIndex, int columnIndex) voidsetRoutes(List<RouteModel> routes) voidupdateRoute(RouteModel route) voidupdateRoutes(Collection<RouteModel> routesToUpdate) Updates several routes with a single table event so that aTableRowSorterwithsetSortsOnUpdatesre-sorts once for the whole batch instead of once per route.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Field Details
-
NAME_COLUMN
public static final int NAME_COLUMN- See Also:
-
CREATOR_COLUMN
public static final int CREATOR_COLUMN- See Also:
-
LENGTH_COLUMN
public static final int LENGTH_COLUMN- See Also:
-
DURATION_COLUMN
public static final int DURATION_COLUMN- See Also:
-
COLUMN_COUNT
public static final int COLUMN_COUNT- See Also:
-
-
Constructor Details
-
RoutesTableModel
public RoutesTableModel()
-
-
Method Details
-
setRoutes
-
getRowCount
public int getRowCount() -
getColumnCount
public int getColumnCount() -
getValueAt
-
getRoute
-
updateRoutes
Updates several routes with a single table event so that aTableRowSorterwithsetSortsOnUpdatesre-sorts once for the whole batch instead of once per route. Routes that are no longer in the model are ignored.
-