|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mssm.crover.domain2d.Diagram
A Diagram is the representation of a Domain2D_Annotation model. It encapsulates the logic needed to draw a complete diagram from the annotation node.
| Field Summary | |
protected DrawingSurface |
ds
|
protected Domain2D |
first
|
protected javax.swing.JFrame |
frame
|
| Constructor Summary | |
Diagram()
The default constructor builds a sequence called "nothing" and a Domain2D_Annotation which contains no domain. |
|
Diagram(AnnotatedBioSequence s)
|
|
Diagram(AnnotatedBioSequence s,
Domain2D_Annotation d2da)
|
|
| Method Summary | |
protected java.awt.Dimension |
computePreferredSize(java.awt.Component[] comps)
|
void |
dispose()
Dispose of this diagram. |
protected void |
enlargePreferredSize(java.awt.Dimension min_size,
java.awt.geom.Point2D cpoint,
double width,
double height)
Helps determine the size of this component. |
Domain2D |
getDomainById(java.lang.String id)
Return the Domain which has this id. |
ResidueGlyphFactory |
getGlyphFactory()
|
GlyphLink[] |
getGlyphLinks()
Obtain the location of the residue glyphs on the page. |
java.awt.image.BufferedImage |
getImage()
Returns the image corresponding to this diagram. |
Domain2D_Annotation |
getModel()
Get the model represented by this diagram. |
Domain2D |
getRenderingEngine(int i)
Returns the rendering engine for the ith SSR. |
ResidueGlyph |
getResidueGlyph(int position)
Returns the ResidueGlyph corresponding to this position in this sequence. |
ResidueGlyphRenderingAttributes |
getResidueGlyphRenderingAttributes()
Obtain the residue glyph rendering attributes. |
ResidueModelFactory |
getResidueModelFactory()
Obtain the factory used for globally for residue model instanciation. |
DrawingSurface |
getSurface()
Returns the DrawingSurface owned by this diagram. |
void |
inFrame(boolean inFrame)
Install the diagram in a JFrame. |
boolean |
isFocusTraversable()
|
static void |
main(java.lang.String[] args)
Tests various features of the Diagram class. |
void |
organize()
Organizes the appearance of the diagram. |
void |
repaint()
Repaint the diagram. |
void |
saveGIFImage(java.io.File output)
Save this diagram as a GIF image file. |
void |
saveJPEGImage(java.io.File output)
Save this diagram as a JPEG image file. |
void |
savePostScript(java.io.File output)
Save this diagram as a PostScript file. |
void |
savePostScript(java.io.File output,
int resolution,
float width,
float height)
Save this diagram as a PostScript file. |
void |
setAnnotationsTranslator(AnnotationsToDrawings translator)
Sets the annotation translator for this diagram. |
void |
setModel(Domain2D_Annotation m)
Sets the model to be represented. |
void |
setSize(java.awt.Dimension d)
Sets the size of the diagram. |
void |
setSize(int width,
int height)
Sets the size of the diagram. |
void |
setVisible(boolean show)
Show or hide the diagram. |
void |
useRenderingAttributes(ResidueGlyphRenderingAttributes rgra)
Use the specified rendering attributes when instanciating the resigue glyphs of the diagram. |
void |
useResidueModelFactory(ResidueModelFactory rmf)
Use the specified factory for residue model instanciation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected javax.swing.JFrame frame
protected DrawingSurface ds
protected Domain2D first
| Constructor Detail |
public Diagram()
public Diagram(AnnotatedBioSequence s)
public Diagram(AnnotatedBioSequence s,
Domain2D_Annotation d2da)
| Method Detail |
public void setAnnotationsTranslator(AnnotationsToDrawings translator)
public void inFrame(boolean inFrame)
public boolean isFocusTraversable()
public void useResidueModelFactory(ResidueModelFactory rmf)
public ResidueModelFactory getResidueModelFactory()
useResidueModelFactory(edu.mssm.crover.domain2d.ResidueModelFactory)public ResidueGlyphRenderingAttributes getResidueGlyphRenderingAttributes()
#public void useRenderingAttributes(ResidueGlyphRenderingAttributes rgra)
ResidueGlyph,
ResidueGlyphRenderingAttributespublic void dispose()
public Domain2D_Annotation getModel()
setModel()public Domain2D getDomainById(java.lang.String id)
public void setModel(Domain2D_Annotation m)
public void setSize(java.awt.Dimension d)
public void setSize(int width,
int height)
public DrawingSurface getSurface()
public void saveJPEGImage(java.io.File output)
throws java.io.IOException
java.io.IOException
public void saveGIFImage(java.io.File output)
throws java.io.IOException
java.io.IOExceptionpublic java.awt.image.BufferedImage getImage()
public void savePostScript(java.io.File output,
int resolution,
float width,
float height)
throws java.io.IOException
resolution - Number of dots per inch (DPI) the driver of this Printer will generate.width - Choosen width for diagram on the page.height - Choosen height for diagram on the page.
java.io.IOException
public void savePostScript(java.io.File output)
throws java.io.IOException
java.io.IOExceptionprotected java.awt.Dimension computePreferredSize(java.awt.Component[] comps)
protected void enlargePreferredSize(java.awt.Dimension min_size,
java.awt.geom.Point2D cpoint,
double width,
double height)
public void organize()
public GlyphLink[] getGlyphLinks()
java.lang.InternalError - Thrown when the diagram was not provided with a ResidueModelFactory.public ResidueGlyph getResidueGlyph(int position)
public void repaint()
public Domain2D getRenderingEngine(int i)
throws Domain2D_Annotation.BadDomain2DRenderingClass
Domain2D_Annotation.BadDomain2DRenderingClasspublic void setVisible(boolean show)
java.awt.JFrame#setVisiblepublic ResidueGlyphFactory getGlyphFactory()
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||