SkyAxisLabeller
public abstract class TickSkyAxisLabeller extends java.lang.Object implements SkyAxisLabeller
Modifier and Type | Class | Description |
---|---|---|
static class |
TickSkyAxisLabeller.SkyTick |
Aggregates a line label, graphics position and text anchor.
|
Modifier and Type | Field | Description |
---|---|---|
static Anchor |
X_ANCHOR |
|
static Anchor |
Y_ANCHOR |
Constructor | Description |
---|---|
TickSkyAxisLabeller(java.lang.String name,
java.lang.String description) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
protected abstract TickSkyAxisLabeller.SkyTick[] |
calculateTicks(double[][][] lines,
java.lang.String[] labels,
java.awt.Rectangle plotBounds) |
Returns a list of ticks for labelling lines produced by a
GridLiner.
|
AxisAnnotation |
createAxisAnnotation(GridLiner gridLiner,
Captioner captioner) |
Returns an axis annotation object for a given grid painter and
captioner.
|
static TickSkyAxisLabeller.SkyTick |
createExternalTick(java.lang.String label,
double[][] line,
java.awt.Rectangle bounds) |
Constructs a single tick that sits outside the plot bounding box
for a given grid line.
|
static TickSkyAxisLabeller.SkyTick |
createInternalTick(java.lang.String label,
double[][] line) |
Constructs a single tick that sits inside the plot bounding box
for a given grid line.
|
java.lang.String |
getLabellerDescription() |
Returns a description for this mode.
|
java.lang.String |
getLabellerName() |
Returns a name for this axis labelling mode.
|
protected TickSkyAxisLabeller.SkyTick[] |
removeOverlaps(TickSkyAxisLabeller.SkyTick[] ticks,
Captioner captioner) |
Takes a list of ticks and removes some elements if they are
so crowded together the labels overlap.
|
public TickSkyAxisLabeller(java.lang.String name, java.lang.String description)
name
- labeller namedescription
- labeller descriptionpublic java.lang.String getLabellerName()
SkyAxisLabeller
getLabellerName
in interface SkyAxisLabeller
public java.lang.String getLabellerDescription()
SkyAxisLabeller
getLabellerDescription
in interface SkyAxisLabeller
public AxisAnnotation createAxisAnnotation(GridLiner gridLiner, Captioner captioner)
SkyAxisLabeller
createAxisAnnotation
in interface SkyAxisLabeller
gridLiner
- grid lines for a sky plotcaptioner
- text rendererprotected abstract TickSkyAxisLabeller.SkyTick[] calculateTicks(double[][][] lines, java.lang.String[] labels, java.awt.Rectangle plotBounds)
lines
- gridliner line point arraylabels
- gridliner line label arrayplotBounds
- extent of plot region in graphics coordinatesGridLiner
protected TickSkyAxisLabeller.SkyTick[] removeOverlaps(TickSkyAxisLabeller.SkyTick[] ticks, Captioner captioner)
ticks
- input tick listcaptioner
- text rendererpublic static TickSkyAxisLabeller.SkyTick createExternalTick(java.lang.String label, double[][] line, java.awt.Rectangle bounds)
label
- tick textline
- grid line coordinates - array of (x,y) arraysbounds
- plot region boundspublic static TickSkyAxisLabeller.SkyTick createInternalTick(java.lang.String label, double[][] line)
label
- tick textline
- grid line coordinates - array of (x,y) arraysCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.