/** * 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); } }
/** * Update controls to reflect the current selection state. */ private void updateControls() { btnModify.setDisabled(lstScheduled.getSelectedItem() == null); btnDelete.setDisabled(btnModify.isDisabled()); }
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); }
private void updateControls() { btnSelect.setDisabled(treeSearch.getSelectedCount() == 0); }
protected void statusChanged() { mainController.btnOK.setDisabled(!isComplete()); }
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); }
/** * 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); }
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" : "")); }
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); } }
/** * 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); } }
/** * 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()); } }
@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()); }
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(); }
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); }
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); }
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); }
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); }
/** * 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); } }
activeList = list; activeFilter = null; btnFavorite.setDisabled(list == this.favorites); boolean hasDateRange = (list != null && list.isDateRangeRequired()); lblDateRange.setVisible(hasDateRange);