edu.mssm.crover.webservices.rbde
Interface CustomizedDiagram

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
CustomizedDiagram2_0
All Known Implementing Classes:
CustomizedDiagramImpl1_0, CustomizedDiagramImpl3_0, CustomizedDiagramImpl5_0

public interface CustomizedDiagram
extends java.io.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 ColorAnnotationsCollorScheme 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.
 java.awt.Image getImage()
          Returns 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.
 java.awt.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 scale_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 seq)
          Resets AnnotatedBioSequence to seq and resets all other fields to initial empty state.
 

Method Detail

setSequence

public void setSequence(AnnotatedBioSequence seq)
Resets AnnotatedBioSequence to seq and resets all other fields to initial empty state.


getSequence

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

See Also:
setSequence(edu.mssm.crover.representation.AnnotatedBioSequence)

setNtermDirectionUp

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


setNtermDirectionDown

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


getNtermDirection

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

See Also:
setNtermDirectionUp, setNtermDirectionDown

getColorAnnotationsColorScheme

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


setDefaultColorScheme

public 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.


getDefaultColorScheme

public ResidueColorScheme getDefaultColorScheme()
Returns the current default ResidueColorScheme.

See Also:
setDefaultColorScheme

getImageScaleFactor

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

See Also:
setImageScaleFactor

setImageScaleFactor

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

See Also:
getImage

setNeedRebuildImage

public 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

public 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

public java.awt.Image getImage()
Returns Image representation of the current sequence diagram.


getDiagram

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


getImageTime

public 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.


setElipses

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


getElipses

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

See Also:
setElipses

flush

public 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

public 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.



Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.