Class SourceEditor.IconPathTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.openstreetmap.josm.gui.preferences.SourceEditor.IconPathTableModel
- All Implemented Interfaces:
Serializable,TableModel
- Enclosing class:
- SourceEditor
Table model for icons paths.
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionIconPathTableModel(DefaultListSelectionModel selectionModel) Constructs a newIconPathTableModel. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an icon path.intReturns the icon paths.intgetValueAt(int rowIndex, int columnIndex) booleanisCellEditable(int rowIndex, int columnIndex) voidRemoves the selected path.voidsetIconPaths(Collection<String> paths) Sets the icons paths.voidsetValueAt(Object aValue, int rowIndex, int columnIndex) protected voidsort()Sorts paths lexicographically.voidupdatePath(int pos, String path) Updates icon path at given index.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
data
-
selectionModel
-
-
Constructor Details
-
IconPathTableModel
Constructs a newIconPathTableModel.- Parameters:
selectionModel- selection model
-
-
Method Details
-
getColumnCount
-
getRowCount
-
getValueAt
-
isCellEditable
- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
setIconPaths
Sets the icons paths.- Parameters:
paths- icons paths
-
addPath
Adds an icon path.- Parameters:
path- icon path to add
-
updatePath
Updates icon path at given index.- Parameters:
pos- positionpath- new path
-
removeSelected
Removes the selected path. -
sort
Sorts paths lexicographically. -
getIconPaths
Returns the icon paths.- Returns:
- the icon paths
-