Package com.vaadin.ui

Examples of com.vaadin.ui.Notification.show()


        // Notification
        Notification n = new Notification("Hey there!");
        n.setIcon(icon);
        n.setPosition(Position.BOTTOM_CENTER);
        n.setDelayMsec(300000);
        n.show(Page.getCurrent());

        // grid of compoents
        GridLayout gl = new GridLayout(4, 5);
        gl.setSpacing(true);
        layout.addComponent(gl);
View Full Code Here


        access(new Runnable() {
            @Override
            public void run() {
                Notification n = new Notification("Message received", message,
                        Type.TRAY_NOTIFICATION);
                n.show(getPage());
            }
        });

    }
View Full Code Here

            @Override
            public void buttonClick(ClickEvent event) {
                Notification notification = new Notification("Notification");
                notification.setDelayMsec(10000);
                notification.setPosition(Position.MIDDLE_LEFT);
                notification.show(getUI().getPage());
            }
        });
        addComponent(left);

        Button right = new Button("Show Notification in middle right");
View Full Code Here

            @Override
            public void buttonClick(ClickEvent event) {
                Notification notification = new Notification("Notification");
                notification.setDelayMsec(10000);
                notification.setPosition(Position.MIDDLE_RIGHT);
                notification.show(getUI().getPage());
            }
        });
        addComponent(right);

    }
View Full Code Here

        Notification n = new Notification(
                "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This should be a <br/><b>SEMI-TRANSPARENT</b><br/> notification",
                Type.WARNING_MESSAGE);
        n.setHtmlContentAllowed(true);
        n.show(Page.getCurrent());
    }

    @Override
    protected String getDescription() {
        // TODO Auto-generated method stub
View Full Code Here

            notificationConf.setAssistivePrefix(typeValue, prefix.getValue());
            notificationConf.setAssistivePostfix(typeValue, postfix.getValue());
            notificationConf.setAssistiveRole(typeValue,
                    (NotificationRole) role.getValue());

            n.show(Page.getCurrent());
        }
    }

    private class DefaultHandler implements ClickListener {
        @Override
View Full Code Here

        @Override
        public void buttonClick(ClickEvent event) {
            Notification n = new Notification(tf.getValue(),
                    (Type) type.getValue());
            n.setHtmlContentAllowed(true);
            n.show(Page.getCurrent());
        }
    }

}
View Full Code Here

    }

    @Override
    public void buttonClick(ClickEvent event) {
        Notification n = makeNotification();
        n.show(Page.getCurrent());
    }

    private Notification makeNotification() {
        Notification n = new Notification(captionField.getValue(),
                messageField.getValue(), Notification.TYPE_HUMANIZED_MESSAGE,
View Full Code Here

        if (styleName != null) {
            notification.setStyleName(styleName);
        }

        notification.setDelayMsec(-1);
        notification.show(parent.getUI().getPage());
    }

    @Override
    public void setStyleName(String style) {
        styleName = style;
View Full Code Here

            @Override
            public void menuSelected(MenuItem selectedItem) {
                Notification notification = new Notification("Test",
                        Type.HUMANIZED_MESSAGE);
                notification.show(Page.getCurrent());
            }
        });
        return menubar;
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.