diff options
author | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-01-23 13:45:39 +0000 |
---|---|---|
committer | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-01-23 13:45:39 +0000 |
commit | 9ef5d25ffec1c26ccf76ad46131e33a861335da1 (patch) | |
tree | be14792e0edcdedec734f0d2336302d13b58b727 | |
parent | a3f54566ff2b9b17c143bb68913d64aea188d8a7 (diff) | |
download | mocca-9ef5d25ffec1c26ccf76ad46131e33a861335da1.tar.gz mocca-9ef5d25ffec1c26ccf76ad46131e33a861335da1.tar.bz2 mocca-9ef5d25ffec1c26ccf76ad46131e33a861335da1.zip |
tiny applet
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@286 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
10 files changed, 158 insertions, 57 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java index 41dae3ba..5e60ed3e 100644 --- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java +++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java @@ -91,8 +91,11 @@ public class BKUApplet extends JApplet implements AppletParameterProvider { log.debug("setting locale to " + getLocale()); BKUGUIFacade.Style guiStyle; - if ("advanced".equals(getAppletParameter(GUI_STYLE))) { + String guiStyleParam = getAppletParameter(GUI_STYLE); + if ("advanced".equals(guiStyleParam)) { guiStyle = BKUGUIFacade.Style.advanced; + } else if ("tiny".equals(guiStyleParam)) { + guiStyle = BKUGUIFacade.Style.tiny; } else { guiStyle = BKUGUIFacade.Style.simple; } diff --git a/BKUApplet/src/test/resources/appletTest.html b/BKUApplet/src/test/resources/appletTest.html index 2bf9ba0c..c8bd99d3 100644 --- a/BKUApplet/src/test/resources/appletTest.html +++ b/BKUApplet/src/test/resources/appletTest.html @@ -19,15 +19,13 @@ <center> <applet code="at.gv.egiz.bku.online.applet.BKUApplet.class" archive="../BKUApplet-1.0.4-SNAPSHOT.jar, ../test-libs/commons-logging-1.1.1.jar , ../test-libs/iaik_jce_me4se-3.04.jar" - width=300 height=200> - <param name="GuiStyle" value="advanced"/> - <param name="Locale" value="en_US"/> + width=152 height=145> + <param name="GuiStyle" value="tiny"/> + <param name="Locale" value="ja_JA"/> <!--param name="Background" value="jar:file:/home/clemens/workspace/mocca/BKUApplet/target/BKUApplet-1.0-SNAPSHOT.jar!/images/help.png"/--> - <param name="Background" value="http://localhost:3495/img/BackgroundChipperling.png"/> - <param name="WSDL_URL" value="http://localhost:3495/stal?wsdl"/> + <!--param name="Background" value="http://localhost:3495/img/BackgroundChipperling.png"/--> + <param name="WSDL_URL" value="https://danu.gv.at:3496/stal?wsdl"/> <param name="HelpURL" value="http://apps.egiz.gv.at/bkuonline/help/"/> - <param name="HashDataDisplay" value="frame"/> - <!--param name="HashDataURL" value="http://localhost:3495/BKUOnline-1.0-SNAPSHOT/hashDataInput"/--> <param name="SessionId" value="TestSession"/> <param name="RedirectURL" value="http://localhost:3495/bkuResult"/> </applet> diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java index 5ee0058f..51906616 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIFacade.java @@ -63,9 +63,11 @@ public interface BKUGUIFacade { public static final String MESSAGE_INSERTCARD = "message.insertcard"; public static final String MESSAGE_ENTERPIN = "message.enterpin"; public static final String MESSAGE_HASHDATALINK = "message.hashdatalink"; + public static final String MESSAGE_HASHDATALINK_TINY = "message.hashdatalink.tiny"; // public static final String MESSAGE_HASHDATA = "message.hashdata"; public static final String MESSAGE_HASHDATALIST = "message.hashdatalist"; public static final String MESSAGE_RETRIES = "message.retries"; + public static final String MESSAGE_LAST_RETRY = "message.retries.last"; public static final String MESSAGE_OVERWRITE = "message.overwrite"; public static final String MESSAGE_HELP = "message.help"; public static final String WARNING_XHTML = "warning.xhtml"; @@ -90,7 +92,7 @@ public interface BKUGUIFacade { public static final String SAVE_HASHDATAINPUT_PREFIX = "save.hashdatainput.prefix"; public static final String ALT_HELP = "alt.help"; - public enum Style { simple, advanced }; + public enum Style { tiny, simple, advanced }; // public void init(Container contentPane, Locale locale, Style guiStyle, URL background, ActionListener helpListener); diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java index d61c9a03..1e63c8d7 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUIImpl.java @@ -53,6 +53,7 @@ import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JScrollPane; import javax.swing.JTable; +import javax.swing.JTextField; import javax.swing.LayoutStyle; import javax.swing.ListSelectionModel; import javax.swing.SwingUtilities; @@ -69,6 +70,10 @@ public class BKUGUIImpl implements BKUGUIFacade { private static final Log log = LogFactory.getLog(BKUGUIImpl.class); + protected enum PinLabelPosition { + LEFT, ABOVE + } + protected HelpMouseListener helpListener; protected Container contentPane; @@ -92,6 +97,9 @@ public class BKUGUIImpl implements BKUGUIFacade { protected boolean renderHeaderPanel = false; protected boolean renderIconPanel = false; protected boolean renderCancelButton = false; + protected boolean shortText = false; + protected PinLabelPosition pinLabelPos = PinLabelPosition.LEFT; + protected boolean renderRefId = false; /** * set contentPane @@ -125,6 +133,10 @@ public class BKUGUIImpl implements BKUGUIFacade { renderHeaderPanel = true; renderIconPanel = false; renderCancelButton = true; + renderRefId = true; + } else if (guiStyle == Style.tiny) { + shortText = true; + pinLabelPos = PinLabelPosition.ABOVE; } registerHelpListener(helpListener); @@ -537,11 +549,21 @@ public class BKUGUIImpl implements BKUGUIFacade { if (numRetries < 0) { infoLabel.setFont(infoLabel.getFont().deriveFont(infoLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); String infoPattern = messages.getString(MESSAGE_ENTERPIN); - infoLabel.setText(MessageFormat.format(infoPattern, new Object[] {pinSpec.getLocalizedName()})); + if (shortText) { + infoLabel.setText(MessageFormat.format(infoPattern, new Object[] {"PIN"})); + } else { + infoLabel.setText(MessageFormat.format(infoPattern, new Object[] {pinSpec.getLocalizedName()})); + } helpListener.setHelpTopic(HELP_CARDPIN); } else { + String retryPattern; + if (numRetries < 2) { + retryPattern = messages.getString(MESSAGE_LAST_RETRY); + } else { + retryPattern = messages.getString(MESSAGE_RETRIES); + } infoLabel.setFont(infoLabel.getFont().deriveFont(infoLabel.getFont().getStyle() | java.awt.Font.BOLD)); - infoLabel.setText(MessageFormat.format(messages.getString(MESSAGE_RETRIES), new Object[]{String.valueOf(numRetries)})); + infoLabel.setText(MessageFormat.format(retryPattern, new Object[]{String.valueOf(numRetries)})); infoLabel.setForeground(ERROR_COLOR); helpListener.setHelpTopic(HELP_RETRY); } @@ -570,27 +592,47 @@ public class BKUGUIImpl implements BKUGUIFacade { infoVertical .addComponent(helpLabel); } - - mainPanelLayout.setHorizontalGroup( - mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) - .addGroup(infoHorizontal) + + GroupLayout.Group pinHorizontal; + GroupLayout.Group pinVertical; + + if (pinLabelPos == PinLabelPosition.ABOVE) { + pinHorizontal = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(cardPinLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(pinField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(mainPanelLayout.createSequentialGroup() - .addComponent(cardPinLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) - .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) - .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) - .addComponent(pinField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) //)) - .addComponent(pinsizeLabel)))); - mainPanelLayout.setVerticalGroup( - mainPanelLayout.createSequentialGroup() - .addGroup(infoVertical) + .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) + .addComponent(pinsizeLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)); + pinVertical = mainPanelLayout.createSequentialGroup() + .addComponent(cardPinLabel) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) - .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) - .addComponent(cardPinLabel) - .addComponent(pinField)) + .addComponent(pinField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE); + } else { + pinHorizontal = mainPanelLayout.createSequentialGroup() + .addComponent(cardPinLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) - .addComponent(pinsizeLabel)); - - + .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) + .addComponent(pinField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(pinsizeLabel)); + pinVertical = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(cardPinLabel) + .addComponent(pinField); + } + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(infoHorizontal) + .addGroup(pinHorizontal)); + + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createSequentialGroup() + .addGroup(infoVertical) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(pinVertical) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(pinsizeLabel)); + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); buttonPanel.setLayout(buttonPanelLayout); @@ -707,7 +749,11 @@ public class BKUGUIImpl implements BKUGUIFacade { JLabel infoLabel = new JLabel(); if (numRetries < 0) { infoLabel.setFont(infoLabel.getFont().deriveFont(infoLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); - infoLabel.setText(messages.getString(MESSAGE_HASHDATALINK)); + if (shortText) { + infoLabel.setText(messages.getString(MESSAGE_HASHDATALINK_TINY)); + } else { + infoLabel.setText(messages.getString(MESSAGE_HASHDATALINK)); + } infoLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); infoLabel.setForeground(HYPERLINK_COLOR); infoLabel.addMouseListener(new MouseAdapter() { @@ -720,8 +766,14 @@ public class BKUGUIImpl implements BKUGUIFacade { }); helpListener.setHelpTopic(HELP_SIGNPIN); } else { + String retryPattern; + if (numRetries < 2) { + retryPattern = messages.getString(MESSAGE_LAST_RETRY); + } else { + retryPattern = messages.getString(MESSAGE_RETRIES); + } + infoLabel.setText(MessageFormat.format(retryPattern, new Object[]{String.valueOf(numRetries)})); infoLabel.setFont(infoLabel.getFont().deriveFont(infoLabel.getFont().getStyle() | java.awt.Font.BOLD)); - infoLabel.setText(MessageFormat.format(messages.getString(MESSAGE_RETRIES), new Object[]{String.valueOf(numRetries)})); infoLabel.setForeground(ERROR_COLOR); helpListener.setHelpTopic(HELP_RETRY); } @@ -737,28 +789,48 @@ public class BKUGUIImpl implements BKUGUIFacade { if (!renderHeaderPanel) { infoHorizontal .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) - .addComponent(helpLabel); //, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE); + .addComponent(helpLabel); infoVertical .addComponent(helpLabel); } + GroupLayout.Group pinHorizontal; + GroupLayout.Group pinVertical; + + if (pinLabelPos == PinLabelPosition.ABOVE) { + pinHorizontal = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(signPinLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addComponent(pinField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(mainPanelLayout.createSequentialGroup() + .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) + .addComponent(pinsizeLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)); + + pinVertical = mainPanelLayout.createSequentialGroup() + .addComponent(signPinLabel) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(pinField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE); + } else { + pinHorizontal = mainPanelLayout.createSequentialGroup() + .addComponent(signPinLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) + .addComponent(pinField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(pinsizeLabel)); + pinVertical = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(signPinLabel) + .addComponent(pinField); + } + mainPanelLayout.setHorizontalGroup( mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(infoHorizontal) - .addGroup(mainPanelLayout.createSequentialGroup() - .addComponent(signPinLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) - .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) - .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) - .addComponent(pinField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(pinsizeLabel)))); + .addGroup(pinHorizontal)); mainPanelLayout.setVerticalGroup( mainPanelLayout.createSequentialGroup() .addGroup(infoVertical) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) - .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) - .addComponent(signPinLabel) - .addComponent(pinField)) + .addGroup(pinVertical) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(pinsizeLabel)); @@ -1084,9 +1156,9 @@ public class BKUGUIImpl implements BKUGUIFacade { String refIdLabelPattern = messages.getString(MESSAGE_HASHDATALIST); refIdLabel.setText(MessageFormat.format(refIdLabelPattern, new Object[]{signedReferences.size()})); - HashDataTableModel tableModel = new HashDataTableModel(signedReferences); + HashDataTableModel tableModel = new HashDataTableModel(signedReferences, renderRefId); final JTable hashDataTable = new JTable(tableModel); - hashDataTable.setDefaultRenderer(HashDataInput.class, new HyperlinkRenderer()); + hashDataTable.setDefaultRenderer(HashDataInput.class, new HyperlinkRenderer(renderRefId)); hashDataTable.setTableHeader(null); // not possible to add mouse listener to TableCellRenderer diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HashDataTableModel.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HashDataTableModel.java index b0f51a78..70842102 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HashDataTableModel.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HashDataTableModel.java @@ -31,14 +31,23 @@ class HashDataTableModel extends DefaultTableModel { protected static final Log log = LogFactory.getLog(HashDataTableModel.class); /** HashDataInput in first column, register hyperlinkrenderer only here */ - protected Class[] types = new Class[]{ HashDataInput.class, String.class }; + protected Class[] types; protected List<HashDataInput> hashDataInputs; - - public HashDataTableModel(List<HashDataInput> hashDataInputs) { - super(0, 2); + + public HashDataTableModel(List<HashDataInput> hashDataInputs, boolean twoColLayout) { + super(0, (twoColLayout) ? 2 : 1); this.hashDataInputs = hashDataInputs; - for (HashDataInput hdi : hashDataInputs) { - addRow(new Object[]{ hdi, hdi.getMimeType()}); + + if (twoColLayout) { + types = new Class[] { HashDataInput.class, String.class }; + for (HashDataInput hdi : hashDataInputs) { + addRow(new Object[] { hdi, hdi.getMimeType() }); + } + } else { + types = new Class[] { HashDataInput.class }; + for (HashDataInput hdi : hashDataInputs) { + addRow(new Object[] { hdi }); + } } } diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HyperlinkRenderer.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HyperlinkRenderer.java index f983706e..16024fcc 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HyperlinkRenderer.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/HyperlinkRenderer.java @@ -26,13 +26,25 @@ import javax.swing.table.DefaultTableCellRenderer; */ public class HyperlinkRenderer extends DefaultTableCellRenderer { + protected boolean renderReferenceId; + + public HyperlinkRenderer(boolean renderReferenceId) { + this.renderReferenceId = renderReferenceId; + } + /** * cannot change mouse cursor here, do in jTable * @param value */ @Override protected void setValue(Object value) { - super.setText("<html><u>" + ((HashDataInput) value).getReferenceId() + "</u></html>"); + String hrefText; + if (renderReferenceId) { + hrefText = ((HashDataInput) value).getReferenceId(); + } else { + hrefText = ((HashDataInput) value).getMimeType(); + } + super.setText("<html><u>" + hrefText + "</u></html>"); setForeground(BKUGUIFacade.HYPERLINK_COLOR); } } diff --git a/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties index d2b47a9d..4562fda5 100644 --- a/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties +++ b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages.properties @@ -32,11 +32,13 @@ message.wait=<html>Bitte warten...</html> message.insertcard=<html>Bitte die B\u00FCrgerkarte in den Kartenleser stecken</html> message.enterpin=<html>{0} eingeben</html> message.hashdatalink=<html><a href=\"anzeige\">Signaturdaten anzeigen</a></html> +message.hashdatalink.tiny=<html><a href=\"anzeige\">Signaturdaten</a></html> #message.hashdata=<html>Hinweis: Dies ist eine Voransicht des zu signierenden Inhalts. F\u00FCr eine standardkonforme Darstellung siehe Hilfe (i).</html> #message.hashdata=<html>Dies ist eine Voransicht des zu signierenden Inhaltes. F\u00FCr Details siehe Hilfe (i).</html> #verwenden sie bitte die von ihrem System zur Verf\u00FCgung gestellte {0} Anwendung. message.hashdatalist=<html>{0} Signaturdaten:</html> -message.retries=<html>Noch {0} Versuch(e)</html> +message.retries.last=<html>Letzter Versuch!</html> +message.retries=<html>Noch {0} Versuche</html> message.overwrite=<html>M\u00F6chten Sie das existierende Dokument {0} \u00FCberschreiben?</html> message.help=<html>Hilfe zu {0}</html> warning.xhtml=<html>Hinweis: Dies ist eine Voransicht des zu signierenden Inhalts. F\u00FCr eine standardkonforme Darstellung siehe Hilfe (i).</html> diff --git a/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages_en.properties b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages_en.properties index 524a2a98..0faa3dba 100644 --- a/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages_en.properties +++ b/BKUCommonGUI/src/main/resources/at/gv/egiz/bku/gui/Messages_en.properties @@ -32,8 +32,10 @@ message.wait=<html>Please wait...</html> message.insertcard=<html>Please insert your citizen card into the reader</html> message.enterpin=<html>Enter {0}</html> message.hashdatalink=<html><a href=\"anzeige\">Display signature data</a></html> +message.hashdatalink.tiny=<html><a href=\"anzeige\">signature data</a></html> #message.hashdata=<html>Remark: This is a preview of the data to-be signed. For standards compliant display see help.</html> message.hashdatalist=<html>{0} signature data objects:</html> +message.retries.last=<html>Last try!</html> message.retries=<html>{0} tries left</html> message.overwrite=<html>Overwrite {0}?</html> message.help=<html>Help topic {0}</html> @@ -60,7 +62,8 @@ error.no.hashdata=<html>No signature data available: {0}</html> error.display.hashdata=<html>Could not display signature data: {0}</html> error.write.hashdata=<html>Could not save signature data: {0}</html> error.invalid.hash=<html>Invalid signature data: {0}</html> -error.ws.unreachable=<html>Web-service unreachable: {0}</html> +error.ws.unreachable=<html>Server unreachable</html> +#error.ws.unreachable=<html>Web-service unreachable: {0}</html> error.pcsc=<html>No PC/SC interface for smartcard access provided</html> error.cardterminal=<html>Could not find smartcard reader</html> error.unknown=<html>An error occured: {0}</html> 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"); // |