Package org.openstreetmap.josm.gui.io
Class SaveLayersModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- javax.swing.table.DefaultTableModel
-
- org.openstreetmap.josm.gui.io.SaveLayersModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
public class SaveLayersModel extends javax.swing.table.DefaultTableModel
Table model for theSaveLayersTable
in theSaveLayersDialog
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SaveLayersModel.Mode
The status of the editor
-
Field Summary
Fields Modifier and Type Field Description private static int
columnActions
private static int
columnFilename
private java.util.List<SaveLayerInfo>
layerInfo
private SaveLayersModel.Mode
mode
static java.lang.String
MODE_PROP
private java.beans.PropertyChangeSupport
support
-
Constructor Summary
Constructors Constructor Description SaveLayersModel()
Constructs a newSaveLayersModel
.
-
Method Summary
-
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
MODE_PROP
public static final java.lang.String MODE_PROP
-
layerInfo
private transient java.util.List<SaveLayerInfo> layerInfo
-
mode
private SaveLayersModel.Mode mode
-
support
private final java.beans.PropertyChangeSupport support
-
columnFilename
private static final int columnFilename
- See Also:
- Constant Field Values
-
columnActions
private static final int columnActions
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SaveLayersModel
public SaveLayersModel()
Constructs a newSaveLayersModel
.
-
-
Method Detail
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
-
fireModeChanged
protected void fireModeChanged(SaveLayersModel.Mode oldValue, SaveLayersModel.Mode newValue)
-
setMode
public void setMode(SaveLayersModel.Mode newValue)
-
getMode
public SaveLayersModel.Mode getMode()
-
populate
public void populate(java.util.List<? extends AbstractModifiableLayer> layers)
Populates the model with given modifiable layers.- Parameters:
layers
- The layers to use to populate this model- Since:
- 7358
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
- Overrides:
getRowCount
in classjavax.swing.table.DefaultTableModel
-
getValueAt
public java.lang.Object getValueAt(int row, int column)
- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
getValueAt
in classjavax.swing.table.DefaultTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.DefaultTableModel
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int column)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.DefaultTableModel
-
getSafeLayerInfo
public java.util.List<SaveLayerInfo> getSafeLayerInfo()
-
getLayersWithoutFilesAndSaveRequest
public java.util.List<SaveLayerInfo> getLayersWithoutFilesAndSaveRequest()
-
getLayersWithIllegalFilesAndSaveRequest
public java.util.List<SaveLayerInfo> getLayersWithIllegalFilesAndSaveRequest()
-
getLayersWithConflictsAndUploadRequest
public java.util.List<SaveLayerInfo> getLayersWithConflictsAndUploadRequest()
-
getLayersToUpload
public java.util.List<SaveLayerInfo> getLayersToUpload()
-
getLayersToSave
public java.util.List<SaveLayerInfo> getLayersToSave()
-
setUploadState
public void setUploadState(AbstractModifiableLayer layer, UploadOrSaveState state)
-
setSaveState
public void setSaveState(AbstractModifiableLayer layer, UploadOrSaveState state)
-
getSaveLayerInfo
public SaveLayerInfo getSaveLayerInfo(AbstractModifiableLayer layer)
-
resetSaveAndUploadState
public void resetSaveAndUploadState()
-
hasUnsavedData
public boolean hasUnsavedData()
-
getNumCancel
public int getNumCancel()
-
getNumFailed
public int getNumFailed()
-
-