當前位置: 首頁>>代碼示例>>Java>>正文


Java CheckBox.setValue方法代碼示例

本文整理匯總了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);
			}
		}
	}
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:22,代碼來源:RoomGroupEdit.java

示例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();
}
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:20,代碼來源:ColumnEditorWidget.java

示例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;
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:24,代碼來源:BatchClassView.java

示例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;
	}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:26,代碼來源:TableInfoView.java

示例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);
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:17,代碼來源:GitHubAuthenticatorViewImpl.java

示例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);
  }
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:23,代碼來源:PreviewViewImpl.java

示例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);
  }
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:23,代碼來源:PreviewViewImpl.java

示例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;
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:20,代碼來源:ProjectInfoScreen.java

示例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);
}
 
開發者ID:showlowtech,項目名稱:google-apis-explorer,代碼行數:18,代碼來源:FieldsEditor.java

示例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);
			}
		}
	}
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:30,代碼來源:RoomFeatureEdit.java

示例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()));
		}
	}
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:15,代碼來源:CourseFinderClasses.java

示例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);
    }
}
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:14,代碼來源:ESGFSearchPanel.java

示例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();
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:13,代碼來源:ExtendedScrollTable.java

示例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)));
		}
	}
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:14,代碼來源:ExtendedScrollTable.java

示例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();
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:15,代碼來源:ExtendedScrollTable.java


注:本文中的com.google.gwt.user.client.ui.CheckBox.setValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。