List of usage examples for com.vaadin.ui Notification show
public static Notification show(String caption, Type type)
From source file:com.etest.global.ShowErrorNotification.java
public static void warning(String warning) { Notification.show(warning, Notification.Type.WARNING_MESSAGE); }
From source file:com.etest.global.ShowErrorNotification.java
public static void tray(String tray) { Notification.show(tray, Notification.Type.TRAY_NOTIFICATION); }
From source file:com.etest.view.systemadministration.curriculum.CurriculumFormWindow.java
void requiredAllFields() { Notification.show("Fill up all Fields!", Notification.Type.ASSISTIVE_NOTIFICATION); }
From source file:com.etest.view.systemadministration.CurriculumMainUI.java
void requiredAllFields() { Notification.show("Fill up all Fields!", Notification.Type.WARNING_MESSAGE); }
From source file:com.etest.view.systemadministration.faculty.FacultyFormWindow.java
void requiredAllFields() { Notification.show("Required All Fields!", Notification.Type.WARNING_MESSAGE); }
From source file:com.etest.view.systemadministration.SemestralTeamUI.java
void requiredAllFields() { Notification.show("Required All Fields", Notification.Type.ERROR_MESSAGE); }
From source file:com.etest.view.testbank.CellCaseWindow.java
Window modifyCaseWindow(CellCase cellCase) { VerticalLayout v = new VerticalLayout(); v.setWidth("100%"); v.setMargin(true);/*ww w .j a v a 2 s.c o m*/ v.setSpacing(true); Window sub = new Window("MODIFY"); sub.setWidth("400px"); sub.setModal(true); sub.center(); ComboBox actionDone = new ComboBox("Action: "); actionDone.setWidth("70%"); actionDone.addStyleName(ValoTheme.COMBOBOX_SMALL); actionDone.setNullSelectionAllowed(false); actionDone.addItem("resolved"); actionDone.addItem("clarified"); actionDone.addItem("modified"); actionDone.setImmediate(true); v.addComponent(actionDone); TextArea remarks = new TextArea("Remarks: "); remarks.setWidth("100%"); remarks.setRows(3); v.addComponent(remarks); Button modify = new Button("UPDATE"); modify.setWidth("70%"); modify.setIcon(FontAwesome.EDIT); modify.addStyleName(ValoTheme.BUTTON_PRIMARY); modify.addStyleName(ValoTheme.BUTTON_SMALL); modify.addClickListener((Button.ClickEvent event) -> { if (remarks.getValue() == null || remarks.getValue().trim().isEmpty()) { Notification.show("Add remarks!", Notification.Type.WARNING_MESSAGE); return; } if (actionDone.getValue() == null) { Notification.show("Add action!", Notification.Type.WARNING_MESSAGE); return; } cellCase.setActionDone(actionDone.getValue().toString()); cellCase.setRemarks(remarks.getValue().trim()); boolean result = ccs.modifyCellCase(cellCase); if (result) { Notification.show("Case has been Modified!", Notification.Type.TRAY_NOTIFICATION); sub.close(); close(); } }); v.addComponent(modify); sub.setContent(v); sub.getContent().setHeightUndefined(); return sub; }
From source file:com.etest.view.testbank.cellitem.CellItemWindow.java
void requiredAllOptions() { Notification.show("Fill up all Options!", Notification.Type.WARNING_MESSAGE); }
From source file:com.etest.view.testbank.cellitem.CellItemWindow.java
Window modifyCellItemWindow(CellItem ci) { VerticalLayout v = new VerticalLayout(); v.setWidth("100%"); v.setMargin(true);// w w w. j a v a2s . c om v.setSpacing(true); Window sub = new Window("MODIFY"); sub.setWidth("400px"); sub.setModal(true); sub.center(); ComboBox actionDone = new ComboBox("Action: "); actionDone.setWidth("70%"); actionDone.addStyleName(ValoTheme.COMBOBOX_SMALL); actionDone.setNullSelectionAllowed(false); actionDone.addItem("resolved"); actionDone.addItem("clarified"); actionDone.addItem("modified"); actionDone.setImmediate(true); v.addComponent(actionDone); TextArea remarks = new TextArea("Remarks: "); remarks.setWidth("100%"); remarks.setRows(3); v.addComponent(remarks); Button modify = new Button("UPDATE"); modify.setWidth("70%"); modify.setIcon(FontAwesome.EDIT); modify.addStyleName(ValoTheme.BUTTON_PRIMARY); modify.addStyleName(ValoTheme.BUTTON_SMALL); modify.addClickListener((Button.ClickEvent event) -> { if (remarks.getValue() == null || remarks.getValue().trim().isEmpty()) { Notification.show("Add remarks!", Notification.Type.WARNING_MESSAGE); return; } if (actionDone.getValue() == null) { Notification.show("Add action!", Notification.Type.WARNING_MESSAGE); return; } ci.setRemarks(remarks.getValue().trim()); ci.setActionDone(actionDone.getValue().toString()); boolean result = cis.modifyCellItem(ci); if (result) { sub.close(); close(); } }); v.addComponent(modify); sub.setContent(v); sub.getContent().setHeightUndefined(); return sub; }
From source file:com.etest.view.testbank.cellitem.CellItemWindow.java
Window modifyKeyWindow(int itemKeyId, int cellItemId, String keyValue, String optionValue, boolean isOptionKeyExist) { VerticalLayout v = new VerticalLayout(); v.setWidth("100%"); v.setMargin(true);//w w w .j av a2 s .c om v.setSpacing(true); Window sub = new Window("MODIFY"); sub.setWidth("400px"); sub.setModal(true); sub.center(); ComboBox actionDone = new ComboBox("Action: "); actionDone.setWidth("70%"); actionDone.addStyleName(ValoTheme.COMBOBOX_SMALL); actionDone.setNullSelectionAllowed(false); actionDone.addItem("resolved"); actionDone.addItem("clarified"); actionDone.addItem("modified"); actionDone.setImmediate(true); v.addComponent(actionDone); TextArea remarks = new TextArea("Remarks: "); remarks.setWidth("100%"); remarks.setRows(3); v.addComponent(remarks); Button modify = new Button("UPDATE"); modify.setWidth("70%"); modify.setIcon(FontAwesome.EDIT); modify.addStyleName(ValoTheme.BUTTON_PRIMARY); modify.addStyleName(ValoTheme.BUTTON_SMALL); modify.addClickListener((Button.ClickEvent event) -> { if (remarks.getValue() == null || remarks.getValue().trim().isEmpty()) { Notification.show("Add remarks!", Notification.Type.WARNING_MESSAGE); return; } if (actionDone.getValue() == null) { Notification.show("Add action!", Notification.Type.WARNING_MESSAGE); return; } boolean result = k.modifyItemKey(itemKeyId, cellItemId, keyValue, optionValue, isOptionKeyExist, remarks.getValue().trim(), actionDone.getValue().toString()); if (result) { Notification.show("Key SUCCESSFULLY modified", Notification.Type.TRAY_NOTIFICATION); sub.close(); } }); v.addComponent(modify); sub.setContent(v); sub.getContent().setHeightUndefined(); return sub; }