@Override public void committed() { Patient patient = PatientContext.getActivePatient(); AImage image = patient == null ? null : Util.getImage(patient.getPhoto()); if (patient == null) { imgPhoto.setSrc(Util.NOPATIENT_IMAGE); imgPhoto.setTooltip((Popup) null); imgPhoto.setTooltiptext(Labels.getLabel("patientphoto.no.patient")); } else if (image == null) { imgPhoto.setSrc(Util.SILHOUETTE_IMAGE); imgPhoto.setTooltip((Popup) null); imgPhoto.setTooltiptext(Labels.getLabel("patientphoto.no.photo")); } else { imgPhoto.setContent(image); imgPhoto.setTooltiptext(null); imgPhoto.setTooltip(popup); imgFullPhoto.setContent(image); lblCaption.setValue( patient == null ? "" : FhirUtil.formatName(patient.getName(), NameUse.USUAL, NameUse.OFFICIAL, null)); } }
/** * Places the highlight indicator next to the specified notification. If the notification is not * found or is null, the indicator is hidden. * * @param notification Notification to highlight. */ protected void highlightNotification(Notification notification) { int i = notification == null ? -1 : model.indexOf(notification); if (i >= 0) { Listitem item = lstNotification.getItemAtIndex(i); imgIndicator.setParent(item.getFirstChild()); imgIndicator.setVisible(true); Clients.scrollIntoView(item); } else { imgIndicator.setVisible(false); } }
public void beforeChildAdded(Component newChild, Component refChild) { if (!(newChild instanceof Area)) throw new UiException("Unsupported child for imagemap: " + newChild); super.beforeChildAdded(newChild, refChild); } }
public Image(String src) { setSrc(src); }
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); }
/** Sets the content directly with the rendered image. * It actually encodes the rendered image to an PNG image * ({@link org.zkoss.image.Image}) with {@link Images#encode}, * and then invoke {@link #setContent(org.zkoss.image.Image)}. * * <p>If you want more control such as different format, quality, * and naming, you can use {@link Images} directly. * * @since 3.0.7 */ public void setContent(RenderedImage image) { try { setContent(image == null ? (org.zkoss.image.Image) null : Images.encode("a.png", image)); } catch (java.io.IOException ex) { throw new UiException(ex); } }
lblProvider.setValue(null); lblServiceCategory.setValue(null); imgLocked.setVisible(false); } else { String text = encounter.getLocation().isEmpty() ? "" : FhirUtil.getLast(encounter.getLocation()).toString(); lblProvider.setValue(provider == null ? null : provider.getName().toString()); lblServiceCategory.setValue(encounter.getType().toString()); imgLocked.setVisible(EncounterUtil.isLocked(encounter));
/** * Initialize controller. */ @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); noSelectionMessage = lblLocation.getValue(); imgLocked.setSrc(Constants.ICON_LOCKED); committed(); }
@Override public void committed() { Patient patient = PatientContext.getActivePatient(); AImage image = patient == null ? null : Util.getImage(patient.getPhoto()); if (patient == null) { imgPhoto.setSrc(Util.NOPATIENT_IMAGE); imgPhoto.setTooltip((Popup) null); imgPhoto.setTooltiptext(Labels.getLabel("patientphoto.no.patient")); } else if (image == null) { imgPhoto.setSrc(Util.SILHOUETTE_IMAGE); imgPhoto.setTooltip((Popup) null); imgPhoto.setTooltiptext(Labels.getLabel("patientphoto.no.photo")); } else { imgPhoto.setContent(image); imgPhoto.setTooltiptext(null); imgPhoto.setTooltip(popup); imgFullPhoto.setContent(image); lblCaption.setValue(patient == null ? "" : FhirUtil.formatName(patient.getName(), NameUseEnum.USUAL, NameUseEnum.OFFICIAL, null)); } }
/** * Update dependent UI elements when security domain selection has changed. */ private void domainChanged() { ISecurityDomain securityDomain = getSelectedSecurityDomain(); lblDomain.setValue(securityDomain.getName()); String logoUrl = securityDomain.getAttribute(Constants.PROP_LOGIN_LOGO); imgDomain.setSrc(logoUrl == null ? defaultLogoUrl : logoUrl); setMessageText(securityDomain.getAttribute(Constants.PROP_LOGIN_HEADER), lblHeader, htmlHeader, null); setMessageText(securityDomain.getAttribute(Constants.PROP_LOGIN_INFO), lblInfo, htmlInfo, divInfo); }