Package org.biojava.bio.gui.sequence
Class ZiggyImapRenderer
java.lang.Object
org.biojava.bio.gui.sequence.ZiggyImapRenderer
- All Implemented Interfaces:
Serializable,FeatureRenderer,ImageMapRenderer
ZiggyImapRenderer is a decorator for
ZiggyFeatureRenderer which adds the ability to create
HTML image map coordinates which correspond to the feature
rendering produced by the ZiggyFeatureRenderer. These
coordinates correspond to the block regions of the image rather
than the "elbow" sections which join the locations.
- Since:
- 1.3
- Author:
- Keith James
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionZiggyImapRenderer(ZiggyFeatureRenderer renderer, ImageMap imageMap, URLFactory urlFactory) Creates a newZiggyImapRenderer. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDepth(SequenceRenderContext context) getImageMapreturns the current image map.processMouseEvent(FeatureHolder holder, SequenceRenderContext context, MouseEvent mEvent) voidrenderFeature(Graphics2D g2, Feature f, SequenceRenderContext context) voidrenderImageMap(Graphics2D g2, Feature f, SequenceRenderContext context) renderImageMapwrites a set of image map coordinates corresponding to the rectangle sections drawn by the renderer.voidsetImageMap(ImageMap imageMap) setImageMapsets the current image map.
-
Constructor Details
-
ZiggyImapRenderer
Creates a newZiggyImapRenderer.- Parameters:
renderer- aZiggyFeatureRenderer.imageMap- anImageMap.urlFactory- anURLFactorywhich should be capable of creating a suitable URL from eachFeatureon theSequenceto be rendered.
-
-
Method Details
-
getImageMap
getImageMapreturns the current image map.- Returns:
- an
ImageMap.
-
setImageMap
setImageMapsets the current image map.- Parameters:
imageMap- anImageMap.
-
renderImageMap
renderImageMapwrites a set of image map coordinates corresponding to the rectangle sections drawn by the renderer. All the block regions of the image receive the same URL. The hotspots created by this method have the renderedFeatureset as their user object.This method is called by
renderFeaturewhen a raster image is rendered.- Specified by:
renderImageMapin interfaceImageMapRenderer- Parameters:
g2- aGraphics2D.f- aFeature.context- aSequenceRenderContext.
-
renderFeature
- Specified by:
renderFeaturein interfaceFeatureRenderer
-
getDepth
- Specified by:
getDepthin interfaceFeatureRenderer
-
processMouseEvent
public FeatureHolder processMouseEvent(FeatureHolder holder, SequenceRenderContext context, MouseEvent mEvent) - Specified by:
processMouseEventin interfaceFeatureRenderer
-