|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.geom.TickSkyAxisLabeller
public abstract class TickSkyAxisLabeller
Partial SkyAxisLabeller implementation that labels axes with positioned numeric labels.
Nested Class Summary | |
---|---|
static class |
TickSkyAxisLabeller.SkyTick
Aggregates a line label, graphics position and text anchor. |
Field Summary | |
---|---|
static Anchor |
X_ANCHOR
|
static Anchor |
Y_ANCHOR
|
Constructor Summary | |
---|---|
TickSkyAxisLabeller(String name,
String description)
Constructor. |
Method Summary | |
---|---|
protected abstract TickSkyAxisLabeller.SkyTick[] |
calculateTicks(double[][][] lines,
String[] labels,
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(String label,
double[][] line,
Rectangle bounds)
Constructs a single tick that sits outside the plot bounding box for a given grid line. |
static TickSkyAxisLabeller.SkyTick |
createInternalTick(String label,
double[][] line)
Constructs a single tick that sits inside the plot bounding box for a given grid line. |
String |
getLabellerDescription()
Returns a description for this mode. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Anchor X_ANCHOR
public static Anchor Y_ANCHOR
Constructor Detail |
---|
public TickSkyAxisLabeller(String name, String description)
name
- labeller namedescription
- labeller descriptionMethod Detail |
---|
public String getLabellerName()
SkyAxisLabeller
getLabellerName
in interface SkyAxisLabeller
public 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 renderer
protected abstract TickSkyAxisLabeller.SkyTick[] calculateTicks(double[][][] lines, String[] labels, 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 renderer
public static TickSkyAxisLabeller.SkyTick createExternalTick(String label, double[][] line, Rectangle bounds)
label
- tick textline
- grid line coordinates - array of (x,y) arraysbounds
- plot region boundspublic static TickSkyAxisLabeller.SkyTick createInternalTick(String label, double[][] line)
label
- tick textline
- grid line coordinates - array of (x,y) arrays
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |