Example usage for com.vaadin.server FontAwesome CHEVRON_DOWN

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

Introduction

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

Prototype

FontAwesome CHEVRON_DOWN

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

Click Source Link

Usage

From source file:com.cavisson.gui.dashboard.components.controls.Panels.java

License:Apache License

public Panels() {
    setMargin(true);/*w w w  .j av a  2 s. c om*/

    Label h1 = new Label("Panels & Layout panels");
    h1.addStyleName("h1");
    addComponent(h1);

    HorizontalLayout row = new HorizontalLayout();
    row.addStyleName("wrapping");
    row.setSpacing(true);
    addComponent(row);
    TestIcon testIcon = new TestIcon(60);

    Panel panel = new Panel("Normal");
    panel.setIcon(testIcon.get());
    panel.setContent(panelContent());
    row.addComponent(panel);

    panel = new Panel("Sized");
    panel.setIcon(testIcon.get());
    panel.setWidth("10em");
    panel.setHeight("250px");
    panel.setContent(panelContent());
    row.addComponent(panel);

    panel = new Panel("Custom Caption");
    panel.setIcon(testIcon.get());
    panel.addStyleName("color1");
    panel.setContent(panelContent());
    row.addComponent(panel);

    panel = new Panel("Custom Caption");
    panel.setIcon(testIcon.get());
    panel.addStyleName("color2");
    panel.setContent(panelContent());
    row.addComponent(panel);

    panel = new Panel("Custom Caption");
    panel.setIcon(testIcon.get());
    panel.addStyleName("color3");
    panel.setContent(panelContent());
    row.addComponent(panel);

    panel = new Panel("Borderless style");
    panel.setIcon(testIcon.get());
    panel.addStyleName("borderless");
    panel.setContent(panelContent());
    row.addComponent(panel);

    panel = new Panel("Borderless + scroll divider");
    panel.setIcon(testIcon.get());
    panel.addStyleName("borderless");
    panel.addStyleName("scroll-divider");
    panel.setContent(panelContentScroll());
    panel.setHeight("17em");
    row.addComponent(panel);

    panel = new Panel("Well style");
    panel.setIcon(testIcon.get());
    panel.addStyleName("well");
    panel.setContent(panelContent());
    row.addComponent(panel);

    CssLayout layout = new CssLayout();
    layout.setIcon(testIcon.get());
    layout.setCaption("Panel style layout");
    layout.addStyleName("card");
    layout.addComponent(panelContent());
    row.addComponent(layout);

    layout = new CssLayout();
    layout.addStyleName("card");
    row.addComponent(layout);
    HorizontalLayout panelCaption = new HorizontalLayout();
    panelCaption.addStyleName("v-panel-caption");
    panelCaption.setWidth("100%");
    // panelCaption.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    Label label = new Label("Panel style layout");
    panelCaption.addComponent(label);
    panelCaption.setExpandRatio(label, 1);

    Button action = new Button();
    action.setIcon(FontAwesome.PENCIL);
    action.addStyleName("borderless-colored");
    action.addStyleName("small");
    action.addStyleName("icon-only");
    panelCaption.addComponent(action);
    MenuBar dropdown = new MenuBar();
    dropdown.addStyleName("borderless");
    dropdown.addStyleName("small");
    MenuItem addItem = dropdown.addItem("", FontAwesome.CHEVRON_DOWN, null);
    addItem.setStyleName("icon-only");
    addItem.addItem("Settings", null);
    addItem.addItem("Preferences", null);
    addItem.addSeparator();
    addItem.addItem("Sign Out", null);
    panelCaption.addComponent(dropdown);

    layout.addComponent(panelCaption);
    layout.addComponent(panelContent());
    layout.setWidth("14em");

    layout = new CssLayout();
    layout.setIcon(testIcon.get());
    layout.setCaption("Well style layout");
    layout.addStyleName("well");
    layout.addComponent(panelContent());
    row.addComponent(layout);
}

From source file:fr.amapj.view.views.producteur.livraison.ProducteurLivraisonsView.java

License:Open Source License

