Example usage for com.vaadin.server FontAwesome CLOUD_DOWNLOAD

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

Introduction

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

Prototype

FontAwesome CLOUD_DOWNLOAD

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

Click Source Link

Usage

From source file:com.hybridbpm.ui.view.DevelopmentView.java

License:Apache License

public DevelopmentView() {
    Design.read(this);
    Responsive.makeResponsive(panelLayout);

    moduleType.addContainerProperty("NAME", String.class, null);
    moduleType.addItem(Boolean.FALSE).getItemProperty("NAME").setValue("Module");
    moduleType.addItem(Boolean.TRUE).getItemProperty("NAME").setValue("Template");
    moduleType.setItemCaptionMode(AbstractSelect.ItemCaptionMode.PROPERTY);
    moduleType.setItemCaptionPropertyId("NAME");
    moduleType.setValue(Boolean.FALSE);
    moduleType.addValueChangeListener(this);

    btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
    btnAdd.addClickListener(this);

    btnRefresh.setIcon(FontAwesome.REFRESH);
    btnRefresh.addClickListener(this);

    btnExport.setIcon(FontAwesome.CLOUD_UPLOAD);
    btnExport.addClickListener(this);

    btnImport.setIcon(FontAwesome.CLOUD_DOWNLOAD);
    btnImport.addClickListener(this);

    btnRegenerate.setIcon(FontAwesome.WRENCH);
    btnRegenerate.addClickListener(this);

    modulesLayout.setMargin(new MarginInfo(true, false, false, false));
    modulesLayout.setExpandRatio(modulesTable, 1f);

    modulesTable.addContainerProperty("title", Component.class, null, "Title", null, Table.Align.LEFT);
    modulesTable.setColumnExpandRatio("title", 1f);
    modulesTable.addContainerProperty("updateDate", Date.class, null, "Update Date", null, Table.Align.LEFT);
    modulesTable.addContainerProperty("actions", TableButtonBar.class, null, "Actions", null, Table.Align.LEFT);
    modulesTable.setColumnWidth("updateDate", 150);
    modulesTable.setColumnWidth("actions", 80);
    modulesTable.addGeneratedColumn("updateDate", new DateColumnGenerator());
    modulesTable.setVisibleColumns("title", "updateDate", "actions");
}

From source file:org.eclipse.hawkbit.ui.management.actionhistory.ActionHistoryTable.java

License:Open Source License

/**
 * Get status icon./*from  w  w w  . j  a  va2  s.  c o m*/
 *
 * @param status
 *            as Status
 * @return Label as UI
 */
private Label getStatusIcon(final Action.Status status) {
    final Label label = new LabelBuilder().name("").buildLabel();
    final String statusIconPending = "statusIconPending";
    label.setContentMode(ContentMode.HTML);
    if (Action.Status.FINISHED == status) {
        label.setDescription(i18n.get("label.finished"));
        label.setStyleName(STATUS_ICON_GREEN);
        label.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
    } else if (Action.Status.ERROR == status) {
        label.setDescription(i18n.get("label.error"));
        label.setStyleName("statusIconRed");
        label.setValue(FontAwesome.EXCLAMATION_CIRCLE.getHtml());
    } else if (Action.Status.WARNING == status) {
        label.setStyleName("statusIconOrange");
        label.setDescription(i18n.get("label.warning"));
        label.setValue(FontAwesome.EXCLAMATION_CIRCLE.getHtml());
    } else if (Action.Status.RUNNING == status) {
        // dynamic spinner
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.running"));
        label.setValue(FontAwesome.ADJUST.getHtml());
    } else if (Action.Status.CANCELING == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.cancelling"));
        label.setValue(FontAwesome.TIMES_CIRCLE.getHtml());
    } else if (Action.Status.CANCELED == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.cancelled"));
        label.setStyleName(STATUS_ICON_GREEN);
        label.setValue(FontAwesome.TIMES_CIRCLE.getHtml());
    } else if (Action.Status.RETRIEVED == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.retrieved"));
        label.setValue(FontAwesome.CIRCLE_O.getHtml());
    } else if (Action.Status.DOWNLOAD == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.download"));
        label.setValue(FontAwesome.CLOUD_DOWNLOAD.getHtml());
    } else if (Action.Status.SCHEDULED == status) {
        label.setStyleName(statusIconPending);
        label.setDescription(i18n.get("label.scheduled"));
        label.setValue(FontAwesome.HOURGLASS_1.getHtml());
    } else {
        label.setDescription("");
        label.setValue("");
    }
    return label;

}