SubCircularRendererContext (BioJava-1.5-beta API)
Keywords: org.biojava.bio.gui.sequence.SubCircularRendererContext class

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 SubCircularRendererContext

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

All Implemented Interfaces:
  CircularRendererContext

    public class SubCircularRendererContext

extends Object
implements CircularRendererContext

A renderer context that allows some or all properties of another context to be over-ridden.

Since:
  1.4
Author:
  Matthew Pocock

Constructor Summary
`SubCircularRendererContext(CircularRendererContext delegate, SymbolList symbols, FeatureHolder features, double radius)` Create a new sub context.

Method Summary
`double` | `getAngle(int indx)` Return the angle for an index into a sequence.
`FeatureHolder` | `getFeatures()` The features to render.
`int` | `getIndex(double angle)` Calculate the position in the sequence relating to the angle.
`double` | `getOffset()` Get the angle through which the origin of the sequence is rotated through.
`double` | `getRadius()` Get the current radius at which data should be rendered.
`SymbolList` | `getSymbols()` The SymbolList that is currently rendered by this context.

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

Constructor Detail

### SubCircularRendererContext

    public SubCircularRendererContext(CircularRendererContext delegate,
                                      SymbolList symbols,
                                      FeatureHolder features,
                                      double radius)

  Create a new sub context.

  Supply the real values for symbols, features and radius if you want this context to mask the values of the parent context. Otherwise, provide the default values.

  Parameters:
    `delegate` - the original context to wrap
    `symbols` - the SymbolList to return for getSymbols(), or null
    `features` - the FeatureHolder to return for getFeatures(), or null
    `radius` - the radius to return for getRadius(), or NaN
  Throws:
    `NullPointerException` - if delegate is null

Method Detail

### getOffset

    public double getOffset()

  Description copied from interface: `CircularRendererContext`
  Get the angle through which the origin of the sequence is rotated through.

  This is equivalent to adding the offset to all calculated angles.

  Specified by:
    `getOffset` in interface `CircularRendererContext`
  Returns:
    the rotation offset

### getAngle

    public double getAngle(int indx)

  Description copied from interface: `CircularRendererContext`
  Return the angle for an index into a sequence.

  Specified by:
    `getAngle` in interface `CircularRendererContext`
  Parameters:
    `indx` - the sequence offset
  Returns:
    the angle this offset is to be rendered to

### getIndex

    public int getIndex(double angle)

  Description copied from interface: `CircularRendererContext`
  Calculate the position in the sequence relating to the angle.

  Specified by:
    `getIndex` in interface `CircularRendererContext`
  Parameters:
    `angle` - the angle arround the circle
  Returns:
    the index of the symbol rendered at that angle

### getRadius

    public double getRadius()

  Description copied from interface: `CircularRendererContext`
  Get the current radius at which data should be rendered.

  Specified by:
    `getRadius` in interface `CircularRendererContext`
  Returns:
    the radius

### getSymbols

    public SymbolList getSymbols()

  Description copied from interface: `CircularRendererContext`
  The SymbolList that is currently rendered by this context.

  Specified by:
    `getSymbols` in interface `CircularRendererContext`
  Returns:
    the Sequence value

### getFeatures

    public FeatureHolder getFeatures()

  Description copied from interface: `CircularRendererContext`
  The features to render.

  Specified by:
    `getFeatures` in interface `CircularRendererContext`
  Returns:
    a FeatureHolder with the Features to render

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