public Image(String src) { setSrc(src); }
/** * Initialize controller. */ @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); noSelectionMessage = lblLocation.getValue(); imgLocked.setSrc(Constants.ICON_LOCKED); committed(); }
/** * 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); }
@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)); } }
@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)); } }