|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.ascape.util.data.DataSelection
public class DataSelection
A selection of a group of data series, useful for providing some subset of available data. Methods are provided for selecting data and notifying observers of changes in the selection. Shares much the same interface with VectorSelection, and they will probably be integrated once collections comes into use.
VectorSelection
,
Serialized FormField Summary | |
---|---|
protected DataGroup |
dataGroup
The backing data group for this selection. |
Constructor Summary | |
---|---|
DataSelection()
|
Method Summary | |
---|---|
void |
clearSelection()
Sets selection to none, unselecting every series in the data group. |
java.lang.Object |
clone()
Clones this selectable data group, retaining the original's data group, and copying selection. |
DataGroup |
getData()
Returns the backing data group. |
int |
getIndexOfSelectedIndex(int index)
Returns the index in the backing data group of the series at the selection index. |
double |
getMax()
Returns the maximum value across all series in the selection. |
double |
getMin()
Returns the minimum value across all series in the selection. |
int |
getSelectedIndexOf(java.lang.String name)
Returns the index in the backing data group of the series at the selection index. |
java.lang.String |
getSelectedName(int index)
Returns the name of the series at the selection index. |
java.util.List |
getSelectedSeries()
Returns a list of all selected series. |
DataSeries |
getSelectedSeries(int index)
Returns the series at the selection index. |
java.util.Vector |
getSelectedSeriesData(int index)
Returns the data, as a vector, of the serties at the selection index. |
int |
getSelectionSize()
Returns the number of selected series. |
boolean |
isSelected(DataSeries series)
Is the supplied series selected in this selection? |
boolean |
isSelected(int index)
Is the series at the supplied index selected in this selection? |
void |
selectAll()
Selects every series in the data group. |
void |
setData(DataGroup dataGroup)
Sets the backing data group for this selection. |
void |
setSelected(DataSeries series,
boolean select)
Sets the supplied series to the selection status indicated. |
void |
setSelected(int index,
boolean select)
Sets the series at the supplied index to the selection status indicated. |
void |
setSelected(java.lang.String name,
boolean select)
Sets the series at the supplied index to the selection status indicated. |
void |
update()
Updates the selection in response to a change in the data group. |
void |
update(java.util.Observable observed,
java.lang.Object arg)
Notifies this selection that a change in the backing data group has occured. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DataGroup dataGroup
Constructor Detail |
---|
public DataSelection()
Method Detail |
---|
public DataGroup getData()
public void setData(DataGroup dataGroup)
dataGroup
- the data group this object is a selection ofpublic void update()
public boolean isSelected(DataSeries series)
series
- the series to determine selection status for
public boolean isSelected(int index)
index
- the data group index of the series to determine selection status for
public void selectAll()
public void clearSelection()
public void setSelected(int index, boolean select)
index
- the data group index of the series to set select status forselect
- true to select the item, false to unselect itpublic void setSelected(java.lang.String name, boolean select)
name
- the name of the series to set select status forselect
- true to select the item, false to unselect itpublic void setSelected(DataSeries series, boolean select)
series
- the series to set selection status forselect
- true to select the item, false to unselect itpublic int getSelectionSize()
public int getIndexOfSelectedIndex(int index)
index
- the selected series to get the backing group index forpublic int getSelectedIndexOf(java.lang.String name)
name
- the selected series to get the backing group index forpublic java.lang.String getSelectedName(int index)
index
- the index in this selection of the series to get the name ofpublic DataSeries getSelectedSeries(int index)
index
- the index in this selection of the seriespublic java.util.List getSelectedSeries()
public java.util.Vector getSelectedSeriesData(int index)
index
- the index in this selection of the seriespublic double getMax()
public double getMin()
public void update(java.util.Observable observed, java.lang.Object arg)
update
in interface java.util.Observer
public java.lang.Object clone()
clone
in class java.lang.Object
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |