Class WrapperPlotLayer
java.lang.Object
uk.ac.starlink.ttools.plot2.layer.WrapperPlotLayer
- All Implemented Interfaces:
PlotLayer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a drawing from this layer that can contribute to a user-visible plot.voidextendCoordinateRanges(Range[] ranges, Scale[] scales, DataStore dataStore) Gives this layer a chance to adjust the coordinate ranges assembled during data ranging.Returns a map indicating what additional ranging needs to be done on the input data before this layer can be drawn.Returns the data geometry used by this layer.Returns the data spec that defines the data used by this layer.getOpt()Returns an object that describes some facts about how this layer draws itself used for rendering.Plotter<?> Returns the plotter that generated this layer.getStyle()Returns the plot style used by this layer.
-
Constructor Details
-
WrapperPlotLayer
-
-
Method Details
-
getPlotter
Description copied from interface:PlotLayerReturns the plotter that generated this layer. Used to help determine whether this layer is the same as another one.- Specified by:
getPlotterin interfacePlotLayer- Returns:
- parent plotter
-
getStyle
-
getDataGeom
Description copied from interface:PlotLayerReturns the data geometry used by this layer. This can be used in conjunction with the DataSpec to determine the base positions in data space of what has been plotted. Depending on the nature of the returned object, these positions may be actual points in the data space, or some higher-dimensional object. If null is returned, no such information is available.- Specified by:
getDataGeomin interfacePlotLayer- Returns:
- data geom, or null
-
getDataSpec
Description copied from interface:PlotLayerReturns the data spec that defines the data used by this layer. May be null if no tabular data is required.- Specified by:
getDataSpecin interfacePlotLayer- Returns:
- data spec, or null
-
extendCoordinateRanges
Description copied from interface:PlotLayerGives this layer a chance to adjust the coordinate ranges assembled during data ranging. Supplied is an array of range objects, each corresponding to one of the data position dimensions (it hassurface.getDataDimCountelements). If this layer needs to adjust these ranges beyond what is implied by the result ofgetDataGeom, it may be done here. The implementation may or may not need to acquire a tuple sequence from the supplieddataStore.An array of flags indicating whether each range corresponds to a logarithmic axis is also supplied (same number of eements as
ranges). This may or may not make physical sense for a given case - if in doubt, false elements are given.In many cases (especially for point-plotting type layers) the implementation of this method will be a no-operation.
- Specified by:
extendCoordinateRangesin interfacePlotLayer- Parameters:
ranges- array of data space dimension ranges, may be adjustedscales- array of axis scalings corresponding torangesarraydataStore- data storage object
-
getAuxRangers
Description copied from interface:PlotLayerReturns a map indicating what additional ranging needs to be done on the input data before this layer can be drawn. Each key of the returned map represents a range that needs to be determined; such keys may be shared between layers in the same plot. The corresponding value is an object that can be used to (help) determine the range from the data.Note that ranging of the plot surface axes themselves is handled elsewhere.
- Specified by:
getAuxRangersin interfacePlotLayer- Returns:
- range scales required for plot
-
getOpt
-
createDrawing
Description copied from interface:PlotLayerCreates a drawing from this layer that can contribute to a user-visible plot. TheauxSpansparameter is a map that must contain a Span object for (at least) every scale returned as a key of the map returned byPlotLayer.getAuxRangers().If this layer is unable to draw to the given paper type, an unchecked exception may be thrown. In general it's up to the plotting system to ensure that layers are only painted on suitable paper types. This logic is in
PlotType.- Specified by:
createDrawingin interfacePlotLayer- Parameters:
surface- plot surfaceauxSpans- range informationpaperType- rendering object
-