Interface MutableSelectedStateSink<T>
-
- All Superinterfaces:
ItemSelectable,MutableSelectedState<T>,SelectedState<T>
- All Known Implementing Classes:
MultiMutableSelectedState
public interface MutableSelectedStateSink<T> extends MutableSelectedState<T>, ItemSelectable
An interface for classes that keep track of the selected state of T objects.- Author:
- Tom Nelson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.selection.SelectedState
SelectedState.StateChangeListener<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear(boolean fireEvents)Clears the "selected" state from all elements.booleandeselect(Collection<T> elements, boolean fireEvents)deselect a collection of elementsbooleandeselect(T element, boolean fireEvents)deselect one elementbooleanselect(Collection<T> elements, boolean fireEvents)select a collection of elements to be the only selected elementsbooleanselect(T element, boolean fireEvents)select one element.-
Methods inherited from interface java.awt.ItemSelectable
addItemListener, getSelectedObjects, removeItemListener
-
Methods inherited from interface org.jungrapht.visualization.selection.MutableSelectedState
clear, deselect, deselect, select, select
-
Methods inherited from interface org.jungrapht.visualization.selection.SelectedState
getSelected, isSelected
-
-
-
-
Method Detail
-
select
boolean select(T element, boolean fireEvents)
select one element.- Specified by:
selectin interfaceMutableSelectedState<T>- Parameters:
element- the element to selectfireEvents- if false, act as a sink, if true, do not fire events- Returns:
- true if the collection of selected elements was changed
-
deselect
boolean deselect(T element, boolean fireEvents)
deselect one element- Specified by:
deselectin interfaceMutableSelectedState<T>- Parameters:
element- the element to deselectfireEvents- act as a sink, if true, do not fire events- Returns:
- true is the collection of selected elements was changed
-
select
boolean select(Collection<T> elements, boolean fireEvents)
select a collection of elements to be the only selected elements- Specified by:
selectin interfaceMutableSelectedState<T>- Parameters:
elements-fireEvents- if false, act as a sink, if true, do not fire events- Returns:
- true if the collection of selected elements was changed
-
deselect
boolean deselect(Collection<T> elements, boolean fireEvents)
deselect a collection of elements- Specified by:
deselectin interfaceMutableSelectedState<T>- Parameters:
elements- the elements to deselectfireEvents- if false, act as a sink, if true, do not fire events- Returns:
- true if the collection of selected elements was changed
-
clear
void clear(boolean fireEvents)
Clears the "selected" state from all elements.- Specified by:
clearin interfaceMutableSelectedState<T>- Parameters:
fireEvents- if false, act as a sink, if true, do not fire events
-
-