Revision: 5880
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=5880&view=rev
Author: gerdwagner
Date: 2010-09-13 22:09:54 +0000 (Mon, 13 Sep 2010)
Log Message:
-----------
Used JDK 1.6 splash screen and this way fixed:
1808038: Splash screen was always on top hiding all other windows behind
Modified Paths:
--------------
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Application.java
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Main.java
trunk/sql12/app/src/main/resources/net/sourceforge/squirrel_sql/client/resources/images/gm/splash.jpg
trunk/sql12/doc/src/main/resources/changes.txt
trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/log/Log4jLogger.java
Added Paths:
-----------
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SplashStringWriter.java
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SquirrelSplashScreen.java
Removed Paths:
-------------
trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SplashScreen.java
Modified: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Application.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Application.java 2010-09-08 02:52:26 UTC (rev 5879)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Application.java 2010-09-13 22:09:54 UTC (rev 5880)
@@ -24,9 +24,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-import java.awt.AWTEvent;
-import java.awt.EventQueue;
-import java.awt.Toolkit;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.*;
@@ -44,7 +41,7 @@
import net.sourceforge.squirrel_sql.client.action.ActionCollection;
import net.sourceforge.squirrel_sql.client.gui.FileViewerFactory;
-import net.sourceforge.squirrel_sql.client.gui.SplashScreen;
+import net.sourceforge.squirrel_sql.client.gui.SquirrelSplashScreen;
import net.sourceforge.squirrel_sql.client.gui.WindowManager;
import net.sourceforge.squirrel_sql.client.gui.desktopcontainer.DesktopStyle;
import net.sourceforge.squirrel_sql.client.gui.builders.UIFactory;
@@ -72,7 +69,6 @@
import net.sourceforge.squirrel_sql.client.util.ApplicationFiles;
import net.sourceforge.squirrel_sql.fw.datasetviewer.CellImportExportInfoSaver;
import net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.DTProperties;
-import net.sourceforge.squirrel_sql.fw.gui.CursorChanger;
import net.sourceforge.squirrel_sql.fw.gui.ErrorDialog;
import net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager;
import net.sourceforge.squirrel_sql.fw.util.BareBonesBrowserLaunch;
@@ -86,7 +82,6 @@
import net.sourceforge.squirrel_sql.fw.util.TaskThreadPool;
import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
-import net.sourceforge.squirrel_sql.fw.util.log.SystemOutToLog;
import net.sourceforge.squirrel_sql.fw.xml.XMLBeanReader;
import net.sourceforge.squirrel_sql.fw.xml.XMLBeanWriter;
@@ -100,7 +95,7 @@
{
/** Logger for this class. */
- private static ILogger s_log;
+ private static ILogger s_log = LoggerController.createLogger(Application.class);
/** Internationalized strings for this class. */
private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(Application.class);
@@ -177,33 +172,7 @@
*/
public void startup()
{
- LoggerController.registerLoggerFactory(new SquirrelLoggerFactory(true));
- s_log = LoggerController.createLogger(getClass());
- System.setErr(new PrintStream(new SystemOutToLog(System.err)));
- System.setOut(new PrintStream(new SystemOutToLog(System.out)));
-
-
- EventQueue q = Toolkit.getDefaultToolkit().getSystemEventQueue();
- q.push(new EventQueue()
- {
- protected void dispatchEvent(AWTEvent event)
- {
- try
- {
- super.dispatchEvent(event);
- }
- catch (Throwable t)
- {
- if (s_log.isDebugEnabled())
- {
- t.printStackTrace();
- }
- s_log.error("Exception occured dispatching Event " + event, t);
- }
- }
- });
-
final ApplicationArguments args = ApplicationArguments.getInstance();
// Setup the applications Look and Feel.
@@ -226,39 +195,13 @@
}
});
- SplashScreen splash = null;
+ SquirrelSplashScreen splash = null;
if (args.getShowSplashScreen())
{
- splash = new SplashScreen(_resources, 15, _prefs);
+ splash = new SquirrelSplashScreen(_prefs, 16);
}
- try
- {
- CursorChanger chg = null;
- if (splash != null)
- {
- chg = new CursorChanger(splash);
- chg.show();
- }
- try
- {
- executeStartupTasks(splash, args);
- }
- finally
- {
- if (chg != null)
- {
- chg.restore();
- }
- }
- }
- finally
- {
- if (splash != null)
- {
- splash.dispose();
- }
- }
+ executeStartupTasks(splash, args);
}
/**
@@ -690,7 +633,7 @@
* @throws IllegalArgumentException
* Thrown if <TT>ApplicationArguments<.TT> is null.
*/
- private void executeStartupTasks(SplashScreen splash, ApplicationArguments args)
+ private void executeStartupTasks(SquirrelSplashScreen splash, ApplicationArguments args)
{
if (args == null) { throw new IllegalArgumentException("ApplicationArguments == null"); }
@@ -834,7 +777,7 @@
* @param taskDescription
* Description of new task.
*/
- private void indicateNewStartupTask(SplashScreen splash, String taskDescription)
+ private void indicateNewStartupTask(SquirrelSplashScreen splash, String taskDescription)
{
if (splash != null)
{
Modified: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Main.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Main.java 2010-09-08 02:52:26 UTC (rev 5879)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/Main.java 2010-09-13 22:09:54 UTC (rev 5880)
@@ -1,6 +1,13 @@
package net.sourceforge.squirrel_sql.client;
-import javax.swing.JOptionPane;
+import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
+import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
+import net.sourceforge.squirrel_sql.fw.util.log.SystemOutToLog;
+
+import javax.swing.*;
+import java.awt.*;
+import java.io.IOException;
+import java.io.PrintStream;
/*
* Copyright (C) 2001-2006 Colin Bell
* co...@us...
@@ -26,6 +33,9 @@
*/
public class Main
{
+ /** Logger for this class. */
+ private static ILogger s_log;
+
/**
* Default ctor. private as class should never be instantiated.
*/
@@ -39,8 +49,8 @@
*
* @param args Arguments passed on command line.
*/
- public static void main(String[] args)
- {
+ public static void main(String[] args) throws IOException
+ {
if (ApplicationArguments.initialize(args))
{
@@ -57,8 +67,52 @@
}
else
{
- new Application().startup();
- }
+ startApp();
+ }
}
}
+
+ private static void startApp() throws IOException
+ {
+ LoggerController.registerLoggerFactory(new SquirrelLoggerFactory(true));
+ s_log = LoggerController.createLogger(Main.class);
+
+ System.setErr(new PrintStream(new SystemOutToLog(System.err)));
+ System.setOut(new PrintStream(new SystemOutToLog(System.out)));
+
+
+
+
+ EventQueue q = Toolkit.getDefaultToolkit().getSystemEventQueue();
+ q.push(new EventQueue()
+ {
+ protected void dispatchEvent(AWTEvent event)
+ {
+ try
+ {
+ super.dispatchEvent(event);
+ }
+ catch (Throwable t)
+ {
+ if (s_log.isDebugEnabled())
+ {
+ t.printStackTrace();
+ }
+ s_log.error("Exception occured dispatching Event " + event, t);
+ }
+ }
+ });
+
+
+ Runnable runnable = new Runnable()
+ {
+ public void run()
+ {
+ new Application().startup();
+ }
+ };
+
+ SwingUtilities.invokeLater(runnable);
+ }
+
}
Deleted: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SplashScreen.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SplashScreen.java 2010-09-08 02:52:26 UTC (rev 5879)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SplashScreen.java 2010-09-13 22:09:54 UTC (rev 5880)
@@ -1,201 +0,0 @@
-package net.sourceforge.squirrel_sql.client.gui;
-/*
- * Copyright (C) 2001-2006 Colin Bell
- * co...@us...
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-import java.awt.Color;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-
-import javax.swing.BorderFactory;
-import javax.swing.Icon;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JProgressBar;
-import javax.swing.JWindow;
-import javax.swing.SwingUtilities;
-
-import net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences;
-import net.sourceforge.squirrel_sql.client.resources.SquirrelResources;
-import net.sourceforge.squirrel_sql.fw.gui.GUIUtils;
-import net.sourceforge.squirrel_sql.fw.util.ClassLoaderListener;
-import net.sourceforge.squirrel_sql.fw.util.StringManager;
-import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
-import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
-import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
-
-public class SplashScreen extends JWindow
-{
- /** Logger for this class. */
- private final static ILogger s_log =
- LoggerController.createLogger(SplashScreen.class);
-
- /** Internationalized strings for this class. */
- private static final StringManager s_stringMgr =
- StringManagerFactory.getStringManager(SplashScreen.class);
-
- private JProgressBar _progressBar;
-
- private JLabel _pluginLabel;
-
- SquirrelPreferences _prefs;
-
- public SplashScreen(SquirrelResources rsrc,
- int progressBarSize,
- SquirrelPreferences prefs)
- throws IllegalArgumentException
- {
- super();
- _prefs = prefs;
- if (rsrc == null)
- {
- throw new IllegalArgumentException("Null Resources passed");
- }
- createUserInterface(rsrc, progressBarSize);
- }
-
- private void createUserInterface(SquirrelResources rsrc, int progressBarSize)
- {
- final JPanel mainPnl = new JPanel(new GridBagLayout());
- final Color bgColor = new Color(SquirrelResources.S_SPLASH_IMAGE_BACKGROUND);
- mainPnl.setBackground(bgColor);
- mainPnl.setBorder(BorderFactory.createRaisedBevelBorder());
-
- GridBagConstraints gbc;
-
- Icon icon = rsrc.getIcon(SquirrelResources.IImageNames.SPLASH_SCREEN);
-
- gbc = new GridBagConstraints(0,0,1,1,1,1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0,5,5,5),0,0);
- mainPnl.add(new JLabel(icon), gbc);
-
- _progressBar = new JProgressBar(0, progressBarSize);
- _progressBar.setStringPainted(true);
- _progressBar.setString("");
- _progressBar.setBackground(bgColor);
- _progressBar.setForeground(Color.blue);
-
- if (_prefs.getShowPluginFilesInSplashScreen())
- {
- _pluginLabel = new JLabel("Dummy");
- _pluginLabel.setForeground(new Color(SquirrelResources.S_SPLASH_IMAGE_BACKGROUND));
-
- gbc = new GridBagConstraints(0,1,1,1,0,0,
- GridBagConstraints.NORTHWEST,
- GridBagConstraints.HORIZONTAL,
- new Insets(0,5,0,5),0,0);
- mainPnl.add(new VersionPane(false), gbc);
-
- gbc = new GridBagConstraints(0,2,1,1,0,0,
- GridBagConstraints.NORTHWEST,
- GridBagConstraints.HORIZONTAL,
- new Insets(0,5,3,5),0,0);
- mainPnl.add(_pluginLabel, gbc);
-
- gbc = new GridBagConstraints(0,3,1,1,0,0,
- GridBagConstraints.NORTHWEST,
- GridBagConstraints.HORIZONTAL,
- new Insets(0,5,3,5),0,0);
- mainPnl.add(_progressBar, gbc);
-
- }
- else
- {
- gbc = new GridBagConstraints(0,1,1,1,0,0,
- GridBagConstraints.NORTHWEST,
- GridBagConstraints.HORIZONTAL,
- new Insets(0,5,7,5),0,0);
- mainPnl.add(new VersionPane(false), gbc);
-
- gbc = new GridBagConstraints(0,2,1,1,0,0,
- GridBagConstraints.NORTHWEST,
- GridBagConstraints.HORIZONTAL,
- new Insets(0,5,5,5),0,0);
- mainPnl.add(_progressBar, gbc);
- }
-
- getContentPane().add(mainPnl);
-
- pack();
- setSize(400,500);
-
- GUIUtils.centerWithinScreen(this);
- setVisible(true);
- }
-
- public void indicateLoadingFile(final String filename) {
- try
- {
- SwingUtilities.invokeAndWait(new Runnable()
- {
- public void run()
- {
- if (filename != null)
- {
- _pluginLabel.setForeground(new Color(71, 73, 139));
- // i18n[SplashScreen.info.loadingfile=Loading file - ]
- _pluginLabel.setText(s_stringMgr.getString("SplashScreen.info.loadingfile") + filename);
- }
- else
- {
- _pluginLabel.setForeground(new Color(SquirrelResources.S_SPLASH_IMAGE_BACKGROUND));
- _pluginLabel.setText("Dummy");
- }
- _pluginLabel.validate();
- }
- });
- }
- catch (Exception ex)
- {
- //i18n[SplashScreen.error.updatingprogressbar=Error occured updating progress bar]
- s_log.error(s_stringMgr.getString("SplashScreen.error.updatingprogressbar"), ex);
- }
- }
-
- public void indicateNewTask(final String text)
- {
- // Using a thread for this gets rid of most of the "white flash".
- try
- {
- SwingUtilities.invokeAndWait(new Runnable()
- {
- public void run()
- {
- _progressBar.setString(text);
- _progressBar.setValue(_progressBar.getValue() + 1);
- }
- });
- Thread.yield();
- }
- catch (Exception ex)
- {
- // i18n[SplashScreen.error.updatingprogressbar=Error occured updating progress bar]
- s_log.error(s_stringMgr.getString("SplashScreen.error.updatingprogressbar"), ex);
- }
- }
-
- public ClassLoaderListener getClassLoaderListener() {
- return new ClassLoaderListener() {
- public void loadedZipFile(String filename) {
- indicateLoadingFile(filename);
- }
- public void finishedLoadingZipFiles() {
- indicateLoadingFile(null);
- }
- };
- }
-}
Added: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SplashStringWriter.java
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SplashStringWriter.java (rev 0)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SplashStringWriter.java 2010-09-13 22:09:54 UTC (rev 5880)
@@ -0,0 +1,165 @@
+package net.sourceforge.squirrel_sql.client.gui;
+
+import net.sourceforge.squirrel_sql.client.Version;
+import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
+import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
+
+import java.awt.*;
+
+public class SplashStringWriter
+{
+ private final static ILogger s_log = LoggerController.createLogger(SplashStringWriter.class);
+
+
+ private SplashScreen _splashScreen;
+ private boolean _hasTwoLines;
+ private int _maxNumberOffCallsToWriteUpperLine;
+ private static final Font FONT = new Font(Font.DIALOG, Font.BOLD, 14);
+ private static final Color BG = new Color(171, 176, 195);
+ private static final Color FG_UPPER = Color.black;
+ private static final Color FG_PROGRESS = new Color(74, 91, 153);
+ private static final Color FG_LOWER = new Color(74, 91, 153);
+ private static final int X_DIST = 10;
+ private static final int Y_DIST = 15;
+ private static final int X_PROGRESSBAR = X_DIST - 3;
+
+ private Graphics2D _graphics;
+
+ private int _yUpper;
+ private int _yLower;
+ private int _numberOffCallsToWriteUpperLine;
+ private int _yProgressbar;
+ private int _maxWidhtProgressbar;
+ private int _heightProgressbar;
+ private String _lowerLine;
+ private String _upperLine;
+ private int _paintAreaHeight;
+
+
+ public SplashStringWriter(SplashScreen splashScreen, boolean hasTwoLines, int maxNumberOffCallsToWriteUpperLine)
+ {
+ _splashScreen = splashScreen;
+ _hasTwoLines = hasTwoLines;
+ _maxNumberOffCallsToWriteUpperLine = maxNumberOffCallsToWriteUpperLine;
+
+ _graphics = _splashScreen.createGraphics();
+
+ _graphics.setFont(FONT);
+
+
+ _yLower = _splashScreen.getSize().height - Y_DIST;
+
+ FontMetrics fontMetrics = _graphics.getFontMetrics(FONT);
+
+ if (_hasTwoLines)
+ {
+ _yUpper = _yLower - fontMetrics.getHeight() - Y_DIST;
+ }
+ else
+ {
+ _yUpper = _yLower;
+ }
+
+ _yProgressbar = _yUpper - fontMetrics.getHeight() - 2;
+
+ _maxWidhtProgressbar = _splashScreen.getSize().width - 2 * X_DIST;
+
+ _heightProgressbar = fontMetrics.getHeight() + 10;
+
+ _paintAreaHeight = 2 * Y_DIST + 2 * fontMetrics.getHeight() + 5;
+
+
+ _graphics.setColor(FG_UPPER);
+
+ paintCopyrigthAndVersion(fontMetrics);
+ }
+
+ private void paintCopyrigthAndVersion(FontMetrics fontMetrics)
+ {
+ String[] splits = Version.getCopyrightStatement().split("\\n");
+
+ int xVers = (_splashScreen.getSize().width - fontMetrics.getStringBounds(Version.getVersion(), _graphics).getBounds().width) / 2;
+ int yVers = _splashScreen.getSize().height - (_paintAreaHeight + ((splits.length + 1) * (fontMetrics.getHeight() + 5)));
+ _graphics.drawString(Version.getVersion(), xVers, yVers);
+
+
+ for (int i = 0; i < splits.length; i++)
+ {
+ int xSpilt = (_splashScreen.getSize().width - fontMetrics.getStringBounds(splits[i], _graphics).getBounds().width) / 2;
+ int ySplit = _splashScreen.getSize().height - (_paintAreaHeight + ((splits.length - i) * (fontMetrics.getHeight() + 5)));
+ _graphics.drawString(splits[i], xSpilt, ySplit);
+ }
+ }
+
+ public void writeUpperProgressLine(String s)
+ {
+ _upperLine = s;
+ ++_numberOffCallsToWriteUpperLine;
+ paint();
+ }
+
+ public void writeLowerProgressLine(String s)
+ {
+ _lowerLine = s;
+ paint();
+ }
+
+
+ private void paint()
+ {
+
+ clear();
+
+ paintProgress();
+
+ paintStrings();
+ }
+
+ private void paintStrings()
+ {
+ write(_upperLine, _yUpper, FG_UPPER);
+
+ if(_hasTwoLines)
+ {
+ write(_lowerLine, _yLower, FG_LOWER);
+ }
+ }
+
+ private void paintProgress()
+ {
+ if(_maxNumberOffCallsToWriteUpperLine < _numberOffCallsToWriteUpperLine + 1)
+ {
+ String msg = "Programmer: Please increase _maxNumberOffCallsToWriteUpperLine to make the Progressbar work right";
+ s_log.error(msg, new IllegalStateException(msg));
+
+ _numberOffCallsToWriteUpperLine = _maxNumberOffCallsToWriteUpperLine;
+ }
+
+ int width = (int)
+ (
+ (double)(_maxWidhtProgressbar) * ((double)(_numberOffCallsToWriteUpperLine)) / ((double)(_maxNumberOffCallsToWriteUpperLine))
+ );
+
+ _graphics.setColor(FG_PROGRESS);
+ _graphics.fillRect(X_PROGRESSBAR, _yProgressbar, width, _heightProgressbar);
+ }
+
+ private void clear()
+ {
+ _graphics.setColor(BG);
+ _graphics.fillRect(0, _splashScreen.getSize().height - _paintAreaHeight, _splashScreen.getSize().width, _paintAreaHeight);
+ }
+
+
+ private String write(String s, int y, Color fg)
+ {
+ if (null != s)
+ {
+ _graphics.setColor(fg);
+ _graphics.drawString(s, X_DIST, y);
+ _splashScreen.update();
+ }
+
+ return s;
+ }
+}
Copied: trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SquirrelSplashScreen.java (from rev 5879, trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SplashScreen.java)
===================================================================
--- trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SquirrelSplashScreen.java (rev 0)
+++ trunk/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/SquirrelSplashScreen.java 2010-09-13 22:09:54 UTC (rev 5880)
@@ -0,0 +1,83 @@
+package net.sourceforge.squirrel_sql.client.gui;
+/*
+ * Copyright (C) 2001-2006 Colin Bell
+ * co...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+import net.sourceforge.squirrel_sql.client.preferences.SquirrelPreferences;
+import net.sourceforge.squirrel_sql.fw.util.ClassLoaderListener;
+import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
+import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
+
+import java.awt.*;
+
+public class SquirrelSplashScreen
+{
+ private final static ILogger s_log = LoggerController.createLogger(SquirrelSplashScreen.class);
+
+
+ private SplashStringWriter _splashStringWriter;
+
+ public SquirrelSplashScreen(SquirrelPreferences prefs, int numberOffCallsToindicateNewTask)
+ {
+ SplashScreen splashScreen = SplashScreen.getSplashScreen();
+
+ if(null == splashScreen)
+ {
+ s_log.error("No SplashScreen availabe", new NullPointerException("No SplashScreen availabe. Please check VM parameter -splash:"));
+ return;
+ }
+ _splashStringWriter = new SplashStringWriter(splashScreen, prefs.getShowPluginFilesInSplashScreen(), numberOffCallsToindicateNewTask);
+ }
+
+
+ private void indicateLoadingFile(final String filename)
+ {
+ if(null == _splashStringWriter)
+ {
+ return;
+ }
+
+ _splashStringWriter.writeLowerProgressLine(filename);
+ }
+
+ public void indicateNewTask(final String text)
+ {
+ if(null == _splashStringWriter)
+ {
+ return;
+ }
+
+ _splashStringWriter.writeUpperProgressLine(text);
+ }
+
+ public ClassLoaderListener getClassLoaderListener()
+ {
+ return new ClassLoaderListener()
+ {
+ public void loadedZipFile(String filename)
+ {
+ indicateLoadingFile(filename);
+ }
+
+ public void finishedLoadingZipFiles()
+ {
+ indicateLoadingFile(null);
+ }
+ };
+ }
+}
Modified: trunk/sql12/app/src/main/resources/net/sourceforge/squirrel_sql/client/resources/images/gm/splash.jpg
===================================================================
(Binary files differ)
Modified: trunk/sql12/doc/src/main/resources/changes.txt
===================================================================
--- trunk/sql12/doc/src/main/resources/changes.txt 2010-09-08 02:52:26 UTC (rev 5879)
+++ trunk/sql12/doc/src/main/resources/changes.txt 2010-09-13 22:09:54 UTC (rev 5880)
@@ -23,6 +23,8 @@
Bug-fixes:
+1808038: Splash screen was always on top hiding all other windows behind it
+
2998121: (Update doesn't work, settings seem correct). Now, if the local release.xml file
is not found the error dialog states as the cause, rather than merely saying the release.xml file
couldn't be downloaded.
Modified: trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/log/Log4jLogger.java
===================================================================
--- trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/log/Log4jLogger.java 2010-09-08 02:52:26 UTC (rev 5879)
+++ trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/util/log/Log4jLogger.java 2010-09-13 22:09:54 UTC (rev 5880)
@@ -54,7 +54,7 @@
_listener = listener;
_clazz = clazz;
_log = Logger.getLogger(clazz);
- _log.setLevel(Level.DEBUG);
+ _log.setLevel(Level.INFO);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|