public abstract class LegendPainter extends GlimpsePainter2D
Modifier and Type | Class and Description |
---|---|
static class |
LegendPainter.BlockLegendPainter |
static class |
LegendPainter.LegendPlacement |
static class |
LegendPainter.LineLegendPainter |
BYTES_PER_FLOAT, logger
Constructor and Description |
---|
LegendPainter(LegendPainter.LegendPlacement placement) |
Modifier and Type | Method and Description |
---|---|
void |
addItem(String label,
float[] rgba) |
void |
addItem(String label,
float r,
float g,
float b,
float a) |
void |
clear() |
void |
dispose(GlimpseContext context)
Free GPU and CPU memory associated with this this GlimpsePainter.
|
Font |
getFont() |
void |
paintTo(GlimpseContext context,
GlimpseBounds bounds,
Axis2D axis) |
void |
removeItem(String label) |
void |
setColor(String label,
float[] rgba) |
void |
setColor(String label,
float r,
float g,
float b,
float a) |
LegendPainter |
setFont(Font font) |
LegendPainter |
setFont(Font font,
boolean antialias) |
LegendPainter |
setFont(int size,
boolean bold) |
LegendPainter |
setFont(int size,
boolean bold,
boolean antialias) |
void |
setLegendItemWidth(int width)
Sets the width of the item to the left of the label in the legend.
|
void |
setLookAndFeel(LookAndFeel laf)
Sets display options for the painter based on the provided LookAndFeel.
|
void |
setOffset(int offsetX,
int offsetY) |
void |
setOffsetX(int offset) |
void |
setOffsetY(int offset) |
void |
setPlacement(LegendPainter.LegendPlacement placement) |
void |
setSpacing(int spacer)
Sets the space between elements in the legend.
|
LegendPainter |
setTextColor(float[] rgba) |
void |
setTextColor(float r,
float g,
float b,
float a) |
paintTo
isDisposed, isVisible, paintTo, setErrorHandling, setVisible
public LegendPainter(LegendPainter.LegendPlacement placement)
public LegendPainter setFont(Font font)
public LegendPainter setFont(Font font, boolean antialias)
public LegendPainter setFont(int size, boolean bold)
public LegendPainter setFont(int size, boolean bold, boolean antialias)
public Font getFont()
public LegendPainter setTextColor(float[] rgba)
public void setTextColor(float r, float g, float b, float a)
public void addItem(String label, float r, float g, float b, float a)
public void addItem(String label, float[] rgba)
public void removeItem(String label)
public void clear()
public void setColor(String label, float r, float g, float b, float a)
public void setColor(String label, float[] rgba)
public void setPlacement(LegendPainter.LegendPlacement placement)
public void setOffsetX(int offset)
public void setOffsetY(int offset)
public void setOffset(int offsetX, int offsetY)
public void setSpacing(int spacer)
spacer
- public void setLegendItemWidth(int width)
width
- public void paintTo(GlimpseContext context, GlimpseBounds bounds, Axis2D axis)
paintTo
in class GlimpsePainter2D
public void setLookAndFeel(LookAndFeel laf)
GlimpsePainter
setLookAndFeel
in interface GlimpsePainter
setLookAndFeel
in class GlimpsePainterImpl
public void dispose(GlimpseContext context)
GlimpsePainter
dispose
in interface GlimpsePainter
dispose
in class GlimpsePainterImpl
Copyright © 2013 Metron, Inc.. All rights reserved.