@Override
public void onPopupClose() {
    Long idProducteur = producteurSelector.getProducteurId();

    if (idProducteur == null) {
        central.removeAllComponents();/*from  ww w .j av a  2  s  . com*/
        return;
    }

    //
    MesLivraisonsDTO res = new MesLivraisonsService().getLivraisonProducteur(gapViewer.getDateDebut(),
            gapViewer.getDateFin(), idProducteur);
    central.removeAllComponents();

    // Pour chaque jour, ajout des produits  livrer
    for (JourLivraisonsDTO jour : res.jours) {
        VerticalLayout vl = BaseUiTools.addPanel(central, PANEL_UNJOUR);

        String dateMessage = df1.format(jour.date);
        BaseUiTools.addStdLabel(vl, dateMessage, LABEL_DATEJOURLIV);

        for (ProducteurLivraisonsDTO producteurLiv : jour.producteurs) {
            BaseUiTools.addBandeau(vl, producteurLiv.modeleContrat, "nomcontrat");

            String msg = "<b>Quantits totales  livrer :</b><ul>";
            for (QteProdDTO cell : producteurLiv.produits) {
                msg += "<li>" + cell.qte + " " + cell.nomProduit + " , " + cell.conditionnementProduit
                        + "</li>";
            }
            msg += "</ul>";
            BaseUiTools.addHtmlLabel(vl, msg, LABEL_QTEPRODUIT);

            Button b = new Button("Voir le dtail par amapien");
            b.setIcon(FontAwesome.CHEVRON_DOWN);
            vl.addComponent(b);

            Label detail = BaseUiTools.addHtmlLabel(vl, "", LABEL_QTEPRODUIT);

            b.addStyleName("icon-align-right");
            b.addStyleName("large");
            b.addClickListener(e -> buttonClick(detail, b, producteurLiv.idModeleContratDate));
            b.setData(new Boolean(false));

            //
            Link extractFile = LinkCreator.createLink(new EGFeuilleDistributionProducteur(
                    producteurLiv.idModeleContrat, producteurLiv.idModeleContratDate));
            vl.addComponent(extractFile);

        }
    }
}

From source file:fr.amapj.view.views.producteur.livraison.ProducteurLivraisonsView.java

License:Open Source License

public void buttonClick(Label detail, Button b, Long idModeleContratDate) {
    boolean status = (Boolean) b.getData();
    status = !status;//from www .  j  a va2s. com
    b.setData(status);

    if (status) {
        //
        b.setCaption("Masquer le dtail par amapien");
        b.setIcon(FontAwesome.CHEVRON_UP);
        //
        String content = new GestionContratService().getDetailContrat(idModeleContratDate);
        detail.setValue("<br/>" + content);
    } else {
        //
        b.setCaption("Voir le dtail par amapien");
        b.setIcon(FontAwesome.CHEVRON_DOWN);
        //
        detail.setValue("");
    }
}

From source file:me.uni.emuseo.view.common.ExpandingPanel.java

License:Open Source License

public ExpandingPanel() {
    expandingButton = new Button();
    expandingButton.addClickListener(new Button.ClickListener() {

        /**//from   w w w .j a  v a2 s  .  co  m
         * 
         */
        private static final long serialVersionUID = -441812999850345526L;

        @Override
        public void buttonClick(ClickEvent event) {
            onToggle();
        }

    });
    expandingButton.setWidth(100, Unit.PERCENTAGE);
    expandingButton.setStyleName("expanding-panel-button");
    setWidth(100, Unit.PERCENTAGE);
    addComponent(expandingButton);
    setExpandRatio(expandingButton, 0);
    this.setSizeFull();
    setStyleName("expanding-panel");

    expanded = false;
    expandingButton.setIcon(FontAwesome.CHEVRON_DOWN);
}

From source file:me.uni.emuseo.view.common.ExpandingPanel.java

License:Open Source License

protected void onToggle() {
    boolean toExpand = !this.expanded;
    if (toExpand) {
        this.addComponent(expandingContent);
        this.setExpandRatio(expandingContent, 1);
        addStyleName("expanded");
        expandingButton.setIcon(FontAwesome.CHEVRON_RIGHT);
    } else {//ww  w . ja  v  a  2 s  .  com
        this.removeComponent(expandingContent);
        removeStyleName("expanded");
        expandingButton.setIcon(FontAwesome.CHEVRON_DOWN);
    }
    this.expanded = !this.expanded;
}

From source file:org.lucidj.ui.gauss.GaussUI.java

License:Apache License

private void show_sidebar(boolean visible) {
    if (visible == sidebar_visible()) {
        // Nothing changed
        return;//from   w ww .  j  ava  2s .co  m
    }

    if (visible) {
        hsContentsSidebar.setLocked(false);
        hsContentsSidebar.setMinSplitPosition(MIN_RIGHT_PANEL_WIDTH_PX, Unit.PIXELS);
        hsContentsSidebar.setSplitPosition(get_default_right_panel_width(), Unit.PIXELS, true);
        toggle_sidebar.setIcon(FontAwesome.CHEVRON_DOWN);
    } else {
        if (default_right_panel_width_px != 0) // Record size only after proper init
        {
            default_right_panel_width_px = (int) hsContentsSidebar.getSplitPosition();
        }
        hsContentsSidebar.setMinSplitPosition(0, Unit.PIXELS);
        hsContentsSidebar.setSplitPosition(0, Unit.PIXELS, true);
        hsContentsSidebar.setLocked(true);
        toggle_sidebar.setIcon(FontAwesome.CHEVRON_LEFT);
    }
}

From source file:org.lucidj.ui.gauss.GaussUI.java

