## org.biojava.bio.gui.sequence
Class GlyphFeatureRenderer

    java.lang.Object
      org.biojava.utils.AbstractChangeable
          org.biojava.bio.gui.sequence.SequenceRendererWrapper
              org.biojava.bio.gui.sequence.FilteringRenderer
                  org.biojava.bio.gui.sequence.GlyphFeatureRenderer

All Implemented Interfaces:
  Serializable, FeatureRenderer, SequenceRenderer, Changeable

Direct Known Subclasses:
  SecondaryStructureFeatureRenderer

    public class GlyphFeatureRenderer

extends FilteringRenderer
implements FeatureRenderer

A FeatureRenderer that renders a particular Glyph for Features accepted by a particular FeatureFilter

Since:
  1.5
Author:
  Mark Southern, Andreas Dräger
See Also:
  `Glyph`, Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface org.biojava.bio.gui.sequence.SequenceRenderer
`SequenceRenderer.RendererForwarder`

Field Summary
`protected List<FeatureFilter>` `fList`
`protected List<Glyph>` `gList`

Fields inherited from class org.biojava.bio.gui.sequence.FilteringRenderer
`filter, FILTER, recurse, RECURSE`

Fields inherited from class org.biojava.bio.gui.sequence.SequenceRendererWrapper
`RENDERER`

Constructor Summary
`GlyphFeatureRenderer()`

Method Summary
`void` `addFilterAndGlyph(FeatureFilter ff, Glyph g)`
`boolean` `containsFilter(FeatureFilter ff)` Returns true if the given `FeatureFilter` is already contained in this renderer.
`double` `getDepth(SequenceRenderContext src)` Returns the depth property of this class.
`FeatureFilter` `getFeatureFilter(int i)` Returns the ith `FeatureFilter` in this renderer.
`Glyph` `getGlyphForFilter(FeatureFilter ff)` Returns the `Glyph` object which is assigned to the given feature filter.
`FeatureHolder` `processMouseEvent(FeatureHolder fh, SequenceRenderContext src, MouseEvent me)`
`void` `removeFilterWithGlyph(FeatureFilter ff)`
`void` `renderFeature(Graphics2D g2, Feature f, SequenceRenderContext src)`
`void` `setDepth(double depth)`
`void` `setGlyphForFilter(FeatureFilter ff, Glyph glyph)` Allows setting another `Glyph` object to be painted for the given FeatureFilter.

Methods inherited from class org.biojava.bio.gui.sequence.FilteringRenderer
`getChangeSupport, getContext, getFilter, getMinimumLeader, getMinimumTrailer, getRecurse, hasListeners, paint, processMouseEvent, setFilter, setRecurse, toString`

Methods inherited from class org.biojava.bio.gui.sequence.SequenceRendererWrapper
`getRenderer, setRenderer`

Methods inherited from class org.biojava.utils.AbstractChangeable
`addChangeListener, addChangeListener, generateChangeSupport, hasListeners, isUnchanging, removeChangeListener, removeChangeListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### fList

    protected List<FeatureFilter> fList

### gList

    protected List<Glyph> gList

Constructor Detail

### GlyphFeatureRenderer

    public GlyphFeatureRenderer()

Method Detail

### addFilterAndGlyph

    public void addFilterAndGlyph(FeatureFilter ff,
                                  Glyph g)
                           throws ChangeVetoException

  Throws:
    `ChangeVetoException`

### removeFilterWithGlyph

    public void removeFilterWithGlyph(FeatureFilter ff)
                               throws ChangeVetoException

  Throws:
    `ChangeVetoException`

### getFeatureFilter

    public FeatureFilter getFeatureFilter(int i)

  Returns the ith `FeatureFilter` in this renderer.

  Parameters:
    `i` -
  Returns:
    the featureFilter

### containsFilter

    public boolean containsFilter(FeatureFilter ff)

  Returns true if the given `FeatureFilter` is already contained in this renderer.

  Parameters:
    `ff` -
  Returns:
    flag if featurefilter is contained

### setGlyphForFilter

    public void setGlyphForFilter(FeatureFilter ff,
                                  Glyph glyph)
                           throws NoSuchElementException

  Allows setting another `Glyph` object to be painted for the given FeatureFilter.

  Parameters:
    `ff` -
    `glyph` -
  Throws:
    `ChangeVetoException`
    `NoSuchElementException`

### getGlyphForFilter

    public Glyph getGlyphForFilter(FeatureFilter ff)
                            throws NoSuchElementException

  Returns the `Glyph` object which is assigned to the given feature filter.

  Parameters:
    `ff` -
  Returns:
    `Glyph` object
  Throws:
    `NoSuchElementException`

### setDepth

    public void setDepth(double depth)

### getDepth

    public double getDepth(SequenceRenderContext src)

  Returns the depth property of this class.

  Specified by:
    `getDepth` in interface `FeatureRenderer`
  Specified by:
    `getDepth` in interface `SequenceRenderer`
  Overrides:
    `getDepth` in class `FilteringRenderer`
  Parameters:
    `src` - the SequenceRenderContext to return info for
  Returns:
    the depth

### processMouseEvent

    public FeatureHolder processMouseEvent(FeatureHolder fh,
                                           SequenceRenderContext src,
                                           MouseEvent me)

  Specified by:
    `processMouseEvent` in interface `FeatureRenderer`

### renderFeature

    public void renderFeature(Graphics2D g2,
                              Feature f,
                              SequenceRenderContext src)

  Specified by:
    `renderFeature` in interface `FeatureRenderer`