@Override public void onClick(ClickEvent event) { String userName = view.getUsernameBox().getText(); String password = view.getPasswordBox().getText(); if (authResult == Result.KAA_ADMIN_NOT_EXISTS) { createKaaAdmin(userName, password); } else { login(userName, password); } } }
super(false); supportPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); supportPanel.setWidth("1000px"); resetButton = new Button(Utils.constants.reset()); supportPanel.add(resetButton); listBox.getElement().getStyle().setPropertyPx("minWidth", 100); HorizontalPanel groupPanel = new HorizontalPanel(); groupPanel.setSpacing(15); keyHashPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); endpointKeyHashButton = new RadioButton("filter", Utils.constants.endpointKeyHash()); endpointKeyHash = new TextBox(); endpointKeyHash.setWidth("100%"); findButton = new Button(Utils.constants.find()); findButton.addStyleName(Utils.avroUiStyle.buttonSmall()); keyHashPanel.add(endpointKeyHashButton); keyHashPanel.add(endpointKeyHash);
private void findByEndpointKeyHash() { listView.getEndpointGroupButton().setValue(false); listView.getEndpointKeyHashButton().setValue(true); listView.clearError(); String value = listView.getEndpointKeyHashTextBox().getValue(); dataProvider.setEndpointKeyHash(value); dataProvider.update(); }
loginTitle.getElement().setInnerSafeHtml( SafeHtmlUtils.fromSafeConstant(Utils.messages.loginTitle())); usernameBox = new TextBox(); usernameBox.setName("j_username"); usernameBox.setWidth("100%"); passwordBox.setWidth("100%"); Label loginLabel = new Label(Utils.constants.username()); loginTable.setWidget(0, 0, loginLabel); loginTable.setWidget(0, 1, usernameBox); Label passwordLabel = new Label(Utils.constants.password()); loginTable.setWidget(1, 0, passwordLabel); loginTable.setWidget(1, 1, passwordBox); forgotPasswordLabel = new Label(Utils.constants.forgotPassword()); forgotPasswordLabel.addStyleName(Utils.kaaAdminStyle.linkLabel()); loginTable.setWidget(2, 0, forgotPasswordLabel); .setColSpan(2, 0, 2); loginButton = new Button(Utils.constants.login()); loginButton.addStyleName(Utils.kaaAdminStyle.loginButton()); loginTable.setWidget(3, 2, loginButton); loginButton.getElement().getStyle().setMarginTop(15, Unit.PX);
Label label = new Label(Utils.constants.notificationSchema()); label.addStyleName(Utils.avroUiStyle.requiredField()); notificationSchemaInfo = new SchemaInfoListBox(); detailsTable.setWidget(row, 0, label); row++; label = new Label(Utils.constants.expiresAt()); expiredAt = new DateBox(); expiredAt.setWidth("200px"); label = new Label(Utils.constants.endpointKeyHash()); endpointKeyHashTextBox = new TextBox(); endpointKeyHashTextBox.setWidth("200px"); detailsTable.setWidget(row, 0, label); detailsTable.setWidget(row, 1, endpointKeyHashTextBox);
public void show() { final FormStylePopup pop = new FormStylePopup(); final TextBox fieldName = new TextBox(); final TextBox fieldType = new TextBox(); fieldName.addKeyPressHandler( new NoSpaceKeyPressHandler() ); fieldType.addKeyPressHandler( new NoSpaceKeyPressHandler() ); if ( field != null ) { fieldName.setText( field.name ); fieldType.setText( field.type ); HorizontalPanel typeP = new HorizontalPanel(); typeP.add( fieldType ); final ListBox typeChoice = new ListBox(); typeChoice.addItem( Constants.INSTANCE.chooseType() ); typeChoice.addItem( entry.getValue(), entry.getKey() ); typeP.add( typeChoice ); typeP ); Button ok = new Button( Constants.INSTANCE.OK() ); ok.addClickHandler( new ClickHandler() {
VerticalPanel mainPanel = new VerticalPanel(); HorizontalPanel login = new HorizontalPanel(); HorizontalPanel password = new HorizontalPanel(); HorizontalPanel buttons = new HorizontalPanel(); mainPanel.add(login); mainPanel.add(password); mainPanel.add(buttons); Label userNameLabel = new Label("User:"); Label passwordLabel = new Label("Password:"); userNameInput = new TextBox(); passwordInput = new PasswordTextBox(); password.setCellHorizontalAlignment(passwordInput, HasAlignment.ALIGN_RIGHT); loginButton = new Button("Login"); buttons.add(loginButton); buttons.setWidth("100%"); userNameInput.addKeyDownHandler(formSubmit); passwordInput.addKeyDownHandler(formSubmit);
HorizontalPanel changeName = new HorizontalPanel(); final TextBox name = new TextBox(); name.setText( factModel.getName() ); changeName.add( name ); lstSuperTypes.addItem( Constants.INSTANCE.DoesNotExtend() ); for ( FactMetaModel fmm : superTypeFactModels ) { if ( !fmm.getName().equals( factModel.getName() ) ) { lstSuperTypes.addItem( fmm.getName() ); if ( factModel.getSuperType() != null && factModel.getSuperType().equals( fmm.getName() ) ) { selectedIndex = lstSuperTypes.getItemCount() - 1; Button nameButton = new Button( Constants.INSTANCE.OK() ); nameButton.addKeyPressHandler( new NoSpaceKeyPressHandler() ); nameButton.addClickHandler( new ClickHandler() {
private void createLoginPanel(){ lightbox = new KSLightBox(); VerticalPanel panel = new VerticalPanel(); errorLabel = new Label(); errorLabel.setText(TIMEOUT_MSG); errorLabel.setStyleName("KSError"); username = new TextBox(); username.setName("j_username"); table.setWidget(1,1, password); table.setWidget(2,0,(new Button("Login", new ClickHandler() { public void onClick(ClickEvent event) { panel.add(errorLabel); panel.add(table); panel.setStyleName("KSLoginPanel");
Button ok = new Button( "upload" ); ok.addClickHandler( new ClickHandler() { public void onClick( ClickEvent event ) { showUploadingBusy(); HorizontalPanel fields = new HorizontalPanel(); fields.add( up ); fields.add( ok ); hiddenGroupIdField.setName( HTMLFileManagerFields.GROUP_ID ); hiddenGroupIdField.setText( null ); hiddenArtifactIdField.setName( HTMLFileManagerFields.ARTIFACT_ID ); hiddenArtifactIdField.setText( null ); hiddenVersionIdField.setName( HTMLFileManagerFields.VERSION_ID ); hiddenVersionIdField.setText( null ); hiddenFieldsPanel.addAttribute( "VersionID:", hiddenVersionIdField ); VerticalPanel allFields = new VerticalPanel(); allFields.add( fields ); allFields.add( hiddenFieldsPanel );
HorizontalPanel varName = new HorizontalPanel(); final TextBox varTxt = new BindingTextBox(); if ( pattern.getBoundName() == null ) { varTxt.setText( "" ); } else { varTxt.setText( pattern.getBoundName() ); varTxt.setVisibleLength( 6 ); varName.add( varTxt ); Button bindVar = new Button( HumanReadableConstants.INSTANCE.Set() ); bindVar.addClickHandler( new ClickHandler() { public void onClick( ClickEvent event ) { String var = varTxt.getText(); varName.add( bindVar ); popup.addAttribute( Constants.INSTANCE.VariableName(), varName );
public SearchPopup() { super(true); Label label = new Label("Search for Node:"); label.getElement().getStyle().setPaddingTop(4, Unit.PX); label.getElement().getStyle().setPaddingLeft(5, Unit.PX); m_tf = new TextBox(); m_tf.setSize("99%", "15px"); m_okBtn = new Button("OK"); m_okBtn.setSize("100%", "100%"); m_okBtn.addClickHandler(new ClickHandler() {
setTitle(locale.createFactoryTitle()); Widget widget = uiBinder.createAndBindUi(this); widget.getElement().getStyle().setPadding(0, Unit.PX); setWidget(widget); factoryNameLabel.setText(locale.createFactoryName()); factoryLinkLabel.setText(locale.createFactoryLink()); configure.getElement().insertFirst(factoryResources.configure().getSvg().getElement()); launch.getElement().insertFirst(factoryResources.execute().getSvg().getElement()); launch.addStyleName(style.launchIcon()); configure.addStyleName(style.configureIcon()); createFactoryButton.setEnabled(false); addFooterButton( locale.createFactoryButtonClose(), "projectReadOnlyGitUrl-btnClose", event -> delegate.onCancelClicked()); createFactoryButton.addClickHandler(clickEvent -> delegate.onCreateClicked()); buttonBuilder.withResourceWidget(factoryLink).build(); factoryLink.setReadOnly(true); final Tooltip launchFactoryTooltip = Tooltip.create( locale.createFactoryConfigureTooltip()); configureFactoryTooltip.setShowDelayDisabled(false); factoryName.getElement().setAttribute("placeholder", "new-factory-name");
private void showBindingPopUp() { final FormStylePopup popup = new FormStylePopup(); popup.setWidth( 500 + "px" ); HorizontalPanel vn = new HorizontalPanel(); final TextBox varName = new TextBox(); Button ok = new Button( HumanReadableConstants.INSTANCE.Set() ); vn.add( new Label( Constants.INSTANCE.BindTheExpressionToAVariable() ) ); vn.add( varName ); vn.add( ok ); ok.addClickHandler( new ClickHandler() { public void onClick( ClickEvent event ) { String var = varName.getText(); if ( getModeller().isVariableNameUsed( var ) ) { Window.alert( Constants.INSTANCE.TheVariableName0IsAlreadyTaken( var ) ); return; } expression.setBinding( var ); getModeller().refreshWidget(); popup.hide(); } } ); popup.addRow( vn ); popup.show(); }
private void doSearch() { VerticalPanel container = new VerticalPanel(); VerticalPanel criteria = new VerticalPanel(); final TextBox searchTextBox = new TextBox(); Button go = new Button(); go.setText( "Search" ); ts.addAttribute( "", go ); go.addClickHandler( cl ); searchTextBox.addKeyPressHandler( new KeyPressHandler() { public void onKeyPress( KeyPressEvent event ) { if ( event.getCharCode() == KeyCodes.KEY_ENTER ) { criteria.add( ts ); container.add( criteria ); container.add( resultsP );
rootPanel.setSize("800", "300"); htmlPanel = new HTML("Connecting..."); htmlPanel.setStyleName("chat"); rootPanel.add(htmlPanel); submitPanel.setVisible(false); textBox = new TextBox(); textBox.setVisibleLength(109); textBox.addKeyPressHandler(new KeyPressHandler() { public void onKeyPress(KeyPressEvent event) { if (event.getCharCode() == KeyCodes.KEY_ENTER) { textBox.setSize("", "30"); submitPanel.add(textBox); Button btnSubmit = new Button("Submit"); btnSubmit.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { onSubmit(); btnSubmit.setHeight("30"); submitPanel.add(btnSubmit);
/** * Create a new instance using a custom resource bundle. * * @param resource The custom resource bundle to use. */ public OptionsPrintPanel(PrintWidgetResource resource) { super(resource); UIBINDER.createAndBindUi(this); printButton.setEnabled(true); titleTextBox.getElement().setAttribute("placeholder", MESSAGES.printPrefsTitlePlaceholder()); // fill the pageSizeListBox for (String pageSizeName : PageSize.getAllNames()) { pageSizeListBox.addItem(pageSizeName); } // fill the postPrintActionRadioButtonMap postPrintActionRadioButtonMap = new HashMap<PrintConfiguration.PostPrintAction, RadioButton>(); for (PrintConfiguration.PostPrintAction postPrintAction : PrintConfiguration.PostPrintAction.values()) { RadioButton radioButton = new RadioButton("postPrintAction", Print.getInstance().getPrintUtil() .toString(postPrintAction)); postPrintActionRadioButtonMap.put(postPrintAction, radioButton); postPrintActionRadioGroup.add(radioButton); } createViewBasedOnConfiguration(); }
VerticalPanel panel = new VerticalPanel(); uploadForm.setWidget( panel ); final TextBox tb = new TextBox(); tb.setName( "textBoxFormElement" ); panel.add( tb ); panel.add( upload ); Button uploadSubmitButton = new Button( "Upload" ); panel.add( uploadSubmitButton ); uploadSubmitButton.addClickListener( new ClickListener() { public void onClick( Widget sender ) { uploadForm.submit();
public EditorStringPropertyWidget(String name, String value) { propertyName.setText(name); propertyValueBox = new TextBox(); propertyValueBox.setVisibleLength(5); propertyValueBox.setValue(value); propertyValueBox.addKeyUpHandler(this); valuePanel.add(propertyValueBox); }
String getMessagePreview(final EIURI instanceURI, final String instanceLabel) { final Person fromInfo = new Person( fromNameText.getText(), fromEmailText.getText(), fromTitleText.getText(), fromLabName.getText(), institutionNameText.getText(), institutionSelect.getItemText(institutionSelect.getSelectedIndex()) ); final TributaryRequestDetailInfo requestDetailInfo = new TributaryRequestDetailInfo( instanceURI, instanceLabel, descriptionText.getText(), additionalInfoText.getText(), agreeToCiteCheckBox.getValue(), agreeToShareCheckBox.getValue() ); final ContactBean msg = new TributaryBean( fromInfo, requestDetailInfo, subject, ccEmailCheckBox.getValue() ); // this will deliver html in case that's what the message will use, or plain-text if no html: showGlasspane(); InstancePage.contactService.getMessageContent( SessionContext.getSessionId(), msg, true, new RootAsyncCallback<String>() { @Override public void onSuccess(String result) { if ( result != null ) { contentPreview = result; new TributaryPreviewPanel( contentPreview ) ; hideGlasspane(); } else { Window.alert( "Error obtaining message text. Please check required fields." ); } } }); return "Still only a mock-message: working on the async callback...."; }