From 32d17447a258188b2d534bcb0bf65a659ba7b7d0 Mon Sep 17 00:00:00 2001 From: mcentner Date: Fri, 29 Aug 2008 12:11:34 +0000 Subject: Initial import. git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 53 ++++++++ .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 136 +++++++++++++++++++++ 2 files changed, 189 insertions(+) create mode 100644 BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java create mode 100644 BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java new file mode 100644 index 00000000..4dc1f8b3 --- /dev/null +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -0,0 +1,53 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* 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 javax.swing.JFrame; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * + * @author clemens + */ +public class BKUGUITest { + + @Ignore + public void testBKUGUI() { + JFrame testFrame = new JFrame("BKUGUITest"); + BKUGUI gui = new BKUGUI(); + gui.init(testFrame.getContentPane(), null); + BKUGUIWorker worker = new BKUGUIWorker(); + worker.init(gui); + testFrame.pack(); + testFrame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + testFrame.setVisible(true); + new Thread(worker).start(); + + while(true) ; + } + + @Test + public void dummyTest() { + } +} diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java new file mode 100644 index 00000000..50771216 --- /dev/null +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -0,0 +1,136 @@ +/* +* Copyright 2008 Federal Chancellery Austria and +* Graz University of Technology +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* 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; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.Collections; + +/** + * + * @author clemens + */ +public class BKUGUIWorker implements Runnable { + + BKUGUIFacade gui; + + public void init(BKUGUIFacade gui) { + this.gui = gui; + } + + @Override + public void run() { + try { + + final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN"); + + + final ActionListener cancelListener = new ActionListener() { + + public void actionPerformed(ActionEvent e) { + System.out.println("CANCEL EVENT OCCURED: " + e); + } + }; + ActionListener okListener = new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + System.out.println("OK EVENT OCCURED: " + e); + } + }; + final ActionListener signListener = new ActionListener() { + + public void actionPerformed(ActionEvent e) { + System.out.println("SIGN EVENT OCCURED: " + e); + } + }; + ActionListener hashdataListener = new ActionListener() { + + public void actionPerformed(ActionEvent e) { + System.out.println("HASHDATA EVENT OCCURED: " + e); + ActionListener returnListener = new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", null, "hashdata"); + } + }; + HashDataInput signedRef = new HashDataInput() { + + @Override + public InputStream getHashDataInput() { + return new ByteArrayInputStream("HashDataInput_002".getBytes()); + } + + @Override + public String getMimeType() { + return "text/xml"; + } + }; + gui.showHashDataInputDialog(Collections.singletonList(signedRef), returnListener, "return"); + } + }; + + + +// gui.showWelcomeDialog(); +// +// Thread.sleep(2000); + + gui.showInsertCardDialog(cancelListener, "cancel"); + + Thread.sleep(2000); + + gui.showCardNotSupportedDialog(cancelListener, "cancel"); + + Thread.sleep(2000); + +// PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Karten-PIN"); +// +// gui.showCardPINDialog(cardPinSpec, okListener, "ok", cancelListener, "cancel"); +// +// Thread.sleep(2000); +// + +// gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// +// Thread.sleep(2000); +// +// gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// +// Thread.sleep(2000); +//// +// gui.showErrorDialog("Testfehler occured", null, null); +// +// Thread.sleep(2000); +// +// gui.showErrorDialog("Testfehler occured"); + + } catch (InterruptedException ex) { + ex.printStackTrace(); + } + } +} -- cgit v1.2.3 From 3808a5b4ec9d13c8cbb1b7fd95afa62c133342fd Mon Sep 17 00:00:00 2001 From: clemenso Date: Fri, 5 Sep 2008 13:39:14 +0000 Subject: HashDataInput git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@21 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 50771216..a251be55 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -21,10 +21,9 @@ package at.gv.egiz.bku.gui; import at.gv.egiz.smcc.PINSpec; +import at.gv.egiz.stal.HashDataInput; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.Collections; @@ -89,6 +88,11 @@ public class BKUGUIWorker implements Runnable { public String getMimeType() { return "text/xml"; } + + @Override + public String getReferenceId() { + return "ref123"; + } }; gui.showHashDataInputDialog(Collections.singletonList(signedRef), returnListener, "return"); } -- cgit v1.2.3 From d3698ed2a4f129e5af970f072bc79bb8226d7765 Mon Sep 17 00:00:00 2001 From: clemenso Date: Fri, 5 Sep 2008 15:41:19 +0000 Subject: Text HashDataInput git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@24 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 34 ++++++++++++---------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index a251be55..e2f478c9 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -86,7 +86,7 @@ public class BKUGUIWorker implements Runnable { @Override public String getMimeType() { - return "text/xml"; + return "text/plain"; } @Override @@ -104,13 +104,13 @@ public class BKUGUIWorker implements Runnable { // // Thread.sleep(2000); - gui.showInsertCardDialog(cancelListener, "cancel"); - - Thread.sleep(2000); - - gui.showCardNotSupportedDialog(cancelListener, "cancel"); - - Thread.sleep(2000); +// gui.showInsertCardDialog(cancelListener, "cancel"); +// +// Thread.sleep(2000); +// +// gui.showCardNotSupportedDialog(cancelListener, "cancel"); +// +// Thread.sleep(2000); // PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Karten-PIN"); // @@ -119,19 +119,23 @@ public class BKUGUIWorker implements Runnable { // Thread.sleep(2000); // -// gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); -// -// Thread.sleep(2000); -// -// gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); -// -// Thread.sleep(2000); + gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + + Thread.sleep(2000); + + gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + + Thread.sleep(2000); //// // gui.showErrorDialog("Testfehler occured", null, null); // // Thread.sleep(2000); // // gui.showErrorDialog("Testfehler occured"); + + +// gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); +// Thread.sleep(2000); } catch (InterruptedException ex) { ex.printStackTrace(); -- cgit v1.2.3 From 84e214e4d708f13c8f09c68273541e535c560296 Mon Sep 17 00:00:00 2001 From: clemenso Date: Wed, 10 Sep 2008 16:54:04 +0000 Subject: gui final 0.1b git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@30 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 10 ++- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 90 ++++++++++++++++++---- 2 files changed, 84 insertions(+), 16 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index 4dc1f8b3..a9c21a00 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -21,6 +21,8 @@ package at.gv.egiz.bku.gui; +import java.awt.Container; +import java.awt.Dimension; import javax.swing.JFrame; import org.junit.Ignore; import org.junit.Test; @@ -36,7 +38,9 @@ public class BKUGUITest { public void testBKUGUI() { JFrame testFrame = new JFrame("BKUGUITest"); BKUGUI gui = new BKUGUI(); - gui.init(testFrame.getContentPane(), null); + Container contentPane = testFrame.getContentPane(); + contentPane.setPreferredSize(new Dimension(500, 200)); + gui.init(contentPane, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); @@ -50,4 +54,8 @@ public class BKUGUITest { @Test public void dummyTest() { } + +// public static void main(String[] args) { +// new BKUGUITest().testBKUGUI(); +// } } diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index e2f478c9..4367f642 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -26,7 +26,8 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.ByteArrayInputStream; import java.io.InputStream; -import java.util.Collections; +import java.util.ArrayList; +import java.util.List; /** * @@ -42,7 +43,7 @@ public class BKUGUIWorker implements Runnable { @Override public void run() { - try { +// try { final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN"); @@ -77,11 +78,11 @@ public class BKUGUIWorker implements Runnable { gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", null, "hashdata"); } }; - HashDataInput signedRef = new HashDataInput() { + HashDataInput signedRef1 = new HashDataInput() { @Override public InputStream getHashDataInput() { - return new ByteArrayInputStream("HashDataInput_002".getBytes()); + return new ByteArrayInputStream("HashDataInput_001\n12345\n\tHello, world!\n12345\n\n12345\n6789\nblabla".getBytes()); } @Override @@ -91,10 +92,69 @@ public class BKUGUIWorker implements Runnable { @Override public String getReferenceId() { - return "ref123"; + return "Reference-ref1-00000000000000000000001"; } }; - gui.showHashDataInputDialog(Collections.singletonList(signedRef), returnListener, "return"); + HashDataInput signedRef2 = new HashDataInput() { + + @Override + public InputStream getHashDataInput() { + return new ByteArrayInputStream("HashDataInput_002".getBytes()); + } + + @Override + public String getMimeType() { + return "text/xml"; + } + + @Override + public String getReferenceId() { + return "Reference-ref2-00000000000000000000002"; + } + }; + HashDataInput signedRef3 = new HashDataInput() { + + @Override + public InputStream getHashDataInput() { + return new ByteArrayInputStream("HashDataInput_003".getBytes()); + } + + @Override + public String getMimeType() { + return "text/xml"; + } + + @Override + public String getReferenceId() { + return "Reference-ref3-00000000000000000000003"; + } + }; + HashDataInput signedRef4 = new HashDataInput() { + + @Override + public InputStream getHashDataInput() { + return new ByteArrayInputStream("HashDataInput_004".getBytes()); + } + + @Override + public String getMimeType() { + return "text/xml"; + } + + @Override + public String getReferenceId() { + return "ref4"; + } + }; + + // + List signedRefs = new ArrayList(); + signedRefs.add(signedRef1); + signedRefs.add(signedRef2); + signedRefs.add(signedRef3); + signedRefs.add(signedRef4); +// signedRefs = Collections.singletonList(signedRef1); + gui.showHashDataInputDialog(signedRefs, returnListener, "return"); } }; @@ -105,7 +165,7 @@ public class BKUGUIWorker implements Runnable { // Thread.sleep(2000); // gui.showInsertCardDialog(cancelListener, "cancel"); -// + // Thread.sleep(2000); // // gui.showCardNotSupportedDialog(cancelListener, "cancel"); @@ -113,7 +173,7 @@ public class BKUGUIWorker implements Runnable { // Thread.sleep(2000); // PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Karten-PIN"); -// +//// // gui.showCardPINDialog(cardPinSpec, okListener, "ok", cancelListener, "cancel"); // // Thread.sleep(2000); @@ -121,11 +181,11 @@ public class BKUGUIWorker implements Runnable { gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); - Thread.sleep(2000); +// Thread.sleep(2000); - gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); - - Thread.sleep(2000); +// gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// +// Thread.sleep(2000); //// // gui.showErrorDialog("Testfehler occured", null, null); // @@ -137,8 +197,8 @@ public class BKUGUIWorker implements Runnable { // gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); // Thread.sleep(2000); - } catch (InterruptedException ex) { - ex.printStackTrace(); - } +// } catch (InterruptedException ex) { +// ex.printStackTrace(); +// } } } -- cgit v1.2.3 From 3794536434fdbb06067eddcfd248898ce85f85a1 Mon Sep 17 00:00:00 2001 From: clemenso Date: Fri, 12 Sep 2008 13:06:34 +0000 Subject: gui 0.2 git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@34 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 276 ++++++++++----------- 1 file changed, 138 insertions(+), 138 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 4367f642..85f05435 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -1,19 +1,19 @@ /* -* Copyright 2008 Federal Chancellery Austria and -* Graz University of Technology -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2008 Federal Chancellery Austria and + * Graz University of Technology + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * 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. @@ -35,137 +35,137 @@ import java.util.List; */ public class BKUGUIWorker implements Runnable { - BKUGUIFacade gui; + BKUGUIFacade gui; - public void init(BKUGUIFacade gui) { - this.gui = gui; - } + public void init(BKUGUIFacade gui) { + this.gui = gui; + } - @Override - public void run() { + @Override + public void run() { // try { - final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN"); - - - final ActionListener cancelListener = new ActionListener() { - - public void actionPerformed(ActionEvent e) { - System.out.println("CANCEL EVENT OCCURED: " + e); - } - }; - ActionListener okListener = new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - System.out.println("OK EVENT OCCURED: " + e); - } - }; - final ActionListener signListener = new ActionListener() { - - public void actionPerformed(ActionEvent e) { - System.out.println("SIGN EVENT OCCURED: " + e); - } - }; - ActionListener hashdataListener = new ActionListener() { - - public void actionPerformed(ActionEvent e) { - System.out.println("HASHDATA EVENT OCCURED: " + e); - ActionListener returnListener = new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", null, "hashdata"); - } - }; - HashDataInput signedRef1 = new HashDataInput() { - - @Override - public InputStream getHashDataInput() { - return new ByteArrayInputStream("HashDataInput_001\n12345\n\tHello, world!\n12345\n\n12345\n6789\nblabla".getBytes()); - } - - @Override - public String getMimeType() { - return "text/plain"; - } - - @Override - public String getReferenceId() { - return "Reference-ref1-00000000000000000000001"; - } - }; - HashDataInput signedRef2 = new HashDataInput() { - - @Override - public InputStream getHashDataInput() { - return new ByteArrayInputStream("HashDataInput_002".getBytes()); - } - - @Override - public String getMimeType() { - return "text/xml"; - } - - @Override - public String getReferenceId() { - return "Reference-ref2-00000000000000000000002"; - } - }; - HashDataInput signedRef3 = new HashDataInput() { - - @Override - public InputStream getHashDataInput() { - return new ByteArrayInputStream("HashDataInput_003".getBytes()); - } - - @Override - public String getMimeType() { - return "text/xml"; - } - - @Override - public String getReferenceId() { - return "Reference-ref3-00000000000000000000003"; - } - }; - HashDataInput signedRef4 = new HashDataInput() { - - @Override - public InputStream getHashDataInput() { - return new ByteArrayInputStream("HashDataInput_004".getBytes()); - } - - @Override - public String getMimeType() { - return "text/xml"; - } - - @Override - public String getReferenceId() { - return "ref4"; - } - }; - - // - List signedRefs = new ArrayList(); - signedRefs.add(signedRef1); + final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN"); + + + final ActionListener cancelListener = new ActionListener() { + + public void actionPerformed(ActionEvent e) { + System.out.println("CANCEL EVENT OCCURED: " + e); + } + }; + ActionListener okListener = new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + System.out.println("OK EVENT OCCURED: " + e); + } + }; + final ActionListener signListener = new ActionListener() { + + public void actionPerformed(ActionEvent e) { + System.out.println("SIGN EVENT OCCURED: " + e); + } + }; + ActionListener hashdataListener = new ActionListener() { + + public void actionPerformed(ActionEvent e) { + System.out.println("HASHDATA EVENT OCCURED: " + e); + ActionListener returnListener = new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", null, "hashdata"); + } + }; + HashDataInput signedRef1 = new HashDataInput() { + + @Override + public InputStream getHashDataInput() { + return new ByteArrayInputStream("oialfx HashDataInput_001\n12345\n\tHello, world!\n12345\n\n12345\n6789\nblabla".getBytes()); + } + + @Override + public String getMimeType() { + return "text/plain"; + } + + @Override + public String getReferenceId() { + return "Reference-ref1-00000000000000000000001"; + } + }; + HashDataInput signedRef2 = new HashDataInput() { + + @Override + public InputStream getHashDataInput() { + return new ByteArrayInputStream("HashDataInput_002".getBytes()); + } + + @Override + public String getMimeType() { + return "text/xml"; + } + + @Override + public String getReferenceId() { + return "Reference-ref2-00000000000000000000002"; + } + }; + HashDataInput signedRef3 = new HashDataInput() { + + @Override + public InputStream getHashDataInput() { + return new ByteArrayInputStream("HashDataInput_003".getBytes()); + } + + @Override + public String getMimeType() { + return "text/xml"; + } + + @Override + public String getReferenceId() { + return "Reference-ref3-00000000000000000000003"; + } + }; + HashDataInput signedRef4 = new HashDataInput() { + + @Override + public InputStream getHashDataInput() { + return new ByteArrayInputStream("HashDataInput_004".getBytes()); + } + + @Override + public String getMimeType() { + return "text/xml"; + } + + @Override + public String getReferenceId() { + return "ref4"; + } + }; + + // + List signedRefs = new ArrayList(); + signedRefs.add(signedRef1); signedRefs.add(signedRef2); signedRefs.add(signedRef3); signedRefs.add(signedRef4); // signedRefs = Collections.singletonList(signedRef1); - gui.showHashDataInputDialog(signedRefs, returnListener, "return"); - } - }; - + gui.showHashDataInputDialog(signedRefs, returnListener, "return"); + } + }; + // gui.showWelcomeDialog(); // // Thread.sleep(2000); - + // gui.showInsertCardDialog(cancelListener, "cancel"); - + // Thread.sleep(2000); // // gui.showCardNotSupportedDialog(cancelListener, "cancel"); @@ -178,11 +178,11 @@ public class BKUGUIWorker implements Runnable { // // Thread.sleep(2000); // - - gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + + gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); // Thread.sleep(2000); - + // gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); // // Thread.sleep(2000); @@ -192,13 +192,13 @@ public class BKUGUIWorker implements Runnable { // Thread.sleep(2000); // // gui.showErrorDialog("Testfehler occured"); - - + + // gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); // Thread.sleep(2000); // } catch (InterruptedException ex) { // ex.printStackTrace(); // } - } + } } -- cgit v1.2.3 From a288c99fa6955a2c9055b28dc1c805dacbe5fc93 Mon Sep 17 00:00:00 2001 From: clemenso Date: Mon, 15 Sep 2008 18:02:18 +0000 Subject: encoding git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@40 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 2 +- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 24 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index a9c21a00..5f1bc8b2 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -39,7 +39,7 @@ public class BKUGUITest { JFrame testFrame = new JFrame("BKUGUITest"); BKUGUI gui = new BKUGUI(); Container contentPane = testFrame.getContentPane(); - contentPane.setPreferredSize(new Dimension(500, 200)); + contentPane.setPreferredSize(new Dimension(380, 150)); gui.init(contentPane, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 85f05435..6cbc2cd1 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -82,7 +82,7 @@ public class BKUGUIWorker implements Runnable { @Override public InputStream getHashDataInput() { - return new ByteArrayInputStream("oialfx HashDataInput_001\n12345\n\tHello, world!\n12345\n\n12345\n6789\nblabla".getBytes()); + return new ByteArrayInputStream("Ich bin ein einfacher Text mit Umlauten: öäüßéç@€\n123\n456\n\tHello, world!\n\nlkjsd\nnksdjf".getBytes()); } @Override @@ -94,6 +94,10 @@ public class BKUGUIWorker implements Runnable { public String getReferenceId() { return "Reference-ref1-00000000000000000000001"; } + @Override + public String getEncoding() { + return "UTF-8"; + } }; HashDataInput signedRef2 = new HashDataInput() { @@ -111,6 +115,10 @@ public class BKUGUIWorker implements Runnable { public String getReferenceId() { return "Reference-ref2-00000000000000000000002"; } + @Override + public String getEncoding() { + return "UTF-8"; + } }; HashDataInput signedRef3 = new HashDataInput() { @@ -128,6 +136,11 @@ public class BKUGUIWorker implements Runnable { public String getReferenceId() { return "Reference-ref3-00000000000000000000003"; } + + @Override + public String getEncoding() { + return "UTF-8"; + } }; HashDataInput signedRef4 = new HashDataInput() { @@ -145,6 +158,11 @@ public class BKUGUIWorker implements Runnable { public String getReferenceId() { return "ref4"; } + + @Override + public String getEncoding() { + return "UTF-8"; + } }; // @@ -153,6 +171,10 @@ public class BKUGUIWorker implements Runnable { signedRefs.add(signedRef2); signedRefs.add(signedRef3); signedRefs.add(signedRef4); +// signedRefs.add(signedRef4); +// signedRefs.add(signedRef4); +// signedRefs.add(signedRef4); +// signedRefs.add(signedRef4); // signedRefs = Collections.singletonList(signedRef1); gui.showHashDataInputDialog(signedRefs, returnListener, "return"); } -- cgit v1.2.3 From 12d4f22e52fba1f867571afbd539b532e2afe1b5 Mon Sep 17 00:00:00 2001 From: clemenso Date: Thu, 18 Sep 2008 09:48:56 +0000 Subject: wait message bug git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@47 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 2 +- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 29 ++++++++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index 5f1bc8b2..2ea0c5a2 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -34,7 +34,7 @@ import org.junit.Test; */ public class BKUGUITest { - @Ignore + @Test public void testBKUGUI() { JFrame testFrame = new JFrame("BKUGUITest"); BKUGUI gui = new BKUGUI(); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 6cbc2cd1..909da4ad 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -43,7 +43,7 @@ public class BKUGUIWorker implements Runnable { @Override public void run() { -// try { + try { final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN"); @@ -185,9 +185,18 @@ public class BKUGUIWorker implements Runnable { // gui.showWelcomeDialog(); // // Thread.sleep(2000); + + gui.showWaitDialog(null); + + Thread.sleep(1000); + + gui.showWaitDialog("test"); + + Thread.sleep(1000); + // gui.showInsertCardDialog(cancelListener, "cancel"); - +// // Thread.sleep(2000); // // gui.showCardNotSupportedDialog(cancelListener, "cancel"); @@ -201,7 +210,7 @@ public class BKUGUIWorker implements Runnable { // Thread.sleep(2000); // - gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); // Thread.sleep(2000); @@ -209,18 +218,18 @@ public class BKUGUIWorker implements Runnable { // // Thread.sleep(2000); //// -// gui.showErrorDialog("Testfehler occured", null, null); -// -// Thread.sleep(2000); + gui.showErrorDialog("Testfehler occured", null, null); + + Thread.sleep(2000); // -// gui.showErrorDialog("Testfehler occured"); + gui.showErrorDialog("Testfehler occured"); // gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); // Thread.sleep(2000); -// } catch (InterruptedException ex) { -// ex.printStackTrace(); -// } + } catch (InterruptedException ex) { + ex.printStackTrace(); + } } } -- cgit v1.2.3 From 49dd625e2537b14b201d254ebef9745d9890a105 Mon Sep 17 00:00:00 2001 From: clemenso Date: Thu, 18 Sep 2008 09:50:10 +0000 Subject: wait message bug git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@48 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index 2ea0c5a2..5f1bc8b2 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -34,7 +34,7 @@ import org.junit.Test; */ public class BKUGUITest { - @Test + @Ignore public void testBKUGUI() { JFrame testFrame = new JFrame("BKUGUITest"); BKUGUI gui = new BKUGUI(); -- cgit v1.2.3 From 8ccd9ab69dc74762567930f4c576a359502f1071 Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 30 Sep 2008 16:37:59 +0000 Subject: showErrorDialog l10n git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@77 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 33 +++++++++++++++------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 909da4ad..0641bf58 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -186,13 +186,13 @@ public class BKUGUIWorker implements Runnable { // // Thread.sleep(2000); - gui.showWaitDialog(null); - - Thread.sleep(1000); - - gui.showWaitDialog("test"); - - Thread.sleep(1000); +// gui.showWaitDialog(null); +// +// Thread.sleep(1000); +// +// gui.showWaitDialog("test"); +// +// Thread.sleep(1000); // gui.showInsertCardDialog(cancelListener, "cancel"); @@ -218,11 +218,24 @@ public class BKUGUIWorker implements Runnable { // // Thread.sleep(2000); //// - gui.showErrorDialog("Testfehler occured", null, null); - +// gui.showErrorDialog(BKUGUIFacade.ERR_UNKNOWN, new Object[] {"Testfehler"}, null, null); +// +// Thread.sleep(2000); +// + + gui.showErrorDialog("error.test", new Object[] {"Testfehler", "noch ein TestFehler"}); + Thread.sleep(2000); // - gui.showErrorDialog("Testfehler occured"); + gui.showErrorDialog("error.no.hashdata", null); + + Thread.sleep(2000); +// + gui.showErrorDialog(BKUGUIFacade.ERR_UNKNOWN, new Object[] {"Testfehler"}); + + Thread.sleep(2000); +// + gui.showErrorDialog("error.unknown", null); // gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); -- cgit v1.2.3 From d7a3b8fdb62c881afb87838f2bb03b4c4b58e16d Mon Sep 17 00:00:00 2001 From: clemenso Date: Wed, 8 Oct 2008 15:59:43 +0000 Subject: simpleGUI (header,chipperling removed) git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@87 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 77 +++++++++++----------- 1 file changed, 38 insertions(+), 39 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 0641bf58..c366cb76 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -168,9 +168,9 @@ public class BKUGUIWorker implements Runnable { // List signedRefs = new ArrayList(); signedRefs.add(signedRef1); - signedRefs.add(signedRef2); - signedRefs.add(signedRef3); - signedRefs.add(signedRef4); +// signedRefs.add(signedRef2); +// signedRefs.add(signedRef3); +// signedRefs.add(signedRef4); // signedRefs.add(signedRef4); // signedRefs.add(signedRef4); // signedRefs.add(signedRef4); @@ -182,62 +182,61 @@ public class BKUGUIWorker implements Runnable { -// gui.showWelcomeDialog(); -// -// Thread.sleep(2000); + gui.showWelcomeDialog(); + + Thread.sleep(2000); + + gui.showWaitDialog(null); + + Thread.sleep(1000); -// gui.showWaitDialog(null); -// -// Thread.sleep(1000); -// -// gui.showWaitDialog("test"); -// -// Thread.sleep(1000); + gui.showWaitDialog("test"); + + Thread.sleep(1000); -// gui.showInsertCardDialog(cancelListener, "cancel"); -// -// Thread.sleep(2000); -// -// gui.showCardNotSupportedDialog(cancelListener, "cancel"); -// -// Thread.sleep(2000); + gui.showInsertCardDialog(cancelListener, "cancel"); -// PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Karten-PIN"); -//// -// gui.showCardPINDialog(cardPinSpec, okListener, "ok", cancelListener, "cancel"); -// -// Thread.sleep(2000); -// + Thread.sleep(2000); + + gui.showCardNotSupportedDialog(cancelListener, "cancel"); + + Thread.sleep(2000); + + PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Karten-PIN"); + + gui.showCardPINDialog(cardPinSpec, okListener, "ok", cancelListener, "cancel"); + + Thread.sleep(2000); -// gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); -// Thread.sleep(2000); + Thread.sleep(4000); -// gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); -// -// Thread.sleep(2000); -//// -// gui.showErrorDialog(BKUGUIFacade.ERR_UNKNOWN, new Object[] {"Testfehler"}, null, null); -// -// Thread.sleep(2000); -// + gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + + Thread.sleep(2000); + + gui.showErrorDialog(BKUGUIFacade.ERR_UNKNOWN, new Object[] {"Testfehler"}, null, null); + + Thread.sleep(2000); gui.showErrorDialog("error.test", new Object[] {"Testfehler", "noch ein TestFehler"}); Thread.sleep(2000); -// + gui.showErrorDialog("error.no.hashdata", null); Thread.sleep(2000); -// + gui.showErrorDialog(BKUGUIFacade.ERR_UNKNOWN, new Object[] {"Testfehler"}); Thread.sleep(2000); -// + gui.showErrorDialog("error.unknown", null); +// gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); // gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); // Thread.sleep(2000); -- cgit v1.2.3 From f993d336e51b9f7898aeeff2e5ae6785066d1e5b Mon Sep 17 00:00:00 2001 From: clemenso Date: Thu, 9 Oct 2008 16:23:52 +0000 Subject: demo integration beta1 git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@94 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index 5f1bc8b2..308be642 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -40,7 +40,7 @@ public class BKUGUITest { BKUGUI gui = new BKUGUI(); Container contentPane = testFrame.getContentPane(); contentPane.setPreferredSize(new Dimension(380, 150)); - gui.init(contentPane, null); + gui.init(contentPane, null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); -- cgit v1.2.3 From 8479ef50c84e8998f7909074df6a23c2ff0aa5b0 Mon Sep 17 00:00:00 2001 From: clemenso Date: Fri, 31 Oct 2008 12:33:18 +0000 Subject: Help Icon git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@132 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index 308be642..c32a237a 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -40,7 +40,7 @@ public class BKUGUITest { BKUGUI gui = new BKUGUI(); Container contentPane = testFrame.getContentPane(); contentPane.setPreferredSize(new Dimension(380, 150)); - gui.init(contentPane, null, null); + gui.init(contentPane, null, null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); -- cgit v1.2.3 From 9662ac90b6aa84bc54543d3c8670ba6c8e42bbac Mon Sep 17 00:00:00 2001 From: clemenso Date: Thu, 13 Nov 2008 18:24:57 +0000 Subject: FRAME HashDataDisplay FRAME Help git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@165 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index c366cb76..af1368e5 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -176,7 +176,7 @@ public class BKUGUIWorker implements Runnable { // signedRefs.add(signedRef4); // signedRefs.add(signedRef4); // signedRefs = Collections.singletonList(signedRef1); - gui.showHashDataInputDialog(signedRefs, returnListener, "return"); + gui.showHashDataInputDialog(signedRefs, true, returnListener, "return"); } }; -- cgit v1.2.3 From 28e81afd92a6568ff78736b72c5257a86c0b9b91 Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 18 Nov 2008 08:03:35 +0000 Subject: GUI refactoring 1 git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@177 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 5 +- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 110 ++++++++++----------- 2 files changed, 58 insertions(+), 57 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index c32a237a..b57e1923 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -32,15 +32,16 @@ import org.junit.Test; * * @author clemens */ +@Ignore public class BKUGUITest { - @Ignore + @Test public void testBKUGUI() { JFrame testFrame = new JFrame("BKUGUITest"); BKUGUI gui = new BKUGUI(); Container contentPane = testFrame.getContentPane(); contentPane.setPreferredSize(new Dimension(380, 150)); - gui.init(contentPane, null, null, null); + gui.init(contentPane, null, BKUGUIFacade.Style.advanced, null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index af1368e5..e4936067 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -43,7 +43,7 @@ public class BKUGUIWorker implements Runnable { @Override public void run() { - try { +// try { final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN"); @@ -176,7 +176,7 @@ public class BKUGUIWorker implements Runnable { // signedRefs.add(signedRef4); // signedRefs.add(signedRef4); // signedRefs = Collections.singletonList(signedRef1); - gui.showHashDataInputDialog(signedRefs, true, returnListener, "return"); + gui.showHashDataInputDialog(signedRefs, returnListener, "return"); } }; @@ -184,64 +184,64 @@ public class BKUGUIWorker implements Runnable { gui.showWelcomeDialog(); - Thread.sleep(2000); - - gui.showWaitDialog(null); - - Thread.sleep(1000); - - gui.showWaitDialog("test"); - - Thread.sleep(1000); - - - gui.showInsertCardDialog(cancelListener, "cancel"); - - Thread.sleep(2000); - - gui.showCardNotSupportedDialog(cancelListener, "cancel"); - - Thread.sleep(2000); - - PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Karten-PIN"); - - gui.showCardPINDialog(cardPinSpec, okListener, "ok", cancelListener, "cancel"); - - Thread.sleep(2000); - - gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); - - Thread.sleep(4000); - - gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); - - Thread.sleep(2000); - - gui.showErrorDialog(BKUGUIFacade.ERR_UNKNOWN, new Object[] {"Testfehler"}, null, null); - - Thread.sleep(2000); - - gui.showErrorDialog("error.test", new Object[] {"Testfehler", "noch ein TestFehler"}); - - Thread.sleep(2000); - - gui.showErrorDialog("error.no.hashdata", null); - - Thread.sleep(2000); - - gui.showErrorDialog(BKUGUIFacade.ERR_UNKNOWN, new Object[] {"Testfehler"}); - - Thread.sleep(2000); - - gui.showErrorDialog("error.unknown", null); +// Thread.sleep(2000); +// +// gui.showWaitDialog(null); +// +// Thread.sleep(1000); +// +// gui.showWaitDialog("test"); +// +// Thread.sleep(1000); +// +// +// gui.showInsertCardDialog(cancelListener, "cancel"); +// +// Thread.sleep(2000); +// +// gui.showCardNotSupportedDialog(cancelListener, "cancel"); +// +// Thread.sleep(2000); +// +// PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Karten-PIN"); +// +// gui.showCardPINDialog(cardPinSpec, okListener, "ok", cancelListener, "cancel"); +// +// Thread.sleep(2000); +// +// gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// +// Thread.sleep(4000); +// +// gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// +// Thread.sleep(2000); +// +// gui.showErrorDialog(BKUGUIFacade.ERR_UNKNOWN, new Object[] {"Testfehler"}, null, null); +// +// Thread.sleep(2000); +// +// gui.showErrorDialog("error.test", new Object[] {"Testfehler", "noch ein TestFehler"}); +// +// Thread.sleep(2000); +// +// gui.showErrorDialog("error.no.hashdata", null); +// +// Thread.sleep(2000); +// +// gui.showErrorDialog(BKUGUIFacade.ERR_UNKNOWN, new Object[] {"Testfehler"}); +// +// Thread.sleep(2000); +// +// gui.showErrorDialog("error.unknown", null); // gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); // gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); // Thread.sleep(2000); - } catch (InterruptedException ex) { - ex.printStackTrace(); - } +// } catch (InterruptedException ex) { +// ex.printStackTrace(); +// } } } -- cgit v1.2.3 From 6d2cd68c8adff8c27a6a3a18711ea44a2e7bfe30 Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 18 Nov 2008 18:00:44 +0000 Subject: GUI refactoring 2 git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@178 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 5 +- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 122 +++++---------------- 2 files changed, 32 insertions(+), 95 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index b57e1923..0d2712dd 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -32,16 +32,15 @@ import org.junit.Test; * * @author clemens */ -@Ignore +//@Ignore public class BKUGUITest { @Test public void testBKUGUI() { JFrame testFrame = new JFrame("BKUGUITest"); - BKUGUI gui = new BKUGUI(); Container contentPane = testFrame.getContentPane(); contentPane.setPreferredSize(new Dimension(380, 150)); - gui.init(contentPane, null, BKUGUIFacade.Style.advanced, null, null); + BKUGUIFacade gui = BKUGUIFactory.createGUI(contentPane, null, BKUGUIFacade.Style.advanced, null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index e4936067..82b42d0f 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -22,6 +22,7 @@ package at.gv.egiz.bku.gui; import at.gv.egiz.smcc.PINSpec; import at.gv.egiz.stal.HashDataInput; +import at.gv.egiz.stal.impl.ByteArrayHashDataInput; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.ByteArrayInputStream; @@ -78,99 +79,36 @@ public class BKUGUIWorker implements Runnable { gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", null, "hashdata"); } }; - HashDataInput signedRef1 = new HashDataInput() { - - @Override - public InputStream getHashDataInput() { - return new ByteArrayInputStream("Ich bin ein einfacher Text mit Umlauten: öäüßéç@€\n123\n456\n\tHello, world!\n\nlkjsd\nnksdjf".getBytes()); - } - - @Override - public String getMimeType() { - return "text/plain"; - } - - @Override - public String getReferenceId() { - return "Reference-ref1-00000000000000000000001"; - } - @Override - public String getEncoding() { - return "UTF-8"; - } - }; - HashDataInput signedRef2 = new HashDataInput() { - - @Override - public InputStream getHashDataInput() { - return new ByteArrayInputStream("HashDataInput_002".getBytes()); - } - - @Override - public String getMimeType() { - return "text/xml"; - } - - @Override - public String getReferenceId() { - return "Reference-ref2-00000000000000000000002"; - } - @Override - public String getEncoding() { - return "UTF-8"; - } - }; - HashDataInput signedRef3 = new HashDataInput() { - - @Override - public InputStream getHashDataInput() { - return new ByteArrayInputStream("HashDataInput_003".getBytes()); - } - - @Override - public String getMimeType() { - return "text/xml"; - } - - @Override - public String getReferenceId() { - return "Reference-ref3-00000000000000000000003"; - } - - @Override - public String getEncoding() { - return "UTF-8"; - } - }; - HashDataInput signedRef4 = new HashDataInput() { - - @Override - public InputStream getHashDataInput() { - return new ByteArrayInputStream("HashDataInput_004".getBytes()); - } - - @Override - public String getMimeType() { - return "text/xml"; - } - - @Override - public String getReferenceId() { - return "ref4"; - } - - @Override - public String getEncoding() { - return "UTF-8"; - } - }; + HashDataInput signedRef1 = new ByteArrayHashDataInput( + "Ich bin ein einfacher Text mit Umlauten: öäüßéç@€\n123\n456\n\tHello, world!\n\nlkjsd\nnksdjf".getBytes(), + "ref-id-000000001", + "text/plain", + "UTF-8"); + + HashDataInput signedRef2 = new ByteArrayHashDataInput( + "HashDataInput_002".getBytes(), + "ref-id-000000002", + "application/xhtml+xml", + "UTF-8"); + + HashDataInput signedRef3 = new ByteArrayHashDataInput( + "HashDataInput_003".getBytes(), + "ref-id-000000003", + "application/xhtml+xml", + "UTF-8"); + + HashDataInput signedRef4 = new ByteArrayHashDataInput( + "HashDataInput_004".getBytes(), + "ref-id-000000004", + "text/xml", + "UTF-8"); // List signedRefs = new ArrayList(); signedRefs.add(signedRef1); -// signedRefs.add(signedRef2); -// signedRefs.add(signedRef3); -// signedRefs.add(signedRef4); + signedRefs.add(signedRef2); + signedRefs.add(signedRef3); + signedRefs.add(signedRef4); // signedRefs.add(signedRef4); // signedRefs.add(signedRef4); // signedRefs.add(signedRef4); @@ -182,8 +120,8 @@ public class BKUGUIWorker implements Runnable { - gui.showWelcomeDialog(); - +// gui.showWelcomeDialog(); +// // Thread.sleep(2000); // // gui.showWaitDialog(null); @@ -209,7 +147,7 @@ public class BKUGUIWorker implements Runnable { // // Thread.sleep(2000); // -// gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); // // Thread.sleep(4000); // -- cgit v1.2.3 From bc81c317e254fa617fc24c8129b743ac74aad470 Mon Sep 17 00:00:00 2001 From: clemenso Date: Wed, 19 Nov 2008 11:49:55 +0000 Subject: GUI feature complete git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@180 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 82b42d0f..fec097f5 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -81,7 +81,7 @@ public class BKUGUIWorker implements Runnable { }; HashDataInput signedRef1 = new ByteArrayHashDataInput( "Ich bin ein einfacher Text mit Umlauten: öäüßéç@€\n123\n456\n\tHello, world!\n\nlkjsd\nnksdjf".getBytes(), - "ref-id-000000001", + "ref-id-0000000000000000000000001", "text/plain", "UTF-8"); -- cgit v1.2.3 From b93f035e2c9df0ad430300c4f755b775a4aa1ed3 Mon Sep 17 00:00:00 2001 From: clemenso Date: Mon, 24 Nov 2008 13:37:11 +0000 Subject: xhtml warning git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@192 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 6 +++--- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index 0d2712dd..bc4bdb97 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -32,15 +32,15 @@ import org.junit.Test; * * @author clemens */ -//@Ignore +@Ignore public class BKUGUITest { @Test public void testBKUGUI() { JFrame testFrame = new JFrame("BKUGUITest"); Container contentPane = testFrame.getContentPane(); - contentPane.setPreferredSize(new Dimension(380, 150)); - BKUGUIFacade gui = BKUGUIFactory.createGUI(contentPane, null, BKUGUIFacade.Style.advanced, null, null); + contentPane.setPreferredSize(new Dimension(190, 130)); + BKUGUIFacade gui = BKUGUIFactory.createGUI(contentPane, null, BKUGUIFacade.Style.simple, null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index fec097f5..4d97f9fb 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -147,10 +147,13 @@ public class BKUGUIWorker implements Runnable { // // Thread.sleep(2000); // - gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); // // Thread.sleep(4000); // + + gui.showErrorDialog(BKUGUIFacade.ERR_NO_PCSC, null, null, null); + // gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); // // Thread.sleep(2000); -- cgit v1.2.3 From 9ef5d25ffec1c26ccf76ad46131e33a861335da1 Mon Sep 17 00:00:00 2001 From: clemenso Date: Fri, 23 Jan 2009 13:45:39 +0000 Subject: tiny applet git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@286 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 4 ++-- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index bc4bdb97..d413f812 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -39,8 +39,8 @@ public class BKUGUITest { public void testBKUGUI() { JFrame testFrame = new JFrame("BKUGUITest"); Container contentPane = testFrame.getContentPane(); - contentPane.setPreferredSize(new Dimension(190, 130)); - BKUGUIFacade gui = BKUGUIFactory.createGUI(contentPane, null, BKUGUIFacade.Style.simple, null, null); + contentPane.setPreferredSize(new Dimension(170, 150)); + BKUGUIFacade gui = BKUGUIFactory.createGUI(contentPane, null, BKUGUIFacade.Style.tiny, null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 4d97f9fb..73aaab46 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -142,17 +142,17 @@ public class BKUGUIWorker implements Runnable { // Thread.sleep(2000); // // PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Karten-PIN"); -// +// // gui.showCardPINDialog(cardPinSpec, okListener, "ok", cancelListener, "cancel"); // // Thread.sleep(2000); // -// gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); // // Thread.sleep(4000); // - gui.showErrorDialog(BKUGUIFacade.ERR_NO_PCSC, null, null, null); +// gui.showErrorDialog(BKUGUIFacade.ERR_NO_PCSC, null, null, null); // gui.showSignaturePINRetryDialog(signPinSpec, 2, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); // -- cgit v1.2.3 From ff9a71fe2a2beb94ad7aa52ba2c77a24dd39509e Mon Sep 17 00:00:00 2001 From: clemenso Date: Wed, 11 Feb 2009 20:04:58 +0000 Subject: removed BKUGUIFactory git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@297 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index d413f812..c8cff617 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -40,7 +40,7 @@ public class BKUGUITest { JFrame testFrame = new JFrame("BKUGUITest"); Container contentPane = testFrame.getContentPane(); contentPane.setPreferredSize(new Dimension(170, 150)); - BKUGUIFacade gui = BKUGUIFactory.createGUI(contentPane, null, BKUGUIFacade.Style.tiny, null, null); + BKUGUIFacade gui = new BKUGUIImpl(contentPane, null, BKUGUIFacade.Style.tiny, null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); -- cgit v1.2.3 From 6576428966f1e3d688269a407b072fb01f9f7647 Mon Sep 17 00:00:00 2001 From: clemenso Date: Thu, 26 Feb 2009 19:39:00 +0000 Subject: 1.1 candidate (activation) git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@309 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 73aaab46..08ecaa7f 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -46,7 +46,7 @@ public class BKUGUIWorker implements Runnable { public void run() { // try { - final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN"); + final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN", (byte) 0x81, null); final ActionListener cancelListener = new ActionListener() { -- cgit v1.2.3 From 28e772965f4fb313aeb5018e6104943a1177bc06 Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 10 Mar 2009 11:10:55 +0000 Subject: pinfield and pinsize label aligned trailing git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@317 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 08ecaa7f..ef64ac59 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -21,6 +21,7 @@ package at.gv.egiz.bku.gui; import at.gv.egiz.smcc.PINSpec; +import at.gv.egiz.smcc.STARCOSCard; import at.gv.egiz.stal.HashDataInput; import at.gv.egiz.stal.impl.ByteArrayHashDataInput; import java.awt.event.ActionEvent; @@ -46,7 +47,8 @@ public class BKUGUIWorker implements Runnable { public void run() { // try { - final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Signatur-PIN", (byte) 0x81, null); + final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Test-PIN", (byte) 0x81, null); + final PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Test-PIN", (byte) 0x01, null); final ActionListener cancelListener = new ActionListener() { -- cgit v1.2.3 From 2a1df5e58e44f8d77f34eb80df74e8c0d27caceb Mon Sep 17 00:00:00 2001 From: clemenso Date: Wed, 18 Mar 2009 22:27:28 +0000 Subject: 1.1-rc5 (pinProviderFactories, gui refactoring, signatureCard, secureViewer) git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@322 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index ef64ac59..194e18b0 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -78,7 +78,7 @@ public class BKUGUIWorker implements Runnable { @Override public void actionPerformed(ActionEvent e) { - gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", null, "hashdata"); + gui.showSignaturePINDialog(signPinSpec, -1, signListener, "sign", cancelListener, "cancel", null, "hashdata"); } }; HashDataInput signedRef1 = new ByteArrayHashDataInput( @@ -116,7 +116,7 @@ public class BKUGUIWorker implements Runnable { // signedRefs.add(signedRef4); // signedRefs.add(signedRef4); // signedRefs = Collections.singletonList(signedRef1); - gui.showHashDataInputDialog(signedRefs, returnListener, "return"); + gui.showSecureViewer(signedRefs, returnListener, "return"); } }; @@ -149,7 +149,7 @@ public class BKUGUIWorker implements Runnable { // // Thread.sleep(2000); // - gui.showSignaturePINDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + gui.showSignaturePINDialog(signPinSpec, -1, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); // // Thread.sleep(4000); // -- cgit v1.2.3 From 616e06910051528674165319a1d6d161dff5859c Mon Sep 17 00:00:00 2001 From: clemenso Date: Fri, 27 Mar 2009 17:33:11 +0000 Subject: 1.1-RC6 (pinpad, pinmgmt, secureviewer) git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@323 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 5 +++-- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index c8cff617..b3eaf8c7 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -39,8 +39,9 @@ public class BKUGUITest { public void testBKUGUI() { JFrame testFrame = new JFrame("BKUGUITest"); Container contentPane = testFrame.getContentPane(); - contentPane.setPreferredSize(new Dimension(170, 150)); - BKUGUIFacade gui = new BKUGUIImpl(contentPane, null, BKUGUIFacade.Style.tiny, null, null); +// contentPane.setPreferredSize(new Dimension(170, 150)); + contentPane.setPreferredSize(new Dimension(290, 190)); + BKUGUIFacade gui = new BKUGUIImpl(contentPane, null, BKUGUIFacade.Style.advanced, null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 194e18b0..5475a45b 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -149,7 +149,9 @@ public class BKUGUIWorker implements Runnable { // // Thread.sleep(2000); // - gui.showSignaturePINDialog(signPinSpec, -1, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); +// gui.showSignaturePINDialog(signPinSpec, -1, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + + gui.showPinpadSignaturePINDialog(signPinSpec, -1, hashdataListener, "hashdata"); // // Thread.sleep(4000); // -- cgit v1.2.3 From 4b8b858ddcab0bfbde80304a0f631233388a13d1 Mon Sep 17 00:00:00 2001 From: tzefferer Date: Fri, 16 Oct 2009 09:54:37 +0000 Subject: Keyboard accessibility for Online-BKU git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@528 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index b3eaf8c7..9f1cb612 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -41,7 +41,7 @@ public class BKUGUITest { Container contentPane = testFrame.getContentPane(); // contentPane.setPreferredSize(new Dimension(170, 150)); contentPane.setPreferredSize(new Dimension(290, 190)); - BKUGUIFacade gui = new BKUGUIImpl(contentPane, null, BKUGUIFacade.Style.advanced, null, null); + BKUGUIFacade gui = new BKUGUIImpl(contentPane, null, BKUGUIFacade.Style.advanced, null, null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); -- cgit v1.2.3 From 83e8c95ea7d257166d350a59bfd81e9833ec14fd Mon Sep 17 00:00:00 2001 From: clemenso Date: Thu, 5 Nov 2009 19:05:14 +0000 Subject: [#484] European Language support git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@535 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 2 +- .../java/at/gv/egiz/bku/gui/DummyFontLoader.java | 35 +++++ .../at/gv/egiz/bku/gui/SecureViewerDialogTest.java | 165 +++++++++++++++++++++ 3 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java create mode 100644 BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index 9f1cb612..fdd58850 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -41,7 +41,7 @@ public class BKUGUITest { Container contentPane = testFrame.getContentPane(); // contentPane.setPreferredSize(new Dimension(170, 150)); contentPane.setPreferredSize(new Dimension(290, 190)); - BKUGUIFacade gui = new BKUGUIImpl(contentPane, null, BKUGUIFacade.Style.advanced, null, null, null); + BKUGUIFacade gui = new BKUGUIImpl(contentPane, null, BKUGUIFacade.Style.advanced, null, new DummyFontLoader(), null, null); BKUGUIWorker worker = new BKUGUIWorker(); worker.init(gui); testFrame.pack(); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java new file mode 100644 index 00000000..87d67adc --- /dev/null +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java @@ -0,0 +1,35 @@ +/* + * Copyright 2008 Federal Chancellery Austria and + * Graz University of Technology + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package at.gv.egiz.bku.gui; + +import at.gv.egiz.bku.gui.viewer.FontProviderException; +import at.gv.egiz.bku.gui.viewer.FontProvider; +import java.awt.Font; + +/** + * + * @author Clemens Orthacker + */ +public class DummyFontLoader implements FontProvider { + + @Override + public Font getFont() throws FontProviderException { + return new Font("monospaced", Font.PLAIN, 10); + } + +} diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java new file mode 100644 index 00000000..fc8dcd96 --- /dev/null +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java @@ -0,0 +1,165 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package at.gv.egiz.bku.gui; + +import at.gv.egiz.stal.impl.ByteArrayHashDataInput; +import java.awt.Font; +import java.io.BufferedInputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.util.ResourceBundle; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +/** + * + * @author clemens + */ +@Ignore +public class SecureViewerDialogTest { + + static SecureViewerDialog secureViewer; + static ResourceBundle messages; + + @BeforeClass + public static void setUpClass() throws Exception { + messages = ResourceBundle.getBundle("at/gv/egiz/bku/gui/Messages"); + secureViewer = new SecureViewerDialog(null, messages, new DummyFontLoader(), null); + } + + @AfterClass + public static void tearDownClass() throws Exception { + } + + @Before + public void setUp() { + } + + @After + public void tearDown() { + } + + + @Test + @Ignore + public void testLatin1Supplement() throws UnsupportedEncodingException, FileNotFoundException, IOException { +// StringBuilder data = new StringBuilder(); +// data.append("\nhttp://www.unicode.org/charts/PDF/U0080.pdf\n"); +// for (int i = 0x0080; i <= 0x00ff; i++) { +// data.append((char) i); +// } +// System.out.println(data.toString()); + BufferedInputStream bis = new BufferedInputStream(new FileInputStream("/home/clemens/IAIK/MOCCA/encoding/test_iso-8859-1.txt")); + byte[] bytes = new byte[bis.available()]; + bis.read(bytes); + String s = new String(bytes, "iso-8859-1"); + System.out.println("read iso-8859-1 bytes " + s); + + secureViewer.setContent(new ByteArrayHashDataInput(s.getBytes("UTF-8"), "id-1", "text/plain", "iso-8859-1")); + + } + + @Test + @Ignore + public void testGreek() throws UnsupportedEncodingException { +// Font fm = new Font(Font.MONOSPACED, Font.PLAIN, 10); + Font fm = new Font("Lucida Sans Typewriter", Font.PLAIN, 18); //GothicBBB-MediumH", Font.PLAIN, 10); + System.out.println(fm.getFontName() + ", " + fm.getPSName() + ", " + fm); + + StringBuilder data = new StringBuilder(); + data.append("\nhttp://www.unicode.org/charts/PDF/U0370.pdf\n"); + for (int i = 0x0370; i <= 0x03ff; i++) { + if (!fm.canDisplay((char) i)) { + System.out.println("cannot display " + Integer.toHexString(i) ); + } + data.append((char) i); + } + + System.out.println(data.toString()); + secureViewer.setContent(new ByteArrayHashDataInput(data.toString().getBytes("UTF-8"), "id-1", "text/plain", "UTF-8")); + + } + + /** + * Test of setContent method, of class SecureViewerDialog. + */ + @Test +// @Ignore + public void testCyrillic() throws UnsupportedEncodingException { + + StringBuilder data = new StringBuilder("\n"); + + int[] mocca = new int[] {0x041c, 0x04a8, 0x0480, 0x0480, 0x0466 }; + + for (int i = 0; i < mocca.length; i++) { + data.append((char) mocca[i]); + } + data.append(" goes cyrillic\n"); + + data.append("\nCyrillic - http://www.unicode.org/charts/PDF/U0400.pdf\n"); + for (int i = 0x0400; i <= 0x04ff; i++) { +// System.out.printf("%c%04x=%c\t", (i & 7) == 0 ? '\n' : '\0', i, (char)i); +// System.out.print((char) i); + data.append((char)i); + } + + data.append("\n\nCyrillic Supplement - http://www.unicode.org/charts/PDF/U0500.pdf\n"); + for (int i = 0x0500; i <= 0x0525; i++) { +// System.out.printf("%c%04x=%c\t", (i & 7) == 0 ? '\n' : '\0', i, (char)i); +// System.out.print((char) i); + data.append((char) i); + } + + for (int i = 0; i < data.length(); i++) { + char c = data.charAt(i); + if (c >= '\u0400' && c <= '\u0525') { + System.out.println(c + "\tcyrillic"); + } else if (c < '\u007f') { + System.out.println(c + "\tlatin"); + } else { + System.out.println(c + "\tunknown"); + } + } + + System.out.println(data.toString()); + +// char[] cyrillicChars = new char[] {(char) 0x0411, (char) 0x0444}; +// System.out.println(new String(cyrillicChars)); // + ": " + SMCCHelper.toString(cyrillicBytes)); +// byte[] cyrillicBytes = new byte[] {(byte) 0x11, (byte) 0x04, (byte) 0x0444}; +// System.out.println(new String(cyrillicBytes, "UTF-8") + ": " + SMCCHelper.toString(cyrillicBytes)); + +// String encoding = "cp1252"; +// String data = "öäü߀"; +// byte[] bytes = data.getBytes(encoding); +// System.out.println(data + "\t" + SMCCHelper.toString(bytes)); +// byte[] bytes2 = data.getBytes("cp1252"); +// System.out.println(data + "\t" + SMCCHelper.toString(bytes2)); + + secureViewer.setContent(new ByteArrayHashDataInput(data.toString().getBytes("UTF-8"), "id-1", "text/plain", "UTF-8")); + + System.out.println("\n\n=============================\n"); +// +//// int[] mocca = new int[] {0x0428, 0x0429, 0x04a8, 0x04e8, 0x047a, 0x042d, 0x042d, 0x0421, 0x0421, 0x04d0, 0x0466 }; +// int[] mocca = new int[] {0x0429, 0x04a8, 0x0480, 0x0480, 0x0466 }; + for (int i = 0; i < mocca.length; i++) { + System.out.print((char) mocca[i]); + } +// for (int i = 0; i < mocca.length; i++) { +// System.out.printf(" 0x%04x", mocca[i]); +// } +// + System.out.println("\n=============================\n"); + + } + + +} \ No newline at end of file -- cgit v1.2.3 From 5bb4d11327fcfe0fdc4234eeb02f4b09d108109e Mon Sep 17 00:00:00 2001 From: clemenso Date: Mon, 9 Nov 2009 17:05:57 +0000 Subject: applet version BKUFonts .project git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@536 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 1 - BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 6 +++--- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java | 6 ++++++ 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index fdd58850..e2e8d104 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -32,7 +32,6 @@ import org.junit.Test; * * @author clemens */ -@Ignore public class BKUGUITest { @Test diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 5475a45b..20654141 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -108,9 +108,9 @@ public class BKUGUIWorker implements Runnable { // List signedRefs = new ArrayList(); signedRefs.add(signedRef1); - signedRefs.add(signedRef2); - signedRefs.add(signedRef3); - signedRefs.add(signedRef4); +// signedRefs.add(signedRef2); +// signedRefs.add(signedRef3); +// signedRefs.add(signedRef4); // signedRefs.add(signedRef4); // signedRefs.add(signedRef4); // signedRefs.add(signedRef4); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java index 87d67adc..505c4247 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/DummyFontLoader.java @@ -21,14 +21,20 @@ import at.gv.egiz.bku.gui.viewer.FontProviderException; import at.gv.egiz.bku.gui.viewer.FontProvider; import java.awt.Font; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + /** * * @author Clemens Orthacker */ public class DummyFontLoader implements FontProvider { + protected final static Log log = LogFactory.getLog(DummyFontLoader.class); + @Override public Font getFont() throws FontProviderException { + log.debug("return font"); return new Font("monospaced", Font.PLAIN, 10); } -- cgit v1.2.3 From 0af223f23f2178113147b3b1f0a755e9c5abbaee Mon Sep 17 00:00:00 2001 From: clemenso Date: Mon, 9 Nov 2009 17:14:46 +0000 Subject: Ignore BKUGUITest git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@537 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java | 1 + 1 file changed, 1 insertion(+) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java index e2e8d104..fdd58850 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUITest.java @@ -32,6 +32,7 @@ import org.junit.Test; * * @author clemens */ +@Ignore public class BKUGUITest { @Test -- cgit v1.2.3 From b7dd29046e232e4d42623655efc28965cce942b8 Mon Sep 17 00:00:00 2001 From: clemenso Date: Fri, 13 Nov 2009 15:13:21 +0000 Subject: git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@546 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java index fc8dcd96..131a344f 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java @@ -7,6 +7,8 @@ package at.gv.egiz.bku.gui; import at.gv.egiz.stal.impl.ByteArrayHashDataInput; import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -33,7 +35,7 @@ public class SecureViewerDialogTest { @BeforeClass public static void setUpClass() throws Exception { messages = ResourceBundle.getBundle("at/gv/egiz/bku/gui/Messages"); - secureViewer = new SecureViewerDialog(null, messages, new DummyFontLoader(), null); + secureViewer = new SecureViewerDialog(null, messages,null, null, new DummyFontLoader(), null); } @AfterClass -- cgit v1.2.3 From 5af9b75dccc1b52d1382fe0f2df30affd509f5b9 Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 24 Nov 2009 18:48:00 +0000 Subject: Filenames derived from reference URI git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@553 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 12 ++++++++---- .../test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 20654141..6e345ee3 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -85,25 +85,29 @@ public class BKUGUIWorker implements Runnable { "Ich bin ein einfacher Text mit Umlauten: öäüßéç@€\n123\n456\n\tHello, world!\n\nlkjsd\nnksdjf".getBytes(), "ref-id-0000000000000000000000001", "text/plain", - "UTF-8"); + "UTF-8", + "file.txt"); HashDataInput signedRef2 = new ByteArrayHashDataInput( "HashDataInput_002".getBytes(), "ref-id-000000002", "application/xhtml+xml", - "UTF-8"); + "UTF-8", + "file.xhtml"); HashDataInput signedRef3 = new ByteArrayHashDataInput( "HashDataInput_003".getBytes(), "ref-id-000000003", "application/xhtml+xml", - "UTF-8"); + "UTF-8", + "file2.xhtml"); HashDataInput signedRef4 = new ByteArrayHashDataInput( "HashDataInput_004".getBytes(), "ref-id-000000004", "text/xml", - "UTF-8"); + "UTF-8", + "file.xml"); // List signedRefs = new ArrayList(); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java index 131a344f..9bbc1b1a 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/SecureViewerDialogTest.java @@ -66,7 +66,7 @@ public class SecureViewerDialogTest { String s = new String(bytes, "iso-8859-1"); System.out.println("read iso-8859-1 bytes " + s); - secureViewer.setContent(new ByteArrayHashDataInput(s.getBytes("UTF-8"), "id-1", "text/plain", "iso-8859-1")); + secureViewer.setContent(new ByteArrayHashDataInput(s.getBytes("UTF-8"), "id-1", "text/plain", "iso-8859-1", "file.txt")); } @@ -87,7 +87,7 @@ public class SecureViewerDialogTest { } System.out.println(data.toString()); - secureViewer.setContent(new ByteArrayHashDataInput(data.toString().getBytes("UTF-8"), "id-1", "text/plain", "UTF-8")); + secureViewer.setContent(new ByteArrayHashDataInput(data.toString().getBytes("UTF-8"), "id-1", "text/plain", "UTF-8", "file.txt")); } @@ -146,7 +146,7 @@ public class SecureViewerDialogTest { // byte[] bytes2 = data.getBytes("cp1252"); // System.out.println(data + "\t" + SMCCHelper.toString(bytes2)); - secureViewer.setContent(new ByteArrayHashDataInput(data.toString().getBytes("UTF-8"), "id-1", "text/plain", "UTF-8")); + secureViewer.setContent(new ByteArrayHashDataInput(data.toString().getBytes("UTF-8"), "id-1", "text/plain", "UTF-8", "file.txt")); System.out.println("\n\n=============================\n"); // -- cgit v1.2.3 From 3da4655d011dfc2f04f9e4ac28b38aee42d01bc0 Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 5 Jan 2010 10:06:47 +0000 Subject: Features [#437] Handle pinpad [64:03] response apdu correctly [#445] pin entry feedback for VERIFY_PIN_START/FINISH [#471] Provide SecureViewer Link before Pinpad PinEntry timeout starts Bugs [#479] PIN Managment Applet allows unmatching new pin and pin confirmation [#480] PIN Management displays blocked PINs as ACTIVE [#486] Not possible to select 3 times in series the same item from signedReferencesList for display in secureViewer [#506] change pin dialog (gui) issues [#508] e-card G3 PIN activation (with TransportPIN) not supported [#509] closing secure viewer window (WINDOW_CLOSING) leaves "signature data is displayed in viewer" dialog in applet git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@565 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'BKUCommonGUI/src/test/java') diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 6e345ee3..a2a84d6e 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -45,7 +45,7 @@ public class BKUGUIWorker implements Runnable { @Override public void run() { -// try { + try { final PINSpec signPinSpec = new PINSpec(6, 10, "[0-9]", "Test-PIN", (byte) 0x81, null); final PINSpec cardPinSpec = new PINSpec(4, 4, "[0-9]", "Test-PIN", (byte) 0x01, null); @@ -155,7 +155,10 @@ public class BKUGUIWorker implements Runnable { // // gui.showSignaturePINDialog(signPinSpec, -1, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); - gui.showPinpadSignaturePINDialog(signPinSpec, -1, hashdataListener, "hashdata"); + gui.showSignatureDataDialog(signPinSpec, signListener, "sign", cancelListener, "cancel", hashdataListener, "hashdata"); + Thread.sleep(2000); + + gui.showEnterPINDirect(signPinSpec, -1); // // Thread.sleep(4000); // @@ -189,8 +192,8 @@ public class BKUGUIWorker implements Runnable { // gui.showTextPlainHashDataInput("hallo,\n welt!", "12345", null, "cancel", null, "save"); // Thread.sleep(2000); -// } catch (InterruptedException ex) { -// ex.printStackTrace(); -// } + } catch (InterruptedException ex) { + ex.printStackTrace(); + } } } -- cgit v1.2.3