T
- The type of the connection object.public abstract class ConnectionPlot<T> extends MultiPlot implements IConnectionClient<T>
IPlot
whose
content depends on a local or remote connection (a ConnectionAdapter
).component
Constructor and Description |
---|
ConnectionPlot(IVizService vizService)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
setConnectionAdapter(IConnectionAdapter<T> adapter)
Sets the current connection associated with the client.
|
void |
setDataSource(java.net.URI file)
Sets the data source (which is currently rendered if the plot is drawn).
|
void |
update(IUpdateable component)
This method informs the plot that its associated connection has been
updated.
|
draw, getDataSource, getNumberOfAxes, getPlotTypes, getProperties, getSourceHost, getVizService, isSourceRemote, setProperties
public ConnectionPlot(IVizService vizService)
vizService
- The visualization service responsible for this plot.public void setDataSource(java.net.URI file) throws java.lang.NullPointerException, java.io.IOException, java.lang.IllegalArgumentException, java.lang.Exception
Note: ConnectionPlot
additionally performs basic checks on
the files. For instance, it will throw an exception if the file does not
exist or if there are read permission issues.
setDataSource
in class MultiPlot
file
- The new data source URI.java.lang.NullPointerException
- if the specified file is nulljava.io.IOException
- if there was an error while reading the file's contentsjava.lang.IllegalArgumentException
- if there are no plots availablejava.lang.Exception
- if there is some other unspecified problem with the filepublic void setConnectionAdapter(IConnectionAdapter<T> adapter)
IConnectionClient
Note: Implementations should at least unregister from the previously associated connection and register with the new one. It may also trigger an update to the client.
setConnectionAdapter
in interface IConnectionClient<T>
adapter
- The new connection adapter. If null
, the connection
will be unset and the plot will be cleared.public void update(IUpdateable component)
update
in interface IUpdateableListener
component
- The component that was updated. This is expected to be the
associated ConnectionAdapter
.