Example usage for com.vaadin.server FontAwesome PLUS

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

Introduction

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

Prototype

FontAwesome PLUS

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

Click Source Link

Usage

From source file:org.eclipse.hawkbit.ui.filtermanagement.TargetFilterHeader.java

License:Open Source License

private Button createAddButton() {
    final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.TARGET_FILTER_ADD_ICON_ID, "",
            i18n.getMessage(UIMessageIdProvider.TOOLTIP_ADD), null, false, FontAwesome.PLUS,
            SPUIButtonStyleNoBorder.class);
    button.addClickListener(event -> addNewFilter());
    return button;

}

From source file:org.eclipse.hawkbit.ui.rollout.rollout.DefineGroupsLayout.java

License:Open Source License

private Button createAddButton() {
    final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.ROLLOUT_GROUP_ADD_ID,
            i18n.getMessage("button.rollout.add.group"), "", "", true, FontAwesome.PLUS,
            SPUIButtonStyleNoBorderWithIcon.class);
    button.setSizeUndefined();/*from w  w w .  j  a v  a  2s . c  om*/
    button.addStyleName("default-color");
    button.setEnabled(true);
    button.setVisible(true);
    button.addClickListener(event -> addGroupRowAndValidate());
    return button;

}

From source file:org.inakirj.imagerulette.MyUI.java

License:Open Source License

@Override
protected void init(VaadinRequest vaadinRequest) {

    TabBarView tabManager = new TabBarView();
    tabManager.addStyleName("tab-style");

    Button addImage = new Button();
    addImage.setIcon(FontAwesome.PLUS);
    addImage.addClickListener(e -> addImageRow());

    tabContent1 = new NavigationView();
    tabContent2 = new NavigationView();
    tabContent3 = new NavigationView();

    // Upload images tab
    tabContent1.setCaption("Set image URLs");
    tabContent1.setContent(new DiceGallerySetupView());
    tabContent1.setData("1");
    tabContent1.setRightComponent(addImage);
    Tab tabUpload = tabManager.addTab(tabContent1, "UPLOAD");
    tabUpload.setIcon(FontAwesome.LINK);

    // Setup tab/*from   ww  w  .j a  v a2 s  .  com*/
    tabContent2.setCaption("Create your dice pool");
    tabContent2.addStyleName("view-background");
    Button resetSliders = new Button("");
    resetSliders.addClickListener(e -> onResetSliders());
    resetSliders.addStyleName("reset-button");
    resetSliders.setIcon(FontAwesome.REPEAT);
    tabContent2.setRightComponent(resetSliders);
    tabContent2.setContent(new DiceURLSetupView(tabContent3));
    tabContent2.setData("2");
    Tab tabSetup = tabManager.addTab(tabContent2, "SETUP");
    tabSetup.setIcon(FontAwesome.COGS);

    // Dice tab
    tabContent3.setCaption("Roll the dice");
    tabContent3.setContent(new DicePlayView());
    tabContent3.setData("3");
    Tab tabPlay = tabManager.addTab(tabContent3, "DICE");
    tabPlay.setIcon(FontAwesome.CUBES);
    tabContent3.setEnabled(false);

    tabManager.setSelectedTab(tabContent2);
    tabManager.addListener(new SelectedTabChangeListener() {

        /** The Constant serialVersionUID. */
        private static final long serialVersionUID = -5418597313724716790L;

        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {
            NavigationView tab = (NavigationView) (event.getTabSheet().getSelelectedTab()).getComponent();
            if (tab.getData().equals("3") && tab.isEnabled()) {
                ((DicePlayView) tab.getContent()).setupLottery(generateLotteryList);
            }
        }
    });
    setContent(tabManager);
}

From source file:org.jumpmind.metl.ui.views.admin.GroupPanel.java

License:Open Source License

public GroupPanel(ApplicationContext context, TabbedPanel tabbedPanel) {
    this.context = context;
    this.tabbedPanel = tabbedPanel;

    ButtonBar buttonBar = new ButtonBar();
    addComponent(buttonBar);/*  www .j a v  a2s . c o m*/

    newButton = buttonBar.addButton("New", FontAwesome.PLUS);
    newButton.addClickListener(new NewClickListener());

    editButton = buttonBar.addButton("Edit", FontAwesome.EDIT);
    editButton.addClickListener(new EditClickListener());

    removeButton = buttonBar.addButton("Remove", FontAwesome.TRASH_O);
    removeButton.addClickListener(new RemoveClickListener());

    container = new BeanItemContainer<Group>(Group.class);

    table = new Table();
    table.setSizeFull();
    table.setCacheRate(100);
    table.setPageLength(100);
    table.setImmediate(true);
    table.setSelectable(true);
    table.setMultiSelect(true);

    table.setContainerDataSource(container);
    table.setVisibleColumns("name", "createTime", "lastUpdateTime");
    table.setColumnHeaders("Name", "Create Time", "Update Time");
    table.addItemClickListener(new TableItemClickListener());
    table.addValueChangeListener(new TableValueChangeListener());
    table.setSortContainerPropertyId("name");
    table.setSortAscending(true);

    addComponent(table);
    setExpandRatio(table, 1.0f);
    refresh();
}

