public Point getPanelPos ( int aligSeq , int i ) { Point p = new Point ( ) ; // get line // we do integer division since we ignore remainders int lineNr = i / DEFAULT_LINE_LENGTH ; // but we want to have the reminder for the line position. int linePos = i % DEFAULT_LINE_LENGTH ; int x = linePos * DEFAULT_CHAR_SIZE + DEFAULT_X_SPACE + DEFAULT_LEGEND_SIZE ; int y = lineNr * DEFAULT_Y_STEP + DEFAULT_Y_SPACE ; y += DEFAULT_LINE_SEPARATION * aligSeq ; p . setLocation ( x , y ) ; return p ; }
get the position of the sequence position on the Panel