本文整理了Java中org.zkoss.zul.Button.setDisabled()
方法的一些代码示例,展示了Button.setDisabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setDisabled()
方法的具体详情如下:
包路径:org.zkoss.zul.Button
类名称:Button
方法名:setDisabled
[英]Sets whether it is disabled.
[中]设置是否禁用它。
代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.patientselection.v1
/**
* Update control states.
*/
private void updateControls() {
if (manageListMode) {
boolean filterSelected = lstManagedListFilter.getSelectedItem() != null;
boolean patientSelected = lstManagedList.getSelectedItem() != null;
btnManagedListFilterRename.setDisabled(!filterSelected);
btnManagedListFilterDelete.setDisabled(!filterSelected);
btnManagedListAddCurrent.setDisabled(!filterSelected || PatientContext.getActivePatient() == null);
btnManagedListAdd.setDisabled(!filterSelected || activePatient == null);
btnManagedListImport.setDisabled(!filterSelected || lstPatientList.getModel() == null);
btnManagedListRemove.setDisabled(!patientSelected);
btnManagedListRemoveAll.setDisabled(lstManagedList.getItemCount() == 0);
btnOK.setDisabled(false);
btnManageList.setDisabled(true);
} else {
btnManageList.setDisabled(activeList == null
|| (activeList.getItemManager() == null && activeList.getFilterManager() == null));
btnOK.setDisabled(activePatient == null);
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.notification
/**
* Update controls to reflect the current selection state.
*/
private void updateControls() {
btnModify.setDisabled(lstScheduled.getSelectedItem() == null);
btnDelete.setDisabled(btnModify.isDisabled());
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.anticoag
private void updateControls() {
btnAdd.setDisabled(encounter == null || EncounterUtil.isLocked(encounter));
AntiCoagRecord record = getSelectedValue();
boolean isLocked = record == null || record.getVisitLocked();
btnEdit.setDisabled(isLocked);
btnDelete.setDisabled(isLocked);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.core
private void updateControls() {
btnSelect.setDisabled(treeSearch.getSelectedCount() == 0);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.encounter
protected void statusChanged() {
mainController.btnOK.setDisabled(!isComplete());
}
代码示例来源:origin: org.zkoss.zk/zul
protected void updateByClient(String name, Object value) {
if ("disabled".equals(name))
setDisabled(value instanceof Boolean ? ((Boolean) value).booleanValue()
: "true".equals(Objects.toString(value)));
else
super.updateByClient(name, value);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.documents
/**
* Update the display count of selected documents.
*
* @param selCount The selection count.
*/
private void updateSelectCount(int selCount) {
if (selCount == 0) {
btnView.setLabel(lblBtnViewSelectAll);
btnClear.setDisabled(true);
} else {
btnView.setLabel(viewText + " (" + selCount + ")");
btnClear.setDisabled(false);
}
btnView.setDisabled(listBox.getItemCount() == 0);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.esig
private void update() {
int i = eSigService.getCount();
button.setDisabled(i == 0);
button.setTooltiptext(String.format("There %s %s item%s awaiting review.", i == 1 ? "is" : "are", i == 0 ? "no" : i,
i != 1 ? "s" : ""));
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.core
protected void doSearch(String searchText) {
searchText = searchText == null ? "" : StrUtil.xlate(searchText.toUpperCase(), StrUtil.U, "");
if (searchText.contains(" - ")) {
searchText = StrUtil.piece(searchText, " - ");
}
if (!searchText.isEmpty() || lookupParams.isLookupNull()) {
List<String> sRpc = executeRPC(searchText);
if (PCC.errorCheck(sRpc)) {
btnSelect.setDisabled(true);
//Collapse
//RunQuery = sRpc = ""
return;
}
btnSelect.setDisabled(false);
//Expand
loadResults(sRpc);
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.notification
/**
* Update controls to reflect the current selection state.
*
* @param processingUpdate If true, a processing status update has occurred.
*/
private void updateControls(boolean processingUpdate) {
btnAll.setDisabled(isProcessing || model.isEmpty());
btnDelete.setDisabled(isProcessing || !canDeleteSelected());
btnInfoAll.setDisabled(isProcessing || !hasInfoOnly());
btnSelected.setDisabled(isProcessing || model.getSelection().isEmpty());
btnForward.setDisabled(isProcessing || btnSelected.isDisabled());
radAll.setStyle(radAll.isChecked() ? BOLD : NO_BOLD);
radPatient.setStyle(radPatient.isChecked() ? BOLD : NO_BOLD);
if (processingUpdate) {
lstNotification.setDisabled(isProcessing);
ZKUtil.disableChildren(lstNotification, isProcessing);
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.encounter
/**
* Updated the active encounter selector when the tab selection has changed. Sends an activation
* signal to the previous and new selector.
*/
private void selectionChanged() {
if (selector != null) {
selector.activate(false);
btnOK.setDisabled(true);
}
selector = getSelector(tabbox.getSelectedPanel());
if (selector != null) {
selector.activate(true);
btnOK.setDisabled(!selector.isComplete());
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.documents
@Override
protected void setListModel(ListModel<Document> model) {
super.setListModel(model);
int docCount = model == null ? 0 : model.getSize();
lblInfo.setValue(docCount + " document(s)");
btnView.setDisabled(docCount == 0);
updateSelectCount(((Selectable<?>) model).getSelection().size());
}
代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.patientselection.v1
private void setActivePatient(Patient patient) {
// Build the demographic display here
activePatient = patient;
root.setAttribute(Constants.SELECTED_PATIENT_ATTRIB, activePatient);
ZKUtil.detachChildren(pnlDemoRoot);
if (patient != null && patientDetailRenderer != null) {
patientDetailRenderer.render(pnlDemoRoot, patient, this);
}
btnDemoDetail.setDisabled(activePatient == null);
updateControls();
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.skintest
private void updateControls() {
boolean b = PatientContext.getActivePatient() == null || !bgoSecurity.verifyWriteAccess(true);
TestItem test = getSelectedTest();
boolean locked = test == null ? true : test.isLocked();
boolean pending = test == null ? false : test.isPending();
btnAdd.setDisabled(b);
btnEdit.setDisabled(b || locked || !pending);
btnDelete.setDisabled(locked);
mnuAdd.setDisabled(btnAdd.isDisabled());
mnuEdit.setDisabled(btnEdit.isDisabled());
mnuDelete.setDisabled(btnDelete.isDisabled());
mnuVisitDetail.setDisabled(test == null || test.getEncounter() == null);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.problem
private void updateControls() {
boolean b = PatientContext.getActivePatient() == null || !bgoSecurity.verifyWriteAccess(true);
btnAdd.setDisabled(b);
btnEdit.setDisabled(b || lbProblems.getSelectedCount() == 0);
btnDelete.setDisabled(btnEdit.isDisabled());
mnuAdd.setDisabled(btnAdd.isDisabled());
mnuEdit.setDisabled(btnEdit.isDisabled());
mnuDelete.setDisabled(btnDelete.isDisabled());
btnPOV.setDisabled(true); //oEncounter.Prepare(ofNotLocked Or ofValidateOnly)
btnPOV.setVisible(allowAddPov);
mnuPOV.setDisabled(btnPOV.isDisabled());
mnuPOV.setVisible(btnPOV.isVisible());
mnuSetFilter.setDisabled(cboFilter.getSelectedIndex() == -1);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.vitals
private void refreshForm() {
modified = false;
noValidate = true;
tbar.setVisible(encounter != null);
panelchildren.setVisible(encounter != null);
if (encounter == null) {
return;
}
imgLocked.setVisible(encounter != null
&& encounter.getStatusElement().getValueAsEnum() == EncounterStateEnum.FINISHED);
btnNew.setDisabled(!imgLocked.isVisible());
btnCancel.setDisabled(btnNew.isDisabled());
btnOK.setDisabled(false);
lastDateTime = lastDateTime != null ? lastDateTime : useEncounterDate ? encounter.getPeriod().getStart()
: new FMDate();
loadGrid();
val = getValue(colIndex, rowIndex);
moveTo(rangeCol - 1, 1);
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-patientheader
private void setPatient(Patient patient) {
this.patient = patient;
hideLabels();
needsDetail = true;
ZKUtil.detachChildren(pnlDetail);
if (log.isDebugEnabled()) {
log.debug("patient: " + patient);
}
if (patient == null) {
lblName.setValue(noSelection);
lblName.setSclass("z-bandbox-disabled");
btnDetail.setDisabled(true);
return;
}
btnDetail.setDisabled(false);
patientName = FhirUtil.formatName(patient.getName());
String mrn = FhirUtil.getMRNString(patient);
lblName.setValue(patientName + (mrn.isEmpty() ? "" : " (" + mrn + ")"));
lblName.setSclass(null);
setLabel(lblDOB, formatDateAndAge(patient.getBirthDate()), lblDOBLabel);
setLabel(lblDOD, formatDOD(patient.getDeceased()), lblDODLabel);
setLabel(lblGender, patient.hasGender() ? patient.getGender().getDisplay() : null, null);
Clients.resize(root);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.esig
/**
* Update controls to reflect the current state.
*/
private void updateControls() {
int count = 0;
int total = 0;
for (Row row : grid.getAllRows()) {
if (!(row instanceof Group)) {
total++;
boolean isSelected = grid.isSelected(row);
if (isSelected) {
count++;
}
}
}
lblSelectionCount.setValue(" (" + count + "/" + total + ")");
btnOK.setDisabled(count == 0);
txtPassword.setDisabled(count == 0);
if (!txtPassword.isDisabled()) {
txtPassword.setFocus(true);
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.vitals
btnOK.setDisabled(!modified);
代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.patientselection.v1
activeList = list;
activeFilter = null;
btnFavorite.setDisabled(list == this.favorites);
boolean hasDateRange = (list != null && list.isDateRangeRequired());
lblDateRange.setVisible(hasDateRange);
内容来源于网络,如有侵权,请联系作者删除!