Class AnalyticSurfaceLegend
- java.lang.Object
-
- gov.nasa.worldwindx.examples.analytics.AnalyticSurfaceLegend
-
- All Implemented Interfaces:
Renderable
public class AnalyticSurfaceLegend extends java.lang.Object implements Renderable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AnalyticSurfaceLegend.LabelAttributes
protected static class
AnalyticSurfaceLegend.LabelRenderable
protected static class
AnalyticSurfaceLegend.OrderedLabel
-
Field Summary
Fields Modifier and Type Field 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
-
Constructor Summary
Constructors Modifier Constructor Description protected
AnalyticSurfaceLegend()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 thisRenderable
to render itself using the provided draw context.void
setOpacity(double opacity)
void
setScreenLocation(java.awt.Point point)
void
setVisible(boolean visible)
-
-
-
Field Detail
-
DEFAULT_FONT
protected static final java.awt.Font DEFAULT_FONT
-
DEFAULT_COLOR
protected static final java.awt.Color DEFAULT_COLOR
-
DEFAULT_WIDTH
protected static final int DEFAULT_WIDTH
- See Also:
- Constant Field Values
-
DEFAULT_HEIGHT
protected static final int DEFAULT_HEIGHT
- See Also:
- Constant Field Values
-
visible
protected boolean visible
-
screenImage
protected ScreenImage screenImage
-
labels
protected java.lang.Iterable<? extends Renderable> labels
-
-
Method Detail
-
fromColorGradient
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)
-
fromColorGradient
public static AnalyticSurfaceLegend fromColorGradient(double minValue, double maxValue, double minHue, double maxHue, java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> labels, AnalyticSurfaceLegend.LabelAttributes titleLabel)
-
isVisible
public boolean isVisible()
-
setVisible
public void setVisible(boolean visible)
-
getOpacity
public double getOpacity()
-
setOpacity
public void setOpacity(double opacity)
-
getScreenLocation
public java.awt.Point getScreenLocation(DrawContext dc)
-
setScreenLocation
public void setScreenLocation(java.awt.Point point)
-
getWidth
public int getWidth(DrawContext dc)
-
getHeight
public int getHeight(DrawContext dc)
-
render
public void render(DrawContext dc)
Description copied from interface:Renderable
Causes thisRenderable
to render itself using the provided draw context.- Specified by:
render
in interfaceRenderable
- Parameters:
dc
- theDrawContext
to be used- See Also:
DrawContext
-
createDefaultColorGradientLabels
public static java.lang.Iterable<? extends AnalyticSurfaceLegend.LabelAttributes> createDefaultColorGradientLabels(double minValue, double maxValue, java.text.Format format)
-
createDefaultTitle
public static AnalyticSurfaceLegend.LabelAttributes createDefaultTitle(java.lang.String text)
-
createLegendLabelAttributes
public static AnalyticSurfaceLegend.LabelAttributes createLegendLabelAttributes(double value, java.lang.String text, java.awt.Font font, java.awt.Color color, double xOffset, double yOffset)
-
doRender
protected void doRender(DrawContext dc)
-
drawLabel
protected void drawLabel(DrawContext dc, AnalyticSurfaceLegend.LabelAttributes attr, double x, double y, java.lang.String halign, java.lang.String valign)
-
createColorGradientLegendImage
protected java.awt.image.BufferedImage createColorGradientLegendImage(int width, int height, double minHue, double maxHue, java.awt.Color borderColor)
-
createColorGradientLegendLabels
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)
-
-