Example usage for com.vaadin.server FontAwesome BELL

List of usage examples for com.vaadin.server FontAwesome BELL

Introduction

In this page you can find the example usage for com.vaadin.server FontAwesome BELL.

Prototype

FontAwesome BELL

To view the source code for com.vaadin.server FontAwesome BELL.

Click Source Link

Usage

From source file:com.esofthead.mycollab.vaadin.ui.NotificationButton.java

License:Open Source License

public NotificationButton() {
    super();//from   w  w  w.  j  a  v  a2  s.co  m
    notificationItems = new ArrayList<>();
    notificationContainer = new VerticalLayout();
    notificationContainer.setMargin(true);
    this.setContent(notificationContainer);
    this.setIcon(FontAwesome.BELL);
    this.setStyleName("notification-button");

    addPopupVisibilityListener(this);
    EventBusFactory.getInstance().register(this);
}

From source file:com.esofthead.mycollab.vaadin.web.ui.NotificationComponent.java

License:Open Source License

public NotificationComponent() {
    super();/*from  w  w  w.j av  a  2 s  .  c om*/
    notificationItems = new ArrayList<>();
    notificationContainer = new VerticalLayout();
    new Restrain(notificationContainer).setMaxWidth("500px");
    this.setContent(notificationContainer);
    this.setIcon(FontAwesome.BELL);
    this.setStyleName("notification-button");

    addPopupVisibilityListener(this);
    EventBusFactory.getInstance().register(this);

    // Register to receive broadcasts
    NotificationBroadcaster.register(this);
    JavaScript.getCurrent().addFunction("com.mycollab.scripts.upgrade", new JavaScriptFunction() {
        @Override
        public void call(JsonArray arguments) {
            String version = arguments.getString(0);
            String installerFile = arguments.getString(1);
            String manualDownloadLink = arguments.getString(2);
            UI.getCurrent().addWindow(new UpgradeConfirmWindow(version, manualDownloadLink, installerFile));
        }
    });
}

From source file:com.logicbomb.newschool.MyAppWidgetSet.core.HourWidget.java

public HourWidget(int aHourNumber, int aTotalHourNumber) {
    setWidth("500px");
    setHeight("500px");
    //setStyleName("backColorGrey");

    String[] classes = { "VI", "VII", "VIII", "IX", "X" };
    int index1 = new Random().nextInt(classes.length);
    String selectedClass = (classes[index1]);

    String[] sections = { "A", "B", "C", "D", "E" };
    int index2 = new Random().nextInt(classes.length);
    String selectedSection = (sections[index2]);

    String[] content = { "Gravitation", "Lab", "Electricity", "Force", "Motion" };
    int index3 = new Random().nextInt(classes.length);
    String selectedContent = (content[index3]);

    //Button b= new Button("2");
    //addComponent(b);
    //c.setSizeFull();
    Button iMinorText = new Button(selectedContent);
    double redOrGreen = Math.random();
    if (Math.random() > 0.5) {
        iMinorText.setStyleName("v-button-type1-red");
    } else {/* w  w w .jav a2 s  .c  o m*/
        iMinorText.setStyleName("v-button-type1-green");
    }
    iMinorText.setHeight("40px");
    iMinorText.setWidth("125px");
    //c.setCaptionAsHtml(true);  kkk

    addComponent(iMinorText);//,"top:10px;left:10px");

    Label iMajorText = new Label(selectedClass + " - " + selectedSection);
    iMajorText.setStyleName("v-label-type1");
    iMajorText.setHeight("15px");
    iMajorText.setWidth("50px");
    addComponent(iMajorText, "top:2px;left:1px");

    double numberOfMemos = Math.floor(Math.random() * 5);
    //Diplay if any memo present
    NativeButton memoButton;
    if (numberOfMemos > 0) {
        memoButton = new NativeButton();//String.valueOf(numberOfMemos).replace(".0", ""));
        memoButton.setStyleName("v-button-type2");
        //memoButton.setHeight("15px");
        //memoButton.setWidth("30px");
        memoButton.setIcon(FontAwesome.PENCIL);
        addComponent(memoButton, "top:2px;left:85px");
    }

    double numberOfNotifications = Math.floor(Math.random() * 5);
    NativeButton notificationButton;
    if (numberOfNotifications > 0) {
        notificationButton = new NativeButton();//String.valueOf(numberOfNotifications).replace(".0", ""));
        notificationButton.setStyleName("v-button-type2");
        //notificationButton.setHeight("15px");
        //notificationButton.setWidth("30px");
        notificationButton.setIcon(FontAwesome.BELL);
        addComponent(notificationButton, "top:2px;left:100px");
    }

}

