RoundRectangularBeadRenderer (BioJava-1.5-beta API)
Keywords: org.biojava.bio.gui.sequence.RoundRectangularBeadRenderer 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 RoundRectangularBeadRenderer

    java.lang.Object
      org.biojava.utils.AbstractChangeable
          org.biojava.bio.gui.sequence.AbstractBeadRenderer
              org.biojava.bio.gui.sequence.RoundRectangularBeadRenderer

All Implemented Interfaces:
  Serializable, BeadFeatureRenderer, FeatureRenderer, Changeable

    public class RoundRectangularBeadRenderer

extends AbstractBeadRenderer

`RoundRectangularBeadRenderer` renders features as rectangles with rounded corners. Their outline and fill `Paint`, `Stroke`, feature depth, Y-axis displacement are configurable.

Since:
  1.2
Author:
  Keith James
See Also:
  Serialized Form

Field Summary
`protected double` | `arcHeight`
`protected double` | `arcWidth`
`protected RoundRectangle2D` | `rect`

Fields inherited from class org.biojava.bio.gui.sequence.AbstractBeadRenderer
`beadDepth, beadDisplacement, beadFill, beadOutline, beadStroke, delegates, delegationCache, DEPTH, DISPLACEMENT, FILL, OUTLINE, STROKE`

Constructor Summary
`RoundRectangularBeadRenderer()` Creates a new `RoundRectangularBeadRenderer` object with the default settings.
`RoundRectangularBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke, double arcWidth, double arcHeight)` Creates a new `RoundRectangularBeadRenderer`.

Method Summary
`double` | `getDepth(SequenceRenderContext context)` `getDepth` calculates the depth required by this renderer to display its beads.
`void` | `renderBead(Graphics2D g2, Feature f, SequenceRenderContext context)` `renderBead` renders features as a rectangle with rounded corners.

Methods inherited from class org.biojava.bio.gui.sequence.AbstractBeadRenderer
`getBeadDepth, getBeadDisplacement, getBeadFill, getBeadOutline, getBeadStroke, processMouseEvent, removeDelegateRenderer, renderFeature, setBeadDepth, setBeadDisplacement, setBeadFill, setBeadOutline, setBeadStroke, setDelegateRenderer`

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

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

Field Detail

### rect

    protected RoundRectangle2D rect

### arcWidth

    protected double arcWidth

### arcHeight

    protected double arcHeight

Constructor Detail

### RoundRectangularBeadRenderer

    public RoundRectangularBeadRenderer()

  Creates a new `RoundRectangularBeadRenderer` object with the default settings.

### RoundRectangularBeadRenderer

    public RoundRectangularBeadRenderer(double beadDepth,
                                        double beadDisplacement,
                                        Paint beadOutline,
                                        Paint beadFill,
                                        Stroke beadStroke,
                                        double arcWidth,
                                        double arcHeight)

  Creates a new `RoundRectangularBeadRenderer`.

  Parameters:
    `beadDepth` - a `double`.
    `beadDisplacement` - a `double`.
    `beadOutline` - a `Paint`.
    `beadFill` - a `Paint`.
    `beadStroke` - a `Stroke`.
    `arcWidth` - a `double` value which sets the arc width of the corners.
    `arcHeight` - a `double` value which sets the arc height of the corners.

Method Detail

### renderBead

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

  `renderBead` renders features as a rectangle with rounded corners.

  Specified by:
    `renderBead` in interface `BeadFeatureRenderer`
  Specified by:
    `renderBead` in class `AbstractBeadRenderer`
  Parameters:
    `g2` - a `Graphics2D`.
    `f` - a `Feature` to render.
    `context` - a `SequenceRenderContext` context.

### getDepth

    public double getDepth(SequenceRenderContext context)

  `getDepth` calculates the depth required by this renderer to display its beads.

  Specified by:
    `getDepth` in interface `FeatureRenderer`
  Overrides:
    `getDepth` in class `AbstractBeadRenderer`
  Parameters:
    `context` - a `SequenceRenderContext`.
  Returns:
    a `double`.

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