uk.ac.starlink.ttools.plot2.layer
Class TuplePlotter<S extends Style>

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.layer.TuplePlotter<S>
All Implemented Interfaces:
Plotter<S>
Direct Known Subclasses:
ContourPlotter, DensityGridPlotter, LabelPlotter, ShapePlotter, SimpleDecalPlotter, SpotPlotter

public abstract class TuplePlotter<S extends Style>
extends Object
implements Plotter<S>

Skeleton implementation of Plotter used for plotters that plot positional data.

Since:
15 Feb 2013
Author:
Mark Taylor

Constructor Summary
protected TuplePlotter(String name, Icon icon, Coord[] extraCoords)
          Constructor.
 
Method Summary
 Coord[] getExtraCoords()
          Returns any coordinates used by this plotter additional to the base positions (those returned by DataGeom.getPosCoords() if hasPosition is true).
 Icon getPlotterIcon()
          Returns an icon for this plotter for use in user interface.
 String getPlotterName()
          Returns the name of this plotter for use in user interface.
 boolean hasPosition()
          Returns true.
 
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, getStyleKeys
 

Constructor Detail

TuplePlotter

protected TuplePlotter(String name,
                       Icon icon,
                       Coord[] extraCoords)
Constructor.

Parameters:
name - plotter name
icon - plotter icon
extraCoords - coordinates other than positional coordinates
Method Detail

getPlotterName

public String getPlotterName()
Description copied from interface: Plotter
Returns the name of this plotter for use in user interface.

Specified by:
getPlotterName in interface Plotter<S extends Style>
Returns:
user-directed plotter name

getPlotterIcon

public Icon getPlotterIcon()
Description copied from interface: Plotter
Returns an icon for this plotter for use in user interface.

Specified by:
getPlotterIcon in interface Plotter<S extends Style>
Returns:
plotter icon

hasPosition

public boolean hasPosition()
Returns true.

Specified by:
hasPosition in interface Plotter<S extends Style>
Returns:
true iff createLayer uses a DataGeom

getExtraCoords

public Coord[] getExtraCoords()
Description copied from interface: Plotter
Returns any coordinates used by this plotter additional to the base positions (those returned by DataGeom.getPosCoords() if hasPosition is true).

Specified by:
getExtraCoords in interface Plotter<S extends Style>
Returns:
coordinates apart from base positions


Copyright © 2013 Central Laboratory of the Research Councils. All Rights Reserved.