List of usage examples for com.google.gwt.user.client.ui CheckBox CheckBox
public CheckBox()
From source file:org.activityinfo.ui.client.component.form.field.BooleanFieldWidget.java
License:Open Source License
public BooleanFieldWidget(final ValueUpdater valueUpdater) { this.checkBox = new CheckBox(); this.checkBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() { @Override//ww w . j a v a2 s. co m public void onValueChange(ValueChangeEvent<Boolean> event) { valueUpdater.update(event.getValue()); } }); }
From source file:org.apache.solr.explorer.client.util.ui.widget.editor.BooleanEditor.java
License:Apache License
public BooleanEditor(boolean defaultValue, boolean enabled) { checkBox = new CheckBox(); checkBox.setValue(defaultValue); setEnabled(enabled); }
From source file:org.artificer.ui.client.local.pages.ArtifactsPage.java
License:Apache License
/** * Updates the table of artifacts with the given data. * @param data//from ww w. j av a 2 s.co m */ protected void updateArtifactTable(ArtifactResultSetBean data) { this.artifactsTable.clear(); this.searchInProgressMessage.setVisible(false); if (data.getArtifacts().size() > 0) { for (final ArtifactSummaryBean artifactSummaryBean : data.getArtifacts()) { // If in "new relationship" mode, add checkboxes to the last column. Maintain the target list // based on the clicks. if (stateService.inNewRelationshipMode()) { final CheckBox checkbox = new CheckBox(); boolean checked = addRelationshipTargets.contains(artifactSummaryBean.getUuid()); checkbox.setValue(checked); checkbox.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { boolean checked = checkbox.getValue(); if (checked) { addRelationshipTargets.add(artifactSummaryBean.getUuid()); } else { addRelationshipTargets.remove(artifactSummaryBean.getUuid()); } } }); this.artifactsTable.addRow(artifactSummaryBean, checkbox); } else { this.artifactsTable.addRow(artifactSummaryBean); } } this.artifactsTable.setVisible(true); // Important to set this here. If you click on a search suggestion, filtersPanel's ValueChangeHandler // gets kicked off twice -- once due to the click on the suggestion popup and again when that replaces // the value in the field. The first one sets noDataMessage.setVisible(true), below. See SRAMP-557 this.noDataMessage.setVisible(false); } else { this.noDataMessage.setVisible(true); } }
From source file:org.bonitasoft.console.client.view.categories.CategoriesListEditorView.java
License:Open Source License
private Widget buildSelectAllSelector() { final FlowPanel theWrapper = new FlowPanel(); final CheckBox theSelectAllCheckBox = new CheckBox(); theWrapper.add(theSelectAllCheckBox); theSelectAllCheckBox.addClickHandler(new ClickHandler() { public void onClick(ClickEvent aEvent) { if (aEvent.getSource() instanceof CheckBox) { CheckBox theCheckBox = (CheckBox) aEvent.getSource(); selectAllRows(theCheckBox.getValue()); aEvent.stopPropagation(); }/*from w w w . ja v a 2 s. c om*/ } }); final CustomMenuBar theSelector = new CustomMenuBar(); theSelector.addItem(theWrapper, new Command() { public void execute() { boolean theNewValue = !theSelectAllCheckBox.getValue(); theSelectAllCheckBox.setValue(theNewValue, true); selectAllRows(theNewValue); } }); return theSelector; }
From source file:org.bonitasoft.console.client.view.categories.CategoriesListEditorView.java
License:Open Source License
private Widget buildItemSelector(final int row) { final CheckBox theSelectItemCheckBox = new CheckBox(); theSelectItemCheckBox.addClickHandler(new ClickHandler() { public void onClick(ClickEvent aEvent) { if (aEvent.getSource() instanceof CheckBox) { CheckBox theCheckBox = (CheckBox) aEvent.getSource(); if (theCheckBox.getValue()) { myItemRowSelection.add(row); } else { myItemRowSelection.remove(row); }//from w ww .j av a 2 s. co m } } }); return theSelectItemCheckBox; }
From source file:org.bonitasoft.console.client.view.identity.GroupsListEditorView.java
License:Open Source License
private Widget buildSelectAllSelector() { final FlowPanel theWrapper = new FlowPanel(); final CheckBox theSelectAllCheckBox = new CheckBox(); theWrapper.add(theSelectAllCheckBox); theSelectAllCheckBox.addClickHandler(new ClickHandler() { public void onClick(ClickEvent aEvent) { if (aEvent.getSource() instanceof CheckBox) { CheckBox theCheckBox = (CheckBox) aEvent.getSource(); selectAllRows(theCheckBox.getValue()); aEvent.stopPropagation(); }//from w w w . j a v a 2 s. c o m } }); final CustomMenuBar theSelector = new CustomMenuBar(); theSelector.addItem(theWrapper, new Command() { public void execute() { boolean theNewValue = !theSelectAllCheckBox.getValue(); theSelectAllCheckBox.setValue(theNewValue, true); selectAllRows(theNewValue); } }); return theSelector; }
From source file:org.bonitasoft.console.client.view.identity.MembershipsListEditorView.java
License:Open Source License
private Widget buildItemSelector(final int row) { final CheckBox theSelectItemCheckBox = new CheckBox(); theSelectItemCheckBox.addClickHandler(new ClickHandler() { public void onClick(ClickEvent aEvent) { if (aEvent.getSource() instanceof CheckBox) { CheckBox theCheckBox = (CheckBox) aEvent.getSource(); if (theCheckBox.getValue()) { myMembershipRowSelection.add(row); } else { myMembershipRowSelection.remove(row); }//from w w w . j a va 2s .c om } } }); return theSelectItemCheckBox; }
From source file:org.bonitasoft.console.client.view.identity.RolesListEditorView.java
License:Open Source License
private Widget buildSelectAllSelector() { final CheckBox theSelectAllCheckBox = new CheckBox(); theSelectAllCheckBox.addClickHandler(new ClickHandler() { public void onClick(ClickEvent aEvent) { if (aEvent.getSource() instanceof CheckBox) { CheckBox theCheckBox = (CheckBox) aEvent.getSource(); selectAllRows(theCheckBox.getValue()); aEvent.stopPropagation(); }/*from www .jav a2s . co m*/ } }); final CustomMenuBar theSelector = new CustomMenuBar(); theSelector.addItem(theSelectAllCheckBox, new Command() { public void execute() { boolean theNewValue = !theSelectAllCheckBox.getValue(); theSelectAllCheckBox.setValue(theNewValue, true); selectAllRows(theNewValue); } }); return theSelector; }
From source file:org.bonitasoft.console.client.view.identity.UserMembershipsEditorPanel.java
License:Open Source License
/** * @param row// ww w.j av a2 s .c o m */ private Widget buildItemSelector(final int row) { final CheckBox theSelectItemCheckBox = new CheckBox(); theSelectItemCheckBox.addClickHandler(new ClickHandler() { public void onClick(ClickEvent aEvent) { if (aEvent.getSource() instanceof CheckBox) { CheckBox theCheckBox = (CheckBox) aEvent.getSource(); if (theCheckBox.getValue()) { myMembershipRowSelection.add(row); } else { myMembershipRowSelection.remove(row); } } } }); return theSelectItemCheckBox; }
From source file:org.bonitasoft.console.client.view.identity.UserMembershipsEditorPanel.java
License:Open Source License
private Widget buildSelectAllSelector() { final CheckBox theSelectAllCheckBox = new CheckBox(); theSelectAllCheckBox.addClickHandler(new ClickHandler() { public void onClick(ClickEvent aEvent) { if (aEvent.getSource() instanceof CheckBox) { CheckBox theCheckBox = (CheckBox) aEvent.getSource(); selectAllRows(theCheckBox.getValue()); }//w w w . j a va2 s.c om } }); return theSelectAllCheckBox; }