Class FeatureSelectionModel
java.lang.Object
org.gvsig.fmap.dal.swing.impl.featuretable.FeatureSelectionModel
- All Implemented Interfaces:
ListSelectionModel,org.gvsig.tools.observer.Observer
public class FeatureSelectionModel
extends Object
implements ListSelectionModel, org.gvsig.tools.observer.Observer
- Author:
- 2010- César Ordiñana - gvSIG team
-
Field Summary
FieldsFields inherited from interface javax.swing.ListSelectionModel
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION -
Constructor Summary
ConstructorsConstructorDescriptionFeatureSelectionModel(org.gvsig.fmap.dal.swing.FeatureTableModel featureTableModel) Creates a newFeatureSelectionModelwith aFeatureTableModelused to get theFeatures by position in the table. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddSelectionInterval(int index0, int index1) voidprotected voidfireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting) intintintintintbooleanvoidinsertIndexInterval(int index, int length, boolean before) booleanisSelectedIndex(int index) booleanvoidremoveIndexInterval(int index0, int index1) voidvoidremoveSelectionInterval(int index0, int index1) voidsetAnchorSelectionIndex(int index) voidsetLeadSelectionIndex(int index) voidsetSelectionInterval(int index0, int index1) voidsetSelectionMode(int selectionMode) voidsetValueIsAdjusting(boolean valueIsAdjusting) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.swing.ListSelectionModel
getSelectedIndices, getSelectedItemsCount
-
Field Details
-
listenerList
-
-
Constructor Details
-
FeatureSelectionModel
public FeatureSelectionModel(org.gvsig.fmap.dal.swing.FeatureTableModel featureTableModel) Creates a newFeatureSelectionModelwith aFeatureTableModelused to get theFeatures by position in the table.- Parameters:
featureTableModel- to get Features from- Throws:
org.gvsig.fmap.dal.exception.DataException- if there is an error getting the store selection
-
-
Method Details
-
getAnchorSelectionIndex
public int getAnchorSelectionIndex()- Specified by:
getAnchorSelectionIndexin interfaceListSelectionModel
-
getLeadSelectionIndex
public int getLeadSelectionIndex()- Specified by:
getLeadSelectionIndexin interfaceListSelectionModel
-
getMaxSelectionIndex
public int getMaxSelectionIndex()- Specified by:
getMaxSelectionIndexin interfaceListSelectionModel
-
getMinSelectionIndex
public int getMinSelectionIndex()- Specified by:
getMinSelectionIndexin interfaceListSelectionModel
-
insertIndexInterval
public void insertIndexInterval(int index, int length, boolean before) - Specified by:
insertIndexIntervalin interfaceListSelectionModel
-
removeIndexInterval
public void removeIndexInterval(int index0, int index1) - Specified by:
removeIndexIntervalin interfaceListSelectionModel
-
setAnchorSelectionIndex
public void setAnchorSelectionIndex(int index) - Specified by:
setAnchorSelectionIndexin interfaceListSelectionModel
-
setLeadSelectionIndex
public void setLeadSelectionIndex(int index) - Specified by:
setLeadSelectionIndexin interfaceListSelectionModel
-
addSelectionInterval
public void addSelectionInterval(int index0, int index1) - Specified by:
addSelectionIntervalin interfaceListSelectionModel
-
setSelectionInterval
public void setSelectionInterval(int index0, int index1) - Specified by:
setSelectionIntervalin interfaceListSelectionModel
-
removeSelectionInterval
public void removeSelectionInterval(int index0, int index1) - Specified by:
removeSelectionIntervalin interfaceListSelectionModel
-
clearSelection
public void clearSelection()- Specified by:
clearSelectionin interfaceListSelectionModel
-
isSelectedIndex
public boolean isSelectedIndex(int index) - Specified by:
isSelectedIndexin interfaceListSelectionModel
-
isSelectionEmpty
public boolean isSelectionEmpty()- Specified by:
isSelectionEmptyin interfaceListSelectionModel
-
getValueIsAdjusting
public boolean getValueIsAdjusting()- Specified by:
getValueIsAdjustingin interfaceListSelectionModel- Returns:
-
setValueIsAdjusting
public void setValueIsAdjusting(boolean valueIsAdjusting) - Specified by:
setValueIsAdjustingin interfaceListSelectionModel
-
getSelectionMode
public int getSelectionMode()- Specified by:
getSelectionModein interfaceListSelectionModel
-
setSelectionMode
public void setSelectionMode(int selectionMode) - Specified by:
setSelectionModein interfaceListSelectionModel
-
addListSelectionListener
- Specified by:
addListSelectionListenerin interfaceListSelectionModel
-
removeListSelectionListener
- Specified by:
removeListSelectionListenerin interfaceListSelectionModel
-
update
- Specified by:
updatein interfaceorg.gvsig.tools.observer.Observer
-
fireValueChanged
protected void fireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting) - Parameters:
firstIndex- the first index in the intervallastIndex- the last index in the intervalisAdjusting- true if this is the final change in a series of adjustments- See Also:
-