/** * Enables selection of the institution. */ private void allowOrganizationSelection() { institutionList.setVisible(true); institutionButton.setVisible(false); }
/** * Enables/disables selection of the domain. */ private void setDomainSelectionMode(DomainSelectionMode mode) { cmpDomainList.setVisible(mode == DomainSelectionMode.ALLOW); divDomain.setVisible(mode == DomainSelectionMode.OPTIONAL); }
/** * Close the main dialog. */ private void close() { root.setVisible(false); }
public void setValue(Component cmp, Boolean visible) { cmp.setVisible(visible); }
/** * Closes (hides) the processing dialog. */ private void close() { root.setVisible(false); iterator = null; mainController.setProcessing(false); }
/** * Close the main dialog. */ private void close() { getParent().setVisible(false); }
private void hideLabels() { for (Component child : tbPatient.getChildren()) { if (child instanceof Label && child != lblName) { child.setVisible(false); } } }
private void setEventType(EventType eventType) { switch (eventType) { case HISTORICAL: radHistorical.setChecked(true); fraHistorical.setVisible(true); fraCurrent.setVisible(false); enableResultItems("", "POSITIVE", "NEGATIVE", "DOUBTFUL", "NO TAKE"); break; case CURRENT: fraHistorical.setVisible(false); fraCurrent.setVisible(true); radCurrent.setChecked(true); enableResultItems("PENDING", "POSITIVE", "NEGATIVE", "DOUBTFUL", "NO TAKE"); break; case REFUSAL: radRefusal.setChecked(true); fraHistorical.setVisible(false); fraCurrent.setVisible(false); enableResultItems("", "REFUSED"); break; } }
/** * Displays the specified message text on the form. * * @param text Message text to display. */ private void showMessage(String text) { lblMessage.setValue(text); lblMessage.getParent().setVisible(!StringUtils.isEmpty(text)); }
private void updateControls() { boolean visible = radYes.isSelected(); boolean first = true; for (Component row : rows.getChildren()) { row.setVisible(first || visible); first = false; } pnlGoalOther.setVisible("other".equalsIgnoreCase(cboGoal.getValue())); Clients.resize(pnlGoalOther); }
/** * Disable all user input elements. * * @param text Status text to display. */ private void showStatus(String text) { lblStatus.setValue(text); loginPrompts.setVisible(false); lblStatus.setVisible(true); }
/** * Disable all user input elements. * * @param text State text to display. */ private void showState(final String text) { lblState.setValue(text); loginPrompts.setVisible(false); lblState.setVisible(true); }
private void setLabel(Label label, String value, Component associatedComponent) { label.setValue(value); label.setVisible(value != null && !value.isEmpty()); if (associatedComponent != null) { associatedComponent.setVisible(label.isVisible()); } }
/** * Forward the action to the listener. * * @param action Action to forward. */ protected void onAction(Action action) { root.setVisible(action == Action.VIEW); if (action != null && actionListener != null) { try { actionListener.onEvent(new ActionEvent(notification, action)); } catch (Exception e) { throw MiscUtil.toUnchecked(e); } } } }
private void showMessage(String message) { initGrid(0, 0); Listcell cell = getCell(0, 0); cell.setLabel(message); cell.getParent().setVisible(true); }
/** * Process the next notification. If there are no more notifications, cancel processing. If this * is the last notification, hide this dialog before processing the notification. */ private void doNext() { if (iterator == null || !iterator.hasNext()) { cancelProcessing(); return; } Notification notification = iterator.next(); caption.setLabel(StrUtil.getLabel("vistanotification.processing.caption", ++currentIndex, total)); caption.setTooltiptext(notification.getDisplayText()); if (!iterator.hasNext()) { close(); } else { root.setVisible(true); } process(notification); }
/** * Sets the message text to the specified value. If the text starts with an html tag, it will be * rendered as such. * * @param value The message text. * @param plainText Component to display plain text. * @param htmlText Component to display html. * @param parent If not null, parent will be hidden if text is empty. */ private void setMessageText(String value, Label plainText, Html htmlText, Component parent) { value = StringUtils.trimToEmpty(value); boolean isHtml = StringUtils.startsWithIgnoreCase(value, "<html>"); boolean notEmpty = !value.isEmpty(); plainText.setVisible(notEmpty && !isHtml); htmlText.setVisible(notEmpty && isHtml); if (parent != null) { parent.setVisible(notEmpty); } if (isHtml) { htmlText.setContent(value); } else { plainText.setValue(value); } }
/** * Displays a message to client. * * @param message Message to display to client. If null, message label is hidden. * @param isError If true, highlight the message to indicate an error. */ public void showMessage(String message, boolean isError) { showBusy(null); message = StrUtil.formatMessage(message); boolean show = message != null; if (lblMessage != null) { lblMessage.setVisible(show); lblMessage.setValue(show ? message : ""); ZKUtil.toggleSclass(lblMessage, "alert-danger", "alert-warning", isError); } if (hideOnShowMessage != null) { hideOnShowMessage.setVisible(!show); } }
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); }
/** * Process a single notification. * * @param notification Notification to display. * @param message Optional message text to display. If null, the message text associated with * the notification is displayed. */ public void process(Notification notification, String message) { if (notification != null) { this.notification = notification; lblHeader.setValue(notification.getSubject()); txtMessage.setText(message != null ? message : StrUtil.fromList(service.getNotificationMessage(notification))); txtMessage.setVisible(!txtMessage.getText().isEmpty()); btnDelete.setDisabled(!notification.canDelete()); btnDeleteAll.setDisabled(notification.isActionable() || btnDelete.isDisabled()); btnSkipAll.setDisabled(notification.isActionable()); btnView.setDisabled(!notification.hasPatient()); caption.setLabel(notification.hasPatient() ? notification.getPatientName() : defaultTitle); txtMessage.invalidate(); root.setVisible(true); } else { onAction(null); } }