Class AFPChainCoordManager
- java.lang.Object
-
- org.biojava.nbio.structure.align.gui.aligpanel.AFPChainCoordManager
-
public class AFPChainCoordManager extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CHAR_SIZEsize per characterstatic intDEFAULT_LINE_LENGTHnumber of chars per linestatic intDEFAULT_LINE_SEPARATIONseparation of line 1 and 2 in alignmentstatic intDEFAULT_RIGHT_SPACERSpace on the right side between sequence and legend.static intDEFAULT_X_SPACEleft boundarystatic intDEFAULT_Y_SPACEtop boundarystatic intDEFAULT_Y_STEPsize of space between rowsstatic intSUMMARY_POSPosition at which the alignment summary is printed
-
Constructor Summary
Constructors Constructor Description AFPChainCoordManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAligSeq(java.awt.Point point)returns the AligSeq (0 or 1) for a point returns -1 if not over an alig seq.java.awt.PointgetEndLegendPosition(int lineNr, int chainNr)java.awt.PointgetLegendPosition(int lineNr, int chainNr)provide the coordinates for where to draw the legend for line X and if it is chain 1 or 2java.awt.PointgetPanelPos(int aligSeq, int i)get the position of the sequence position on the PanelintgetPreferredHeight()Y coordinate sizeintgetPreferredWidth()X coordinate sizeintgetSeqPos(int aligSeq, java.awt.Point p)Convert from a X position in the JPanel to alignment positionintgetSummaryPos()voidsetAFPChain(AFPChain afpChain)
-
-
-
Field Detail
-
DEFAULT_RIGHT_SPACER
public static final int DEFAULT_RIGHT_SPACER
Space on the right side between sequence and legend.- See Also:
- Constant Field Values
-
DEFAULT_LINE_LENGTH
public static final int DEFAULT_LINE_LENGTH
number of chars per line- See Also:
- Constant Field Values
-
DEFAULT_Y_STEP
public static final int DEFAULT_Y_STEP
size of space between rows- See Also:
- Constant Field Values
-
DEFAULT_CHAR_SIZE
public static final int DEFAULT_CHAR_SIZE
size per character- See Also:
- Constant Field Values
-
DEFAULT_LINE_SEPARATION
public static final int DEFAULT_LINE_SEPARATION
separation of line 1 and 2 in alignment- See Also:
- Constant Field Values
-
DEFAULT_X_SPACE
public static final int DEFAULT_X_SPACE
left boundary- See Also:
- Constant Field Values
-
DEFAULT_Y_SPACE
public static final int DEFAULT_Y_SPACE
top boundary- See Also:
- Constant Field Values
-
SUMMARY_POS
public static final int SUMMARY_POS
Position at which the alignment summary is printed- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public int getSeqPos(int aligSeq, java.awt.Point p)Convert from a X position in the JPanel to alignment position- Parameters:
aligSeq- sequence 0 or 1p- point on panel- Returns:
- the sequence position for a point on the Panel
-
getPanelPos
public java.awt.Point getPanelPos(int aligSeq, int i)get the position of the sequence position on the Panel- Parameters:
aligSeq- 0 or 1 for which of the two sequences to ask for.i- sequence position- Returns:
- the point on a panel for a sequence position
-
setAFPChain
public void setAFPChain(AFPChain afpChain)
-
getAligSeq
public int getAligSeq(java.awt.Point point)
returns the AligSeq (0 or 1) for a point returns -1 if not over an alig seq.- Parameters:
point-- Returns:
- which of the two sequences a point on the panel corresponds to
-
getLegendPosition
public java.awt.Point getLegendPosition(int lineNr, int chainNr)provide the coordinates for where to draw the legend for line X and if it is chain 1 or 2- Parameters:
lineNr- which line is this forchainNr- is it chain 0 or 1- Returns:
- get the point where to draw the legend
-
getEndLegendPosition
public java.awt.Point getEndLegendPosition(int lineNr, int chainNr)
-
-