edu.mssm.crover.domain2d
Interface ResidueGlyphFactory

All Known Implementing Classes:
ResidueGlyphFactoryImpl

public interface ResidueGlyphFactory

Factory to create ResidueGlyphs.


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 this glyphs.
 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. This method is overloaded by the implementation.


getGlyphs

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

Returns:
The model that were built by this factory.

findGlyph

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

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.


getGlyphCount

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


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.


register

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


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.


getTotalSize

Dimension2D getTotalSize()
Returns the total size of this glyphs. The total size includes the border.


getBorder

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


getRenderingBox

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



Copyright © 2004 Weill Cornell Medical College. All Rights Reserved.