|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.openstreetmap.josm.gui.dialogs.relation.SelectionTableModel
public class SelectionTableModel
| Field Summary | |
|---|---|
private java.util.ArrayList<OsmPrimitive> |
cache
|
private OsmDataLayer |
layer
this selection table model only displays selected primitives in this layer |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
SelectionTableModel(OsmDataLayer layer)
constructor |
|
| Method Summary | |
|---|---|
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed. |
int |
getColumnCount()
|
OsmPrimitive |
getPrimitive(int row)
Replies the primitive at row row in this model |
int |
getRowCount()
|
java.util.List<OsmPrimitive> |
getSelection()
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
void |
layerAdded(Layer newLayer)
Notifies this listener that a layer has been added. |
void |
layerRemoved(Layer oldLayer)
Notifies this listener that a layer has been removed. |
protected void |
populateSelectedPrimitives(OsmDataLayer layer)
populates the model with the primitives currently selected in layer |
void |
register()
|
void |
selectionChanged(java.util.Collection<? extends OsmPrimitive> newSelection)
Informs the listener that the selection in the dataset has changed. |
void |
unregister()
|
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private OsmDataLayer layer
private java.util.ArrayList<OsmPrimitive> cache
| Constructor Detail |
|---|
public SelectionTableModel(OsmDataLayer layer)
throws java.lang.IllegalArgumentException
layer - the data layer. Must not be null.
java.lang.IllegalArgumentException - thrown if layer is null| Method Detail |
|---|
public void register()
public void unregister()
public int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelpublic int getRowCount()
getRowCount in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModel
public void activeLayerChange(Layer oldLayer,
Layer newLayer)
MapView.LayerChangeListener
activeLayerChange in interface MapView.LayerChangeListeneroldLayer - The previous active layernewLayer - The new activer layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded in interface MapView.LayerChangeListenernewLayer - The new added layerpublic void layerRemoved(Layer oldLayer)
MapView.LayerChangeListener
layerRemoved in interface MapView.LayerChangeListeneroldLayer - The old removed layerpublic void selectionChanged(java.util.Collection<? extends OsmPrimitive> newSelection)
SelectionChangedListener
selectionChanged in interface SelectionChangedListenernewSelection - The new selection.public java.util.List<OsmPrimitive> getSelection()
protected void populateSelectedPrimitives(OsmDataLayer layer)
layer
layer - the data layerpublic OsmPrimitive getPrimitive(int row)
row in this model
row - the row
row in this model
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||