public interface LabelRenderer
Renderers are always activated within the context of a particular SequenceRenderContext. A single LabelRenderer can be shared among many sequence panels, or added multiple times to the same panel. The renderer is required to request how much leading and trailing space it requires, as well as the depth (space orthogonal to the direction that the sequence is rendered).
Modifier and Type | Interface and Description |
---|---|
static class |
LabelRenderer.RenderNothing |
Modifier and Type | Field and Description |
---|---|
static LabelRenderer |
RENDER_NOTHING |
Modifier and Type | Method and Description |
---|---|
double |
getMinimumWidth(SequenceRenderContext sp)
Retrieve the minimum space required to render the label.
|
void |
paint(Graphics2D g,
SequenceRenderContext sp,
int min,
int max,
SequenceRenderContext.Border border)
Render a label for the information for sp to g.
|
static final LabelRenderer RENDER_NOTHING
void paint(Graphics2D g, SequenceRenderContext sp, int min, int max, SequenceRenderContext.Border border)
g
- the Graphics2D to render tosp
- the SequencePanel that encapsulates the information to rendermin
- the minimum symbol to render (inclusive)max
- the maximum symbol to render (inclusive)double getMinimumWidth(SequenceRenderContext sp)
sp
- the SequencePanel to return info forCopyright © 2014 BioJava. All rights reserved.