Class MultipleAlignmentCoordManager
- java.lang.Object
- 
- org.biojava.nbio.structure.align.gui.aligpanel.MultipleAlignmentCoordManager
 
- 
 public class MultipleAlignmentCoordManager extends Object Generalization of the Coodinate Manager to include an arbitrary number of sequences (lines) for MultipleAlignment visualization.- Author:
- Aleix Lafita
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_CHAR_SIZESize per characterstatic intDEFAULT_LINE_LENGTHNumber of chars per linestatic intDEFAULT_LINE_SEPARATIONSeparation between sequences in the alignmentstatic intDEFAULT_RIGHT_SPACERSpace on the right side between sequence and legend.static intDEFAULT_X_SPACELeft boundarystatic intDEFAULT_Y_SPACETop boundaryintDEFAULT_Y_STEPSize of space between rows.static intSUMMARY_POSPosition at which the alignment summary is printed
 - 
Constructor SummaryConstructors Constructor Description MultipleAlignmentCoordManager(int size, int length)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAligSeq(Point point)Returns the index of the structure, for a given point in the Panel.PointgetEndLegendPosition(int lineNr, int structure)PointgetLegendPosition(int lineNr, int structure)Provide the coordinates for where to draw the legend for line X given the structure index.PointgetPanelPos(int structure, int pos)Get the X position on the Panel of a particular sequence position.intgetPreferredHeight()Y coordinate sizeintgetPreferredWidth()X coordinate sizeintgetSeqPos(int aligSeq, Point p)Convert from an X position in the JPanel to the position in the sequence alignment.intgetSummaryPos()
 
- 
- 
- 
Field Detail- 
DEFAULT_RIGHT_SPACERpublic static final int DEFAULT_RIGHT_SPACER Space on the right side between sequence and legend.- See Also:
- Constant Field Values
 
 - 
DEFAULT_LINE_LENGTHpublic static final int DEFAULT_LINE_LENGTH Number of chars per line- See Also:
- Constant Field Values
 
 - 
DEFAULT_Y_STEPpublic final int DEFAULT_Y_STEP Size of space between rows. Depends on the number of structures aligned.
 - 
DEFAULT_CHAR_SIZEpublic static final int DEFAULT_CHAR_SIZE Size per character- See Also:
- Constant Field Values
 
 - 
DEFAULT_LINE_SEPARATIONpublic static final int DEFAULT_LINE_SEPARATION Separation between sequences in the alignment- See Also:
- Constant Field Values
 
 - 
DEFAULT_X_SPACEpublic static final int DEFAULT_X_SPACE Left boundary- See Also:
- Constant Field Values
 
 - 
DEFAULT_Y_SPACEpublic static final int DEFAULT_Y_SPACE Top boundary- See Also:
- Constant Field Values
 
 - 
SUMMARY_POSpublic static final int SUMMARY_POS Position at which the alignment summary is printed- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
MultipleAlignmentCoordManagerpublic MultipleAlignmentCoordManager(int size, int length) Constructor.- Parameters:
- size- number of structures/sequences aligned (rows).
- length- number of aligned residues (columns)
 
 
- 
 - 
Method Detail- 
getSummaryPospublic int getSummaryPos() 
 - 
getPreferredWidthpublic int getPreferredWidth() X coordinate size- Returns:
- the preferred width
 
 - 
getPreferredHeightpublic int getPreferredHeight() Y coordinate size- Returns:
- the preferred height
 
 - 
getSeqPospublic int getSeqPos(int aligSeq, Point p) Convert from an X position in the JPanel to the position in the sequence alignment.- Parameters:
- aligSeq- sequence number
- p- point on panel
- Returns:
- the sequence position for a point on the Panel
 
 - 
getPanelPospublic Point getPanelPos(int structure, int pos) Get the X position on the Panel of a particular sequence position.- Parameters:
- structure- index of the structure for the sequence position.
- pos- sequence position, the aligned position index
- Returns:
- the point on a panel for a sequence position
 
 - 
getAligSeqpublic int getAligSeq(Point point) Returns the index of the structure, for a given point in the Panel. Returns -1 if not over a position in the sequence alignment.- Parameters:
- point- x and y coordinates in the panel
- Returns:
- which structure a point on the panel corresponds to
 
 - 
getLegendPositionpublic Point getLegendPosition(int lineNr, int structure) Provide the coordinates for where to draw the legend for line X given the structure index.- Parameters:
- lineNr- line of the Panel
- structure- the structure index
- Returns:
- get the point where to draw the legend
 
 - 
getEndLegendPositionpublic Point getEndLegendPosition(int lineNr, int structure) 
 
- 
 
-