Example usage for com.vaadin.server FontAwesome FORWARD

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

Introduction

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

Prototype

FontAwesome FORWARD

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

Click Source Link

Usage

From source file:org.eclipse.hawkbit.ui.distributions.disttype.CreateUpdateDistSetTypeLayout.java

License:Open Source License

private HorizontalLayout createTwinColumnLayout() {

    final HorizontalLayout twinColumnLayout = new HorizontalLayout();
    twinColumnLayout.setSizeFull();//  w  ww.  j ava2  s.  c  o  m
    twinColumnLayout.setWidth("400px");

    buildSourceTable();
    buildSelectedTable();

    final VerticalLayout selectButtonLayout = new VerticalLayout();
    final Button selectButton = SPUIComponentProvider.getButton(UIComponentIdProvider.SELECT_DIST_TYPE, "", "",
            "arrow-button", true, FontAwesome.FORWARD, SPUIButtonStyleSmallNoBorder.class);
    selectButton.addClickListener(event -> addSMType());
    final Button unSelectButton = SPUIComponentProvider.getButton("unselect-dist-type", "", "", "arrow-button",
            true, FontAwesome.BACKWARD, SPUIButtonStyleSmallNoBorder.class);
    unSelectButton.addClickListener(event -> removeSMType());
    selectButtonLayout.addComponent(selectButton);
    selectButtonLayout.addComponent(unSelectButton);
    selectButtonLayout.setComponentAlignment(selectButton, Alignment.MIDDLE_CENTER);
    selectButtonLayout.setComponentAlignment(unSelectButton, Alignment.MIDDLE_CENTER);

    twinColumnLayout.addComponent(sourceTable);
    twinColumnLayout.addComponent(selectButtonLayout);
    twinColumnLayout.addComponent(selectedTable);
    twinColumnLayout.setComponentAlignment(sourceTable, Alignment.MIDDLE_LEFT);
    twinColumnLayout.setComponentAlignment(selectButtonLayout, Alignment.MIDDLE_CENTER);
    twinColumnLayout.setComponentAlignment(selectedTable, Alignment.MIDDLE_RIGHT);
    twinColumnLayout.setExpandRatio(sourceTable, 0.45F);
    twinColumnLayout.setExpandRatio(selectButtonLayout, 0.07F);
    twinColumnLayout.setExpandRatio(selectedTable, 0.48F);
    sourceTable.setVisibleColumns(DIST_TYPE_NAME);
    return twinColumnLayout;
}

From source file:org.eclipse.hawkbit.ui.distributions.disttype.DistributionSetTypeSoftwareModuleSelectLayout.java

License:Open Source License

private HorizontalLayout createTwinColumnLayout() {
    final HorizontalLayout twinColumnLayout = new HorizontalLayout();
    twinColumnLayout.setSizeFull();//from   w w  w.j a v a 2  s . c  om
    twinColumnLayout.setWidth("400px");

    buildSourceTable();
    buildSelectedTable();

    final VerticalLayout selectButtonLayout = new VerticalLayout();
    final Button selectButton = SPUIComponentProvider.getButton(UIComponentIdProvider.SELECT_DIST_TYPE, "", "",
            "arrow-button", true, FontAwesome.FORWARD, SPUIButtonStyleNoBorder.class);
    selectButton.addClickListener(event -> addSMType());
    final Button unSelectButton = SPUIComponentProvider.getButton("unselect-dist-type", "", "", "arrow-button",
            true, FontAwesome.BACKWARD, SPUIButtonStyleNoBorder.class);
    unSelectButton.addClickListener(event -> removeSMType());
    selectButtonLayout.addComponent(selectButton);
    selectButtonLayout.addComponent(unSelectButton);
    selectButtonLayout.setComponentAlignment(selectButton, Alignment.MIDDLE_CENTER);
    selectButtonLayout.setComponentAlignment(unSelectButton, Alignment.MIDDLE_CENTER);

    twinColumnLayout.addComponent(sourceTable);
    twinColumnLayout.addComponent(selectButtonLayout);
    twinColumnLayout.addComponent(selectedTable);
    twinColumnLayout.setComponentAlignment(sourceTable, Alignment.MIDDLE_LEFT);
    twinColumnLayout.setComponentAlignment(selectButtonLayout, Alignment.MIDDLE_CENTER);
    twinColumnLayout.setComponentAlignment(selectedTable, Alignment.MIDDLE_RIGHT);
    twinColumnLayout.setExpandRatio(sourceTable, 0.45F);
    twinColumnLayout.setExpandRatio(selectButtonLayout, 0.07F);
    twinColumnLayout.setExpandRatio(selectedTable, 0.48F);
    sourceTable.setVisibleColumns(DIST_TYPE_NAME);
    return twinColumnLayout;
}

