From 5bff0a3288bd2b5e1f1030c6e47430735cd09463 Mon Sep 17 00:00:00 2001 From: clemenso Date: Thu, 9 Jul 2009 16:34:07 +0000 Subject: [#393] loading of default background fails git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@407 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java | 2 +- .../main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java | 31 +++++---------------- .../resources/images/BackgroundChipperling.png | Bin 2041 -> 0 bytes .../src/main/resources/images/BackgroundMocca.png | Bin 1287 -> 0 bytes .../main/resources/images/ChipperlingCutoff.png | Bin 0 -> 1522 bytes .../src/main/resources/images/help_orig.png | Bin 303 -> 0 bytes 6 files changed, 8 insertions(+), 25 deletions(-) delete mode 100644 BKUCommonGUI/src/main/resources/images/BackgroundChipperling.png delete mode 100644 BKUCommonGUI/src/main/resources/images/BackgroundMocca.png create mode 100644 BKUCommonGUI/src/main/resources/images/ChipperlingCutoff.png delete mode 100644 BKUCommonGUI/src/main/resources/images/help_orig.png (limited to 'BKUCommonGUI/src') 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); diff --git a/BKUCommonGUI/src/main/resources/images/BackgroundChipperling.png b/BKUCommonGUI/src/main/resources/images/BackgroundChipperling.png deleted file mode 100644 index 5097aa6b..00000000 Binary files a/BKUCommonGUI/src/main/resources/images/BackgroundChipperling.png and /dev/null differ diff --git a/BKUCommonGUI/src/main/resources/images/BackgroundMocca.png b/BKUCommonGUI/src/main/resources/images/BackgroundMocca.png deleted file mode 100644 index 349d9ff0..00000000 Binary files a/BKUCommonGUI/src/main/resources/images/BackgroundMocca.png and /dev/null differ diff --git a/BKUCommonGUI/src/main/resources/images/ChipperlingCutoff.png b/BKUCommonGUI/src/main/resources/images/ChipperlingCutoff.png new file mode 100644 index 00000000..337b144b Binary files /dev/null and b/BKUCommonGUI/src/main/resources/images/ChipperlingCutoff.png differ diff --git a/BKUCommonGUI/src/main/resources/images/help_orig.png b/BKUCommonGUI/src/main/resources/images/help_orig.png deleted file mode 100644 index 5d6da3bf..00000000 Binary files a/BKUCommonGUI/src/main/resources/images/help_orig.png and /dev/null differ -- cgit v1.2.3