/** * The event handler for checkbox events. Expand/close all the nodes in pharmacy orders when * check/uncheck checkbox. */ public void onCheck$chkExpandAll() { if (log.isTraceEnabled()) { log.trace("onCheck : expand detail event fired"); } boolean expandAll = this.chkExpandAll.isChecked(); if (log.isDebugEnabled()) { log.debug("Expand Detail: " + expandAll); } AbstractRowRenderer.setExpandDetail(grid, expandAll); }
private void flagsChanged() { if (chkForceCreate != null) { boolean forceVisit = hasFlag(flags, EncounterFlag.FORCE); chkForceCreate.setChecked(forceVisit); chkForceCreate.setDisabled(forceVisit); } }
/** * Initializes the controller. Loads user preferences and properties. */ @Override protected void initializeController() { setMeshElement(grid, "grid"); super.initializeController(); grid.setRowRenderer(rowRenderer); boolean expandAll = getPropertyValue(Constants.PROPERTY_ID_EXPAND_DETAIL, Boolean.class, chkExpandAll != null && chkExpandAll.isChecked()); if (this.chkExpandAll != null) { this.chkExpandAll.setChecked(expandAll); } AbstractRowRenderer.setExpandDetail(grid, expandAll); if (grid.getColumns() != null) { RowComparator.autowireColumnComparators(grid.getColumns().getChildren()); } grid.setVflex("1"); }
public void render(Component comp, Writer out) throws IOException { final SmartWriter wh = new SmartWriter(out); final Checkbox self = (Checkbox) comp; final String uuid = self.getUuid(); wh.write("<span id=\"").write(uuid).write("\""); wh.write(" z.type=\"zul.btn.Ckbox\""); wh.write(self.getOuterAttrs()).write("><input type=\"checkbox\" id=\""); wh.write(uuid).write("!real\"").write(self.getInnerAttrs()); wh.write("/><label for=\"").write(uuid).write("!real\""); wh.write(self.getLabelAttrs()).write(" class=\""+self.getZclass()+"-cnt\"") .write(">").write(self.getImgTag()); new Out(self.getLabel()).render(out); wh.write("</label></span>"); } }
/** * Update the scheduled notification with new input values and send to the server, then close * the dialog if successful. */ public void onClick$btnOK() { if (validate()) { notification.setDeliveryDate(new FMDate(dtbDelivery.getDate())); notification.setDfn(chkAssociate.isChecked() ? (String) chkAssociate.getValue() : null); notification.setPatientName(chkAssociate.isChecked() ? lblPatient.getValue() : null); notification.setSubject(txtSubject.getValue()); notification.setPriority((Priority) cboPriority.getSelectedItem().getValue()); List<String> message = StrUtil.toList(txtMessage.getText()); if (service.scheduleNotification(notification, message, recipients)) { root.setAttribute("notification", notification); root.detach(); } else { PromptDialog.showError("@vistanotification.schedule.save.failure"); } } }
/** Sets the radio is checked and unchecked the others in the same radio * group ({@link Radiogroup}. */ public void setChecked(boolean checked) { if (checked != isChecked()) { super.setChecked(checked); fixSiblings(checked, false); } }
chkAssociate.setChecked(true); chkAssociate.setValue(notification.getDfn()); } else { Patient patient = PatientContext.getActivePatient(); IdentifierDt mrn = FhirUtil.getMRN(patient); lblPatient.setValue(name + " (" + (mrn == null ? "" : mrn.getValue()) + ")"); chkAssociate.setValue(patient.getId().getIdPart());
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); } }
Date dateLow = null; int row = selectedRow; boolean useAge = chkAge.isVisible() && chkAge.isChecked(); chart.clear(); int colcount = hdrVitals.getChildren().size() - 1; String pctileRPC = percentiles.get(testid); if (pctileRPC != null && chkPercentiles.isChecked()) { List<String> pctiles = broker.callRPCList(pctileRPC, null, testid, patient.getId().getIdPart(), DateUtils.addDays(dateLow, -3000), DateUtils.addDays(dateHigh, 3000), getDefaultUnits());
public void onCheck$chkZoom() { chart.options.chart.zoomType = chkZoom.isChecked() ? ZoomType.xy : null; chartData(); }
@Override protected boolean init(MainController mainController) { super.init(mainController); datEncounter.setDate(new Date()); lstLocation.setSelectedItem(null); cboServiceCategory.setSelectedItem(null); loadEncounterParticipants(new Encounter()); boolean forceVisit = EncounterFlag.hasFlag(mainController.flags, EncounterFlag.FORCE); chkForceCreate.setChecked(forceVisit); chkForceCreate.setDisabled(forceVisit); return true; }
public void onCheck$chkGrid() { int w = chkGrid.isChecked() ? 1 : 0; chart.getXAxis().gridLineWidth = w; chart.getYAxis().gridLineWidth = w; chartData(); }
/** * Pushes the alert to the alert manager. * * @param root The root component. */ private void pushAlert(Component root) { if (chkEvents.isChecked()) { eventManager.fireLocalEvent(IInfoPanel.ALERT_EVENT_NAME, root); } else { infoPanel.showAlert(root); } }
/** * Push a drop item to the info panel. */ public void onClick$btnPushDrop() { pushDrop(newListitem(chkAssociate.isChecked())); }
/** * Test alert. */ public void onClick$btnPushAlert() { pushAlert(newAlertitem(chkAssociate.isChecked())); }
/** * Pushes the item to the info panel. * * @param item The list item. */ private void pushDrop(Listitem item) { if (item != null) { if (chkEvents.isChecked()) { eventManager.fireLocalEvent(IInfoPanel.DROP_EVENT_NAME, item); } else { infoPanel.drop(item); } } }
@Override protected Encounter getEncounterInternal() { if (!isComplete()) { return null; } Listitem item = lstLocation.getSelectedItem(); String locid = item == null ? null : (String) item.getValue(); Location location = locid != null ? DomainFactoryRegistry.fetchObject(Location.class, locid) : null; Comboitem cboitem = cboServiceCategory.getSelectedItem(); String sc = cboitem == null ? null : (String) cboitem.getValue(); Date date = datEncounter.getDate(); Encounter encounter = EncounterUtil.create(mainController.patient, date, location, sc); if (chkForceCreate.isChecked()) { mainController.flags.add(EncounterFlag.FORCE); } else { mainController.flags.remove(EncounterFlag.FORCE); } return encounter; }
encounter = EncounterUtil.create(date, location, sc); if (chkForceCreate.isChecked()) { flags.add(EncounterFlag.FORCE); } else {