public interface PlotFactory
This interface defines a service that creates plotters and plot pages, and keeps track of existing pages. The factory can only plot objects of compatible types. Additional types can be handled through adapters registered with the factory.
The default implementation of the service is provided by PlotterPlugin
.
Modifier and Type | Method and Description |
---|---|
boolean |
canCreatePlotterFor(Class dataType)
Tests if can create a plotter for the given data type.
|
boolean |
canCreatePlotterFor(Class[] dataTypes)
Tests if can create a plotter for the given data types.
|
PlotPage |
createPage(String name)
Create a page which can be used to display plots.
|
Plotter |
createPlotterFor(Class dataType)
Returns a plotter which is able to plot the given class of data.
|
Plotter |
createPlotterFor(Class[] dataTypes)
Returns a plotter which is able to plot all of the given classes of data.
|
PlotPage |
currentPage()
Returns the currently selected plot page, or null if no plot page is currently selected.
|
List<PlotPage> |
pages()
Returns a list of all plot pages that are showing.
|
void |
registerAdapter(PlotterAdapter adapter,
Class from,
Class to)
Register a Plotter adapter that can convert an object of class "from" to an object of class "to".
|
Plotter createPlotterFor(Class dataType)
Plotter createPlotterFor(Class[] dataTypes)
boolean canCreatePlotterFor(Class dataType)
boolean canCreatePlotterFor(Class[] dataTypes)
PlotPage createPage(String name)
name
- The name of the page, or null for a default name.PlotPage currentPage()
void registerAdapter(PlotterAdapter adapter, Class from, Class to)
adapter
- The PlotterAdapter.from
- The class of the objects that can be converted.to
- The class to which the objects can be converted.Copyright © 2018. All rights reserved.