edu.mssm.crover.domain2d
Class Domain2D_Annotation

java.lang.Object
  |
  +--edu.mssm.crover.representation.Annotation
        |
        +--edu.mssm.crover.domain2d.Domain2D_Annotation
All Implemented Interfaces:
BiologicalAnnotation, RootObject, java.io.Serializable

public class Domain2D_Annotation
extends Annotation
implements java.io.Serializable

This annotation describes the information needed for the rendering of a two dimensional protein diagram. Basically, this information is made of two parts.

  • The layout information describes the relative positions and orientations of the subunits on the page.
  • The rendering information encodes the choice for the rendering algorithm to be used for each subunit individually.

    See Also:
    Serialized Form

    Nested Class Summary
     class Domain2D_Annotation.BadDomain2DRenderingClass
               
     class Domain2D_Annotation.BadLoopTemplateClass
               
     class Domain2D_Annotation.LayoutInfo
              Encapsultates the layout for one subunit (a Domain2D)
     class Domain2D_Annotation.RenderingInfo
              Encapsultates the rendering algorithm choice for one subunit (a Domain2D)
     
    Field Summary
     
    Fields inherited from class edu.mssm.crover.representation.Annotation
    origin
     
    Constructor Summary
    Domain2D_Annotation()
               
     
    Method Summary
     void addCterm(int start, int end)
              Convenience method to add a Cterminus representation to this diagram.
     void addHelix(int start, int end)
              Adds an helix representation to this diagram.
     void addHelix(int start, int end, java.awt.Point direction)
              Convenience method to add an helix representation to this diagram.
     void addLoop(int start, int end, java.awt.Point spacer)
              Convenience method to add a loop representation to this diagram.
     void addNterm(int start, int end)
              Convenience method to add an Nterminus representation to this diagram.
     void addStrand(int start, int end)
              Adds a strand representation to this diagram.
     void addStrand(int start, int end, java.awt.Point direction)
              Convenience method to add a strand representation to this diagram.
     void addSubunit(Domain2D_Annotation.LayoutInfo _li, Domain2D_Annotation.RenderingInfo _ri)
              Adds a subunit to this Diagram model.
     boolean describesResidue(int position)
              This annotation does not describe independant residues.
     java.lang.String getInfo()
              Returns a consise text that describes the nature of this annotation.
     Domain2D_Annotation.LayoutInfo getLayoutInfo(int index)
               
     Domain2D_Annotation.RenderingInfo getRenderingInfo(int index)
               
     java.lang.String getShortName()
               
     int getSubunitNumber()
               
     Domain2D_Annotation.LayoutInfo[] layoutInfo()
               
    static void main(java.lang.String[] args)
               
     void modifySubunit(int index, Domain2D_Annotation.LayoutInfo li)
               
     void modifySubunit(int index, Domain2D_Annotation.RenderingInfo li)
               
     void removeSubunit(int index)
              the following methods are for extension purpose only.
     Domain2D_Annotation.RenderingInfo[] renderingInfo()
               
     java.lang.String toString()
              translate the model to a String for debugging purpose.
     
    Methods inherited from class edu.mssm.crover.representation.Annotation
    getOrigin, setOrigin
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Constructor Detail

    Domain2D_Annotation

    public Domain2D_Annotation()
    Method Detail

    getInfo

    public java.lang.String getInfo()
    Description copied from interface: BiologicalAnnotation
    Returns a consise text that describes the nature of this annotation. This text is constant over several instances of the same class.

    Specified by:
    getInfo in interface BiologicalAnnotation
    Specified by:
    getInfo in class Annotation

    describesResidue

    public boolean describesResidue(int position)
    This annotation does not describe independant residues. returns false.

    Specified by:
    describesResidue in interface BiologicalAnnotation

    getShortName

    public java.lang.String getShortName()

    getSubunitNumber

    public int getSubunitNumber()

    renderingInfo

    public Domain2D_Annotation.RenderingInfo[] renderingInfo()

    layoutInfo

    public Domain2D_Annotation.LayoutInfo[] layoutInfo()

    getLayoutInfo

    public Domain2D_Annotation.LayoutInfo getLayoutInfo(int index)

    getRenderingInfo

    public Domain2D_Annotation.RenderingInfo getRenderingInfo(int index)

    addSubunit

    public void addSubunit(Domain2D_Annotation.LayoutInfo _li,
                           Domain2D_Annotation.RenderingInfo _ri)
    Adds a subunit to this Diagram model. The subunit is added to the end of the sequence.


    addNterm

    public void addNterm(int start,
                         int end)
    Convenience method to add an Nterminus representation to this diagram.
    Please note that this method, for convenience, does not raise any exception. In case of failure, for instance if the class domain2d.ExtremityDomain is not found, an error is generated. In this case, it is likely that there is an installation problem as the ExtremityDomain must be in the same package as this class.


    addCterm

    public void addCterm(int start,
                         int end)
    Convenience method to add a Cterminus representation to this diagram.
    Please note that this method, for convenience, does not raise any exception. In case of failure, for instance if the class domain2d.ExtremityDomain is not found, an error is generated. In this case, it is likely that there is an installation problem as the ExtremityDomain must be in the same package as this class. The C terminus spacer is rotated by an angle. This angle is determined according to the exitDirection of the previous subunit (eD). This is consistent with the way Cterm determines its direction from its predecessor SSR exitDirection. When eD == (0,1) no rotation is applied to the spacer.


    addHelix

    public void addHelix(int start,
                         int end,
                         java.awt.Point direction)
    Convenience method to add an helix representation to this diagram.
    Please note that this method, for convenience, does not raise any exception. In case of failure, for instance if the class domain2d.HelicalDomain is not found, an error is generated. In this case, it is likely that there is an installation problem as the HelicalDomain must be in the same package as this class.


    addHelix

    public void addHelix(int start,
                         int end)
    Adds an helix representation to this diagram.

    See Also:
    addStrand(int start, int end,Point direction)

    addLoop

    public void addLoop(int start,
                        int end,
                        java.awt.Point spacer)
    Convenience method to add a loop representation to this diagram.
    Please note that this method, for convenience, does not raise any exception. In case of failure, for instance if the class domain2d.FreeLoop is not found, an error is generated. In this case, it is likely that there is an installation problem as the HelicalDomain must be in the same package as this class.


    addStrand

    public void addStrand(int start,
                          int end,
                          java.awt.Point direction)
    Convenience method to add a strand representation to this diagram.
    Please note that this method, for convenience, does not raise any exception. In case of failure, for instance if the class domain2d.HelicalDomain is not found, an error is generated. In this case, it is likely that there is an installation problem as the HelicalDomain must be in the same package as this class.


    addStrand

    public void addStrand(int start,
                          int end)
    Adds a strand representation to this diagram.

    See Also:
    #addStrand(int start, int end,Point2D direction)

    removeSubunit

    public void removeSubunit(int index)
    the following methods are for extension purpose only.


    modifySubunit

    public void modifySubunit(int index,
                              Domain2D_Annotation.LayoutInfo li)

    modifySubunit

    public void modifySubunit(int index,
                              Domain2D_Annotation.RenderingInfo li)

    toString

    public java.lang.String toString()
    translate the model to a String for debugging purpose.

    Overrides:
    toString in class Annotation

    main

    public static void main(java.lang.String[] args)


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