RbDe rbde-349 (20120127151154)

edu.mssm.crover.domain2d
Interface LoopTemplate

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractLoopTemplate, AlgorithmicLoopTemplate, MultiPointLoopTemplate

public interface LoopTemplate
extends Serializable

Templates of control points for loops.


Method Summary
 void adapt(int numberOfGlyphs, double distance)
          Adapts the template to accommodate the specified number of glyphs separated by a given distance dist.
 Point2D[] getAdapted()
          Adapted control points.
 Point2D[] getControls()
          Original control points.
 Point2D[] getGlyphPositions()
          Returns the positions of the glyphs when laid out on the adapted curve.
 Point2D getP0()
          Returns the first control point.
 Point2D getPn()
          Returns the last control point.
 Point2D getSpacer()
          The spacer that this template match.
 int glyphsNotDisplayed()
          Returns the number of glyphs that cannot fit on the adapted template.
 void setParameterMaxValue(float parameterMaxValue)
          Set the maximal parameter value for template path optimization.
 void setPossibleEllipses(int number)
          Sets the maximum number of ellipsis for this template.
 void setSpacer(Point2D spacer)
          Instructs the template to adapt to a new spacer.
 

Method Detail

getControls

Point2D[] getControls()
Original control points. P0 is at (0,0), Pn is at spacer

Returns:
the array of control points

getAdapted

Point2D[] getAdapted()
Adapted control points. These control point positions are calculated so that the Pn-P0 is still equal to the spacer while the template now accomodates a certain number of residues.

Returns:
the array of control points

getSpacer

Point2D getSpacer()
The spacer that this template match. It is equal to Pn-P0.

Returns:
the spacer

setSpacer

void setSpacer(Point2D spacer)
Instructs the template to adapt to a new spacer. The details of the adaptation are left to the implementation.

Parameters:
spacer - The spacer to adapt to

getP0

Point2D getP0()
Returns the first control point.

Returns:
the first control point

getPn

Point2D getPn()
Returns the last control point.

Returns:
the last control point

adapt

void adapt(int numberOfGlyphs,
           double distance)
Adapts the template to accommodate the specified number of glyphs separated by a given distance dist.

Parameters:
numberOfGlyphs - The number of glyphs that need to be accomodated
distance - The distance beteween each glyph

getGlyphPositions

Point2D[] getGlyphPositions()
Returns the positions of the glyphs when laid out on the adapted curve.

Returns:
an array of glyph positions

glyphsNotDisplayed

int glyphsNotDisplayed()
Returns the number of glyphs that cannot fit on the adapted template. Negative values indicate that more residues could fit on the curve that actually do.

Returns:
The number of glyphs that cannot fit using this template

setPossibleEllipses

void setPossibleEllipses(int number)
Sets the maximum number of ellipsis for this template. The template adjusts the length of the glyph position array according to the maximum number of ellipsis you provide.

Parameters:
number - The number of ellipses for this template

setParameterMaxValue

void setParameterMaxValue(float parameterMaxValue)
Set the maximal parameter value for template path optimization.

Parameters:
parameterMaxValue - Maximum value for the template parameter.

RbDe rbde-349 (20120127151154)

Copyright © 2003-2012 Institute for Computational Biomedicine, All Rights Reserved.