public class DisplayPlot extends Display implements DataSetListener
Modifier and Type | Class and Description |
---|---|
protected static class |
DisplayPlot.DataCasterJudgeFunction |
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 and 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 and 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 and 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(java.lang.Object obj)
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, graphic, removePropertyChangeListener, repaint, 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
public 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(java.lang.Object obj)
graphic
in interface GraphicalElement
graphic
in class Display
obj
- An object that might be used to specify the graphic that the GraphicalElement is to return.
In most cases the GraphicalElement ignores this parameter, and it can be set to null.Device
,
Display
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