/** * Sets the panel style to use for the desktop. * * @param style The panel style. */ public void setStyle(ThemeUtil.PanelStyle style) { this.style = style; desktopOuter.addClass("cwf-desktop " + style.getThemeClass()); }
/** * Applies one or more theme classes to a component. * * @param component Component to receive the theme classes. * @param themeClasses A list of theme classes to apply. */ public static void applyThemeClass(BaseUIComponent component, IThemeClass... themeClasses) { StringBuilder sb = new StringBuilder(); for (IThemeClass themeClass : themeClasses) { String cls = themeClass == null ? null : themeClass.getThemeClass(); if (cls != null) { sb.append(sb.length() > 0 ? " " : "").append(themeClass.getThemeClass()); } } component.addClass(sb.toString()); }
/** * Applies one or more theme classes to a component. * * @param component Component to receive the theme classes. * @param themeClasses A list of theme classes to apply. */ public static void applyThemeClass(BaseUIComponent component, IThemeClass... themeClasses) { StringBuilder sb = new StringBuilder(); for (IThemeClass themeClass : themeClasses) { String cls = themeClass == null ? null : themeClass.getThemeClass(); if (cls != null) { sb.append(sb.length() > 0 ? " " : "").append(themeClass.getThemeClass()); } } component.addClass(sb.toString()); }
private void updateClass() { String sclass = state == State.COUNTDOWN ? SCLASS_COUNTDOWN : SCLASS_IDLE; sclass = "mode:" + mode.format(sclass); if (shutdown) { sclass += " cwf-sessionmonitor-shutdown"; } timeoutWindow.addClass(sclass); timeoutWindow.setVisible(mode != Mode.BASELINE || state != State.INITIAL); }
public SavedState(BaseUIComponent component) { this.component = component; hint = component.getHint(); contextMenu = component.getContext(); component.setAttribute(SAVED_STATE, this); component.addClass("cwf-designmode-active"); }
private void updateCountdown() { if (state == State.COUNTDOWN) { String s = nextMode().getLabel(TIMEOUT_WARNING, DateUtil.formatDuration(countdown, TimeUnit.SECONDS)); lblDuration.setLabel(s); timeoutPanel.addClass("alert:" + (countdown <= 10000 ? "alert-danger" : "alert-warning")); } }
/** * Render detail view for the specified patient. * * @param patient Patient whose detail view is to be rendered. */ @Override public BaseUIComponent render(Patient patient) { BaseUIComponent root = new Div(); root.addClass("fujion-layout-vertical text-center"); root.addStyle("align-items", "center"); if (confirmAccess(patient, root)) { renderDemographics(patient, root); } return root; }
@Override public void afterInitialized(BaseComponent root) { window = (Window) root; shared = defaultIsShared(); boolean manage = root.getAttribute("manage", false); window.setTitle(StrUtil.formatMessage(manage ? CAP_LAYOUT_MANAGE : CAP_LAYOUT_LOAD)); lblPrompt.setLabel(StrUtil.formatMessage(manage ? MSG_LAYOUT_MANAGE : MSG_LAYOUT_LOAD)); modelAndView = lstLayouts.getModelAndView(String.class); modelAndView.setRenderer(renderer); pnlSelect.setVisible(!manage); tbManage.setVisible(manage); ((Radiobutton) radioGroup.getChildAt(shared ? 0 : 1)).setChecked(true); pnlScope.addClass(manage ? "pull-right" : "pull-left"); upload.bind(btnImport); refresh(root.getAttribute("dflt", "")); }
@Override public void afterInitialized(BaseComponent comp) { this.root = (Window) comp; root.setAttribute("controller", this); control = (DialogControl<?>) root.getAttribute("control"); root.setTitle(control.getTitle()); icon.addClass(control.getIconClass()); message.addClass(control.getTextClass()); message.setLabel(control.getMessage()); root.addClass(control.getPanelClass()); chkRemember.setVisible(root.hasAttribute("remember")); root.setOnCanClose(() -> { control.callback(response); return true; }); if (control.getFormat() == ChoiceFormat.BUTTONS) { processButtonResponses(); } else { processListResponses(); } }