List of usage examples for com.vaadin.ui Panel Panel
public Panel()
From source file:gov.va.ehtac.appsonfhir.ui.FHIRChart.java
private Panel getProblemList() { Panel panel = new Panel(); panel.setCaption("Problem List"); panel.setWidth("80%"); panel.setHeight("100px"); return panel; }
From source file:gov.va.ehtac.appsonfhir.ui.FHIRChart.java
private Panel getMedications() { Panel panel = new Panel(); panel.setStyleName(Runo.LAYOUT_DARKER); panel.setCaption("Medications"); panel.setWidth("80%"); panel.setHeight("100px"); return panel; }
From source file:gov.va.ehtac.appsonfhir.ui.FHIRChart.java
private Panel getEncounters() { Panel panel = new Panel(); panel.setCaption("Encounters"); panel.setWidth("80%"); panel.setHeight("100px"); return panel; }
From source file:gov.va.ehtac.appsonfhir.ui.FHIRChart.java
private Panel getAllergies() { Panel panel = new Panel(); panel.setCaption("Recent Test Results"); panel.setWidth("80%"); panel.setHeight("100px"); return panel; }
From source file:gov.va.ehtac.appsonfhir.ui.FHIRChart.java
private Panel getTests() { Panel panel = new Panel(); panel.setCaption("Recent Results"); panel.setWidth("100%"); panel.setHeight("100px"); return panel; }
From source file:gov.va.ehtac.appsonfhir.ui.FHIRChart.java
private Panel getCarePlan() { Panel panel = new Panel(); panel.setCaption("Care Plan"); panel.setWidth("100%"); panel.setHeight("100px"); return panel; }
From source file:gov.va.ehtac.myappsonfhir.ui.FitnessWellness.java
public FitnessWellness() { session = ((HealthElementsForPatientTouchKitUI) UI.getCurrent()).getSessionAttributes(); setCaption("My Health Apps"); content = new VerticalComponentGroup(); this.setWidth("100%"); this.setHeight("100%"); if (dRequest.equals("chart")) { content.addComponent(getChartLayout()); } else if (dRequest.equals("raw")) { content.addComponent(getRawData()); } else {/*w w w . j a v a 2s . c o m*/ //this is a problem content.addComponent(new Panel()); } Button refresh = new Button(); refresh.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { try { dRequest = "chart"; refresh(); } catch (Exception ex) { ex.printStackTrace(); } } }); refresh.setImmediate(true); refresh.setIcon(FontAwesome.REFRESH); setRightComponent(refresh); setContent(new CssLayout(content)); }
From source file:gov.va.ehtac.myappsonfhir.ui.FitnessWellness.java
private void refresh() { content.removeAllComponents();//from w w w .j a va 2 s . c om if (dRequest.equals("chart")) { content.addComponent(getChartLayout()); } else if (dRequest.equals("raw")) { content.addComponent(getRawData()); } else { //this is a problem content.addComponent(new Panel()); } setContent(new CssLayout(content)); }
From source file:info.magnolia.ui.framework.overlay.OverlayPresenter.java
License:Open Source License
@Override public void openAlert(MessageStyleType type, String title, View body, String okButton, final AlertCallback callback) { final BaseDialog dialog = new LightDialog(); dialog.addStyleName(type.getCssClass()); dialog.addStyleName("alert"); dialog.setCaption(title);//from w w w. j a va 2s . c o m CompositeIcon icon = (CompositeIcon) Classes.getClassFactory().newInstance(type.getIconClass()); icon.setStyleName("dialog-icon"); dialog.setHeaderToolbar(icon); dialog.showCloseButton(); dialog.setContent(body.asVaadinComponent()); Panel shortcutPanel = new Panel(); shortcutPanel.setStyleName("shortcut-panel"); shortcutPanel.setHeight(100, Unit.PERCENTAGE); shortcutPanel.setWidth(100, Unit.PERCENTAGE); shortcutPanel.setContent(dialog); final OverlayCloser overlayCloser = openOverlay(new ViewAdapter(shortcutPanel), ModalityLevel.LIGHT); final ShortcutListener escapeShortcut = new ShortcutListener("Escape shortcut", ShortcutAction.KeyCode.ESCAPE, null) { @Override public void handleAction(Object sender, Object target) { callback.onOk(); dialog.closeSelf(); } }; shortcutPanel.addShortcutListener(escapeShortcut); addOkHandler(dialog, okButton, overlayCloser, callback); dialog.addDialogCloseHandler(createCloseHandler(overlayCloser)); }
From source file:info.magnolia.ui.framework.overlay.OverlayPresenter.java
License:Open Source License
@Override public void openConfirmation(MessageStyleType type, String title, View body, String confirmButton, String cancelButton, boolean cancelIsDefault, final ConfirmationCallback callback) { final ConfirmationDialog dialog = new ConfirmationDialog(body.asVaadinComponent(), confirmButton, cancelButton, cancelIsDefault); dialog.addStyleName(type.getCssClass()); dialog.addStyleName("confirmation"); dialog.setCaption(title);// w w w . j a v a2 s .c o m CompositeIcon icon = (CompositeIcon) Classes.getClassFactory().newInstance(type.getIconClass()); icon.setStyleName("dialog-icon"); dialog.setHeaderToolbar(icon); dialog.showCloseButton(); dialog.setContent(body.asVaadinComponent()); Panel shortcutPanel = new Panel(); shortcutPanel.setStyleName("shortcut-panel"); shortcutPanel.setHeight(100, Unit.PERCENTAGE); shortcutPanel.setWidth(100, Unit.PERCENTAGE); shortcutPanel.setContent(dialog); final OverlayCloser overlayCloser = openOverlay(new ViewAdapter(shortcutPanel), ModalityLevel.LIGHT); final ShortcutListener escapeShortcut = new ShortcutListener("Escape shortcut", ShortcutAction.KeyCode.ESCAPE, null) { @Override public void handleAction(Object sender, Object target) { callback.onCancel(); dialog.closeSelf(); } }; shortcutPanel.addShortcutListener(escapeShortcut); dialog.addConfirmationHandler(new ConfirmationDialog.ConfirmationEvent.Handler() { @Override public void onConfirmation(ConfirmationEvent event) { if (event.isConfirmed()) { callback.onSuccess(); } else { callback.onCancel(); } overlayCloser.close(); } }); dialog.addDialogCloseHandler(createCloseHandler(overlayCloser)); }