+ protected void onPreviewNativeEvent(NativePreviewEvent preview) {
+ super.onPreviewNativeEvent(preview);
+ NativeEvent evt = preview.getNativeEvent();
+ if (evt.getType().equals("keydown"))
+ // Use the popup's key preview hooks to close the dialog when either
+ // enter or escape is pressed.
+ switch (evt.getKeyCode()) {
+ case KeyCodes.KEY_ENTER:
+ case KeyCodes.KEY_ESCAPE:
+ hide();
+ break;
+ }
+ }
+
+ }
+
+ private class ReauthenticateDialog extends DialogBox {
+ /**
+ * The widget constructor.
+ */
+ public ReauthenticateDialog() {
+ // Set the dialog's caption.
+ setText("New Password Created");
+ setAnimationEnabled(true);
+ VerticalPanel outer = new VerticalPanel();
+
+ // Create the text and set a style name so we can style it with CSS.
+ HTML text = new HTML("<p>A new WebDAV password has been created." +
+ "</p><p>You will now be redirected to the initial screen" +
+ " for the changes to take effect. Choose \"Show " +
+ "Credentials\" again afterwards to see the new password.</p>");
+ text.setStyleName("gss-AboutText");
+ outer.add(text);
+
+ // Create the 'OK' button, along with a listener that hides the
+ // dialog when the button is clicked.
+ Button confirm = new Button("Proceed", new ClickHandler() {
+ @Override
+ public void onClick(ClickEvent event) {
+ GSS.get().authenticateUser();