From b639490ce156cdcb7cdf1f985ae523896a2ab157 Mon Sep 17 00:00:00 2001 From: clemenso Date: Wed, 30 Sep 2009 13:39:43 +0000 Subject: MOCCA Dialog Icons git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@514 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../gv/egiz/bku/local/stal/LocalSTALFactory.java | 41 ++++++++++++++++++++- .../main/resources/at/gv/egiz/bku/gui/chip128.png | Bin 0 -> 7775 bytes .../main/resources/at/gv/egiz/bku/gui/chip16.png | Bin 0 -> 787 bytes .../main/resources/at/gv/egiz/bku/gui/chip24.png | Bin 0 -> 1227 bytes .../main/resources/at/gv/egiz/bku/gui/chip32.png | Bin 0 -> 1753 bytes .../main/resources/at/gv/egiz/bku/gui/chip48.png | Bin 0 -> 2771 bytes 6 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip128.png create mode 100644 BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip16.png create mode 100644 BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip24.png create mode 100644 BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip32.png create mode 100644 BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip48.png (limited to 'BKULocal/src/main') diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java index 712fb969..ddbcaf46 100644 --- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java @@ -18,6 +18,8 @@ package at.gv.egiz.bku.local.stal; import java.awt.Dimension; import java.awt.Toolkit; +import java.awt.event.WindowEvent; +import java.io.IOException; import java.net.MalformedURLException; import java.util.Locale; @@ -30,7 +32,14 @@ import at.gv.egiz.bku.local.gui.GUIProxy; import at.gv.egiz.bku.local.gui.LocalHelpListener; import at.gv.egiz.stal.STAL; import at.gv.egiz.stal.STALFactory; +import java.awt.Image; +import java.awt.event.WindowAdapter; import java.net.URL; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.imageio.ImageIO; +import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JRootPane; import org.apache.commons.logging.Log; @@ -46,6 +55,25 @@ public class LocalSTALFactory implements STALFactory { protected static final Log log = LogFactory.getLog(LocalSTALFactory.class); protected static final Dimension PREFERRED_SIZE = new Dimension(318, 200); + protected static ArrayList icons = new ArrayList(); + static { + String[] iconResources = new String[] { + "/at/gv/egiz/bku/gui/chip16.png", + "/at/gv/egiz/bku/gui/chip24.png", + "/at/gv/egiz/bku/gui/chip32.png", + "/at/gv/egiz/bku/gui/chip48.png", + "/at/gv/egiz/bku/gui/chip128.png" }; + for (String ir : iconResources) { + URL resource = LocalSTALFactory.class.getResource(ir); + if (ir != null) { + try { + icons.add(ImageIO.read(resource)); + } catch (IOException ex) { + log.warn("failed to set ui dialog icon", ex); + } + } + } + } protected String helpURL; protected Locale locale; @@ -57,9 +85,18 @@ public class LocalSTALFactory implements STALFactory { // use undecorated JFrame instead of JWindow, // which creates an invisible owning frame and therefore cannot getFocusInWindow() JFrame dialog = new JFrame("Bürgerkarte"); + dialog.setIconImages(icons); dialog.setUndecorated(true); - dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE); - +// dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE); +// dialog.addWindowListener(new WindowAdapter() { +// +// @Override +// public void windowClosing(WindowEvent e) { +// super.windowClosing(e); +// log.debug("closing window ********************"); +// } +// +// }); if (locale != null) { dialog.setLocale(locale); } diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip128.png b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip128.png new file mode 100644 index 00000000..c36d8079 Binary files /dev/null and b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip128.png differ diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip16.png b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip16.png new file mode 100644 index 00000000..96b580e9 Binary files /dev/null and b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip16.png differ diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip24.png b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip24.png new file mode 100644 index 00000000..efd6dbeb Binary files /dev/null and b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip24.png differ diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip32.png b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip32.png new file mode 100644 index 00000000..e7efb020 Binary files /dev/null and b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip32.png differ diff --git a/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip48.png b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip48.png new file mode 100644 index 00000000..491fbcac Binary files /dev/null and b/BKULocal/src/main/resources/at/gv/egiz/bku/gui/chip48.png differ -- cgit v1.2.3