public class IndexSelectionModel
extends javax.swing.DefaultListSelectionModel
ListSelectionModel that allows for controlling the current index in a JTable or
JList. An IndexChangeEvent is being fired when the selection index changes. But prior to this a
IndexChangeIntendedEvent is passed around in order to find out whether any listener wants to veto
the index-change. A edit-form for instance that has non applied data may need to veto the event for not
loosing the users edits.| Constructor and Description |
|---|
IndexSelectionModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addIndexChangeListener(IndexChangeEvent.Listener l) |
void |
clearSelection() |
protected boolean |
fireIndexAllowedToChange() |
protected void |
fireIndexChanged() |
void |
fireSelectionState()
Tell all SelectionListeners to update their current state.
|
int |
getCurrentIndex() |
void |
removeIndexChangeListener(IndexChangeEvent.Listener l) |
void |
removeIndexInterval(int index0,
int index1) |
void |
removeSelectionInterval(int index0,
int index1) |
void |
setAnchorSelectionIndex(int anchorIndex) |
void |
setCurrentIndex(int index) |
void |
setLeadSelectionIndex(int leadIndex) |
void |
setSelectionInterval(int index0,
int index1) |
addListSelectionListener, addSelectionInterval, clone, fireValueChanged, fireValueChanged, fireValueChanged, getAnchorSelectionIndex, getLeadSelectionIndex, getListeners, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getSelectionMode, getValueIsAdjusting, insertIndexInterval, isLeadAnchorNotificationEnabled, isSelectedIndex, isSelectionEmpty, moveLeadSelectionIndex, removeListSelectionListener, setLeadAnchorNotificationEnabled, setSelectionMode, setValueIsAdjusting, toStringpublic void setAnchorSelectionIndex(int anchorIndex)
setAnchorSelectionIndex in interface javax.swing.ListSelectionModelsetAnchorSelectionIndex in class javax.swing.DefaultListSelectionModelpublic void setLeadSelectionIndex(int leadIndex)
setLeadSelectionIndex in interface javax.swing.ListSelectionModelsetLeadSelectionIndex in class javax.swing.DefaultListSelectionModelpublic void setSelectionInterval(int index0,
int index1)
setSelectionInterval in interface javax.swing.ListSelectionModelsetSelectionInterval in class javax.swing.DefaultListSelectionModelpublic void clearSelection()
clearSelection in interface javax.swing.ListSelectionModelclearSelection in class javax.swing.DefaultListSelectionModelpublic void removeIndexInterval(int index0,
int index1)
removeIndexInterval in interface javax.swing.ListSelectionModelremoveIndexInterval in class javax.swing.DefaultListSelectionModelpublic void removeSelectionInterval(int index0,
int index1)
removeSelectionInterval in interface javax.swing.ListSelectionModelremoveSelectionInterval in class javax.swing.DefaultListSelectionModelpublic void setCurrentIndex(int index)
public int getCurrentIndex()
public void addIndexChangeListener(IndexChangeEvent.Listener l)
public void removeIndexChangeListener(IndexChangeEvent.Listener l)
protected boolean fireIndexAllowedToChange()
protected void fireIndexChanged()
public void fireSelectionState()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.