Class MapPaintDialog.StylesModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.openstreetmap.josm.gui.dialogs.MapPaintDialog.StylesModel
-
- All Implemented Interfaces:
Serializable
,TableModel
,MapPaintStyles.MapPaintStylesUpdateListener
- Enclosing class:
- MapPaintDialog
protected class MapPaintDialog.StylesModel extends AbstractTableModel implements MapPaintStyles.MapPaintStylesUpdateListener
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Class<?>[]
columnClasses
private List<StyleSource>
data
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description StylesModel()
Constructs a newStylesModel
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
ensureSelectedIsVisible()
Make sure the first of the selected entry is visible in the views of this model.Class<?>
getColumnClass(int column)
int
getColumnCount()
private StyleSource
getRow(int i)
int
getRowCount()
Object
getValueAt(int row, int column)
boolean
isCellEditable(int row, int column)
void
mapPaintStyleEntryUpdated(int idx)
Called whenever a single style source entry was changed.void
mapPaintStylesUpdated()
Called on any style source changes that are not handled byMapPaintStyles.MapPaintStylesUpdateListener.mapPaintStyleEntryUpdated(int)
void
setValueAt(Object aValue, int row, int column)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
columnClasses
private final Class<?>[] columnClasses
-
data
private transient List<StyleSource> data
-
-
Constructor Detail
-
StylesModel
public StylesModel()
Constructs a newStylesModel
.
-
-
Method Detail
-
getRow
private StyleSource getRow(int i)
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTableModel
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfaceTableModel
-
getValueAt
public Object getValueAt(int row, int column)
- Specified by:
getValueAt
in interfaceTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column)
- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
getColumnClass
public Class<?> getColumnClass(int column)
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
-
setValueAt
public void setValueAt(Object aValue, int row, int column)
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-
ensureSelectedIsVisible
public void ensureSelectedIsVisible()
Make sure the first of the selected entry is visible in the views of this model.
-
mapPaintStylesUpdated
public void mapPaintStylesUpdated()
Description copied from interface:MapPaintStyles.MapPaintStylesUpdateListener
Called on any style source changes that are not handled byMapPaintStyles.MapPaintStylesUpdateListener.mapPaintStyleEntryUpdated(int)
- Specified by:
mapPaintStylesUpdated
in interfaceMapPaintStyles.MapPaintStylesUpdateListener
-
mapPaintStyleEntryUpdated
public void mapPaintStyleEntryUpdated(int idx)
Description copied from interface:MapPaintStyles.MapPaintStylesUpdateListener
Called whenever a single style source entry was changed.- Specified by:
mapPaintStyleEntryUpdated
in interfaceMapPaintStyles.MapPaintStylesUpdateListener
- Parameters:
idx
- The index of the entry.
-
-