RbDe rbde-349 (20120127151154)

edu.mssm.crover.domain2d
Interface ResidueGlyphFactory

All Known Implementing Classes:
ResidueGlyphFactoryImpl

public interface ResidueGlyphFactory

Factory to create ResidueGlyph objects.


Method Summary
 ResidueGlyph createResidueGlyph(ResidueModel model)
          Create a residue glyph.
 ResidueGlyph findGlyph(int position)
          Returns the residue glyph that represents this model.
 ResidueGlyph findGlyph(ResidueModel model)
          Returns the residue glyph that represents this model.
 int getBorder()
          Returns the width of the invisible border around residue glyphs.
 int getGLyphCount()
          Returns the number of glyphs this factory built.
 ResidueGlyph[] getGlyphs()
          Returns the glyphs built by this factory.
 double getInterGlyphDistance()
          Returns the suggested inter-glyph distance.
 Rectangle2D getRenderingBox()
          Returns the box in which the glyph rendering is being done.
 Dimension2D getTotalSize()
          Returns the total size of a glyph including the border.
 void register(ResidueGlyph glyph, ResidueModel model)
          Registers this glyph with the factory as if it was created though it.
 void release(ResidueGlyph glyph)
          Release the residue glyph.
 

Method Detail

createResidueGlyph

ResidueGlyph createResidueGlyph(ResidueModel model)
Create a residue glyph.

Parameters:
model - The model used to build the glyph
Returns:
A glyph created with the given model

getGlyphs

ResidueGlyph[] getGlyphs()
Returns the glyphs built by this factory.

Returns:
The glyphs that were built by this factory.

findGlyph

ResidueGlyph findGlyph(ResidueModel model)
Returns the residue glyph that represents this model.

Parameters:
model - The model to find the glyph for
Returns:
The residue glyph or null if the residue model is not represented by a glyph constructed with this factory.

findGlyph

ResidueGlyph findGlyph(int position)
Returns the residue glyph that represents this model. Finds it from its position in the sequence.

Parameters:
position - The position to use in order to find the glyph
Returns:
the glyph at the given position

getGLyphCount

int getGLyphCount()
Returns the number of glyphs this factory built.

Returns:
the number of glyphs created with this factory

release

void release(ResidueGlyph glyph)
Release the residue glyph. In order to be garbage collected, a glyph must be released from the factory that created it.

Parameters:
glyph - The glyph to remove from this factory

register

void register(ResidueGlyph glyph,
              ResidueModel model)
Registers this glyph with the factory as if it was created though it.

Parameters:
glyph - The glyph to register
model - The model associated with the glyph

getInterGlyphDistance

double getInterGlyphDistance()
Returns the suggested inter-glyph distance. This distance should be observed when laying out residue glyphs to avoid an overlap of their rendering.

Returns:
the suggested distance between glyphs

getTotalSize

Dimension2D getTotalSize()
Returns the total size of a glyph including the border.

Returns:
The dimension of glyphs created by this factory

getBorder

int getBorder()
Returns the width of the invisible border around residue glyphs.

Returns:
the width of the glyph border

getRenderingBox

Rectangle2D getRenderingBox()
Returns the box in which the glyph rendering is being done. This box excludes the border of the residue glyph.

Returns:
The rectangle around the glyph

RbDe rbde-349 (20120127151154)

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