public class AnalyticSurfaceLegend extends Object implements Renderable
Modifier and Type | Class and Description |
---|---|
static interface |
AnalyticSurfaceLegend.LabelAttributes |
protected static class |
AnalyticSurfaceLegend.LabelRenderable |
protected static class |
AnalyticSurfaceLegend.OrderedLabel |
Modifier and Type | Field and Description |
---|---|
protected static Color |
DEFAULT_COLOR |
protected static Font |
DEFAULT_FONT |
protected static int |
DEFAULT_HEIGHT |
protected static int |
DEFAULT_WIDTH |
protected Iterable<? extends Renderable> |
labels |
protected ScreenImage |
screenImage |
protected boolean |
visible |
Modifier | Constructor and Description |
---|---|
protected |
AnalyticSurfaceLegend() |
Modifier and Type | Method and Description |
---|---|
protected BufferedImage |
createColorGradientLegendImage(int width,
int height,
double minHue,
double maxHue,
Color borderColor) |
protected Iterable<? extends Renderable> |
createColorGradientLegendLabels(int width,
int height,
double minValue,
double maxValue,
Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels,
AnalyticSurfaceLegend.LabelAttributes titleLabel) |
static Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> |
createDefaultColorGradientLabels(double minValue,
double maxValue,
Format format) |
static AnalyticSurfaceLegend.LabelAttributes |
createDefaultTitle(String text) |
static AnalyticSurfaceLegend.LabelAttributes |
createLegendLabelAttributes(double value,
String text,
Font font,
Color color,
double xOffset,
double yOffset) |
protected void |
doRender(DrawContext dc) |
protected void |
drawLabel(DrawContext dc,
AnalyticSurfaceLegend.LabelAttributes attr,
double x,
double y,
String halign,
String valign) |
static AnalyticSurfaceLegend |
fromColorGradient(double minValue,
double maxValue,
double minHue,
double maxHue,
Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels,
AnalyticSurfaceLegend.LabelAttributes titleLabel) |
static AnalyticSurfaceLegend |
fromColorGradient(int width,
int height,
double minValue,
double maxValue,
double minHue,
double maxHue,
Color borderColor,
Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels,
AnalyticSurfaceLegend.LabelAttributes titleLabel) |
int |
getHeight(DrawContext dc) |
double |
getOpacity() |
Point |
getScreenLocation(DrawContext dc) |
int |
getWidth(DrawContext dc) |
boolean |
isVisible() |
void |
render(DrawContext dc)
Causes this
Renderable to render itself using the provided draw context. |
void |
setOpacity(double opacity) |
void |
setScreenLocation(Point point) |
void |
setVisible(boolean visible) |
protected static final Color DEFAULT_COLOR
protected static final Font DEFAULT_FONT
protected static final int DEFAULT_HEIGHT
protected static final int DEFAULT_WIDTH
protected Iterable<? extends Renderable> labels
protected ScreenImage screenImage
protected boolean visible
protected BufferedImage createColorGradientLegendImage(int width, int height, double minHue, double maxHue, Color borderColor)
protected Iterable<? extends Renderable> createColorGradientLegendLabels(int width, int height, double minValue, double maxValue, Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels, AnalyticSurfaceLegend.LabelAttributes titleLabel)
public static Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> createDefaultColorGradientLabels(double minValue, double maxValue, Format format)
public static AnalyticSurfaceLegend.LabelAttributes createDefaultTitle(String text)
public static AnalyticSurfaceLegend.LabelAttributes createLegendLabelAttributes(double value, String text, Font font, Color color, double xOffset, double yOffset)
protected void doRender(DrawContext dc)
protected void drawLabel(DrawContext dc, AnalyticSurfaceLegend.LabelAttributes attr, double x, double y, String halign, String valign)
public static AnalyticSurfaceLegend fromColorGradient(double minValue, double maxValue, double minHue, double maxHue, Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels, AnalyticSurfaceLegend.LabelAttributes titleLabel)
public static AnalyticSurfaceLegend fromColorGradient(int width, int height, double minValue, double maxValue, double minHue, double maxHue, Color borderColor, Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels, AnalyticSurfaceLegend.LabelAttributes titleLabel)
public int getHeight(DrawContext dc)
public double getOpacity()
public Point getScreenLocation(DrawContext dc)
public int getWidth(DrawContext dc)
public boolean isVisible()
public void render(DrawContext dc)
Renderable
Renderable
to render itself using the provided draw context.render
in interface Renderable
dc
- the DrawContext
to be usedDrawContext
public void setOpacity(double opacity)
public void setScreenLocation(Point point)
public void setVisible(boolean visible)