License:Apache License

private void set_sidebar(Component sidebar) {
    if (sidebar != null) {
        // Sidebar visible and toggle button enabled
        hsContentsSidebar.setSecondComponent(sidebar);
        toggle_sidebar.setEnabled(true);
        show_sidebar(true);//w  ww .j  a va 2  s.c  om
    } else {
        // No contents, sidebar hidden and toggle button disabled
        show_sidebar(false);
        toggle_sidebar.setIcon(FontAwesome.CHEVRON_DOWN); // Down+disable = no sidebar
        hsContentsSidebar.setSecondComponent(emptySidebar);
        toggle_sidebar.setEnabled(false);
    }
}

From source file:org.lucidj.ui.gauss.GaussUI.java

License:Apache License

private void initToolbarArea() {
    hToolbarArea.setStyleName("ui-toolbar-area");
    hToolbarArea.setSizeUndefined();//from   w ww.  j  av a 2 s.  co  m
    hToolbarArea.setWidth("100%");

    CssLayout home_buttons = new CssLayout();
    home_buttons.setStyleName("ui-toolbar-area-home");
    home_buttons.setWidth(get_default_left_panel_width(), Sizeable.Unit.PIXELS);
    home_buttons.setId("_home_buttons");

    final Button toggle_menu = new Button();
    toggle_menu.setWidth(3, Unit.EM);
    toggle_menu.setIcon(FontAwesome.CHEVRON_DOWN);
    toggle_menu.addStyleName("tiny");
    toggle_menu.addStyleName("link");
    toggle_menu.addStyleName("ui-toolbar-spacer");
    toggle_menu.addStyleName("ui-toggle-button");
    toggle_menu.setId("_toggle_menu");
    home_buttons.addComponent(toggle_menu);

    toggle_menu.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent clickEvent) {
            if (!hsMenuContents.isLocked()) {
                default_left_panel_width_px = (int) hsMenuContents.getSplitPosition();
                acMenu.setVisible(false);
                hsMenuContents.setMinSplitPosition(0, Unit.PIXELS);
                hsMenuContents.setSplitPosition(0, Sizeable.Unit.PIXELS);
                toggle_menu.setIcon(FontAwesome.CHEVRON_RIGHT);
                hsMenuContents.setLocked(true);
            } else {
                hsMenuContents.setLocked(false);
                acMenu.setVisible(true);
                hsMenuContents.setMinSplitPosition(MIN_LEFT_PANEL_WIDTH_PX, Unit.PIXELS);
                hsMenuContents.setSplitPosition(get_default_left_panel_width(), Unit.PIXELS);
                toggle_menu.setIcon(FontAwesome.CHEVRON_DOWN);
            }
        }
    });

    final Button home = new Button("Home");
    home.setIcon(FontAwesome.HOME);
    home.addStyleName("tiny");
    home.addStyleName("ui-toolbar-spacer");
    home.addStyleName("ui-toggle-button");
    home.setId("_home");
    home_buttons.addComponent(home);

    home.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent clickEvent) {
            navigator.navigateTo("home");
        }
    });

    final Button new_button = new Button("New");
    new_button.setIcon(FontAwesome.EDIT);
    new_button.addStyleName("tiny");
    new_button.addStyleName("primary");
    new_button.addStyleName("ui-toggle-button");
    new_button.setId("_new");
    home_buttons.addComponent(new_button);
    new_button.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent clickEvent) {
            navigator.navigateTo("new");
        }
    });

    hToolbarArea.addComponent(home_buttons);

    hToolbarPlaceholder = new CssLayout();
    hToolbarPlaceholder.setSizeFull();
    hToolbarArea.addComponent(hToolbarPlaceholder);
    hToolbarArea.setExpandRatio(hToolbarPlaceholder, 1.0f);

    final Button eject_view = new Button();
    eject_view.setIcon(FontAwesome.EXTERNAL_LINK);
    eject_view.addStyleName("tiny");
    eject_view.addStyleName("link");
    eject_view.addStyleName("ui-toggle-button");
    eject_view.setId("_eject_view");
    hToolbarArea.addComponent(eject_view);

    eject_view.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent clickEvent) {
            Notification.show("Not implemented", Notification.Type.HUMANIZED_MESSAGE);
        }
    });

    toggle_sidebar = new Button();
    toggle_sidebar.setWidth(3, Unit.EM);
    toggle_sidebar.addStyleName("tiny");
    toggle_sidebar.addStyleName("link");
    toggle_sidebar.addStyleName("ui-toolbar-spacer");
    toggle_sidebar.addStyleName("ui-toggle-button");
    toggle_sidebar.setId("_toggle_sidebar");
    hToolbarArea.addComponent(toggle_sidebar);

    toggle_sidebar.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent clickEvent) {
            show_sidebar(!sidebar_visible());
        }
    });
}