Example usage for com.vaadin.server FontAwesome EXPAND

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

Introduction

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

Prototype

FontAwesome EXPAND

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

Click Source Link

Usage

From source file:org.eclipse.hawkbit.ui.artifacts.details.ArtifactDetailsLayout.java

License:Open Source License

private SPUIButton createMaxMinButton() {
    final SPUIButton button = (SPUIButton) SPUIComponentProvider.getButton(
            SPUIDefinitions.EXPAND_ACTION_HISTORY, "", i18n.getMessage(UIMessageIdProvider.TOOLTIP_MAXIMIZE),
            null, true, FontAwesome.EXPAND, SPUIButtonStyleNoBorder.class);
    button.addClickListener(event -> maxArtifactDetails());
    return button;

}

From source file:org.eclipse.hawkbit.ui.artifacts.details.ArtifactDetailsLayout.java

License:Open Source License

private void showMaxIcon() {
    maxMinButton.toggleIcon(FontAwesome.EXPAND);
    maxMinButton.setData(Boolean.FALSE);
    maxMinButton.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_MAXIMIZE));
}

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

License:Open Source License

protected void clearWindow() {
    errorOccured = false;//from   ww  w  .j a  v  a 2  s  . c o m
    uploads.removeAllItems();
    setWindowMode(WindowMode.NORMAL);
    setColumnWidth();
    setPopupSizeInMinMode();
    resizeButton.setIcon(FontAwesome.EXPAND);
    this.close();
    artifactUploadState.getUploadedFileStatusList().clear();
    artifactUploadState.getNumberOfFileUploadsFailed().set(0);
}

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

License:Open Source License

private Button getResizeButton() {
    final Button resizeBtn = SPUIComponentProvider.getButton(
            UIComponentIdProvider.UPLOAD_STATUS_POPUP_RESIZE_BUTTON_ID, "", "", "", true, FontAwesome.EXPAND,
            SPUIButtonStyleSmallNoBorder.class);
    resizeBtn.addStyleName(ValoTheme.BUTTON_BORDERLESS);
    resizeBtn.addClickListener(event -> resizeWindow(event));
    return resizeBtn;
}

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

License:Open Source License

private void resizeWindow(final ClickEvent event) {
    if (FontAwesome.EXPAND.equals(event.getButton().getIcon())) {
        event.getButton().setIcon(FontAwesome.COMPRESS);
        setWindowMode(WindowMode.MAXIMIZED);
        resetColumnWidth();/*  ww  w  . j  ava 2  s  .  c  om*/
        grid.getColumn(STATUS).setExpandRatio(0);
        grid.getColumn(PROGRESS).setExpandRatio(1);
        grid.getColumn(FILE_NAME).setExpandRatio(2);
        grid.getColumn(REASON).setExpandRatio(3);
        grid.getColumn(SPUILabelDefinitions.NAME_VERSION).setExpandRatio(4);
        mainLayout.setSizeFull();
    } else {
        event.getButton().setIcon(FontAwesome.EXPAND);
        setWindowMode(WindowMode.NORMAL);
        setColumnWidth();
        setPopupSizeInMinMode();
    }
}

From source file:org.eclipse.hawkbit.ui.common.table.AbstractTableHeader.java

License:Open Source License

private SPUIButton createMaxMinIcon() {
    final SPUIButton button = (SPUIButton) SPUIComponentProvider.getButton(getMaxMinIconId(), "",
            i18n.getMessage(UIMessageIdProvider.TOOLTIP_MAXIMIZE), null, false, FontAwesome.EXPAND,
            SPUIButtonStyleNoBorder.class);
    button.addClickListener(event -> maxMinButtonClicked());
    return button;
}

From source file:org.eclipse.hawkbit.ui.common.table.AbstractTableHeader.java

License:Open Source License

private void showMaxIcon() {
    maxMinIcon.toggleIcon(FontAwesome.EXPAND);
    maxMinIcon.setData(Boolean.FALSE);
    maxMinIcon.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_MAXIMIZE));
}

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

License:Open Source License

private void buildComponent() {
    // create default title - it will be shown even when no data is
    // available/*from  w  w w  .  j a  v  a 2  s  .  co m*/
    titleOfActionHistory = new LabelBuilder().name(HawkbitCommonUtil.getArtifactoryDetailsLabelId(""))
            .buildCaptionLabel();

    titleOfActionHistory.setImmediate(true);
    titleOfActionHistory.setContentMode(ContentMode.HTML);

    maxMinButton = (SPUIButton) SPUIComponentProvider.getButton(SPUIDefinitions.EXPAND_ACTION_HISTORY, "", "",
            null, true, FontAwesome.EXPAND, SPUIButtonStyleSmallNoBorder.class);
    // listener for maximizing action history
    maxMinButton.addClickListener(event -> maxMinButtonClicked());

}

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

License:Open Source License

private void showMaxIcon() {
    maxMinButton.togleIcon(FontAwesome.EXPAND);
    maxMinButton.setData(Boolean.FALSE);
}

From source file:org.ikasan.dashboard.ui.framework.panel.LandingViewPanel.java

License:BSD License

private Component createContentWrapper(final Component content) {
    final CssLayout slot = new CssLayout();
    slot.setWidth("100%");
    slot.addStyleName("dashboard-panel-slot");

    CssLayout card = new CssLayout();
    card.setWidth("100%");
    card.addStyleName(ValoTheme.LAYOUT_CARD);

    HorizontalLayout toolbar = new HorizontalLayout();
    toolbar.addStyleName("dashboard-panel-toolbar");
    toolbar.setWidth("100%");

    Label caption = new Label(content.getCaption());
    caption.addStyleName(ValoTheme.LABEL_H4);
    caption.addStyleName(ValoTheme.LABEL_COLORED);
    caption.addStyleName(ValoTheme.LABEL_NO_MARGIN);
    content.setCaption(null);//from   w ww .ja v a2s. c o  m

    MenuBar tools = new MenuBar();
    tools.addStyleName(ValoTheme.MENUBAR_BORDERLESS);
    MenuItem max = tools.addItem("", VaadinIcons.EXPAND, new Command() {

        @Override
        public void menuSelected(final MenuItem selectedItem) {
            if (!slot.getStyleName().contains("max")) {
                selectedItem.setIcon(FontAwesome.COMPRESS);
                toggleMaximized(slot, true);
            } else {
                slot.removeStyleName("max");
                selectedItem.setIcon(FontAwesome.EXPAND);
                toggleMaximized(slot, false);
            }
        }
    });
    max.setStyleName("icon-only");
    MenuItem root = tools.addItem("", VaadinIcons.COG, null);
    root.addItem("Configure", new Command() {
        @Override
        public void menuSelected(final MenuItem selectedItem) {
            Notification.show("Not implemented in this demo");
        }
    });
    root.addSeparator();
    root.addItem("Close", new Command() {
        @Override
        public void menuSelected(final MenuItem selectedItem) {
            Notification.show("Not implemented in this demo");
        }
    });

    toolbar.addComponents(caption, tools);
    toolbar.setExpandRatio(caption, 1);
    toolbar.setComponentAlignment(caption, Alignment.MIDDLE_LEFT);

    card.addComponents(toolbar, content);
    slot.addComponent(card);
    return slot;
}