DataSetListener
public class DisplayPlot extends Display implements DataSetListener
Modifier and Type | Class | Description |
---|---|---|
static class |
DisplayPlot.DataWriter |
Writes a file with the raw data from a plot.
|
static class |
DisplayPlot.PopupListener |
|
static class |
DisplayPlot.RawDataWindowOpener |
Opens a window with the raw data from a plot.
|
Modifier and Type | Field | Description |
---|---|---|
protected DataSet |
dataSet |
|
protected boolean |
doClear |
|
protected java.util.LinkedList<DataTagBag> |
drawLineList |
|
protected java.util.LinkedList<DataTagBag> |
labelList |
|
protected boolean |
logWarn |
|
protected javax.swing.JPanel |
panel |
|
protected EtomicaPlot |
plot |
|
protected java.util.LinkedList<DataTagBag> |
unitList |
|
protected java.lang.String |
xLabel |
Constructor | Description |
---|---|
DisplayPlot() |
Creates a plot with a new, empty, DataSinkTable.
|
DisplayPlot(DataSet dataSet) |
Creates a plot using data from the given table.
|
Modifier and Type | Method | Description |
---|---|---|
void |
dataChanged(DataSet changedDataSet) |
Causes the display of the plot to be updated.
|
void |
dataCountChanged(DataSet changedDataSet) |
Updates the units array for the new column, using the default units.
|
void |
doUpdate() |
Redraws the plot.
|
protected IData |
getDataFromSet(DataTag[] tags) |
|
DataSet |
getDataSet() |
Returns the DataSinkTable instance that specifies the plot data.
|
EtomicaPlot |
getPlot() |
Accessor method to plot class so that its properties can be edited.
|
java.awt.Component |
graphic() |
Overrides superclass method to return a JPanel holding the plot.
|
boolean |
isDoClear() |
|
boolean |
isDoLegend() |
Accessor for flag determining if a legend is to be shown.
|
void |
setDoClear(boolean newDoClear) |
|
void |
setDoDrawLines(DataTag[] dataTags,
boolean doDrawLines) |
Sets the data set corresponding to the given tags to be have the data
points connected with lines or not.
|
void |
setDoLegend(boolean b) |
Mutator for flag determining if a legend is to be shown.
|
void |
setLegend(DataTag[] dataTags,
java.lang.String label) |
|
void |
setSize(int width,
int height) |
Sets the drawn size of the plot
|
void |
setUnit(DataTag[] dataTags,
Unit newUnit) |
|
void |
setUnit(Unit newUnit) |
|
void |
setXLabel(java.lang.String newXLabel) |
|
void |
setXUnit(Unit u) |
Extend superclass method to update label with change of unit.
|
addPropertyChangeListener, getLabel, removePropertyChangeListener, setLabel, toString
protected final DataSet dataSet
protected final EtomicaPlot plot
protected final java.util.LinkedList<DataTagBag> labelList
protected final java.util.LinkedList<DataTagBag> unitList
protected final java.util.LinkedList<DataTagBag> drawLineList
protected final javax.swing.JPanel panel
protected boolean doClear
protected java.lang.String xLabel
protected boolean logWarn
public DisplayPlot()
public DisplayPlot(DataSet dataSet)
public DataSet getDataSet()
public void dataChanged(DataSet changedDataSet)
dataChanged
in interface DataSetListener
public void dataCountChanged(DataSet changedDataSet)
dataCountChanged
in interface DataSetListener
changedDataSet
- the Data object that has been addedpublic void doUpdate()
public void setDoLegend(boolean b)
public boolean isDoLegend()
public void setLegend(DataTag[] dataTags, java.lang.String label)
public void setDoClear(boolean newDoClear)
public boolean isDoClear()
public void setDoDrawLines(DataTag[] dataTags, boolean doDrawLines)
public final EtomicaPlot getPlot()
public java.awt.Component graphic()
public void setXUnit(Unit u)
public void setXLabel(java.lang.String newXLabel)
public void setUnit(Unit newUnit)
public void setSize(int width, int height)
width
- new width, in pixelsheight
- new height, in pixels