From source file:com.mycollab.vaadin.web.ui.NotificationComponent.java

License:Open Source License

public NotificationComponent() {
    notificationItems = new ConcurrentHashSet<>();
    notificationContainer = new VerticalLayout();
    new Restrain(notificationContainer).setMaxWidth("500px");
    this.setContent(notificationContainer);
    this.setIcon(FontAwesome.BELL);
    this.setStyleName("notification-button");

    addPopupVisibilityListener(this);
    EventBusFactory.getInstance().register(this);

    // Register to receive broadcasts
    JavaScript.getCurrent().addFunction("com.mycollab.scripts.upgrade", jsonArray -> {
        String version = jsonArray.getString(0);
        String installerFile = jsonArray.getString(1);
        String manualDownloadLink = jsonArray.getString(2);
        UI.getCurrent().addWindow(new UpgradeConfirmWindow(version, manualDownloadLink, installerFile));
    });/*from w  w w. j  a  va  2 s.c  o  m*/
}

From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentView.java

private void buildAppointmentStatus() {
    Label section = new Label("Estado");
    section.addStyleName(ValoTheme.LABEL_H4);
    section.addStyleName(ValoTheme.LABEL_COLORED);
    rootLayout.addComponent(section);//from   ww w  . j ava  2 s . co m

    status = new ComboBox();
    status.setContainerDataSource(containerStatuses);
    status.setWidth("100%");
    status.setTextInputAllowed(false);
    status.setNullSelectionAllowed(false);

    notifyChanges = new CheckBox();
    notifyChanges.setIcon(FontAwesome.BELL);
    notifyChanges.setImmediate(true);

    HorizontalLayout statusWrapper = new HorizontalLayout();
    statusWrapper.setCaption("Estado");
    statusWrapper.addComponent(status);
    statusWrapper.addComponent(notifyChanges);
    statusWrapper.setWidth("100%");
    statusWrapper.setExpandRatio(status, 1);
    rootLayout.addComponent(statusWrapper);

    statusNotes = new TextArea("Notas de estado");
    statusNotes.setWidth("100%");
    statusNotes.setInputPrompt("Anotaciones del estado...");
    rootLayout.addComponent(statusNotes);
}

From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadLayout.java

License:Open Source License

private void createProcessButton() {
    processBtn = SPUIComponentProvider.getButton(UIComponentIdProvider.UPLOAD_PROCESS_BUTTON,
            SPUILabelDefinitions.PROCESS, SPUILabelDefinitions.PROCESS, null, false, null,
            SPUIButtonStyleSmall.class);
    processBtn.setIcon(FontAwesome.BELL);
    processBtn.addStyleName(SPUIStyleDefinitions.ACTION_BUTTON);
    processBtn.addClickListener(this::displayConfirmWindow);
    processBtn.setHtmlContentAllowed(true);
    processBtn.setEnabled(false);//from   ww  w .j  av a  2s .com
}

From source file:org.eclipse.hawkbit.ui.common.footer.AbstractDeleteActionsLayout.java

License:Open Source License

private Button createActionsButton() {
    final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.PENDING_ACTION_BUTTON,
            getNoActionsButtonLabel(), "", "", false, FontAwesome.BELL, SPUIButtonStyleSmall.class);
    button.setStyleName(SPUIStyleDefinitions.ACTION_BUTTON);
    button.addStyleName(SPUIStyleDefinitions.DEL_ACTION_BUTTON);

    button.addClickListener(event -> actionButtonClicked());
    button.setHtmlContentAllowed(true);//from   ww w.  j av  a  2  s  .c o  m
    return button;
}

From source file:org.eclipse.hawkbit.ui.components.NotificationUnreadButton.java

License:Open Source License

/**
 * Constructor./*from   w w  w .  j  av a  2s  .  co  m*/
 * 
 * @param i18n
 *            i18n
 */
@Autowired
NotificationUnreadButton(final VaadinMessageSource i18n) {
    this.i18n = i18n;
    this.unreadNotifications = new ConcurrentHashMap<>();
    setIcon(FontAwesome.BELL);
    setId(UIComponentIdProvider.NOTIFICATION_UNREAD_ID);
    addStyleName(ValoTheme.BUTTON_SMALL);
    addStyleName(STYLE);
    setHtmlContentAllowed(true);
    setEnabled(false);
    createNotificationWindow();
    addClickListener(this::toggleWindow);
}