summaryrefslogtreecommitdiff
path: root/BKULocal/src/main/java/at/gv
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-10-02 17:56:32 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-10-02 17:56:32 +0000
commit52dae23ee6fdc41b90def85deba27c53532991b1 (patch)
treea0acb54a9ab882cc3891e876dcc26221670850e5 /BKULocal/src/main/java/at/gv
parentad0efd4d9fa524d34620c95feb571d8a1d2cc622 (diff)
downloadmocca-1.2.7.tar.gz
mocca-1.2.7.tar.bz2
mocca-1.2.7.zip
[maven-release-plugin] copy for tag mocca-1.2.7mocca-1.2.7
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/tags/mocca-1.2.7@520 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKULocal/src/main/java/at/gv')
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java47
1 files changed, 45 insertions, 2 deletions
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..d961b56f 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,15 @@ 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.Window;
+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 +56,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<Image> icons = new ArrayList<Image>();
+ 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 +86,23 @@ 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");
+ if (log.isTraceEnabled()) {
+ log.debug("alwaysOnTop supported: " + dialog.isAlwaysOnTopSupported());
+ }
+ // [#439] make mocca dialog alwaysOnTop
+ dialog.setAlwaysOnTop(true);
+ 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);
}