|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractListModel com.jidesoft.list.AbstractDualListModel
public abstract class AbstractDualListModel
Field Summary | |
---|---|
protected PropertyChangeSupport |
changeSupport
|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Fields inherited from interface com.jidesoft.list.DualListModel |
---|
DISABLE_SELECTION, KEEP_SELECTION, REMOVE_SELECTION |
Constructor Summary | |
---|---|
AbstractDualListModel()
|
Method Summary | |
---|---|
void |
addFreezeIndex(int index)
Freezes the index. |
void |
addListSelectionListener(ListSelectionListener l)
Add a listener to the list that's notified each time a change to the selection occurs. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. |
void |
addSelectionInterval(int index0,
int index1)
Change the selection to be the set union of the current selection and the indices between index0 and index1 inclusive. |
void |
clearSelection()
Change the selection to the empty set. |
void |
fireIndexedPropertyChange(String propertyName,
int index,
Object oldValue,
Object newValue)
Report a bound indexed property update to any registered listeners. |
void |
firePropertyChange(PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered listeners. |
void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Report a bound property update to any registered listeners. |
protected void |
fireValueChanged(int firstIndex,
int lastIndex)
Notifies ListSelectionListeners that the value of the selection, in the closed interval
firstIndex , lastIndex , has changed. |
protected void |
fireValueChanged(int firstIndex,
int lastIndex,
boolean isAdjusting)
|
int[] |
getFrozenIndices()
Gets all frozen indices. |
ListSelectionListener[] |
getListSelectionListeners()
Returns an array of all the list selection listeners registered on this DefaultListSelectionModel . |
PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the listeners that were added to the PropertyChangeSupport object with addPropertyChangeListener(). |
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName)
Returns an array of all the listeners which have been associated with the named property. |
int[] |
getSelectedIndices()
Returns all selected indices in order. |
int |
getSelectionMode()
Returns the current selection mode. |
boolean |
getValueIsAdjusting()
Returns true if the value is undergoing a series of changes. |
boolean |
hasListeners(String propertyName)
Check if there are any listeners for a specific property, including those registered on all properties. |
int[] |
internalGetSelectedIndices()
|
boolean |
isFreezeIndex(int index)
Gets if the index is froze. |
boolean |
isSelectedIndex(int index)
Returns true if the specified index is selected. |
boolean |
isSelectionEmpty()
Returns true if no indices are selected. |
void |
moveSelection(int index0,
int index1,
int newIndex,
boolean before)
Moves all indices of an interval to a new index. |
void |
removeFreezeIndex(int index)
Unfreezes the index. |
void |
removeListSelectionListener(ListSelectionListener l)
Remove a listener from the list that's notified each time a change to the selection occurs. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
removeSelectionInterval(int index0,
int index1)
Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive. |
void |
selectAll()
Select all elements that exist in original list. |
void |
setSelectionMode(int selectionMode)
Set the selection mode. |
void |
setValueIsAdjusting(boolean valueIsAdjusting)
This property is true if upcoming changes to the value of the model should be considered a single event. |
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.ListModel |
---|
addListDataListener, getElementAt, getSize, removeListDataListener |
Field Detail |
---|
protected PropertyChangeSupport changeSupport
Constructor Detail |
---|
public AbstractDualListModel()
Method Detail |
---|
public boolean isSelectedIndex(int index)
isSelectedIndex
in interface DualListModel
index
- the specified index
public int[] getSelectedIndices()
getSelectedIndices
in interface DualListModel
public void addSelectionInterval(int index0, int index1)
addSelectionInterval
in interface DualListModel
index0
- one end of the interval.index1
- other end of the intervalDualListModel.addListSelectionListener(javax.swing.event.ListSelectionListener)
public void removeSelectionInterval(int index0, int index1)
removeSelectionInterval
in interface DualListModel
index0
- one end of the interval.index1
- other end of the intervalDualListModel.addListSelectionListener(javax.swing.event.ListSelectionListener)
public void moveSelection(int index0, int index1, int newIndex, boolean before)
moveSelection
in interface DualListModel
index0
- one end of the interval.index1
- other end of the intervalnewIndex
- new indexbefore
- true if moving the indices before the new indexpublic void clearSelection()
clearSelection
in interface DualListModel
DualListModel.addListSelectionListener(javax.swing.event.ListSelectionListener)
public boolean isSelectionEmpty()
isSelectionEmpty
in interface DualListModel
public void selectAll()
selectAll
in interface DualListModel
public void setValueIsAdjusting(boolean valueIsAdjusting)
setValueIsAdjusting
in interface DualListModel
valueIsAdjusting
- The new value of the property.DualListModel.getValueIsAdjusting()
public boolean getValueIsAdjusting()
getValueIsAdjusting
in interface DualListModel
DualListModel.setValueIsAdjusting(boolean)
public void setSelectionMode(int selectionMode)
REMOVE_SELECTION
the selected items will be removed from
original list.
DISABLE_SELECTION
the selected items in the original list
will be disabled
KEEP_SELECTION
no affection to the original list
setSelectionMode
in interface DualListModel
selectionMode
- the selection modeDualListModel.getSelectionMode()
public int getSelectionMode()
getSelectionMode
in interface DualListModel
DualListModel.setSelectionMode(int)
public void addFreezeIndex(int index)
DualListModel
addFreezeIndex
in interface DualListModel
index
- the indexpublic void removeFreezeIndex(int index)
DualListModel
removeFreezeIndex
in interface DualListModel
index
- the indexpublic int[] getFrozenIndices()
DualListModel
getFrozenIndices
in interface DualListModel
public boolean isFreezeIndex(int index)
DualListModel
isFreezeIndex
in interface DualListModel
index
- the index
public void addListSelectionListener(ListSelectionListener l)
DualListModel
addListSelectionListener
in interface DualListModel
l
- the ListSelectionListenerDualListModel.removeListSelectionListener(javax.swing.event.ListSelectionListener)
,
DualListModel.addSelectionInterval(int, int)
,
DualListModel.removeSelectionInterval(int, int)
,
DualListModel.clearSelection()
public void removeListSelectionListener(ListSelectionListener l)
DualListModel
removeListSelectionListener
in interface DualListModel
l
- the ListSelectionListenerDualListModel.addListSelectionListener(javax.swing.event.ListSelectionListener)
public ListSelectionListener[] getListSelectionListeners()
DefaultListSelectionModel
.
ListSelectionListener
s
or an empty
array if no list selection listeners are currently registeredaddListSelectionListener(javax.swing.event.ListSelectionListener)
,
removeListSelectionListener(javax.swing.event.ListSelectionListener)
protected void fireValueChanged(int firstIndex, int lastIndex)
ListSelectionListeners
that the value of the selection, in the closed interval
firstIndex
, lastIndex
, has changed.
firstIndex
- the first index in the intervallastIndex
- the last index in the intervalprotected 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
adjustmentsDualListModelSupport
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
is null, no exception is thrown and no action
is taken.
addPropertyChangeListener
in interface DualListModel
listener
- The PropertyChangeListener to be addedpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
was added more than once to the same event
source, it will be notified one less time after being removed.
If listener
is null, or was never added, no exception is
thrown and no action is taken.
removePropertyChangeListener
in interface DualListModel
listener
- The PropertyChangeListener to be removedpublic PropertyChangeListener[] getPropertyChangeListeners()
PropertyChangeListeners
added or an
empty array if no listeners have been addedpublic void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
or listener
is null, no
exception is thrown and no action is taken.
propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener to be addedpublic void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
listener
was added more than once to the same event
source for the specified property, it will be notified one less time
after being removed.
If propertyName
is null, no exception is thrown and no
action is taken.
If listener
is null, or was never added for the specified
property, no exception is thrown and no action is taken.
propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removedpublic PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
propertyName
- The name of the property being listened to
PropertyChangeListeners
associated with
the named property. If no such listeners have been added,
or if propertyName
is null, an empty array is
returned.public void firePropertyChange(String propertyName, Object oldValue, Object newValue)
propertyName
- The programmatic name of the property
that was changed.oldValue
- The old value of the property.newValue
- The new value of the property.public void firePropertyChange(PropertyChangeEvent evt)
evt
- The PropertyChangeEvent object.public void fireIndexedPropertyChange(String propertyName, int index, Object oldValue, Object newValue)
propertyName
- The programmatic name of the property that
was changed.index
- index of the property element that was changed.oldValue
- The old value of the property.newValue
- The new value of the property.public boolean hasListeners(String propertyName)
propertyName
is null, only check for listeners registered on all properties.
propertyName
- the property name.
public int[] internalGetSelectedIndices()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |