public class PlotGenerator<P,A> extends Object
Although this class gives quite a lot of configurability, there are some options it does not provide, for instance related to the details of autoranging plot limits based on the data. To take full advantage of these, you can go back to the lower-level API taking the implementations here as a starting point.
Constructor and Description |
---|
PlotGenerator(SurfaceFactory<P,A> surfFact,
ZoneContent<P,A> content,
Trimming trimming,
ShadeAxisKit shadeKit,
PaperTypeSelector ptSel,
Compositor compositor,
DataStore dataStore,
int xpix,
int ypix,
Padding padding)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Icon |
createIcon(boolean forceBitmap)
Returns a static icon that can be used to paint the plot.
|
PlotDisplay<P,A> |
createPlotDisplay(Navigator<A> navigator,
boolean surfaceAuxRange,
boolean cacheImage)
Returns a JComponent containing a live plot.
|
void |
exportPlot(GraphicExporter exporter,
OutputStream out)
Exports a plot to an output stream in a supported graphics format.
|
public PlotGenerator(SurfaceFactory<P,A> surfFact, ZoneContent<P,A> content, Trimming trimming, ShadeAxisKit shadeKit, PaperTypeSelector ptSel, Compositor compositor, DataStore dataStore, int xpix, int ypix, Padding padding)
surfFact
- surface factorycontent
- layer content of plottrimming
- specification of additional decorationsshadeKit
- specifies shader axis, or null if not requiredptSel
- paper type selectorcompositor
- compositor for pixel compositiondataStore
- data storage objectxpix
- initial horizontal size in pixels
(may get changed by window resizing)ypix
- initial vertical size in pixels
(may get changed by window resizing)padding
- requirements for extent of region outside plot
data box to contain axis labels etc;
may be null or parts may be blank;
those requirements not specified will be
calculated automaticallypublic PlotDisplay<P,A> createPlotDisplay(Navigator<A> navigator, boolean surfaceAuxRange, boolean cacheImage)
surfaceAuxRange
- determines whether aux ranges are recalculated
when the surface changesnavigator
- user gesture navigation controller,
or null for a non-interactive plotcacheImage
- if true, plot image will be cached where applicable,
if false it will be regenerated from data
on every repaintpublic void exportPlot(GraphicExporter exporter, OutputStream out) throws IOException
exporter
- defines a graphics output formatout
- destination stream;
this method buffers it, but doesn't close itIOException
public Icon createIcon(boolean forceBitmap)
forceBitmap
- true iff the plot layers should be forced to
a pixel map grid rather than (perhaps) being drawn using
vector graphics; usually not necessaryCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.