RbDe rbde-349 (20120127151154)

edu.mssm.crover.webservices.rbde
Interface CustomizedDiagram

All Superinterfaces:
Serializable
All Known Implementing Classes:
CustomizedDiagramImpl1_0, CustomizedDiagramImpl1_1, CustomizedDiagramImpl3_0, CustomizedDiagramImpl5_0

public interface CustomizedDiagram
extends Serializable

Encapsulates all necessary diagram components for storage. Contains functionality to rebuild or repaint diagram.


Method Summary
 void dispose()
          Dispose of the resources used by this CustomizedDiagram.
 void flush()
          Flush the resources used by this CustomizedDiagram.
 ColorAnnotationsColorScheme getColorAnnotationsColorScheme()
          Returns the ColorAnnotationsColorScheme that encapsulates the color scheme for residue glyphs.
 ResidueColorScheme getDefaultColorScheme()
          Returns the current default ResidueColorScheme.
 Diagram getDiagram()
          Returns Diagram representation of the sequence diagram.
 boolean getElipses(int residue)
          Returns the elipsable state of the residue.
 Image getImage()
          Returns the image representation of the current sequence diagram.
 double getImageScaleFactor()
          Returns the the scale ratio for the image.
 long getImageTime()
          Returns time the last image has been rebuild or repainted.
 Point getNtermDirection()
          Returns starting direction of the N-terminus.
 AnnotatedBioSequence getSequence()
          Get the sequence this customized diagram represents.
 void setDefaultColorScheme(ResidueColorScheme colorScheme)
          Sets the default color scheme of residue glyphs.
 void setElipses(int residue, boolean elipsesOK)
          Sets the state of the residue to be or not to be able to be included in elipsis.
 void setImageScaleFactor(double factor)
          Sets the scale ratio for the image returned by getImage().
 void setNeedRebuildImage()
          After calling this method the image returned next by getImage() will be rebuilded first.
 void setNeedRepaintImage()
          After calling this method the image returned next by getImage() will be repainted first.
 void setNtermDirectionDown()
          Sets the starting direction of the N-terminus to go downwords.
 void setNtermDirectionUp()
          Sets the starting direction of the N-terminus to go upwords.
 void setSequence(AnnotatedBioSequence sequence)
          Sets AnnotatedBioSequence and resets all other fields to initial empty state.
 

Method Detail

setSequence

void setSequence(AnnotatedBioSequence sequence)
Sets AnnotatedBioSequence and resets all other fields to initial empty state.

Parameters:
sequence - The sequence to set

getSequence

AnnotatedBioSequence getSequence()
Get the sequence this customized diagram represents.

Returns:
The sequence repreented by this diagram
See Also:
setSequence(edu.mssm.crover.representation.AnnotatedBioSequence)

setNtermDirectionUp

void setNtermDirectionUp()
Sets the starting direction of the N-terminus to go upwords.


setNtermDirectionDown

void setNtermDirectionDown()
Sets the starting direction of the N-terminus to go downwords.


getNtermDirection

Point getNtermDirection()
Returns starting direction of the N-terminus.

Returns:
the direction of the N-terminus
See Also:
setNtermDirectionUp(), setNtermDirectionDown()

getColorAnnotationsColorScheme

ColorAnnotationsColorScheme getColorAnnotationsColorScheme()
Returns the ColorAnnotationsColorScheme that encapsulates the color scheme for residue glyphs.

Returns:
the annotation color scheme for the diagram

setDefaultColorScheme

void setDefaultColorScheme(ResidueColorScheme colorScheme)
Sets the default color scheme of residue glyphs. When no other color is specified for a particular residue glyph, it defaults to color set by this ResidueColorScheme.

Parameters:
colorScheme - The color scheme to use by default

getDefaultColorScheme

ResidueColorScheme getDefaultColorScheme()
Returns the current default ResidueColorScheme.

Returns:
the default color scheme
See Also:
setDefaultColorScheme(edu.mssm.crover.domain2d.ResidueColorScheme)

getImageScaleFactor

double getImageScaleFactor()
Returns the the scale ratio for the image.

Returns:
the scale ratio for the image
See Also:
setImageScaleFactor(double)

setImageScaleFactor

void setImageScaleFactor(double factor)
Sets the scale ratio for the image returned by getImage(). Accepted values are double between 0 and 1.

Parameters:
factor - the scale ratio to use for the image
See Also:
getImageScaleFactor()

setNeedRebuildImage

void setNeedRebuildImage()
After calling this method the image returned next by getImage() will be rebuilded first. Is called when the layout of the residue glyphs changes.


setNeedRepaintImage

void setNeedRepaintImage()
After calling this method the image returned next by getImage() will be repainted first. Is being used when the layout of the residue glyphs does not change, but the colors do.


getImage

Image getImage()
Returns the image representation of the current sequence diagram.

Returns:
The actual image that the diagram represents

getDiagram

Diagram getDiagram()
Returns Diagram representation of the sequence diagram.

Returns:
The diagram for this sequence

getImageTime

long getImageTime()
Returns time the last image has been rebuild or repainted. If there is an outstanding request for rebuilding or repainting the Image (before the getImage() has been called), generates new time. In that case the rebuilding or repainting performed by next request of getImage() does not change this time.

Returns:
The last time that the image has been rebuilt or repainted

setElipses

void setElipses(int residue,
                boolean elipsesOK)
Sets the state of the residue to be or not to be able to be included in elipsis.

Parameters:
residue - The residue to set the include status for
elipsesOK - true if this residue can be included in an ellipses, false otherwise

getElipses

boolean getElipses(int residue)
Returns the elipsable state of the residue.

Parameters:
residue - The residue to get the include status for
Returns:
true if this residue can be included in an ellipses, false otherwise
See Also:
setElipses(int, boolean)

flush

void flush()
Flush the resources used by this CustomizedDiagram. Any information that can be restored at the expense of more computation is disposed off. The customized diagram is still functional.


dispose

void dispose()
Dispose of the resources used by this CustomizedDiagram. After this method has been called, the CustomizedDiagram made every effort to release resources and is not functional anymore. The sequence, image and diagram are destroyed.


RbDe rbde-349 (20120127151154)

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