Package com.vaadin.ui

Examples of com.vaadin.ui.Notification


      private static final long serialVersionUID = 812750122135440314L;

      @Override
      public void buttonClick(ClickEvent event) {
        // TODO Auto-generated method stub
        Notification nota = new Notification("", Type.TRAY_NOTIFICATION);
        nota.setPosition(Position.BOTTOM_LEFT);
        nota.setDescription("Refrescando contenido...");
        nota.setIcon(event.getButton().getIcon());
        nota.setDelayMsec(Notification.DELAY_NONE);
        nota.show(getUI().getPage());
      }
    });

    addComponent(btnRefresh);
View Full Code Here


    return saneo.trim();
  }

  public static void showNotifiSave(boolean isSave) {
    if (isSave) {
      Notification nota = new Notification("<b>Nota:</b>",
          "Datos grabados correctamente...", Type.TRAY_NOTIFICATION,
          true);
      nota.setPosition(Position.BOTTOM_LEFT);
      nota.show(UI.getCurrent().getPage());
    } else {
      Notification nota = new Notification("<b>Nota:</b>",
          "Cambios no pudeiron grabarse correctamente<br/>"
              + "Intente nuevamente...", Type.WARNING_MESSAGE,
          true);
      nota.setPosition(Position.BOTTOM_LEFT);
      nota.show(UI.getCurrent().getPage());
    }

  }
View Full Code Here

        // Paint notifications
        if (notifications != null) {
            target.startTag("notifications");
            for (final Iterator<Notification> it = notifications.iterator(); it
                    .hasNext();) {
                final Notification n = it.next();
                target.startTag("notification");
                if (n.getCaption() != null) {
                    target.addAttribute(
                            UIConstants.ATTRIBUTE_NOTIFICATION_CAPTION,
                            n.getCaption());
                }
                if (n.getDescription() != null) {
                    target.addAttribute(
                            UIConstants.ATTRIBUTE_NOTIFICATION_MESSAGE,
                            n.getDescription());
                }
                if (n.getIcon() != null) {
                    target.addAttribute(
                            UIConstants.ATTRIBUTE_NOTIFICATION_ICON,
                            n.getIcon());
                }
                if (!n.isHtmlContentAllowed()) {
                    target.addAttribute(
                            UIConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED,
                            true);
                }
                target.addAttribute(
                        UIConstants.ATTRIBUTE_NOTIFICATION_POSITION, n
                                .getPosition().ordinal());
                target.addAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_DELAY,
                        n.getDelayMsec());
                if (n.getStyleName() != null) {
                    target.addAttribute(
                            UIConstants.ATTRIBUTE_NOTIFICATION_STYLE,
                            n.getStyleName());
                }
                target.endTag("notification");
            }
            target.endTag("notifications");
            notifications = null;
View Full Code Here

        // Paint notifications
        if (notifications != null) {
            target.startTag("notifications");
            for (final Iterator<Notification> it = notifications.iterator(); it
                    .hasNext();) {
                final Notification n = it.next();
                target.startTag("notification");
                if (n.getCaption() != null) {
                    target.addAttribute(
                            UIConstants.ATTRIBUTE_NOTIFICATION_CAPTION,
                            n.getCaption());
                }
                if (n.getDescription() != null) {
                    target.addAttribute(
                            UIConstants.ATTRIBUTE_NOTIFICATION_MESSAGE,
                            n.getDescription());
                }
                if (n.getIcon() != null) {
                    target.addAttribute(
                            UIConstants.ATTRIBUTE_NOTIFICATION_ICON,
                            n.getIcon());
                }
                if (!n.isHtmlContentAllowed()) {
                    target.addAttribute(
                            UIConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED,
                            true);
                }
                target.addAttribute(
                        UIConstants.ATTRIBUTE_NOTIFICATION_POSITION, n
                                .getPosition().ordinal());
                target.addAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_DELAY,
                        n.getDelayMsec());
                if (n.getStyleName() != null) {
                    target.addAttribute(
                            UIConstants.ATTRIBUTE_NOTIFICATION_STYLE,
                            n.getStyleName());
                }
                target.endTag("notification");
            }
            target.endTag("notifications");
            notifications = null;
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Notification

Copyright © 2018 www.massapicom. 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.