本文整理汇总了Java中com.google.gwt.user.client.ui.CheckBox.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java CheckBox.setValue方法的具体用法?Java CheckBox.setValue怎么用?Java CheckBox.setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.CheckBox
的用法示例。
在下文中一共展示了CheckBox.setValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setProperties
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
public void setProperties(RoomPropertiesInterface properties) {
iProperties = properties;
iRooms.setProperties(properties);
iFutureSessions.clear();
iForm.getRowFormatter().setVisible(iFutureSessionsRow, iProperties.hasFutureSessions());
if (iProperties.hasFutureSessions()) {
CheckBox current = new CheckBox(iProperties.getAcademicSessionName());
current.setValue(true); current.setEnabled(false);
current.addStyleName("future-session");
iFutureSessions.add(current);
for (AcademicSessionInterface session: iProperties.getFutureSessions()) {
if (session.isCanAddGlobalRoomGroup() || session.isCanAddDepartmentalRoomGroup()) {
CheckBox ch = new CheckBox(session.getLabel());
iFutureSessionsToggles.put(session.getId(), ch);
ch.addStyleName("future-session");
iFutureSessions.add(ch);
}
}
}
}
示例2: onResponseReceived
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
@Override
public void onResponseReceived(Request request, Response response) {
String text = response.getText();
PopupPanel popup = new PopupPanel(true);
popup.add(new HTML("<strong>Saved edits for:<p></p></strong>"+text+"<p></p>Click outside box to dismiss."));
popup.setPopupPosition(200, Window.getClientHeight()/3);
popup.show();
CellFormatter formatter = datatable.getCellFormatter();
for (Iterator dirtyIt = dirtyrows.keySet().iterator(); dirtyIt.hasNext();) {
Integer widgetrow = (Integer) dirtyIt.next();
for (int i = 0; i < headers.length; i++) {
formatter.removeStyleName(widgetrow, i, "dirty");
}
CheckBox box = (CheckBox) datatable.getWidget(widgetrow, 0);
box.setValue(false);
}
dirtyrows.clear();
}
示例3: setDocumentTypeList
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
/**
* To set Document Type List.
*
* @param documentTypeDTOs Collection<DocumentTypeDTO>
* @return List<Record>
*/
public List<Record> setDocumentTypeList(Collection<DocumentTypeDTO> documentTypeDTOs) {
List<Record> recordList = new LinkedList<Record>();
for (final DocumentTypeDTO documentTypeDTO : documentTypeDTOs) {
if (!documentTypeDTO.getName().equalsIgnoreCase(AdminConstants.DOCUMENT_TYPE_UNKNOWN)) {
CheckBox isHidden = new CheckBox();
isHidden.setValue(documentTypeDTO.isHidden());
isHidden.setEnabled(false);
Record record = new Record(documentTypeDTO.getIdentifier());
record.addWidget(docTypeListView.name, new Label(documentTypeDTO.getName()));
record.addWidget(docTypeListView.description, new Label(documentTypeDTO.getDescription()));
record.addWidget(docTypeListView.isHidden, isHidden);
recordList.add(record);
}
}
return recordList;
}
示例4: setFieldsList
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
private List<Record> setFieldsList(List<TableColumnInfoDTO> fields) {
List<Record> recordList = new LinkedList<Record>();
for (final TableColumnInfoDTO tcInfoDTO : fields) {
Record record = new Record(tcInfoDTO.getIdentifier());
CheckBox isRequired = new CheckBox();
CheckBox isMandatory = new CheckBox();
isRequired.setValue(tcInfoDTO.isRequired());
isRequired.setEnabled(false);
isMandatory.setValue(tcInfoDTO.isMandatory());
isMandatory.setEnabled(false);
record.addWidget(tableColumnInfoListView.betweenLeft, new Label(tcInfoDTO.getBetweenLeft()));
record.addWidget(tableColumnInfoListView.betweenRight, new Label(tcInfoDTO.getBetweenRight()));
record.addWidget(tableColumnInfoListView.columnName, new Label(tcInfoDTO.getColumnName()));
record.addWidget(tableColumnInfoListView.columnHeaderPattern, new Label(tcInfoDTO.getColumnHeaderPattern()));
record.addWidget(tableColumnInfoListView.columnStartCoord, new Label(tcInfoDTO.getColumnStartCoordinate()));
record.addWidget(tableColumnInfoListView.columnEndCoord, new Label(tcInfoDTO.getColumnEndCoordinate()));
record.addWidget(tableColumnInfoListView.columnPattern, new Label(tcInfoDTO.getColumnPattern()));
record.addWidget(tableColumnInfoListView.isRequired, isRequired);
record.addWidget(tableColumnInfoListView.isMandatory, isMandatory);
recordList.add(record);
}
return recordList;
}
示例5: GitHubAuthenticatorViewImpl
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
@Inject
public GitHubAuthenticatorViewImpl(
DialogFactory dialogFactory,
GitHubLocalizationConstant locale,
ProductInfoDataProvider productInfoDataProvider) {
this.dialogFactory = dialogFactory;
this.locale = locale;
isGenerateKeys = new CheckBox(locale.authGenerateKeyLabel());
isGenerateKeys.setValue(true);
contentPanel = new DockLayoutPanel(Style.Unit.PX);
contentPanel.addNorth(
new InlineHTML(locale.authorizationDialogText(productInfoDataProvider.getName())), 20);
contentPanel.addNorth(isGenerateKeys, 20);
}
示例6: checkParentState
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
private void checkParentState(TreeItem treeItem, Boolean value) {
TreeItem parentItem = treeItem.getParentItem();
if (parentItem == null) {
return;
}
if (!(parentItem.getWidget() instanceof FlowPanel)) {
return;
}
FlowPanel parentChangeContainer = (FlowPanel) parentItem.getWidget();
if (!(parentChangeContainer.getWidget(0) instanceof CheckBox)) {
return;
}
CheckBox parentCheckBox = (CheckBox) parentChangeContainer.getWidget(0);
if (value && !parentCheckBox.getValue()) {
parentCheckBox.setValue(true);
checkParentState(parentItem, true);
}
}
示例7: checkChildrenState
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
private void checkChildrenState(TreeItem treeItem, Boolean value) {
int childCount = treeItem.getChildCount();
if (childCount == 0) {
return;
}
for (int i = 0; i < childCount; i++) {
TreeItem childItem = treeItem.getChild(i);
if (!(childItem.getWidget() instanceof FlowPanel)) {
return;
}
FlowPanel childItemContainer = (FlowPanel) childItem.getWidget();
if (!(childItemContainer.getWidget(0) instanceof CheckBox)) {
return;
}
CheckBox childCheckBox = (CheckBox) childItemContainer.getWidget(0);
childCheckBox.setValue(value);
checkChildrenState(childItem, value);
}
}
示例8: renderCheckBox
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
private CheckBox renderCheckBox(LabeledWidgetsGrid g, ConfigParameterInfo param) {
CheckBox checkBox = new CheckBox(getDisplayName(param));
checkBox.setValue(Boolean.parseBoolean(param.value()));
HorizontalPanel p = new HorizontalPanel();
p.add(checkBox);
if (param.description() != null) {
Image infoImg = new Image(Gerrit.RESOURCES.info());
infoImg.setTitle(param.description());
p.add(infoImg);
}
if (param.warning() != null) {
Image warningImg = new Image(Gerrit.RESOURCES.warning());
warningImg.setTitle(param.warning());
p.add(warningImg);
}
g.add((String) null, p);
saveEnabler.listenTo(checkBox);
return checkBox;
}
示例9: FieldsEditor
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
public FieldsEditor(ApiService service, String key) {
super("");
this.service = service;
this.key = key;
root = new CheckBox(key.isEmpty() ? "Select all/none" : key);
root.setValue(false);
root.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
for (HasValue<Boolean> checkBox : children.values()) {
checkBox.setValue(event.getValue(), true);
}
}
});
add(root);
}
示例10: setProperties
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
public void setProperties(RoomPropertiesInterface properties) {
iProperties = properties;
iRooms.setProperties(properties);
iForm.getRowFormatter().setVisible(iTypeRow, !iProperties.getFeatureTypes().isEmpty());
iType.clear();
if (!iProperties.getFeatureTypes().isEmpty()) {
iType.addItem(MESSAGES.itemNoFeatureType(), "-1");
for (FeatureTypeInterface type: iProperties.getFeatureTypes())
iType.addItem(type.getLabel(), type.getId().toString());
}
iFutureSessions.clear();
iForm.getRowFormatter().setVisible(iFutureSessionsRow, iProperties.hasFutureSessions());
if (iProperties.hasFutureSessions()) {
CheckBox current = new CheckBox(iProperties.getAcademicSessionName());
current.setValue(true); current.setEnabled(false);
current.addStyleName("future-session");
iFutureSessions.add(current);
for (AcademicSessionInterface session: iProperties.getFutureSessions()) {
if (session.isCanAddGlobalRoomGroup() || session.isCanAddDepartmentalRoomGroup()) {
CheckBox ch = new CheckBox(session.getLabel());
iFutureSessionsToggles.put(session.getId(), ch);
ch.addStyleName("future-session");
iFutureSessions.add(ch);
}
}
}
}
示例11: onSetValue
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
@Override
public void onSetValue(RequestedCourse course) {
iSelectedClasses.clear();
if (course != null && course.hasSelectedClasses())
iSelectedClasses.addAll(course.getSelectedClasses());
for (int row = 1; row < getRowCount(); row++) {
ClassAssignment a = getData(row);
CheckBox ch = getClassSelection(row);
if (ch != null && a != null) {
ch.setValue(iSelectedClasses.contains(a.getSelection()));
setSelected(row, iSelectedClasses.contains(a.getSelection()));
}
}
}
示例12: removeFacet
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
protected void removeFacet(CheckBox checkBox) {
checkBox.setValue(false, false);
activeFacets.remove(checkBox);
String query = URL.encode(showFacets());
offset=0;
if ( query.length() == 0 ) {
datasetPanel.clear();
} else {
spinLabel.setText("Searching...");
spin.show();
Util.getRPCService().getESGFDatasets(query+"&access=LAS&limit="+limit+"&offset="+offset, datasetCallback);
}
}
示例13: selectAllMassive
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
/**
* selectAllMassive
*/
public void selectAllMassive() {
massiveSelected = new ArrayList<Integer>();
for (int i = 0; dataTable.getRowCount() > i; i++) {
CheckBox checkBox = (CheckBox) dataTable.getWidget(i, colMassiveIndex);
checkBox.setValue(true);
massiveSelected.add(Integer.parseInt(dataTable.getText(i, colDataIndex)));
}
evaluateMergePdf();
}
示例14: selectAllFoldersMassive
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
/**
* selectAllFoldersMassive
*/
public void selectAllFoldersMassive() {
massiveSelected = new ArrayList<Integer>();
for (int i = 0; dataTable.getRowCount() > i; i++) {
if (data.get(Integer.parseInt(dataTable.getText(i, colDataIndex))) instanceof GWTFolder) {
CheckBox checkBox = (CheckBox) dataTable.getWidget(i, colMassiveIndex);
checkBox.setValue(true);
massiveSelected.add(Integer.parseInt(dataTable.getText(i, colDataIndex)));
}
}
}
示例15: selectAllDocumentsMassive
import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
/**
* selectAllDocumentsMassive
*/
public void selectAllDocumentsMassive() {
massiveSelected = new ArrayList<Integer>();
for (int i = 0; dataTable.getRowCount() > i; i++) {
if (data.get(Integer.parseInt(dataTable.getText(i, colDataIndex))) instanceof GWTDocument) {
CheckBox checkBox = (CheckBox) dataTable.getWidget(i, colMassiveIndex);
checkBox.setValue(true);
massiveSelected.add(Integer.parseInt(dataTable.getText(i, colDataIndex)));
}
}
evaluateMergePdf();
}