Class MultipleAlignmentCoordManager
java.lang.Object
org.biojava.nbio.structure.align.gui.aligpanel.MultipleAlignmentCoordManager
Generalization of the Coodinate Manager to include an arbitrary number of
sequences (lines) for MultipleAlignment visualization.
- Author:
- Aleix Lafita
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Size per characterstatic final int
Number of chars per linestatic final int
Separation between sequences in the alignmentstatic final int
Space on the right side between sequence and legend.static final int
Left boundarystatic final int
Top boundaryfinal int
Size of space between rows.static final int
Position at which the alignment summary is printed -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getAligSeq
(Point point) Returns the index of the structure, for a given point in the Panel.getEndLegendPosition
(int lineNr, int structure) getLegendPosition
(int lineNr, int structure) Provide the coordinates for where to draw the legend for line X given the structure index.getPanelPos
(int structure, int pos) Get the X position on the Panel of a particular sequence position.int
Y coordinate sizeint
X coordinate sizeint
Convert from an X position in the JPanel to the position in the sequence alignment.int
-
Field Details
-
DEFAULT_RIGHT_SPACER
public static final int DEFAULT_RIGHT_SPACERSpace on the right side between sequence and legend.- See Also:
-
DEFAULT_LINE_LENGTH
public static final int DEFAULT_LINE_LENGTHNumber of chars per line- See Also:
-
DEFAULT_Y_STEP
public final int DEFAULT_Y_STEPSize of space between rows. Depends on the number of structures aligned. -
DEFAULT_CHAR_SIZE
public static final int DEFAULT_CHAR_SIZESize per character- See Also:
-
DEFAULT_LINE_SEPARATION
public static final int DEFAULT_LINE_SEPARATIONSeparation between sequences in the alignment- See Also:
-
DEFAULT_X_SPACE
public static final int DEFAULT_X_SPACELeft boundary- See Also:
-
DEFAULT_Y_SPACE
public static final int DEFAULT_Y_SPACETop boundary- See Also:
-
SUMMARY_POS
public static final int SUMMARY_POSPosition at which the alignment summary is printed- See Also:
-
-
Constructor Details
-
MultipleAlignmentCoordManager
public MultipleAlignmentCoordManager(int size, int length) Constructor.- Parameters:
size
- number of structures/sequences aligned (rows).length
- number of aligned residues (columns)
-
-
Method Details
-
getSummaryPos
public int getSummaryPos() -
getPreferredWidth
public int getPreferredWidth()X coordinate size- Returns:
- the preferred width
-
getPreferredHeight
public int getPreferredHeight()Y coordinate size- Returns:
- the preferred height
-
getSeqPos
Convert from an X position in the JPanel to the position in the sequence alignment.- Parameters:
aligSeq
- sequence numberp
- point on panel- Returns:
- the sequence position for a point on the Panel
-
getPanelPos
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
-
getAligSeq
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
-
getLegendPosition
Provide the coordinates for where to draw the legend for line X given the structure index.- Parameters:
lineNr
- line of the Panelstructure
- the structure index- Returns:
- get the point where to draw the legend
-
getEndLegendPosition
-