Class AbstractPlotter<S extends Style>
java.lang.Object
uk.ac.starlink.ttools.plot2.layer.AbstractPlotter<S>
- All Implemented Interfaces:
Plotter<S>
- Direct Known Subclasses:
CombineArrayPlotter
,ContourPlotter
,FillPlotter
,FunctionPlotter
,HealpixPlotter
,LabelPlotter
,Line3dPlotter
,LinearFitPlotter
,LinePlotter
,ShapePlotter
,SimpleDecalPlotter
,SkyGridPlotter
,SphereGridPlotter
,SpotPlotter
,TracePlotter
Skeleton implementation of Plotter.
This doesn't do anything clever, just manages the basic members
supplied at construction time. It also returns a null range style key.
- Since:
- 22 Nov 2013
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractPlotter
(String name, Icon icon) Constructs a plotter with no data coordinates or reports.protected
AbstractPlotter
(String name, Icon icon, int npos, Coord[] extraCoords) Constructs a plotter with specified data positions and additional coordinates, no report keys.protected
AbstractPlotter
(String name, Icon icon, CoordGroup coordGrp, boolean hasReports) Constructs a plotter with a given coordinate group and indication of reporting status. -
Method Summary
Modifier and TypeMethodDescriptionReturns an object describing which data coordinates are used for this plotter and how they are arranged in supplied DataSpec objects.Returns an icon for this plotter for use in user interface.Returns the name of this plotter for use in user interface.getRangeStyleKey
(S style) The AbstractPlotter implementation returns null.boolean
Indicates whether the drawings produced by this plotter will return general interest report information to upstream plotting code.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface uk.ac.starlink.ttools.plot2.Plotter
createLayer, createStyle, getPlotterDescription, getStyleKeys
-
Constructor Details
-
AbstractPlotter
Constructs a plotter with a given coordinate group and indication of reporting status.- Parameters:
name
- plotter nameicon
- plotter iconcoordGrp
- coordinate grouphasReports
- whether plot reports are generated
-
AbstractPlotter
Constructs a plotter with no data coordinates or reports.- Parameters:
name
- plotter nameicon
- plotter icon
-
AbstractPlotter
Constructs a plotter with specified data positions and additional coordinates, no report keys.- Parameters:
name
- plotter nameicon
- plotter iconnpos
- number of sets of positional coordinatesextraCoords
- coordinates other than positional coordinates
-
-
Method Details
-
getPlotterName
Description copied from interface:Plotter
Returns the name of this plotter for use in user interface.- Specified by:
getPlotterName
in interfacePlotter<S extends Style>
- Returns:
- user-directed plotter name
-
getPlotterIcon
Description copied from interface:Plotter
Returns an icon for this plotter for use in user interface.- Specified by:
getPlotterIcon
in interfacePlotter<S extends Style>
- Returns:
- plotter icon
-
getCoordGroup
Description copied from interface:Plotter
Returns an object describing which data coordinates are used for this plotter and how they are arranged in supplied DataSpec objects.- Specified by:
getCoordGroup
in interfacePlotter<S extends Style>
- Returns:
- coordinate group
-
hasReports
public boolean hasReports()Description copied from interface:Plotter
Indicates whether the drawings produced by this plotter will return general interest report information to upstream plotting code.- Specified by:
hasReports
in interfacePlotter<S extends Style>
- Returns:
- true if the plot report may return interesting information
- See Also:
-
getRangeStyleKey
The AbstractPlotter implementation returns null.- Specified by:
getRangeStyleKey
in interfacePlotter<S extends Style>
- Parameters:
style
- plot style to assess- Returns:
- opaque object with equality semantics, or null if axis range is not a function of style
-