public class FeatureSelectionModel
extends java.lang.Object
implements javax.swing.ListSelectionModel, org.gvsig.tools.observer.Observer
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
FeatureSelectionModel.FeatureSelectionOperation |
| Modifier and Type | Field and Description |
|---|---|
protected FeatureTableModel |
featureTableModel |
protected javax.swing.event.EventListenerList |
listenerList |
protected javax.swing.ListSelectionModel |
selectionModelDelegated |
| Constructor and Description |
|---|
FeatureSelectionModel(FeatureTableModel featureTableModel)
Creates a new
FeatureSelectionModel with a
FeatureTableModel used to get the Features by position in
the table. |
| Modifier and Type | Method and Description |
|---|---|
void |
addListSelectionListener(javax.swing.event.ListSelectionListener listener) |
void |
addSelectionInterval(int index0,
int index1) |
void |
clearCache() |
void |
clearSelection() |
protected void |
doWithSelection(FeatureSelectionModel.FeatureSelectionOperation operation,
int index0,
int index1,
boolean select) |
protected void |
fireValueChanged(int firstIndex,
int lastIndex,
boolean isAdjusting) |
int |
getAnchorSelectionIndex() |
protected org.gvsig.fmap.dal.feature.Feature |
getFeature(int index)
Returns a Feature by table row position.
|
int |
getLeadSelectionIndex() |
int |
getMaxSelectionIndex() |
int |
getMinSelectionIndex() |
java.lang.Iterable<org.gvsig.fmap.dal.feature.Feature> |
getSelectedFeatures() |
java.util.Iterator<org.gvsig.fmap.dal.feature.Feature> |
getSelectedFeaturesIterator() |
int |
getSelectionMode() |
boolean |
getValueIsAdjusting() |
void |
insertIndexInterval(int index,
int length,
boolean before) |
boolean |
isSelectedIndex(int index) |
boolean |
isSelectionEmpty() |
void |
removeIndexInterval(int index0,
int index1) |
void |
removeListSelectionListener(javax.swing.event.ListSelectionListener listener) |
void |
removeSelectionInterval(int index0,
int index1) |
void |
setAnchorSelectionIndex(int index) |
void |
setLeadSelectionIndex(int index) |
void |
setSelectionInterval(int index0,
int index1) |
void |
setSelectionMode(int selectionMode) |
void |
setValueIsAdjusting(boolean valueIsAdjusting) |
void |
update(org.gvsig.tools.observer.Observable observable,
java.lang.Object notification) |
protected final FeatureTableModel featureTableModel
protected javax.swing.event.EventListenerList listenerList
protected javax.swing.ListSelectionModel selectionModelDelegated
public FeatureSelectionModel(FeatureTableModel featureTableModel) throws org.gvsig.fmap.dal.exception.DataException
FeatureSelectionModel with a
FeatureTableModel used to get the Features by position in
the table.featureTableModel - to get Features fromorg.gvsig.fmap.dal.exception.DataException - if there is an error getting the store selectionpublic void addListSelectionListener(javax.swing.event.ListSelectionListener listener)
addListSelectionListener in interface javax.swing.ListSelectionModelpublic void addSelectionInterval(int index0,
int index1)
addSelectionInterval in interface javax.swing.ListSelectionModelpublic void clearCache()
public void clearSelection()
clearSelection in interface javax.swing.ListSelectionModelprotected void doWithSelection(FeatureSelectionModel.FeatureSelectionOperation operation, int index0, int index1, boolean select)
operation - index0 - index1 - select - protected void fireValueChanged(int firstIndex,
int lastIndex,
boolean isAdjusting)
firstIndex - the first index in the intervallastIndex - the last index in the intervalisAdjusting - true if this is the final change in a series of
adjustmentsEventListenerListpublic int getAnchorSelectionIndex()
getAnchorSelectionIndex in interface javax.swing.ListSelectionModelprotected org.gvsig.fmap.dal.feature.Feature getFeature(int index)
index - public int getLeadSelectionIndex()
getLeadSelectionIndex in interface javax.swing.ListSelectionModelpublic int getMaxSelectionIndex()
getMaxSelectionIndex in interface javax.swing.ListSelectionModelpublic int getMinSelectionIndex()
getMinSelectionIndex in interface javax.swing.ListSelectionModelpublic java.lang.Iterable<org.gvsig.fmap.dal.feature.Feature> getSelectedFeatures()
throws org.gvsig.fmap.dal.exception.DataException
org.gvsig.fmap.dal.exception.DataExceptionpublic java.util.Iterator<org.gvsig.fmap.dal.feature.Feature> getSelectedFeaturesIterator()
throws org.gvsig.fmap.dal.exception.DataException
org.gvsig.fmap.dal.exception.DataExceptionpublic int getSelectionMode()
getSelectionMode in interface javax.swing.ListSelectionModelpublic boolean getValueIsAdjusting()
getValueIsAdjusting in interface javax.swing.ListSelectionModelpublic void insertIndexInterval(int index,
int length,
boolean before)
insertIndexInterval in interface javax.swing.ListSelectionModelpublic boolean isSelectedIndex(int index)
isSelectedIndex in interface javax.swing.ListSelectionModelpublic boolean isSelectionEmpty()
isSelectionEmpty in interface javax.swing.ListSelectionModelpublic void removeIndexInterval(int index0,
int index1)
removeIndexInterval in interface javax.swing.ListSelectionModelpublic void removeListSelectionListener(javax.swing.event.ListSelectionListener listener)
removeListSelectionListener in interface javax.swing.ListSelectionModelpublic void removeSelectionInterval(int index0,
int index1)
removeSelectionInterval in interface javax.swing.ListSelectionModelpublic void setAnchorSelectionIndex(int index)
setAnchorSelectionIndex in interface javax.swing.ListSelectionModelpublic void setLeadSelectionIndex(int index)
setLeadSelectionIndex in interface javax.swing.ListSelectionModelpublic void setSelectionInterval(int index0,
int index1)
setSelectionInterval in interface javax.swing.ListSelectionModelpublic void setSelectionMode(int selectionMode)
setSelectionMode in interface javax.swing.ListSelectionModelpublic void setValueIsAdjusting(boolean valueIsAdjusting)
setValueIsAdjusting in interface javax.swing.ListSelectionModelpublic void update(org.gvsig.tools.observer.Observable observable,
java.lang.Object notification)
update in interface org.gvsig.tools.observer.ObserverCopyright © 2025 gvSIG Association. All rights reserved.