From source file:org.jumpmind.metl.ui.views.admin.NotificationPanel.java

License:Open Source License

public NotificationPanel(ApplicationContext context, TabbedPanel tabbedPanel) {
    this.context = context;
    this.tabbedPanel = tabbedPanel;

    ButtonBar buttonBar = new ButtonBar();
    addComponent(buttonBar);// ww  w . ja  v  a  2  s.c o m

    newButton = buttonBar.addButton("New", FontAwesome.PLUS);
    newButton.addClickListener(new NewClickListener());

    editButton = buttonBar.addButton("Edit", FontAwesome.EDIT);
    editButton.addClickListener(new EditClickListener());

    removeButton = buttonBar.addButton("Remove", FontAwesome.TRASH_O);
    removeButton.addClickListener(new RemoveClickListener());

    filterField = buttonBar.addFilter();
    filterField.addTextChangeListener(this);

    container = new BeanItemContainer<Notification>(Notification.class);

    table = new Table();
    table.setSizeFull();
    table.setCacheRate(100);
    table.setPageLength(100);
    table.setImmediate(true);
    table.setSelectable(true);
    table.setMultiSelect(true);

    table.setContainerDataSource(container);
    table.setVisibleColumns("level", "name", "notifyType", "eventType", "enabled");
    table.setColumnHeaders("Level", "Name", "Notify Type", "Event Type", "Enabled");
    table.addItemClickListener(new TableItemClickListener());
    table.addValueChangeListener(new TableValueChangeListener());
    table.setSortContainerPropertyId("name");
    table.setSortAscending(true);

    addComponent(table);
    setExpandRatio(table, 1.0f);
    refresh();
}

From source file:org.jumpmind.metl.ui.views.admin.UserPanel.java

License:Open Source License

public UserPanel(ApplicationContext context, TabbedPanel tabbedPanel) {
    this.context = context;
    this.tabbedPanel = tabbedPanel;

    ButtonBar buttonBar = new ButtonBar();
    addComponent(buttonBar);/* www . j a  va  2 s  .  c  o  m*/

    newButton = buttonBar.addButton("New", FontAwesome.PLUS);
    newButton.addClickListener(new NewClickListener());

    editButton = buttonBar.addButton("Edit", FontAwesome.EDIT);
    editButton.addClickListener(new EditClickListener());

    removeButton = buttonBar.addButton("Remove", FontAwesome.TRASH_O);
    removeButton.addClickListener(new RemoveClickListener());

    container = new BeanItemContainer<User>(User.class);

    table = new Table();
    table.setSizeFull();
    table.setCacheRate(100);
    table.setPageLength(100);
    table.setImmediate(true);
    table.setSelectable(true);
    table.setMultiSelect(true);

    table.setContainerDataSource(container);
    table.setVisibleColumns("loginId", "name", "lastLoginTime");
    table.setColumnHeaders("Login ID", "Full Name", "Last Login Time");
    table.addItemClickListener(new TableItemClickListener());
    table.addValueChangeListener(new TableValueChangeListener());
    table.setSortContainerPropertyId("loginId");
    table.setSortAscending(true);

    addComponent(table);
    setExpandRatio(table, 1.0f);
    refresh();
}

From source file:org.jumpmind.metl.ui.views.deploy.EditAgentParametersWindow.java

License:Open Source License

public EditAgentParametersWindow(final ApplicationContext context, final Agent agent) {
    super("Agent Parameters");
    this.context = context;
    this.agent = agent;

    Button closeButton = new Button("Close");
    closeButton.addStyleName(ValoTheme.BUTTON_PRIMARY);
    closeButton.addClickListener(new CloseClickListener());

    ButtonBar buttonBar = new ButtonBar();
    buttonBar.addButton("Add", FontAwesome.PLUS, new AddClickListener());

    removeButton = buttonBar.addButton("Remove", FontAwesome.TRASH_O, new RemoveClickListener());
    removeButton.setEnabled(false);/*from www .jav a2 s  .  c o m*/
    addComponent(buttonBar);

    table = new Table();
    table.setSizeFull();
    BeanItemContainer<AgentParameter> container = new BeanItemContainer<AgentParameter>(AgentParameter.class);
    table.setContainerDataSource(container);
    table.setEditable(true);
    table.setSelectable(true);
    table.setTableFieldFactory(new EditFieldFactory());
    table.setVisibleColumns("name", "value");
    table.setColumnHeaders("Name", "Value");
    table.addValueChangeListener(this);
    addComponent(table, 1);

    addComponent(buildButtonFooter(closeButton));

    if (agent.getAgentParameters() != null) {
        for (AgentParameter parameter : agent.getAgentParameters()) {
            table.addItem(parameter);
        }
    }
}

