Package 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
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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojava.bio.gui.sequence.SequenceRenderer
SequenceRenderer.RendererForwarder
-
Field Summary
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFilterAndGlyph
(FeatureFilter ff, Glyph g) boolean
Returns true if the givenFeatureFilter
is already contained in this renderer.double
Returns the depth property of this class.getFeatureFilter
(int i) Returns the ithFeatureFilter
in this renderer.Returns theGlyph
object which is assigned to the given feature filter.processMouseEvent
(FeatureHolder fh, SequenceRenderContext src, MouseEvent me) void
void
renderFeature
(Graphics2D g2, Feature f, SequenceRenderContext src) void
setDepth
(double depth) void
setGlyphForFilter
(FeatureFilter ff, Glyph glyph) Allows setting anotherGlyph
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
-
Field Details
-
fList
-
gList
-
-
Constructor Details
-
GlyphFeatureRenderer
public GlyphFeatureRenderer()
-
-
Method Details
-
addFilterAndGlyph
- Throws:
ChangeVetoException
-
removeFilterWithGlyph
- Throws:
ChangeVetoException
-
getFeatureFilter
Returns the ithFeatureFilter
in this renderer.- Parameters:
i
-- Returns:
- the featureFilter
-
containsFilter
Returns true if the givenFeatureFilter
is already contained in this renderer.- Parameters:
ff
-- Returns:
- flag if featurefilter is contained
-
setGlyphForFilter
Allows setting anotherGlyph
object to be painted for the given FeatureFilter.- Parameters:
ff
-glyph
-- Throws:
ChangeVetoException
NoSuchElementException
-
getGlyphForFilter
Returns theGlyph
object which is assigned to the given feature filter.- Parameters:
ff
-- Returns:
Glyph
object- Throws:
NoSuchElementException
-
setDepth
-
getDepth
Returns the depth property of this class.- Specified by:
getDepth
in interfaceFeatureRenderer
- Specified by:
getDepth
in interfaceSequenceRenderer
- Overrides:
getDepth
in classFilteringRenderer
- Parameters:
src
- the SequenceRenderContext to return info for- Returns:
- the depth
-
processMouseEvent
- Specified by:
processMouseEvent
in interfaceFeatureRenderer
-
renderFeature
- Specified by:
renderFeature
in interfaceFeatureRenderer
-