public class FeatureSelectionModel extends Object implements ListSelectionModel, Observer
| Modifier and Type | Field and Description |
|---|---|
protected EventListenerList |
listenerList |
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION| 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(ListSelectionListener listener) |
void |
addSelectionInterval(int index0,
int index1) |
void |
clearSelection() |
protected void |
fireValueChanged(int firstIndex,
int lastIndex,
boolean isAdjusting) |
int |
getAnchorSelectionIndex() |
int |
getLeadSelectionIndex() |
int |
getMaxSelectionIndex() |
int |
getMinSelectionIndex() |
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(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(Observable observable,
Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
protected EventListenerList listenerList
public FeatureSelectionModel(FeatureTableModel featureTableModel)
FeatureSelectionModel with a
FeatureTableModel used to get the Features by position in
the table.featureTableModel - to get Features fromDataException - if there is an error getting the store selectionpublic int getAnchorSelectionIndex()
getAnchorSelectionIndex in interface ListSelectionModelpublic int getLeadSelectionIndex()
getLeadSelectionIndex in interface ListSelectionModelpublic int getMaxSelectionIndex()
getMaxSelectionIndex in interface ListSelectionModelpublic int getMinSelectionIndex()
getMinSelectionIndex in interface ListSelectionModelpublic void insertIndexInterval(int index,
int length,
boolean before)
insertIndexInterval in interface ListSelectionModelpublic void removeIndexInterval(int index0,
int index1)
removeIndexInterval in interface ListSelectionModelpublic void setAnchorSelectionIndex(int index)
setAnchorSelectionIndex in interface ListSelectionModelpublic void setLeadSelectionIndex(int index)
setLeadSelectionIndex in interface ListSelectionModelpublic void addSelectionInterval(int index0,
int index1)
addSelectionInterval in interface ListSelectionModelpublic void setSelectionInterval(int index0,
int index1)
setSelectionInterval in interface ListSelectionModelpublic void removeSelectionInterval(int index0,
int index1)
removeSelectionInterval in interface ListSelectionModelpublic void clearSelection()
clearSelection in interface ListSelectionModelpublic boolean isSelectedIndex(int index)
isSelectedIndex in interface ListSelectionModelpublic boolean isSelectionEmpty()
isSelectionEmpty in interface ListSelectionModelpublic boolean getValueIsAdjusting()
getValueIsAdjusting in interface ListSelectionModelpublic void setValueIsAdjusting(boolean valueIsAdjusting)
setValueIsAdjusting in interface ListSelectionModelpublic int getSelectionMode()
getSelectionMode in interface ListSelectionModelpublic void setSelectionMode(int selectionMode)
setSelectionMode in interface ListSelectionModelpublic void addListSelectionListener(ListSelectionListener listener)
addListSelectionListener in interface ListSelectionModelpublic void removeListSelectionListener(ListSelectionListener listener)
removeListSelectionListener in interface ListSelectionModelpublic void update(Observable observable, Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
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 adjustmentsEventListenerList