|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DatasetSelectionModel<D extends Dataset,E,F>
This selection model maintains whether items of a Dataset
are selected
in a chart or not. The model connects to the Dataset
as DatasetChangeListener
to recognize the moment a series is removed. Subclasses must implement
#datasetChanged(org.jfree.data.general.DatasetChangeEvent)
to react with an
automatic unselect.
D
= the dataset type the model handles
E
= the data type the series are identified with in the dataset
F
= the data type the data items are identified with in each series
Method Summary | |
---|---|
void |
addSelectionListener(DatasetSelectionListener listener)
Adds a listener which will be informed about changed on the selection model. |
boolean |
changeItemSelection(E seriesKey,
F item)
Changes the selection of a series item. |
void |
clearSelection()
Clears the selection. |
void |
datasetChanged(DatasetChangeEvent event)
Listens for dataset changes. |
D |
getDataset()
Returns the Dataset whose data can be selected. |
boolean |
getValueIsAdjusting()
Returns whether the current selection change is a part of multiple changes. |
boolean |
isItemSelected(E seriesKey,
F item)
Checks if an series item is selected. |
void |
refreshSelection()
Informs all listeners about a general selection change. |
void |
removeSelectionListener(DatasetSelectionListener listener)
Removes a listener from the selection model. |
void |
setItemSelected(E seriesKey,
F item,
boolean selected)
Sets whether a series item is selected or not. |
void |
setValueIsAdjusting(boolean valueIsAdjusting)
Sets whether the following selection changes are part of multiple changes. |
Method Detail |
---|
D getDataset()
Dataset
whose data can be selected.
boolean isItemSelected(E seriesKey, F item)
seriesKey
- key of the seriesitem
- the item in the seriesvoid setItemSelected(E seriesKey, F item, boolean selected)
seriesKey
- key of the seriesitem
- the item in the seriesselected
- flag to (de)select the itemboolean changeItemSelection(E seriesKey, F item)
seriesKey
- key of the seriesitem
- the item in the series
true
if the item changed to selectedvoid clearSelection()
void addSelectionListener(DatasetSelectionListener listener)
listener
- the listener to be addedvoid removeSelectionListener(DatasetSelectionListener listener)
listener
- the listener to be removeboolean getValueIsAdjusting()
true
refreshSelection()
has no effect
and no DatasetSelectionChangeEvent
is fired until
setValueIsAdjusting(false)
is called.
void setValueIsAdjusting(boolean valueIsAdjusting)
true
refreshSelection()
has no effect
and no DatasetSelectionChangeEvent
event is fired.
If the value is set from true
to false
an automatic
refresh is initiated.
refreshSelection()
void refreshSelection()
void datasetChanged(DatasetChangeEvent event)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |