org.biojava.bio.gui.sequence
Class SimpleLabelRenderer
java.lang.Object
|
+--org.biojava.utils.AbstractChangeable
|
+--org.biojava.bio.gui.sequence.SimpleLabelRenderer
- All Implemented Interfaces:
- Changeable, LabelRenderer
- public class SimpleLabelRenderer
- extends AbstractChangeable
- implements LabelRenderer
- Author:
- Matthew Pocock
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleLabelRenderer
public SimpleLabelRenderer()
getLabelGlyph
protected java.awt.Shape getLabelGlyph(SequenceRenderContext src,
java.awt.font.FontRenderContext frc)
setLabel
public void setLabel(java.lang.String label)
throws ChangeVetoException
ChangeVetoException
getLabel
public java.lang.String getLabel()
getMinimumWidth
public double getMinimumWidth(SequenceRenderContext sp)
- Description copied from interface:
LabelRenderer
- Retrieve the minimum space required to render the label.
- Specified by:
getMinimumWidth in interface LabelRenderer
- Parameters:
sp - the SequencePanel to return info for
- Returns:
- the leading distance of the renderer for that sequence panel
paint
public void paint(java.awt.Graphics2D g,
SequenceRenderContext sp,
int min,
int max,
SequenceRenderContext.Border side)
- Description copied from interface:
LabelRenderer
- Render a label for the information for sp to g.
- Specified by:
paint in interface LabelRenderer
- Parameters:
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)