Class SimpleDecalPlotter<S extends Style>
java.lang.Object
uk.ac.starlink.ttools.plot2.layer.AbstractPlotter<S>
uk.ac.starlink.ttools.plot2.layer.SimpleDecalPlotter<S>
- All Implemented Interfaces:
Plotter<S>
Abstract Plotter implementation that does all its painting using a Decal,
no Glyphs.
- Since:
- 15 Feb 2013
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleDecalPlotter(String name, Icon icon, CoordGroup cgrp, boolean hasReports) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncreateLayer(DataGeom geom, DataSpec dataSpec, S style) Creates a PlotLayer based on the given geometry, data and style.protected abstract LayerOptgetLayerOpt(S style) Indicates the layer optimisation options that apply to a given style.protected abstract voidpaintData2D(Surface surface, DataStore dataStore, DataGeom geom, DataSpec dataSpec, S style, Graphics g, PaperType paperType) Called during Decal painting to perform the actual plot.Methods inherited from class AbstractPlotter
getCoordGroup, getPlotterIcon, getPlotterName, getRangeStyleKey, hasReportsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Plotter
createStyle, getPlotterDescription, getStyleKeys
-
Constructor Details
-
SimpleDecalPlotter
Constructor.- Parameters:
name- plotter nameicon- plotter iconcgrp- coordinate grouphasReports- whether plot reports are generated
-
-
Method Details
-
createLayer
Description copied from interface:PlotterCreates a PlotLayer based on the given geometry, data and style.The
styleparameter is the result of a call toPlotter.createStyle(ConfigMap).The
dataSpecparameter must contain the coordinates defined by this plotter's CoordGroup.The
pointDataGeomparameter is only used if theCoordGroup.getBasicPositionCount()orCoordGroup.getExtraPositionCount()method from this plotter's CoordGroup return a non-zero value, otherwise the plot does not have point positions.It is legal to supply null for any of the parameters; if insufficient data is supplied to generate a plot, then the method should return null.
Creating a layer should be cheap; layers may be created and not used.
- Parameters:
geom- indicates base position coordinates and their mapping to points in the data spacedataSpec- specifies the data required for the plotstyle- data style as obtained fromcreateStyle- Returns:
- new plot layer, or null if no drawing will take place
-
getLayerOpt
-
paintData2D
protected abstract void paintData2D(Surface surface, DataStore dataStore, DataGeom geom, DataSpec dataSpec, S style, Graphics g, PaperType paperType) Called during Decal painting to perform the actual plot.- Parameters:
surface- plot surfacedataStore- data storage objectgeom- data geometrystyle- plot styleg- graphics contextpaperType- paper type
-