summaryrefslogtreecommitdiff
path: root/BKUCommonGUI/src/main/java/at
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-07-09 16:34:07 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-07-09 16:34:07 +0000
commit5bff0a3288bd2b5e1f1030c6e47430735cd09463 (patch)
tree03695e33968feafec1d2831dd3926cf09d881259 /BKUCommonGUI/src/main/java/at
parent677021e29d773f51c3ffadbb75e6639eca01980f (diff)
downloadmocca-5bff0a3288bd2b5e1f1030c6e47430735cd09463.tar.gz
mocca-5bff0a3288bd2b5e1f1030c6e47430735cd09463.tar.bz2
mocca-5bff0a3288bd2b5e1f1030c6e47430735cd09463.zip
[#393] loading of default background fails
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@407 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUCommonGUI/src/main/java/at')
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java2
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java31
2 files changed, 8 insertions, 25 deletions
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java
index 79fbfd6c..06aad45f 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java
@@ -42,7 +42,7 @@ public interface BKUGUIFacade {
public static final String ERR_CONFIG = "error.config";
public static final String MESSAGES_BUNDLE = "at/gv/egiz/bku/gui/Messages";
- public static final String DEFAULT_BACKGROUND = "/images/BackgroundChipperling.png";
+ public static final String DEFAULT_BACKGROUND = "/images/ChipperlingCutoff.png";
public static final String DEFAULT_ICON = "/images/ChipperlingLogo.png";
public static final String HELP_IMG = "/images/help.png";
public static final String HASHDATA_FONT = "Monospaced";
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java
index 4cab29e0..16297218 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java
@@ -28,25 +28,15 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.text.MessageFormat;
-import java.util.Collections;
import java.util.List;
import java.util.Locale;
-import java.util.MissingResourceException;
import java.util.ResourceBundle;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
-import javax.swing.JFileChooser;
import javax.swing.JLabel;
-import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JScrollPane;
@@ -153,10 +143,7 @@ public class BKUGUIImpl implements BKUGUIFacade {
initIconPanel(background);
initContentPanel(null);
} else {
- initContentPanel((background == null) ?
- getClass().getResource(DEFAULT_BACKGROUND) :
- background
- );
+ initContentPanel(background);
}
GroupLayout layout = new GroupLayout(contentPane);
@@ -220,20 +207,16 @@ public class BKUGUIImpl implements BKUGUIFacade {
protected void initContentPanel(URL background) {
-// if (background == null) {
-// background = getClass().getResource(DEFAULT_BACKGROUND);
-// }
if (background == null) {
log.debug("no background image set");
+// contentPanel = new ImagePanel(getClass().getResource(DEFAULT_BACKGROUND));
+ contentPanel = new JPanel();
+ } else if ("file".equals(background.getProtocol())) {
+ log.warn("file:// background images not permitted: " + background);
contentPanel = new JPanel();
} else {
- if ("file".equals(background.getProtocol())) {
- log.warn("file:// background images not permitted: " + background +
- ", loading default background");
- background = getClass().getResource(DEFAULT_BACKGROUND);
- }
- log.debug("loading background " + background);
- contentPanel = new ImagePanel(background);
+ log.debug("loading background " + background);
+ contentPanel = new ImagePanel(background);
}
mainPanel = new JPanel();
mainPanel.setOpaque(false);