List of usage examples for com.google.gwt.user.client.ui Button Button
public Button()
From source file:com.apress.progwt.client.college.gui.ext.EditableLabelExtension.java
License:Apache License
/** * @param cancelButtonText//from w w w . j a v a 2 s . co m */ protected Widget createCancelButton(String cancelButtonText) { Button result = new Button(); result.setStyleName("editableLabel-buttons"); result.addStyleName("editableLabel-cancel"); result.setText(cancelButtonText); return result; }
From source file:com.apress.progwt.client.college.gui.ext.EditableLabelExtension.java
License:Apache License
/** * @param okButtonText/* w w w .j a va2 s. c o m*/ */ protected Widget createConfirmButton(String okButtonText) { Button result = new Button(); result.setStyleName("editableLabel-buttons"); result.addStyleName("editableLabel-confirm"); result.setText(okButtonText); return result; }
From source file:com.cgxlib.xq.client.plugins.widgets.ButtonWidgetFactory.java
License:Apache License
public Button create(Element e) { Button button = new Button(); button.getElement().setInnerText(e.getInnerText()); if ("button".equalsIgnoreCase(e.getTagName())) { copyAttributes((ButtonElement) e.cast(), (ButtonElement) button.getElement().cast()); }//from w ww . j a v a 2s. c o m WidgetsUtils.replaceOrAppend(e, button); return button; }
From source file:com.codenvy.ide.extension.maven.client.module.CreateMavenModuleViewImpl.java
License:Open Source License
@Inject public CreateMavenModuleViewImpl(ProjectWizardResources wizardResources, CreateMavenModuleResources resources, ButtonLoaderResources buttonLoaderResources) { super(true);/* w ww .j a v a2 s. co m*/ styles = resources.css(); styles.ensureInjected(); archetypes = Collections.createArray(); setTitle("Create Maven Module"); FlowPanel rootElement = ourUiBinder.createAndBindUi(this); setWidget(rootElement); createButton = new Button(); createButton.setText(CREATE); createButton.addStyleName(wizardResources.wizardCss().blueButton()); createButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { delegate.create(); } }); getFooter().add(createButton); createButton.addStyleName(buttonLoaderResources.Css().buttonLoader()); }
From source file:com.dawg6.web.dhcalc.client.BaseSpinner.java
License:Open Source License
/** * @wbp.parser.constructor/* ww w .j a v a 2 s. c o m*/ */ protected BaseSpinner(ValueBox<T> box, String text, T min, T max, T increment) { this.box = box; this.min = min; this.max = max; this.increment = increment; box.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { keyPressed(); } }); box.addFocusHandler(new FocusHandler() { @Override public void onFocus(FocusEvent event) { normalize(); } }); box.addBlurHandler(new BlurHandler() { @Override public void onBlur(BlurEvent event) { normalize(); } }); box.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent event) { normalize(); } }); HorizontalPanel horizontalPanel = new HorizontalPanel(); horizontalPanel.setStyleName("spinner"); horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); initWidget(horizontalPanel); down = new Button(); down.setText("-"); down.setStyleName("spinnerDownButton"); horizontalPanel.add(down); down.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { increment(-1); } }); box.setStyleName("spinnerBox"); box.setText(text); horizontalPanel.add(box); box.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { BaseSpinner.this.box.selectAll(); } }); up = new Button(); up.setText("+"); up.setStyleName("spinnerUpButton"); horizontalPanel.add(up); up.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { increment(1); } }); }
From source file:com.dimdim.conference.ui.common.client.layout.MultipleListsControlDialog.java
License:Open Source License
protected Vector getFooterButtons() { Vector v = new Vector(); // applyButton = new Button(); // applyButton.setText(UIStrings.getApplyLabel()); // applyButton.setStyleName("dm-popup-close-button"); // applyButton.addClickListener(this); // v.addElement(applyButton); okButton = new Button(); okButton.setText(UIStrings.getOKLabel()); okButton.setStyleName("dm-popup-close-button"); okButton.addClickListener(this); v.addElement(okButton);//from w w w .ja v a 2s .c om return v; }
From source file:com.dimdim.conference.ui.common.client.util.CommonUserInformationDialog.java
License:Open Source License
protected Vector getFooterButtons() { Vector v = new Vector(); okButton = new Button(); okButton.setText(UIGlobals.getYesLabelText()); okButton.setStyleName("dm-popup-close-button"); v.addElement(okButton);//w w w .ja v a2s.c o m return v; }
From source file:com.dimdim.conference.ui.common.client.util.ConfirmationDialog.java
License:Open Source License
protected Vector getFooterButtons() { Vector v = new Vector(); okButton = new Button(); okButton.setText(UIGlobals.getYesLabelText()); okButton.setStyleName("dm-popup-close-button"); okButton.addClickListener(this); v.addElement(okButton);//from w ww. jav a 2 s . c o m return v; }
From source file:com.dimdim.conference.ui.dialogues.client.common.PermissionsControlDialog.java
License:Open Source License
protected Vector getFooterButtons() { Vector v = new Vector(); int size = this.listModel.getListSize(); // Now all the users if any are available. if (size > 0) { applyButton = new Button(); applyButton.setText(UIStrings.getOKLabel()); applyButton.setStyleName("dm-popup-close-button"); applyButton.addClickListener(this); v.addElement(applyButton);// w w w .ja va 2 s.c om } return v; }
From source file:com.dimdim.conference.ui.dialogues.client.common.UserControlDialog.java
License:Open Source License
protected Vector getFooterButtons() { Vector v = new Vector(); if (this.allowUserControl) { applyButton = new Button(); applyButton.setText(UIStrings.getOKLabel()); applyButton.setStyleName("dm-popup-close-button"); // sendButton.addClickListener(this); v.addElement(applyButton);/*from w w w . j a va 2s. c om*/ } return v; }