Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions uk/ac/babraham/FastQC/Dialogs/FastQCTitlePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import javax.swing.JTextField;

import uk.ac.babraham.FastQC.FastQCApplication;
import uk.ac.babraham.FastQC.Utilities.FontManager;

/**
* The Class SeqMonkTitlePanel.
Expand Down Expand Up @@ -132,48 +133,48 @@ public void mouseClicked(MouseEvent e) {
constraints.fill = GridBagConstraints.NONE;

JLabel program = new SmoothJLabel("FastQC High Throughput Sequence QC Report",JLabel.CENTER);
program.setFont(new Font("Dialog",Font.BOLD,18));
program.setFont(FontManager.getFont(Font.BOLD, 18f));
program.setForeground(new Color(200,0,0));
c.add(program,constraints);

constraints.gridy++;
JLabel version = new SmoothJLabel("Version: "+FastQCApplication.VERSION, JLabel.CENTER);
version.setFont(new Font("Dialog",Font.BOLD,15));
version.setFont(FontManager.getFont(Font.BOLD, 15f));
version.setForeground(new Color(0,0,200));
c.add(version,constraints);

constraints.gridy++;
// Use a text field so they can copy this
JLabel website = new JLabel(" www.bioinformatics.babraham.ac.uk/projects/ ");
website.setFont(new Font("Dialog",Font.PLAIN,14));
website.setFont(FontManager.getFont(Font.PLAIN, 14f));
website.setBorder(null);
website.setOpaque(false);
website.setHorizontalAlignment(JTextField.CENTER);
c.add(website,constraints);
constraints.gridy++;

JLabel copyright = new JLabel("\u00a9 Simon Andrews, Pierre Lindenbaum, Brian Howard, Phil Ewels 2011-26,", JLabel.CENTER);
copyright.setFont(new Font("Dialog",Font.PLAIN,14));
copyright.setFont(FontManager.getFont(Font.PLAIN, 14f));
c.add(copyright,constraints);
constraints.gridy++;

JLabel copyright2 = new JLabel("HTSJDK BAM/SAM reader v2.24.1 from Samtools 2022", JLabel.CENTER);
copyright2.setFont(new Font("Dialog",Font.PLAIN,10));
copyright2.setFont(FontManager.getFont(Font.PLAIN, 10f));
c.add(copyright2,constraints);
constraints.gridy++;

JLabel copyright3 = new JLabel("BZip decompression \u00a9Matthew J. Francis, 2011", JLabel.CENTER);
copyright3.setFont(new Font("Dialog",Font.PLAIN,10));
copyright3.setFont(FontManager.getFont(Font.PLAIN, 10f));
c.add(copyright3,constraints);
constraints.gridy++;

JLabel copyright4 = new JLabel("Base64 encoding \u00a9Robert Harder, 2012", JLabel.CENTER);
copyright4.setFont(new Font("Dialog",Font.PLAIN,10));
copyright4.setFont(FontManager.getFont(Font.PLAIN, 10f));
c.add(copyright4,constraints);
constraints.gridy++;

JLabel copyright5 = new JLabel("Java HDF5 reader \u00a9ETH, CISD and SIS, 2007-14", JLabel.CENTER);
copyright5.setFont(new Font("Dialog",Font.PLAIN,10));
copyright5.setFont(FontManager.getFont(Font.PLAIN, 10f));
c.add(copyright5,constraints);

add(c,BorderLayout.CENTER);
Expand Down
13 changes: 9 additions & 4 deletions uk/ac/babraham/FastQC/Graphs/LineGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

import javax.swing.JPanel;

import uk.ac.babraham.FastQC.Utilities.FontManager;

public class LineGraph extends JPanel {

private String [] xTitles;
Expand Down Expand Up @@ -105,7 +107,8 @@ public Dimension getMinimumSize () {

public void paint (Graphics g) {
super.paint(g);


g.setFont(FontManager.defaultFont());
g.setColor(Color.WHITE);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(Color.BLACK);
Expand Down Expand Up @@ -138,8 +141,10 @@ public void paint (Graphics g) {
xOffset += 5;

// Draw the graph title
g.setFont(FontManager.defaultBoldFont());
int titleWidth = g.getFontMetrics().stringWidth(graphTitle);
g.drawString(graphTitle, (xOffset + ((getWidth()-(xOffset+10))/2)) - (titleWidth/2), 30);
g.setFont(FontManager.defaultFont());


// Now draw the axes
Expand Down Expand Up @@ -174,7 +179,7 @@ public void paint (Graphics g) {

if (baseNumberPosition > lastXLabelEnd) {
g.drawString(baseNumber,baseNumberPosition, getHeight()-25);
lastXLabelEnd = baseNumberPosition+baseNumberWidth+5;
lastXLabelEnd = baseNumberPosition+baseNumberWidth+g.getFontMetrics().getHeight()-2;
}
}

Expand Down Expand Up @@ -209,7 +214,7 @@ public void paint (Graphics g) {
// Now draw the data legend

// Make the letters thicker for this so we can see the colours better
g.setFont(g.getFont().deriveFont(Font.BOLD));
g.setFont(FontManager.defaultBoldFont());

if (g instanceof Graphics2D) {
((Graphics2D)g).setStroke(new BasicStroke(1));
Expand Down Expand Up @@ -241,7 +246,7 @@ public void paint (Graphics g) {


// Put the font back how we found it
g.setFont(g.getFont().deriveFont(Font.PLAIN));
g.setFont(FontManager.defaultFont());


}
Expand Down
9 changes: 7 additions & 2 deletions uk/ac/babraham/FastQC/Graphs/QualityBoxPlot.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import javax.swing.JPanel;

import uk.ac.babraham.FastQC.Utilities.FontManager;

public class QualityBoxPlot extends JPanel {

private double [] means;
Expand Down Expand Up @@ -64,7 +66,8 @@ public QualityBoxPlot (double [] means, double [] medians, double [] lowest, dou

public void paint (Graphics g) {
super.paint(g);


g.setFont(FontManager.defaultFont());
g.setColor(Color.WHITE);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(Color.BLACK);
Expand Down Expand Up @@ -102,8 +105,10 @@ public void paint (Graphics g) {


// Draw the graph title
g.setFont(FontManager.defaultBoldFont());
int titleWidth = g.getFontMetrics().stringWidth(graphTitle);
g.drawString(graphTitle, (xOffset + ((getWidth()-(xOffset+10))/2)) - (titleWidth/2), 30);
g.setFont(FontManager.defaultFont());



Expand Down Expand Up @@ -149,7 +154,7 @@ public void paint (Graphics g) {

if (labelStart > lastXLabelEnd) {
g.drawString(xLabels[i], labelStart, getHeight()-25);
lastXLabelEnd = labelStart+g.getFontMetrics().stringWidth(xLabels[i])+5;
lastXLabelEnd = labelStart+baseNumberWidth+g.getFontMetrics().getHeight()-2;
}
}

Expand Down
6 changes: 5 additions & 1 deletion uk/ac/babraham/FastQC/Graphs/TileGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import javax.swing.JPanel;

import uk.ac.babraham.FastQC.Modules.ModuleConfig;
import uk.ac.babraham.FastQC.Utilities.FontManager;
import uk.ac.babraham.FastQC.Utilities.HotColdColourGradient;

public class TileGraph extends JPanel {
Expand All @@ -54,6 +55,7 @@ private int getY(double y) {
public void paint (Graphics g) {
super.paint(g);

g.setFont(FontManager.defaultFont());
g.setColor(Color.WHITE);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(Color.BLACK);
Expand Down Expand Up @@ -81,8 +83,10 @@ public void paint (Graphics g) {

// Draw the graph title
String graphTitle = "Quality per tile";
g.setFont(FontManager.defaultBoldFont());
int titleWidth = g.getFontMetrics().stringWidth(graphTitle);
g.drawString(graphTitle, (xOffset + ((getWidth()-(xOffset+10))/2)) - (titleWidth/2), 30);
g.setFont(FontManager.defaultFont());


// Now draw the axes
Expand Down Expand Up @@ -115,7 +119,7 @@ public void paint (Graphics g) {

if (baseNumberPosition > lastXLabelEnd) {
g.drawString(baseNumber,baseNumberPosition, getHeight()-25);
lastXLabelEnd = baseNumberPosition+baseNumberWidth+5;
lastXLabelEnd = baseNumberPosition+baseNumberWidth+g.getFontMetrics().getHeight()-2;
}
}

Expand Down
102 changes: 102 additions & 0 deletions uk/ac/babraham/FastQC/Resources/Fonts/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
Digitized data copyright (c) 2010 Google Corporation
with Reserved Font Arimo, Tinos and Cousine.
Copyright (c) 2012 Red Hat, Inc.
with Reserved Font Name Liberation.

This Font Software is licensed under the SIL Open Font License,
Version 1.1.

This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL

SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007

PREAMBLE The goals of the Open Font License (OFL) are to stimulate
worldwide development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to provide
a free and open framework in which fonts may be shared and improved in
partnership with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves.
The fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.



DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such.
This may include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components
as distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting ? in part or in whole ?
any of the components of the Original Version, by changing formats or
by porting the Font Software to a new environment.

"Author" refers to any designer, engineer, programmer, technical writer
or other person who contributed to the Font Software.


PERMISSION & CONDITIONS

Permission is hereby granted, free of charge, to any person obtaining a
copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,in
Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole, must
be distributed entirely under this license, and must not be distributed
under any other license. The requirement for fonts to remain under
this license does not apply to any document created using the Font
Software.



TERMINATION
This license becomes null and void if any of the above conditions are not met.



DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading