|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectskrueger.geotools.selection.StyledLayerSelectionModelSynchronizer<StyledFeatureLayerSelectionModel>
skrueger.geotools.selection.TableSelectionSynchronizer
public class TableSelectionSynchronizer
This class keeps the selection of a (feature) JTable
synchronized
with the StyledLayerSelectionModel
of a layer. This is done by
implementing:
PropertyChangeListener
which listens to the
StyledLayerSelectionModel
and accordingly changes the JTable
selectionListSelectionListener
which listens to the JTable
and
accordingly changes the StyledLayerSelectionModel
selectionStyledLayerSelectionModel
and the table's
ListSelectionModel
.
Field Summary | |
---|---|
protected JTable |
featureTable
Holds the table to keep synchronized with the layer selection model. |
protected FeatureCollectionTableModel |
featureTableModel
Holds the table's data. |
Fields inherited from class skrueger.geotools.selection.StyledLayerSelectionModelSynchronizer |
---|
layerSelModel, LOGGER, selectionChangeCausedByMe |
Constructor Summary | |
---|---|
TableSelectionSynchronizer(StyledFeatureLayerSelectionModel layerSelModel,
JTable table)
Creates a new synchronizer |
Method Summary | |
---|---|
void |
propertyChange(PropertyChangeEvent evt)
Called by StyledLayerSelectionModel when a the selection on other
selection components (map, chart, ...) has changed. |
void |
valueChanged(ListSelectionEvent evt)
Called when the table selection is changed by the user. |
Methods inherited from class skrueger.geotools.selection.StyledLayerSelectionModelSynchronizer |
---|
isEnabled, setEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JTable featureTable
protected FeatureCollectionTableModel featureTableModel
Constructor Detail |
---|
public TableSelectionSynchronizer(StyledFeatureLayerSelectionModel layerSelModel, JTable table)
layerSelModel
- layer selection model to keep synchronized with the feature
tabletable
- table to keep synchronized with the layer selection modelMethod Detail |
---|
public void propertyChange(PropertyChangeEvent evt)
StyledLayerSelectionModel
when a the selection on other
selection components (map, chart, ...) has changed. When calling this
method changes the table selection according to the
StyledLayerSelectionModel
selection.
propertyChange
in interface PropertyChangeListener
evt
- an eventpublic void valueChanged(ListSelectionEvent evt)
StyledLayerSelectionModel
.
valueChanged
in interface ListSelectionListener
evt
- an event
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |