uk.ac.starlink.ttools.plot2.layer
Class MarkForm.MarkOutliner

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.layer.MarkForm.MarkOutliner
All Implemented Interfaces:
Outliner
Enclosing class:
MarkForm

public static class MarkForm.MarkOutliner
extends Object
implements Outliner

Outliner implementation for use with MarkForm.


Nested Class Summary
 
Nested classes/interfaces inherited from interface uk.ac.starlink.ttools.plot2.layer.Outliner
Outliner.ShapePainter
 
Constructor Summary
MarkForm.MarkOutliner(MarkShape shape, int size)
          Constructor.
 
Method Summary
 Object calculateBinPlan(Surface surface, DataGeom geom, Map<AuxScale,Range> auxRanges, DataStore dataStore, DataSpec dataSpec, Object[] knownPlans)
          Calculates an opaque object which contains the drawing of this outliner represented as an array of bins, one per pixel.
 Outliner.ShapePainter create2DPainter(Surface surface, DataGeom geom, Map<AuxScale,Range> auxRanges, PaperType2D paperType)
          Creates a ShapePainter object for plotting onto 2-dimensional surfaces.
 Outliner.ShapePainter create3DPainter(CubeSurface surface, DataGeom geom, Map<AuxScale,Range> auxRanges, PaperType3D paperType)
          Creates a ShapePainter object for plotting onto 3-dimensional surfaces.
 boolean equals(Object o)
           
 Map<AuxScale,AuxReader> getAuxRangers(DataGeom geom)
          Defines what non-axis ranging information is required by this outliner.
 int[] getBinCounts(Object plan)
          Returns the bin contents for a given bin plan produced by this object.
 Icon getLegendIcon()
          Returns an icon suitable for identifying points painted by this object in a plot legend.
 long getPointCount(Object plan)
          Returns the number of data positions which contributed to a BinPlan generated by this object.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkForm.MarkOutliner

public MarkForm.MarkOutliner(MarkShape shape,
                             int size)
Constructor.

Parameters:
shape - marker shape
size - marker size in pixels
Method Detail

getLegendIcon

public Icon getLegendIcon()
Description copied from interface: Outliner
Returns an icon suitable for identifying points painted by this object in a plot legend. The returned icon does not manipulate the colour of the graphics context it operates on.

Specified by:
getLegendIcon in interface Outliner
Returns:
legend icon for this outliner

getAuxRangers

public Map<AuxScale,AuxReader> getAuxRangers(DataGeom geom)
Description copied from interface: Outliner
Defines what non-axis ranging information is required by this outliner. The return value is a map in which the keys define the ranges that must be supplied to the painting methods, and the values are reader objects that can acquire these ranges from a dataset.

Specified by:
getAuxRangers in interface Outliner
Parameters:
geom - data geometry
Returns:
map of required scale keys to scale reader objects

create2DPainter

public Outliner.ShapePainter create2DPainter(Surface surface,
                                             DataGeom geom,
                                             Map<AuxScale,Range> auxRanges,
                                             PaperType2D paperType)
Description copied from interface: Outliner
Creates a ShapePainter object for plotting onto 2-dimensional surfaces.

Specified by:
create2DPainter in interface Outliner
Parameters:
surface - plot surface
geom - coordinate geometry
auxRanges - map of scale information required for plot
paperType - 2-d paper type
Returns:
new 2-d painter

create3DPainter

public Outliner.ShapePainter create3DPainter(CubeSurface surface,
                                             DataGeom geom,
                                             Map<AuxScale,Range> auxRanges,
                                             PaperType3D paperType)
Description copied from interface: Outliner
Creates a ShapePainter object for plotting onto 3-dimensional surfaces.

Specified by:
create3DPainter in interface Outliner
Parameters:
surface - 3-d plot surface
geom - coordinate geometry
auxRanges - map of scale information required for plot
paperType - 3-d paper type
Returns:
new 3-d painter

calculateBinPlan

public Object calculateBinPlan(Surface surface,
                               DataGeom geom,
                               Map<AuxScale,Range> auxRanges,
                               DataStore dataStore,
                               DataSpec dataSpec,
                               Object[] knownPlans)
Description copied from interface: Outliner
Calculates an opaque object which contains the drawing of this outliner represented as an array of bins, one per pixel. To make sense of the returned object, use the Outliner.getBinCounts(java.lang.Object) and Outliner.getPointCount(java.lang.Object) methods.

If one of the supplied knowPlans fits the bill, it will be returned without further calculation.

Specified by:
calculateBinPlan in interface Outliner
Parameters:
surface - plot surface
geom - coordinate geometry
auxRanges - map of scale information required for plot
dataStore - data storage
dataSpec - coordinate specification
knownPlans - list of existing plans
Returns:
bin plan, either newly calculated or taken from knownPlans

getBinCounts

public int[] getBinCounts(Object plan)
Description copied from interface: Outliner
Returns the bin contents for a given bin plan produced by this object.

Specified by:
getBinCounts in interface Outliner
Parameters:
plan - bin plan returned from calculateBinPlan
Returns:
array of counts, one element per bin

getPointCount

public long getPointCount(Object plan)
Description copied from interface: Outliner
Returns the number of data positions which contributed to a BinPlan generated by this object. This may or may not be the same as the sum of the pixel counts in the binCounts array; if each data position might contribute multiple pixel hits, the numbers will not be the same.

Specified by:
getPointCount in interface Outliner
Parameters:
plan - bin plan returned from calculateBinPlan
Returns:
number of data positions in plan

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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