From source file:org.jumpmind.metl.ui.views.design.EditContentRouterPanel.java

License:Open Source License

protected void buildUI() {
    if (!readOnly) {
        ButtonBar buttonBar = new ButtonBar();
        addComponent(buttonBar);//  w w w .j ava  2s  . c  o  m

        addButton = buttonBar.addButton("Add", FontAwesome.PLUS);
        addButton.addClickListener((event) -> table.addItem(new Route()));

        removeButton = buttonBar.addButton("Remove", FontAwesome.TRASH_O);
        removeButton.addClickListener((event) -> {
            if (table.getValue() != null) {
                table.removeItem(table.getValue());
                save();
            }
        });
    }

    table.setContainerDataSource(container);

    table.setSelectable(true);
    table.setSortEnabled(false);
    table.setImmediate(true);
    table.setSizeFull();
    table.setVisibleColumns(new Object[] { "matchExpression", "targetStepId" });
    table.setColumnHeaders(new String[] { "Expression", "Target Step" });
    table.setTableFieldFactory(new EditFieldFactory());
    table.addItemClickListener((event) -> {
        if (table.getValue() != null) {
            table.setValue(null);
        }
    });
    table.setEditable(true);
    if (!readOnly) {
        table.addValueChangeListener((event) -> removeButton.setEnabled(table.getValue() != null));
    }

    addComponent(table);
    setExpandRatio(table, 1.0f);

    String json = flowStep.getComponent().get(ContentRouter.SETTING_CONFIG);
    if (isNotBlank(json)) {
        try {
            List<Route> routes = new ObjectMapper().readValue(json, new TypeReference<List<Route>>() {
            });
            for (Route route : routes) {
                table.addItem(route);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

From source file:org.jumpmind.metl.ui.views.design.EditParametersDialog.java

License:Open Source License

public EditParametersDialog(ApplicationContext context, Flow flow, boolean readOnly) {
    super("Flow Parameters");
    this.context = context;
    this.flow = flow;

    Button closeButton = new Button("Close");
    closeButton.addStyleName(ValoTheme.BUTTON_PRIMARY);
    closeButton.addClickListener(new CloseClickListener());

    if (!readOnly) {
        ButtonBar buttonBar = new ButtonBar();
        buttonBar.addButton("Add", FontAwesome.PLUS, new AddClickListener());
        insertButton = buttonBar.addButton("Insert", FontAwesome.CHEVRON_RIGHT, new InsertClickListener());
        insertButton.setEnabled(false);/*from w  w w. j av  a  2 s . c  o m*/
        removeButton = buttonBar.addButton("Remove", FontAwesome.TRASH_O, new RemoveClickListener());
        removeButton.setEnabled(false);
        addComponent(buttonBar);
    }

    table = new Table();
    table.setSizeFull();
    container = new BeanItemContainer<FlowParameter>(FlowParameter.class);
    table.setContainerDataSource(container);
    table.setSelectable(true);
    table.setSortEnabled(false);
    if (!readOnly) {
        table.setEditable(true);
        table.setDragMode(TableDragMode.ROW);
        table.setDropHandler(new TableDropHandler());
        table.setTableFieldFactory(new EditFieldFactory());
        table.addValueChangeListener(this);
    }
    table.setVisibleColumns("position", "name", "defaultValue");
    table.setColumnHeaders("#", "Name", "Default Value");
    table.setColumnExpandRatio("name", .3f);
    table.setColumnExpandRatio("defaultValue", .6f);
    addComponent(table, 1);

    addComponent(buildButtonFooter(closeButton));

    List<FlowParameter> params = flow.getFlowParameters();
    Collections.sort(params, new Comparator<FlowParameter>() {
        public int compare(FlowParameter o1, FlowParameter o2) {
            return new Integer(o1.getPosition()).compareTo(new Integer(o2.getPosition()));
        }
    });

    for (FlowParameter flowParameter : params) {
        table.addItem(flowParameter);
    }
}

From source file:org.opencms.ui.dialogs.CmsNewDialog.java

License:Open Source License

/**
 * Gets the HTML for the action buttons the type info boxes.<p>
 *
 * @return the HTML for the buttons/*  w  w w  .j a  v a2s  .  c  o  m*/
 */
protected String getActionIconHtml() {

    return FontAwesome.PLUS.getHtml();
}