public class AnalyticSurfaceLegend extends java.lang.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 java.awt.Color |
DEFAULT_COLOR |
protected static java.awt.Font |
DEFAULT_FONT |
protected static int |
DEFAULT_HEIGHT |
protected static int |
DEFAULT_WIDTH |
protected java.lang.Iterable<? extends Renderable> |
labels |
protected ScreenImage |
screenImage |
protected boolean |
visible |
Modifier | Constructor and Description |
---|---|
protected |
AnalyticSurfaceLegend() |
Modifier and Type | Method and Description |
---|---|
protected java.awt.image.BufferedImage |
createColorGradientLegendImage(int width,
int height,
double minHue,
double maxHue,
java.awt.Color borderColor) |
protected java.lang.Iterable<? extends Renderable> |
createColorGradientLegendLabels(int width,
int height,
double minValue,
double maxValue,
java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels,
AnalyticSurfaceLegend.LabelAttributes titleLabel) |
static java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> |
createDefaultColorGradientLabels(double minValue,
double maxValue,
java.text.Format format) |
static AnalyticSurfaceLegend.LabelAttributes |
createDefaultTitle(java.lang.String text) |
static AnalyticSurfaceLegend.LabelAttributes |
createLegendLabelAttributes(double value,
java.lang.String text,
java.awt.Font font,
java.awt.Color color,
double xOffset,
double yOffset) |
protected void |
doRender(DrawContext dc) |
protected void |
drawLabel(DrawContext dc,
AnalyticSurfaceLegend.LabelAttributes attr,
double x,
double y,
java.lang.String halign,
java.lang.String valign) |
static AnalyticSurfaceLegend |
fromColorGradient(double minValue,
double maxValue,
double minHue,
double maxHue,
java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels,
AnalyticSurfaceLegend.LabelAttributes titleLabel) |
static AnalyticSurfaceLegend |
fromColorGradient(int width,
int height,
double minValue,
double maxValue,
double minHue,
double maxHue,
java.awt.Color borderColor,
java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels,
AnalyticSurfaceLegend.LabelAttributes titleLabel) |
int |
getHeight(DrawContext dc) |
double |
getOpacity() |
java.awt.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(java.awt.Point point) |
void |
setVisible(boolean visible) |
protected static final java.awt.Color DEFAULT_COLOR
protected static final java.awt.Font DEFAULT_FONT
protected static final int DEFAULT_HEIGHT
protected static final int DEFAULT_WIDTH
protected java.lang.Iterable<? extends Renderable> labels
protected ScreenImage screenImage
protected boolean visible
protected java.awt.image.BufferedImage createColorGradientLegendImage(int width, int height, double minHue, double maxHue, java.awt.Color borderColor)
protected java.lang.Iterable<? extends Renderable> createColorGradientLegendLabels(int width, int height, double minValue, double maxValue, java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels, AnalyticSurfaceLegend.LabelAttributes titleLabel)
public static java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> createDefaultColorGradientLabels(double minValue, double maxValue, java.text.Format format)
public static AnalyticSurfaceLegend.LabelAttributes createDefaultTitle(java.lang.String text)
public static AnalyticSurfaceLegend.LabelAttributes createLegendLabelAttributes(double value, java.lang.String text, java.awt.Font font, java.awt.Color color, double xOffset, double yOffset)
protected void doRender(DrawContext dc)
protected void drawLabel(DrawContext dc, AnalyticSurfaceLegend.LabelAttributes attr, double x, double y, java.lang.String halign, java.lang.String valign)
public static AnalyticSurfaceLegend fromColorGradient(double minValue, double maxValue, double minHue, double maxHue, java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels, AnalyticSurfaceLegend.LabelAttributes titleLabel)
public static AnalyticSurfaceLegend fromColorGradient(int width, int height, double minValue, double maxValue, double minHue, double maxHue, java.awt.Color borderColor, java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels, AnalyticSurfaceLegend.LabelAttributes titleLabel)
public int getHeight(DrawContext dc)
public double getOpacity()
public java.awt.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(java.awt.Point point)
public void setVisible(boolean visible)