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
Class BasicImapRenderer

    java.lang.Object
      org.biojava.bio.gui.sequence.BasicImapRenderer

All Implemented Interfaces:
  Serializable, FeatureRenderer, ImageMapRenderer

    public class BasicImapRenderer

extends Object
implements ImageMapRenderer, Serializable

`BasicImapRenderer` is a decorator for `BasicFeatureRenderer` which adds the ability to create HTML image map coordinates which correspond to the feature rendering produced by the `BasicFeatureRenderer`.

Since:
  1.3
Author:
  Simon Foote
See Also:
  Serialized Form

Constructor Summary
`BasicImapRenderer(BasicFeatureRenderer renderer, ImageMap imageMap, URLFactory urlFactory)` Creates a new `BasicImapRenderer`.

Method Summary
`double` | `getDepth(SequenceRenderContext context)`
`ImageMap` | `getImageMap()` `getImageMap` returns the current image map.
`FeatureHolder` | `processMouseEvent(FeatureHolder holder, SequenceRenderContext context, MouseEvent mEvent)`
`void` | `renderFeature(Graphics2D g2, Feature f, SequenceRenderContext context)`
`void` | `renderImageMap(Graphics2D g2, Feature f, SequenceRenderContext context)` `renderImageMap` writes a set of image map coordinates corresponding to the rectangle sections drawn by the renderer.
`void` | `setImageMap(ImageMap imageMap)` `setImageMap` sets the current image map.

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

Constructor Detail

### BasicImapRenderer

    public BasicImapRenderer(BasicFeatureRenderer renderer,
                             ImageMap imageMap,
                             URLFactory urlFactory)

  Creates a new `BasicImapRenderer`.

  Parameters:
    `renderer` - a `BasicFeatureRenderer`.
    `imageMap` - an `ImageMap`.
    `urlFactory` - an `URLFactory` which should be capable of creating a suitable URL from each `Feature` on the `Sequence` to be rendered.

Method Detail

### getImageMap

    public ImageMap getImageMap()

  `getImageMap` returns the current image map.

  Returns:
    an `ImageMap`.

### setImageMap

    public void setImageMap(ImageMap imageMap)

  `setImageMap` sets the current image map.

  Parameters:
    `imageMap` - an `ImageMap`.

### renderImageMap

    public void renderImageMap(Graphics2D g2,
                               Feature f,
                               SequenceRenderContext context)

  `renderImageMap` writes 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 rendered `Feature` set as their user object.

  This method is called by `renderFeature` when a raster image is rendered.

  Specified by:
    `renderImageMap` in interface `ImageMapRenderer`
  Parameters:
    `g2` - a `Graphics2D`.
    `f` - a `Feature`.
    `context` - a `SequenceRenderContext`.

### renderFeature

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

  Specified by:
    `renderFeature` in interface `FeatureRenderer`

### getDepth

    public double getDepth(SequenceRenderContext context)

  Specified by:
    `getDepth` in interface `FeatureRenderer`

### processMouseEvent

    public FeatureHolder processMouseEvent(FeatureHolder holder,
                                           SequenceRenderContext context,
                                           MouseEvent mEvent)

  Specified by:
    `processMouseEvent` in interface `FeatureRenderer`

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