From 9fcce6749092eb6c5d266dd1dd7099e88014fbd7 Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 4 Nov 2008 12:03:15 +0000 Subject: simplegui messages on top git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@143 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/main/java/at/gv/egiz/bku/gui/BKUGUI.java | 6 +- .../main/java/at/gv/egiz/bku/gui/SimpleGUI.java | 93 ++++++++++++---------- .../bku/binding/BindingProcessorManagerImpl.java | 5 +- smcc/pom.xml | 35 +------- 4 files changed, 59 insertions(+), 80 deletions(-) diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java index 9f733a14..cb99a872 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java @@ -14,10 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package at.gv.egiz.bku.gui; import at.gv.egiz.smcc.PINSpec; @@ -819,7 +815,7 @@ public class BKUGUI implements BKUGUIFacade { mainPanel.removeAll(); buttonPanel.removeAll(); -// titleLabel.setText(messages.getString(TITLE_WAIT)); + titleLabel.setText(messages.getString(TITLE_WAIT)); helpListener.setHelpTopic(HELP_WAIT); diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java index a005292e..6bf6df84 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/SimpleGUI.java @@ -312,15 +312,14 @@ public class SimpleGUI implements BKUGUIFacade { mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( - mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) - .addGroup(mainPanelLayout.createSequentialGroup() + mainPanelLayout.createSequentialGroup() + .addComponent(welcomeMsgLabel) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) - .addComponent(helpLabel)) - .addComponent(welcomeMsgLabel)); + .addComponent(helpLabel)); mainPanelLayout.setVerticalGroup( - mainPanelLayout.createSequentialGroup() - .addComponent(helpLabel) - .addComponent(welcomeMsgLabel)); + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(welcomeMsgLabel) + .addComponent(helpLabel)); contentPanel.validate(); @@ -355,15 +354,14 @@ public class SimpleGUI implements BKUGUIFacade { mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( - mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) - .addGroup(mainPanelLayout.createSequentialGroup() + mainPanelLayout.createSequentialGroup() + .addComponent(insertCardMsgLabel) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) - .addComponent(helpLabel)) - .addComponent(insertCardMsgLabel)); + .addComponent(helpLabel)); mainPanelLayout.setVerticalGroup( - mainPanelLayout.createSequentialGroup() - .addComponent(helpLabel) - .addComponent(insertCardMsgLabel)); + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(insertCardMsgLabel) + .addComponent(helpLabel)); // JButton cancelButton = new JButton(); // cancelButton.setText(messages.getString(BUTTON_CANCEL)); @@ -418,15 +416,14 @@ public class SimpleGUI implements BKUGUIFacade { mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( - mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) - .addGroup(mainPanelLayout.createSequentialGroup() + mainPanelLayout.createSequentialGroup() + .addComponent(insertCardMsgLabel) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) - .addComponent(helpLabel)) - .addComponent(insertCardMsgLabel)); + .addComponent(helpLabel)); mainPanelLayout.setVerticalGroup( - mainPanelLayout.createSequentialGroup() - .addComponent(helpLabel) - .addComponent(insertCardMsgLabel)); + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(insertCardMsgLabel) + .addComponent(helpLabel)); // JButton cancelButton = new JButton(); // cancelButton.setText(messages.getString(BUTTON_CANCEL)); @@ -764,6 +761,11 @@ public class SimpleGUI implements BKUGUIFacade { helpListener.setHelpTopic(errorMsgKey); + JLabel errorTitleLabel = new JLabel(); + errorTitleLabel.setFont(errorTitleLabel.getFont().deriveFont(errorTitleLabel.getFont().getStyle() | java.awt.Font.BOLD)); + errorTitleLabel.setText(messages.getString(TITLE_ERROR)); + errorTitleLabel.setForeground(ERROR_COLOR); + String errorMsgPattern = messages.getString(errorMsgKey); String errorMsg = MessageFormat.format(errorMsgPattern, errorMsgParams); @@ -778,12 +780,15 @@ public class SimpleGUI implements BKUGUIFacade { mainPanelLayout.setHorizontalGroup( mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(mainPanelLayout.createSequentialGroup() + .addComponent(errorTitleLabel) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) .addComponent(helpLabel)) .addComponent(errorMsgLabel)); mainPanelLayout.setVerticalGroup( mainPanelLayout.createSequentialGroup() - .addComponent(helpLabel) + .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(errorTitleLabel) + .addComponent(helpLabel)) .addComponent(errorMsgLabel)); JButton okButton = new JButton(); @@ -827,27 +832,34 @@ public class SimpleGUI implements BKUGUIFacade { helpListener.setHelpTopic(errorMsgKey); + JLabel errorTitleLabel = new JLabel(); + errorTitleLabel.setFont(errorTitleLabel.getFont().deriveFont(errorTitleLabel.getFont().getStyle() | java.awt.Font.BOLD)); + errorTitleLabel.setText(messages.getString(TITLE_ERROR)); + errorTitleLabel.setForeground(ERROR_COLOR); + String errorMsgPattern = messages.getString(errorMsgKey); String errorMsg = MessageFormat.format(errorMsgPattern, errorMsgParams); JLabel errorMsgLabel = new JLabel(); errorMsgLabel.setFont(errorMsgLabel.getFont().deriveFont(errorMsgLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); errorMsgLabel.setText(errorMsg); - errorMsgLabel.setForeground(ERROR_COLOR); - + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( - mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) - .addGroup(mainPanelLayout.createSequentialGroup() - .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) - .addComponent(helpLabel)) - .addComponent(errorMsgLabel)); - mainPanelLayout.setVerticalGroup( - mainPanelLayout.createSequentialGroup() - .addComponent(helpLabel) - .addComponent(errorMsgLabel)); + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(mainPanelLayout.createSequentialGroup() + .addComponent(errorTitleLabel) + .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) + .addComponent(helpLabel)) + .addComponent(errorMsgLabel)); + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createSequentialGroup() + .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(errorTitleLabel) + .addComponent(helpLabel)) + .addComponent(errorMsgLabel)); contentPanel.validate(); } @@ -885,16 +897,15 @@ public class SimpleGUI implements BKUGUIFacade { mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( - mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) - .addGroup(mainPanelLayout.createSequentialGroup() + mainPanelLayout.createSequentialGroup() + .addComponent(waitMsgLabel) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) - .addComponent(helpLabel)) - .addComponent(waitMsgLabel)); + .addComponent(helpLabel)); mainPanelLayout.setVerticalGroup( - mainPanelLayout.createSequentialGroup() - .addComponent(helpLabel) - .addComponent(waitMsgLabel)); - + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(waitMsgLabel) + .addComponent(helpLabel)); + contentPanel.validate(); } }); diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java index cc1b7532..9757f7cc 100644 --- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessorManagerImpl.java @@ -285,16 +285,19 @@ public class BindingProcessorManagerImpl implements BindingProcessorManager { log.debug("Removing binding processor: " + sessionId); ProcessingContext ctx = contextMap.get(sessionId); if (ctx == null) { + log.warn("no processing context to remove for session " + sessionId); return; } Future f = ctx.getFuture(); - + // MapEntityWrapper wrapper = bindingProcessorMap.get(sessionId); // if (wrapper == null) { // return; // } // Future f = wrapper.getFuture(); + if (!f.isDone()) { + log.trace("canceling " + sessionId); f.cancel(true); } contextMap.remove(sessionId); diff --git a/smcc/pom.xml b/smcc/pom.xml index 3e3dfe14..9fa81387 100644 --- a/smcc/pom.xml +++ b/smcc/pom.xml @@ -1,6 +1,5 @@ - + bku at.gv.egiz @@ -15,36 +14,6 @@ http://bku.egiz.gv.at - - maven-jar-plugin - - - - sign - - - - - - false - false - - false - - - test-applet signer - keystore.ks - storepass - keypass - true - - - - maven-compiler-plugin - - UTF-8 - - maven-resources-plugin @@ -70,4 +39,4 @@ iaik_jce_full_signed --> - \ No newline at end of file + -- cgit v1.2.3