From source file:org.jumpmind.vaadin.ui.sqlexplorer.DefaultButtonBar.java

License:Open Source License

protected void populate(MenuBar menuBar) {
    executeAtCursorButton = menuBar.addItem("", FontAwesome.PLAY, new Command() {

        private static final long serialVersionUID = 1L;

        @Override//from   w w w .j a  va2 s  .co  m
        public void menuSelected(MenuItem selectedItem) {
            queryPanel.execute(false);
        }
    });
    executeAtCursorButton.setDescription("Run sql under cursor (CTRL+ENTER)");

    executeScriptButton = menuBar.addItem("", FontAwesome.FORWARD, new Command() {

        private static final long serialVersionUID = 1L;

        @Override
        public void menuSelected(MenuItem selectedItem) {
            queryPanel.execute(true);
        }
    });
    executeScriptButton.setDescription("Run as script");

    commitButton = menuBar.addItem("", FontAwesome.ARROW_CIRCLE_O_RIGHT, new Command() {

        private static final long serialVersionUID = 1L;

        @Override
        public void menuSelected(MenuItem selectedItem) {
            queryPanel.commit();
        }
    });
    commitButton.setStyleName("green");
    commitButton.setDescription("Commit");
    commitButton.setEnabled(false);

    rollbackButton = menuBar.addItem("", FontAwesome.ARROW_CIRCLE_O_LEFT, new Command() {

        private static final long serialVersionUID = 1L;

        @Override
        public void menuSelected(MenuItem selectedItem) {
            queryPanel.rollback();
        }
    });
    rollbackButton.setStyleName("red");
    rollbackButton.setDescription("Rollback");
    rollbackButton.setEnabled(false);

    historyButton = menuBar.addItem("", FontAwesome.SEARCH, new Command() {

        private static final long serialVersionUID = 1L;

        @Override
        public void menuSelected(MenuItem selectedItem) {
            new SqlHistoryDialog(settingsProvider, queryPanel).showAtSize(0.6);
        }
    });
    historyButton.setDescription("Sql History");
    historyButton.setEnabled(true);

    MenuItem optionsButton = menuBar.addItem("", FontAwesome.TASKS, null);
    optionsButton.setDescription("Options");

    importButton = optionsButton.addItem("DB Import", FontAwesome.DOWNLOAD, new Command() {

        private static final long serialVersionUID = 1L;

        @Override
        public void menuSelected(MenuItem selectedItem) {
            new DbImportDialog(db.getPlatform()).showAtSize(0.6);
        }
    });

    exportButton = optionsButton.addItem("DB Export", FontAwesome.UPLOAD, new Command() {

        private static final long serialVersionUID = 1L;

        @Override
        public void menuSelected(MenuItem selectedItem) {
            new DbExportDialog(db.getPlatform(), queryPanel).showAtSize(0.6);
        }
    });

    fillButton = optionsButton.addItem("DB Fill", FontAwesome.BEER, new Command() {

        private static final long serialVersionUID = 1L;

        @Override
        public void menuSelected(MenuItem selectedItem) {
            new DbFillDialog(db.getPlatform(), queryPanel).showAtSize(0.6);
        }
    });

    for (IDbMenuItem item : additionalMenuItems) {
        optionsButton.addItem(item.getCaption(), item.getIcon(), item.getCommand());
    }
}