|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.starlink.topcat.plot.PointSelection
public class PointSelection
Encapsulates the selection of the list of points which is to be plotted. This may be composed of points from one or more than one tables.
| Nested Class Summary | |
|---|---|
static class |
PointSelection.TableMask
Struct-type class which defines an association of a TopcatModel and a BitSet. |
| Constructor Summary | |
|---|---|
PointSelection(PointSelector[] selectors,
int[][] subsetPointers,
String[] subsetNames)
Constructs a new selection. |
|
| Method Summary | |
|---|---|
uk.ac.starlink.ttools.plot.PlotData |
createPlotData(Points points)
Returns a PlotData object based on this point selection but with a given points object. |
boolean |
equals(Object otherObject)
Equals is implemented efficiently to identify two PointSelection objects which will behave in the same way. |
Points |
getEmptyPoints()
Returns a dummy Points object compatible with this selection. |
int |
getNdim()
|
int |
getNerror()
|
long |
getPointRow(long ipoint)
Given a point index from this selection, returns the row number in its table (see getPointTable(long) that it represents. |
Points |
getPoints()
|
uk.ac.starlink.ttools.plot.PointSequence |
getPointSequence()
|
long[] |
getPointsForRow(TopcatModel tcModel,
long lrow)
Given a table and a row index into that table, returns the point indices of any points in this selection which correspond to that row. |
TopcatModel |
getPointTable(long ipoint)
Given a point index from this selection, returns the table that it comes from. |
int |
getSetCount()
|
SetId[] |
getSetIds()
Returns the list of set ID labels which identify where each set comes from. |
String |
getSetName(int iset)
|
uk.ac.starlink.ttools.plot.Style |
getSetStyle(int iset)
|
uk.ac.starlink.ttools.plot.Style[] |
getStyles()
Returns a list of styles for subset plotting. |
RowSubset[] |
getSubsets()
Returns a list of subsets to be plotted. |
PointSelection.TableMask[] |
getTableMasks(BitSet pointMask)
Given a bit vector which represents a selection of the points in this object, returns an array of TableMask objects which represent selections of rows within any of the tables this object knows about. |
int |
hashCode()
|
boolean |
hasLabels()
|
Points |
readPoints(BoundedRangeModel progress)
Reads a data points list for this selection. |
boolean |
sameAxes(PointSelection other)
Determines if the axes defining this point selection are the same as those for another one. |
boolean |
sameData(PointSelection other)
Determines if the data required to plot this point selection is the same as the data required to plot another one. |
void |
setPoints(Points points)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PointSelection(PointSelector[] selectors,
int[][] subsetPointers,
String[] subsetNames)
As well as the point selectors themselves which hold almost all
the required state, an additional array, subsetPointers
is given to indicate in what order the subsets should be plotted.
Each element of this array is a two-element int array; the first
element is the index of the point selector, and the second element
the index of the subset within that selector.
selectors - array of PointSelector objects whose current state
determines the points to be plottedsubsetPointers - pointers to subsetssubsetNames - labels to be used for the subsets in
subsetPointers| Method Detail |
|---|
public Points readPoints(BoundedRangeModel progress)
throws IOException,
InterruptedException
sameData(uk.ac.starlink.topcat.plot.PointSelection)). If a progress bar model is supplied it
will be updated as the read progresses.
This method checks for interruption status on its calling thread. If an interruption is made, it will cease calculating and throw an InterruptedException.
progress - bar model to be updated as read is done
InterruptedException - if the calling thread is interrupted
IOExceptionpublic Points getEmptyPoints()
getCount()==0public RowSubset[] getSubsets()
readPoints(javax.swing.BoundedRangeModel).
public uk.ac.starlink.ttools.plot.Style[] getStyles()
getSubsets().
public int getSetCount()
getSetCount in interface uk.ac.starlink.ttools.plot.PlotDatapublic String getSetName(int iset)
getSetName in interface uk.ac.starlink.ttools.plot.PlotDatapublic uk.ac.starlink.ttools.plot.Style getSetStyle(int iset)
getSetStyle in interface uk.ac.starlink.ttools.plot.PlotDatapublic int getNdim()
getNdim in interface uk.ac.starlink.ttools.plot.PlotDatapublic int getNerror()
getNerror in interface uk.ac.starlink.ttools.plot.PlotDatapublic boolean hasLabels()
hasLabels in interface uk.ac.starlink.ttools.plot.PlotDatapublic uk.ac.starlink.ttools.plot.PlotData createPlotData(Points points)
points - fixed points data
public uk.ac.starlink.ttools.plot.PointSequence getPointSequence()
getPointSequence in interface uk.ac.starlink.ttools.plot.PlotDatapublic void setPoints(Points points)
public Points getPoints()
public SetId[] getSetIds()
getSubsets().
public TopcatModel getPointTable(long ipoint)
ipoint - point index
getPointRow(long)public long getPointRow(long ipoint)
getPointTable(long) that it represents.
ipoint - point index
public long[] getPointsForRow(TopcatModel tcModel,
long lrow)
tcModel - tablelrow - row index in tcModel
public PointSelection.TableMask[] getTableMasks(BitSet pointMask)
pointMask - bit vector reprsenting a subset of the points
in this object
public boolean sameAxes(PointSelection other)
sameData(uk.ac.starlink.topcat.plot.PointSelection),
except that PointSelections with different error or label information
can be considered to have the same axes.
other - comparison object
public boolean sameData(PointSelection other)
readPoints(javax.swing.BoundedRangeModel) will
return the same result for this object and other.
other - comparison object
public boolean equals(Object otherObject)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||