Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.gui.sequence
Interface LabelRenderer

All Known Implementing Classes:
  LabelRenderer.RenderNothing, SimpleLabelRenderer

    public interface LabelRenderer

The interface for things that can render labels for a line of information about a sequence.

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).

Author:
  Matthew Pocock

Nested Class Summary
`static class` | `LabelRenderer.RenderNothing`

Field Summary
`static LabelRenderer` | `RENDER_NOTHING`

Method Summary
`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.

Field Detail

### RENDER_NOTHING

    static final LabelRenderer RENDER_NOTHING

Method Detail

### paint

    void paint(Graphics2D g,
               SequenceRenderContext sp,
               int min,
               int max,
               SequenceRenderContext.Border border)

  Render a label for the information for sp to g.

  Parameters:
    `g` - the Graphics2D to render to
    `sp` - the SequencePanel that encapsulates the information to render
    `min` - the minimum symbol to render (inclusive)
    `max` - the maximum symbol to render (inclusive)

### getMinimumWidth

    double getMinimumWidth(SequenceRenderContext sp)

  Retrieve the minimum space required to render the label.

  Parameters:
    `sp` - the SequencePanel to return info for
  Returns:
    the leading distance of the renderer for that sequence panel

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD