List of usage examples for com.google.gwt.user.client.ui HTMLPanel HTMLPanel
private HTMLPanel(Element elem)
From source file:uk.ac.ncl.openlab.intake24.client.ui.AuthTokenForm.java
License:Apache License
public void showInvalidToken() { form.clear(); form.add(new HTMLPanel( SafeHtmlUtils.fromSafeConstant(messages.authToken_invalid(EmbeddedData.surveySupportEmail)))); }
From source file:uk.ac.ncl.openlab.intake24.client.ui.AuthTokenForm.java
License:Apache License
public void showServiceError() { form.clear();//from w w w . j ava 2 s .c o m form.add(new HTMLPanel(messages.serverErrorTitle())); form.add(new HTMLPanel( SafeHtmlUtils.fromSafeConstant(messages.serverErrorText(EmbeddedData.surveySupportEmail)))); }
From source file:uk.ac.ncl.openlab.intake24.client.ui.GenUserForm.java
License:Apache License
public void showCredentials(GeneratedCredentials credentials, final Callback onContinueClicked) { form.clear();//from ww w. ja va 2 s .c om FlowPanel userInfo = new FlowPanel(); userInfo.addStyleName("intake24-user-info-panel"); userInfo.add(new HTMLPanel(SafeHtmlUtils.fromSafeConstant(messages.genUserWelcome()))); userInfo.add(new HTMLPanel(SafeHtmlUtils.fromSafeConstant(messages.genUserSaveInfo()))); String surveyUrl = Window.Location.getProtocol() + "//" + Window.Location.getHost() + Window.Location.getPath(); Grid userInfoTable = new Grid(2, 2); userInfoTable.addStyleName("intake24-user-info-table"); userInfoTable.setWidget(0, 0, new Label(messages.loginForm_userNameLabel())); userInfoTable.setWidget(0, 1, new Label(credentials.userName)); userInfoTable.setWidget(1, 0, new Label(messages.loginForm_passwordLabel())); userInfoTable.setWidget(1, 1, new Label(credentials.password)); userInfo.add(userInfoTable); userInfo.add(new HTMLPanel(SafeHtmlUtils.fromSafeConstant(messages.genUserSurveyLink()))); FlowPanel urlDiv = new FlowPanel(); urlDiv.add(new Anchor(surveyUrl, surveyUrl)); userInfo.add(urlDiv); userInfo.add(new HTMLPanel(SafeHtmlUtils.fromSafeConstant(messages.genUserOneSitting()))); Button cont = WidgetFactory.createGreenButton(messages.genUserContinue(), "genUserFormContinueButton", new ClickHandler() { @Override public void onClick(ClickEvent event) { onContinueClicked.call(); } }); userInfo.add(WidgetFactory.createButtonsPanel(cont)); form.add(userInfo); }
From source file:uk.ac.ncl.openlab.intake24.client.ui.GenUserForm.java
License:Apache License
public void showForbidden() { form.clear(); form.add(new HTMLPanel( SafeHtmlUtils.fromSafeConstant(messages.genUserForbidden(EmbeddedData.surveySupportEmail)))); }
From source file:uk.ac.ncl.openlab.intake24.client.ui.LoginForm.java
License:Apache License
public void onLoginAttemptFailed() { statusPanel.clear();/*from w ww .jav a2 s .c o m*/ statusPanel.add(new HTMLPanel(SafeHtmlUtils.fromSafeConstant(messages .loginForm_passwordNotRecognised(SafeHtmlUtils.htmlEscape(EmbeddedData.surveySupportEmail))))); loginButton.setEnabled(true); }
From source file:uk.ac.ncl.openlab.intake24.client.ui.LoginForm.java
License:Apache License
public void onLoginServiceError() { statusPanel.clear();/*from w w w. j a v a2s. c om*/ statusPanel.add(new HTMLPanel(SafeHtmlUtils.fromSafeConstant( messages.loginForm_serviceException(SafeHtmlUtils.htmlEscape(EmbeddedData.surveySupportEmail))))); loginButton.setEnabled(true); }