本文整理匯總了Java中com.google.gwt.user.client.ui.CheckBox.setEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java CheckBox.setEnabled方法的具體用法?Java CheckBox.setEnabled怎麽用?Java CheckBox.setEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.CheckBox
的用法示例。
在下文中一共展示了CheckBox.setEnabled方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: 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;
}
示例3: 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;
}
示例4: renderCheckBox
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
private void renderCheckBox(int row, LabelAndValues lv) {
ApprovalInfo self =
Gerrit.isSignedIn() ? lv.info.forUser(Gerrit.getUserAccount().getId().get()) : null;
final String id = lv.info.name();
final CheckBox b = new CheckBox();
b.setText(id);
b.setEnabled(lv.permitted.contains((short) 1));
if (self != null && self.value() == 1) {
b.setValue(true);
}
b.addValueChangeHandler(
new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
in.label(id, event.getValue() ? (short) 1 : (short) 0);
}
});
b.setStyleName(style.label_name());
labelsTable.setWidget(row, 0, b);
CellFormatter fmt = labelsTable.getCellFormatter();
fmt.setStyleName(row, labelHelpColumn, style.label_help());
labelsTable.setText(row, labelHelpColumn, lv.info.valueText("+1"));
}
示例5: 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);
}
}
}
}
示例6: setCheckBoxEnabled
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
private void setCheckBoxEnabled(final CheckBox checkBox, final boolean enabled ) {
if( enabled ) {
checkBox.setStyleName( CommonResourcesContainer.REGULAR_FIELD_STYLE);
} else {
checkBox.setStyleName( CommonResourcesContainer.DISABLED_FIELD_STYLE);
}
checkBox.setEnabled(enabled);
}
示例7: createUI
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
private void createUI(final boolean isMandatory, final CheckBox checkBox, final Node newNode, final TreeItem childTree) {
if (newNode.getParent().getLabel().getKey().equals("BatchClassModules")
|| newNode.getLabel().getKey().equals("BatchClassModules")) {
checkBox.setEnabled(Boolean.FALSE);
checkBox.setValue(Boolean.TRUE);
newNode.getLabel().setMandatory(Boolean.TRUE);
} else {
if (isMandatory) {
checkBox.setEnabled(Boolean.TRUE);
checkBox.setValue(Boolean.FALSE);
} else {
if (importExisting.getValue().equalsIgnoreCase(TRUE)) {
checkBox.setEnabled(Boolean.TRUE);
checkBox.setValue(Boolean.FALSE);
newNode.getLabel().setMandatory(Boolean.FALSE);
} else if (importExisting.getValue().equalsIgnoreCase(FALSE)) {
checkBox.setEnabled(Boolean.FALSE);
checkBox.setValue(Boolean.TRUE);
newNode.getLabel().setMandatory(Boolean.TRUE);
}
}
if (checkBox != null && checkBox.isEnabled()) {
checkBox.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
boolean checked = ((CheckBox) event.getSource()).getValue();
newNode.getLabel().setMandatory(checked);
setParentItemsUI(childTree.getParentItem(), checked, newNode);
setChildItemsUI(childTree, checked, newNode);
}
});
}
}
}
示例8: getbatchFolderListView
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
/**
* To get batch Folder List View.
*
* @param propertyMap Map<String, String>
*/
public void getbatchFolderListView(Map<String, String> propertyMap) {
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.addStyleName("width100");
CheckBox checkBox = new CheckBox(propertyMap.get(BatchFolderListDTO.FOLDER_NAME));
checkBox.setName(propertyMap.get(BatchFolderListDTO.FOLDER_NAME));
checkBox.setFormValue(propertyMap.get(BatchFolderListDTO.FOLDER_NAME));
checkBox.setEnabled(Boolean.parseBoolean(propertyMap.get(BatchFolderListDTO.ENABLED)));
checkBox.setChecked(Boolean.parseBoolean(propertyMap.get(BatchFolderListDTO.CHECKED)));
horizontalPanel.add(checkBox);
exportBatchClassViewPanel.add(horizontalPanel);
}
示例9: setFieldsList
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
/**
* To set Fields List.
*
* @param fields Collection<FieldTypeDTO>
* @return List<Record>
*/
public List<Record> setFieldsList(Collection<FieldTypeDTO> fields) {
List<Record> recordList = new LinkedList<Record>();
for (final FieldTypeDTO fieldTypeDTO : fields) {
CheckBox isHidden = new CheckBox();
CheckBox isMultiLine = new CheckBox();
CheckBox isReadOnly = new CheckBox();
isHidden.setValue(fieldTypeDTO.isHidden());
isHidden.setEnabled(false);
isMultiLine.setValue(fieldTypeDTO.isMultiLine());
isMultiLine.setEnabled(false);
isReadOnly.setValue(fieldTypeDTO.getIsReadOnly());
isReadOnly.setEnabled(false);
Record record = new Record(fieldTypeDTO.getIdentifier());
record.addWidget(fieldTypeListView.name, new Label(fieldTypeDTO.getName()));
record.addWidget(fieldTypeListView.description, new Label(fieldTypeDTO.getDescription()));
record.addWidget(fieldTypeListView.type, new Label(fieldTypeDTO.getDataType().name()));
record.addWidget(fieldTypeListView.fdOrder, new Label(fieldTypeDTO.getFieldOrderNumber()));
record.addWidget(fieldTypeListView.sampleValue, new Label(fieldTypeDTO.getSampleValue()));
record.addWidget(fieldTypeListView.barcode, new Label(fieldTypeDTO.getBarcodeType()));
record.addWidget(fieldTypeListView.isHidden, isHidden);
record.addWidget(fieldTypeListView.isMultiLine, isMultiLine);
record.addWidget(fieldTypeListView.isReadOnly, isReadOnly);
recordList.add(record);
}
return recordList;
}
示例10: createRecords
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
private List<Record> createRecords(Collection<BatchInstanceDTO> batchInstanceDTOs) {
List<Record> recordList = new LinkedList<Record>();
batchInstanceDTOMap.clear();
for (final BatchInstanceDTO batchInstanceDTO : batchInstanceDTOs) {
CheckBox checkBox = new CheckBox();
checkBox.setValue(batchInstanceDTO.isRemote());
checkBox.setEnabled(false);
Record record = new Record(batchInstanceDTO.getBatchIdentifier());
String[] priority = convertPriority(batchInstanceDTO.getPriority());
Label property = new Label(priority[0]);
record.addWidget(batchInstanceListView.priority, property);
property.setStyleName(priority[1]);
record.addWidget(batchInstanceListView.batchId, new Label(batchInstanceDTO.getBatchIdentifier()));
record.addWidget(batchInstanceListView.batchClassName, new Label(batchInstanceDTO.getBatchClassName()));
record.addWidget(batchInstanceListView.batchName, new Label(batchInstanceDTO.getBatchName()));
record.addWidget(batchInstanceListView.batchCreatedOn, new Label(batchInstanceDTO.getCreatedOn()));
record.addWidget(batchInstanceListView.batchUpdatedOn, new Label(batchInstanceDTO.getUploadedOn()));
record.addWidget(batchInstanceListView.currentUser, new Label(batchInstanceDTO.getCurrentUser()));
record.addWidget(batchInstanceListView.status, new Label(batchInstanceDTO.getStatus()));
record.addWidget(batchInstanceListView.isRemote, checkBox);
recordList.add(record);
batchInstanceDTOMap.put(batchInstanceDTO.getBatchIdentifier(), batchInstanceDTO);
}
if (recordList.isEmpty()) {
disableButtons();
}
return recordList;
}
示例11: populate
import com.google.gwt.user.client.ui.CheckBox; //導入方法依賴的package包/類
void populate(int row, AccountInfo i) {
CheckBox checkBox = new CheckBox();
table.setWidget(row, 1, checkBox);
checkBox.setEnabled(enabled);
table.setWidget(row, 2, AccountLinkPanel.create(i));
table.setText(row, 3, i.email());
final FlexCellFormatter fmt = table.getFlexCellFormatter();
fmt.addStyleName(row, 1, Gerrit.RESOURCES.css().iconCell());
fmt.addStyleName(row, 2, Gerrit.RESOURCES.css().dataCell());
fmt.addStyleName(row, 3, Gerrit.RESOURCES.css().dataCell());
setRowItem(row, i);
}