public class SimpleLabelRenderer extends AbstractChangeable implements LabelRenderer
LabelRenderer.RenderNothing
Modifier and Type | Field and Description |
---|---|
static ChangeType |
LABEL |
RENDER_NOTHING
Constructor and Description |
---|
SimpleLabelRenderer() |
Modifier and Type | Method and Description |
---|---|
String |
getLabel() |
protected Shape |
getLabelGlyph(SequenceRenderContext src,
FontRenderContext frc) |
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 side)
Render a label for the information for sp to g.
|
void |
setLabel(String label) |
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
public static final ChangeType LABEL
public SimpleLabelRenderer()
protected Shape getLabelGlyph(SequenceRenderContext src, FontRenderContext frc)
public void setLabel(String label) throws ChangeVetoException
ChangeVetoException
public double getMinimumWidth(SequenceRenderContext sp)
LabelRenderer
getMinimumWidth
in interface LabelRenderer
sp
- the SequencePanel to return info forpublic void paint(Graphics2D g, SequenceRenderContext sp, int min, int max, SequenceRenderContext.Border side)
LabelRenderer
paint
in interface LabelRenderer
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)Copyright © 2014 BioJava. All rights reserved.