From 4343cf050d45836266ce09241d53f47805d1dcc4 Mon Sep 17 00:00:00 2001 From: tkellner Date: Fri, 13 Jul 2012 14:43:07 +0000 Subject: Add Warning Dialog functions git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1108 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java | 6 ++++++ .../src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) 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 e4264c0c..5de6a9e0 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 @@ -60,6 +60,7 @@ public interface BKUGUIFacade { public static final String HELP_IMG_FOCUS = "/at/gv/egiz/bku/gui/help.png"; //help_focus.png"; public static final String HASHDATA_FONT = "Monospaced"; public static final Color ERROR_COLOR = Color.RED; + public static final Color WARNING_COLOR = Color.ORANGE; public static final Color HYPERLINK_COLOR = Color.BLUE; public static final Color HELP_COLOR = new Color(70, 148, 169); public static final String TITLE_WELCOME = "title.welcome"; @@ -182,6 +183,11 @@ public interface BKUGUIFacade { public void showErrorDialog(String errorMsgKey, Object[] errorMsgParams); + public void showWarningDialog(String warningMsgKey, Object[] warningMsgParams, + ActionListener okListener, String okCommand); + + public void showWarningDialog(String warningMsgKey, Object[] warningMsgParams); + public void showMessageDialog(String titleKey, String msgKey, Object[] msgParams, String buttonKey, 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 132509ff..1f6e849e 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 @@ -1627,6 +1627,23 @@ public class BKUGUIImpl implements BKUGUIFacade { errorMsgParams, null, null, null); } + @Override + public void showWarningDialog(final String warningMsgKey, + final Object[] warningMsgParams, final ActionListener okListener, + final String okCommand) { + + showMessageDialog(TITLE_WARNING, WARNING_COLOR, warningMsgKey, + warningMsgParams, BUTTON_OK, okListener, okCommand); + } + + @Override + public void showWarningDialog(final String warningMsgKey, + final Object[] warningMsgParams) { + + showMessageDialog(TITLE_WARNING, WARNING_COLOR, warningMsgKey, + warningMsgParams, null, null, null); + } + @Override public void showMessageDialog(final String titleKey, final String msgKey, final Object[] msgParams, final String buttonKey, -- cgit v1.2.3