public class CSVPlot extends java.lang.Object implements IPlot
Constructor and Description |
---|
CSVPlot(java.net.URI source)
The Constructor
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.widgets.Composite |
draw(java.lang.String category,
java.lang.String plotType,
org.eclipse.swt.widgets.Composite parent)
This operation directs the IPlot to draw itself in its parent as the
specified plot type.
|
java.net.URI |
getDataSource()
This operation returns the data source that is plotted/drawn by this
IPlot.
|
int |
getNumberOfAxes()
This operation returns the number of axes of the plot.
|
java.util.Map<java.lang.String,java.lang.String[]> |
getPlotTypes()
This operation returns a simple map of plot types that can be created by
the IPlot using its data source.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
This operation returns properties of this IPlot that can be safely
modified and/or tuned by the client.
|
java.lang.String |
getSourceHost()
This operation retrieves the hostname for this IPlot's data source.
|
boolean |
isSourceRemote()
This operation signifies whether or not the IPlot's host is local or
remote.
|
void |
load()
This operation loads the data that will be plotted.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> props)
This operation updates the properties of the plot based on client-side
modifications.
|
public CSVPlot(java.net.URI source)
source
- The URI of the CSV file.public void load()
public java.util.Map<java.lang.String,java.lang.String[]> getPlotTypes() throws java.lang.Exception
IPlot
key | value
line | "x vs y1", "x vs y2", "x vs y3"
scatter | "x vs y1", "x vs y2", "x vs y3"
contour | "x vs y1", "x vs y2", "x vs y3"
getPlotTypes
in interface IPlot
java.lang.Exception
- This exception indicates that the IPlot was not able to
retrieve the list of plot types and explains why.IPlot.getPlotTypes()
public int getNumberOfAxes()
IPlot
getNumberOfAxes
in interface IPlot
IPlot.getNumberOfAxes()
public java.util.Map<java.lang.String,java.lang.String> getProperties()
IPlot
getProperties
in interface IPlot
IPlot.getProperties()
public void setProperties(java.util.Map<java.lang.String,java.lang.String> props) throws java.lang.Exception
IPlot
setProperties
in interface IPlot
props
- The updated propertiesjava.lang.Exception
- This exception indicates that the IPlot could not update its
properties or redraw itself.IPlot.setProperties(java.util.Map)
public java.net.URI getDataSource()
IPlot
getDataSource
in interface IPlot
IPlot.getDataSource()
public java.lang.String getSourceHost()
IPlot
getSourceHost
in interface IPlot
IPlot.getSourceHost()
public boolean isSourceRemote()
IPlot
isSourceRemote
in interface IPlot
IPlot.isSourceRemote()
public org.eclipse.swt.widgets.Composite draw(java.lang.String category, java.lang.String plotType, org.eclipse.swt.widgets.Composite parent) throws java.lang.Exception
IPlot
This operation may be called multiple types to change its type. It is expected that the implementation will know how to clear the parent, if necessary, or to otherwise manage its own drawing service. There is no guarantee that the caller will clear the parent.
draw
in interface IPlot
category
- The category of the plot to create. That is, the key in the
map; something "line" or "scatter" using the example from
getPlotTypes();plotType
- The type of plot that this IPlot should showparent
- The composite in which the plot should be drawn.java.lang.Exception
- This exception indicates that they IPlot could not be drawn
with either the given type or parent and explains why.IPlot.draw(java.lang.String,
java.lang.String, org.eclipse.swt.widgets.Composite)