List of usage examples for com.vaadin.ui Button equals
@Override public boolean equals(Object obj)
From source file:edu.vcu.csbc.vahmpexplorer.main.VaHMPExplorer.java
@Override public void buttonClick(ClickEvent event) { Button button = event.getButton(); if (button.equals(getDataTabSheet().getShowRdp())) { getDataTabSheet().createNewRdpTab(getTaxaMap(), getSampleTable().getValue()); } else if (button.equals(changePassword)) { ChangePasswordWindow w = new ChangePasswordWindow(this); w.show();//from ww w. ja v a2 s . c om } else if (button.equals(logout)) { logout(); } }
From source file:me.uni.emuseo.view.common.form.FormPopUpWindow.java
License:Open Source License
private void buildButtons() { ClickListener clickListener = new ClickListener() { private static final long serialVersionUID = 5320702365033343873L; @Override//from w ww .j a va 2 s. com public void buttonClick(ClickEvent event) { Button button = event.getButton(); if (button.equals(saveButton)) { onPreSave(); } else if (button.equals(cancelButton)) { onCancel(); } } }; buttonLayout = new HorizontalLayout(); saveButton = new Button(); saveButton.addStyleName("primary"); saveButton.setIcon(FontAwesome.SAVE); saveButton.addClickListener(clickListener); cancelButton = new Button(); cancelButton.addStyleName("primary"); cancelButton.setIcon(FontAwesome.UNDO); cancelButton.addClickListener(clickListener); buttonLayout.addComponent(saveButton); buttonLayout.addComponent(cancelButton); buttonLayout.setSpacing(true); buttonLayout.addStyleName("form-buttons"); }
From source file:me.uni.emuseo.view.common.form.FormWithButtonsLayout.java
License:Open Source License
protected HorizontalLayout buildButtons() { final Button saveButton = new Button(); final Button cancelButton = new Button(); ClickListener clickListener = new ClickListener() { private static final long serialVersionUID = 5320702365033343873L; @Override//from w w w. j ava 2s . c om public void buttonClick(ClickEvent event) { Button button = event.getButton(); if (button.equals(saveButton)) { onPreSave(); } else if (button.equals(cancelButton)) { onCancel(); } } }; HorizontalLayout buttonLayout = new HorizontalLayout(); saveButton.addStyleName("primary"); saveButton.setIcon(FontAwesome.SAVE); saveButton.addClickListener(clickListener); cancelButton.addStyleName("primary"); cancelButton.setIcon(FontAwesome.UNDO); cancelButton.addClickListener(clickListener); buttonLayout.addComponent(saveButton); buttonLayout.addComponent(cancelButton); buttonLayout.setSpacing(true); buttonLayout.addStyleName("form-buttons"); return buttonLayout; }
From source file:me.uni.emuseo.view.common.helpers.ConfirmationWindow.java
License:Open Source License
private void buildButtons() { ClickListener clickListener = new ClickListener() { private static final long serialVersionUID = 5320702365033343873L; @Override//from w w w . j av a2 s. c o m public void buttonClick(ClickEvent event) { Button button = event.getButton(); if (button.equals(confirmButton)) { confirm(); } else if (button.equals(cancelButton)) { onCancel(); } } }; buttonLayout = new HorizontalLayout(); confirmButton = new Button("Tak"); confirmButton.addStyleName("primary"); confirmButton.addClickListener(clickListener); cancelButton = new Button("Nie"); cancelButton.addStyleName("primary"); cancelButton.addClickListener(clickListener); buttonLayout.addComponent(confirmButton); buttonLayout.addComponent(cancelButton); buttonLayout.setSpacing(true); buttonLayout.addStyleName("form-buttons"); }
From source file:org.eclipse.skalli.view.component.RadioSelect.java
License:Open Source License
@Override public void buttonClick(ClickEvent event) { radios.get(selected).setIcon(UNSELECTED); Button b = event.getButton(); if (UNSELECTED.equals(b.getIcon())) { for (int i = 0; i < radios.size(); ++i) { if (b.equals(radios.get(i))) { selected = i;/*from ww w .j a va 2s . c o m*/ } } b.setIcon(SELECTED); } }
From source file:org.hip.vif.admin.groupadmin.ui.ContributionsListView.java
License:Open Source License
private void disableOtherButtons(final Button inButton, final HorizontalLayout inButtons) { final Iterator<Component> lIterator = inButtons.iterator(); while (lIterator.hasNext()) { final Component lComponent = lIterator.next(); if (lComponent instanceof Button) { if (!inButton.equals(lComponent)) { lComponent.setEnabled(false); }//from ww w . j a v a 2 s . c om } } }
From source file:org.hip.vif.forum.groups.ui.ContributionsListView.java
License:Open Source License
private void disableOtherButtons(final Button inButton) { final Iterator<Component> lIterator = buttons.iterator(); while (lIterator.hasNext()) { final Component lComponent = lIterator.next(); if (lComponent instanceof Button) { if (!inButton.equals(lComponent)) { lComponent.setEnabled(false); }/*www . j a va 2 s . com*/ } } }
From source file:org.jdal.vaadin.ui.ButtonBar.java
License:Apache License
@Override public void buttonClick(ClickEvent event) { Button selected = event.getButton(); selected.addStyleName("selected"); for (Button b : buttons) { if (!b.equals(event.getButton())) b.removeStyleName("selected"); }/* www. j a v a2 s . c o m*/ }
From source file:org.s23m.cell.editor.semanticdomain.ui.components.MultitabPanel.java
License:Mozilla Public License
public void formEventHandler(final Button.ClickEvent event) { final Button source = event.getButton(); if (source.equals(saveBtn)) { detailsForm.commit();//w ww.java 2 s .com //changeSupport.firePropertyChange(EditorEvents.CHANGESET_MODIFIED.getEventName(), null, null); ((org.s23m.cell.editor.semanticdomain.Editor) getApplication()).updateContainmentTree(); detailsForm.setReadOnly(true); toggleButtonVisibilities(false); } else if (source.equals(cancelBtn)) { detailsForm.discard(); detailsForm.setReadOnly(true); Transaction.rollbackChangedSets(); toggleButtonVisibilities(false); } else if (source.equals(editBtn)) { detailsForm.setReadOnly(false); toggleButtonVisibilities(true); } }