git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'task/JAL-3594_updated--CHANNEL_cosmetics' into develop
[jalview.git]
/
src
/
jalview
/
gui
/
SplashScreen.java
diff --git
a/src/jalview/gui/SplashScreen.java
b/src/jalview/gui/SplashScreen.java
index
9dfd1d5
..
a8a849e
100755
(executable)
--- a/
src/jalview/gui/SplashScreen.java
+++ b/
src/jalview/gui/SplashScreen.java
@@
-59,6
+59,13
@@
public class SplashScreen extends JPanel
private JPanel iconimg = new JPanel(new BorderLayout());
private JPanel iconimg = new JPanel(new BorderLayout());
+ // could change fg, bg, font later to use ChannelProperties
+ private static Color bg = Color.WHITE;
+
+ private static Color fg = Color.BLACK;
+
+ private static Font font = new Font("SansSerif", Font.PLAIN, FONT_SIZE);
+
/*
* as JTextPane in Java, JLabel in javascript
*/
/*
* as JTextPane in Java, JLabel in javascript
*/
@@
-72,6
+79,8
@@
public class SplashScreen extends JPanel
private long oldTextLength = -1;
private long oldTextLength = -1;
+ public static int logoSize = 32;
+
/*
* allow click in the initial splash screen to dismiss it
* immediately (not if opened from About menu)
/*
* allow click in the initial splash screen to dismiss it
* immediately (not if opened from About menu)
@@
-119,6
+128,9
@@
public class SplashScreen extends JPanel
*/
{
splashText = new JTextPane();
*/
{
splashText = new JTextPane();
+ splashText.setBackground(bg);
+ splashText.setForeground(fg);
+ splashText.setFont(font);
Thread t = new Thread(this);
t.start();
}
Thread t = new Thread(this);
t.start();
}
@@
-167,12
+179,20
@@
public class SplashScreen extends JPanel
{
}
{
}
+ this.setBackground(bg);
+ this.setForeground(fg);
+ this.setFont(font);
+
iframe = new JInternalFrame();
iframe.setFrameIcon(null);
iframe.setClosable(true);
this.setLayout(new BorderLayout());
iframe.setContentPane(this);
iframe.setLayer(JLayeredPane.PALETTE_LAYER);
iframe = new JInternalFrame();
iframe.setFrameIcon(null);
iframe.setClosable(true);
this.setLayout(new BorderLayout());
iframe.setContentPane(this);
iframe.setLayer(JLayeredPane.PALETTE_LAYER);
+ iframe.setBackground(bg);
+ iframe.setForeground(fg);
+ iframe.setFont(font);
+
if (Platform.isJS())
{
// ignore in JavaScript
if (Platform.isJS())
{
// ignore in JavaScript
@@
-185,9
+205,13
@@
public class SplashScreen extends JPanel
*/
{
((JTextPane) splashText).setEditable(false);
*/
{
((JTextPane) splashText).setEditable(false);
+ splashText.setBackground(bg);
+ splashText.setForeground(fg);
+ splashText.setFont(font);
SplashImage splashimg = new SplashImage(image);
SplashImage splashimg = new SplashImage(image);
- iconimg.add(splashimg, BorderLayout.CENTER);
+ iconimg.add(splashimg, BorderLayout.LINE_START);
+ iconimg.setBackground(bg);
add(iconimg, BorderLayout.NORTH);
}
add(splashText, BorderLayout.CENTER);
add(iconimg, BorderLayout.NORTH);
}
add(splashText, BorderLayout.CENTER);
@@
-229,6
+253,9
@@
public class SplashScreen extends JPanel
{
JTextPane jtp = new JTextPane();
jtp.setEditable(false);
{
JTextPane jtp = new JTextPane();
jtp.setEditable(false);
+ jtp.setBackground(bg);
+ jtp.setForeground(fg);
+ jtp.setFont(font);
jtp.setContentType("text/html");
jtp.setText("<html>" + newtext + "</html>");
jtp.addHyperlinkListener(this);
jtp.setContentType("text/html");
jtp.setText("<html>" + newtext + "</html>");
jtp.addHyperlinkListener(this);
@@
-237,7
+264,10
@@
public class SplashScreen extends JPanel
splashText.addMouseListener(closer);
splashText.setVisible(true);
splashText.addMouseListener(closer);
splashText.setVisible(true);
- splashText.setSize(new Dimension(750, 375));
+ splashText.setSize(new Dimension(750, 375 + logoSize));
+ splashText.setBackground(bg);
+ splashText.setForeground(fg);
+ splashText.setFont(font);
add(splashText, BorderLayout.CENTER);
revalidate();
iframe.setBounds((Desktop.instance.getWidth() - 750) / 2,
add(splashText, BorderLayout.CENTER);
revalidate();
iframe.setBounds((Desktop.instance.getWidth() - 750) / 2,
@@
-327,10
+357,10
@@
public class SplashScreen extends JPanel
@Override
public void paintComponent(Graphics g)
{
@Override
public void paintComponent(Graphics g)
{
- g.setColor(Color.white);
+ g.setColor(bg);
g.fillRect(0, 0, getWidth(), getHeight());
g.fillRect(0, 0, getWidth(), getHeight());
- g.setColor(Color.black);
- g.setFont(new Font("Verdana", Font.BOLD, FONT_SIZE + 6));
+ g.setColor(fg);
+ g.setFont(new Font(font.getFontName(), Font.BOLD, FONT_SIZE + 6));
if (image != null)
{
if (image != null)
{