Example usage for com.vaadin.server FontAwesome ADJUST

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

Introduction

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

Prototype

FontAwesome ADJUST

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

Click Source Link

Usage

From source file:com.esofthead.mycollab.module.crm.ui.components.ComponentUtils.java

License:Open Source License

public static MButton createCustomizeViewButton() {
    MButton customizeViewBtn = new MButton("");
    customizeViewBtn.setIcon(FontAwesome.ADJUST);
    customizeViewBtn.setDescription("Layout Options");
    customizeViewBtn.setStyleName(UIConstants.THEME_BLUE_LINK);
    customizeViewBtn.addStyleName("small-padding");
    return customizeViewBtn;
}

From source file:com.esofthead.mycollab.module.crm.view.account.AccountListDashlet.java

License:Open Source License

public AccountListDashlet() {
    super("My Accounts", new VerticalLayout());
    tableItem = new AccountTableDisplay(Arrays.asList(AccountTableFieldDef.accountname,
            AccountTableFieldDef.phoneoffice, AccountTableFieldDef.email));

    tableItem.addTableListener(new TableClickListener() {
        private static final long serialVersionUID = 1L;

        @Override/*ww  w  . ja v  a 2 s  .c om*/
        public void itemClick(final TableClickEvent event) {
            final SimpleAccount account = (SimpleAccount) event.getData();
            if ("accountname".equals(event.getFieldName())) {
                EventBusFactory.getInstance()
                        .post(new AccountEvent.GotoRead(AccountListDashlet.this, account.getId()));
            }
        }
    });
    bodyContent.addComponent(tableItem);

    Button customizeViewBtn = new Button("", new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            UI.getCurrent()
                    .addWindow(new AccountListCustomizeWindow(AccountListDashlet.VIEW_DEF_ID, tableItem));

        }
    });
    customizeViewBtn.setIcon(FontAwesome.ADJUST);
    customizeViewBtn.setDescription("Layout Options");
    customizeViewBtn.setStyleName(UIConstants.BUTTON_ICON_ONLY);

    this.addHeaderElement(customizeViewBtn);
}

From source file:com.esofthead.mycollab.module.crm.view.activity.CallListDashlet.java

License:Open Source License

public CallListDashlet() {
    super("My Calls", new VerticalLayout());

    tableItem = new CallTableDisplay(new TableViewField(null, "isClosed", UIConstants.TABLE_CONTROL_WIDTH),
            Arrays.asList(/*from  w w w  .  jav a 2s . c om*/
                    new TableViewField(CallI18nEnum.FORM_SUBJECT, "subject", UIConstants.TABLE_X_LABEL_WIDTH),
                    new TableViewField(TaskI18nEnum.FORM_START_DATE, "startdate",
                            UIConstants.TABLE_DATE_TIME_WIDTH),
                    new TableViewField(ActivityI18nEnum.FORM_STATUS, "status",
                            UIConstants.TABLE_S_LABEL_WIDTH)));

    tableItem.addTableListener(new TableClickListener() {

        @Override
        public void itemClick(final TableClickEvent event) {
            final SimpleCall call = (SimpleCall) event.getData();
            if ("isClosed".equals(event.getFieldName())) {
                call.setIsclosed(true);
                final CallService callService = ApplicationContextUtil.getSpringBean(CallService.class);
                callService.updateWithSession(call, AppContext.getUsername());
                display();
            }
        }
    });
    bodyContent.addComponent(tableItem);

    Button customizeViewBtn = new Button("", new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {

        }
    });
    customizeViewBtn.setIcon(FontAwesome.ADJUST);
    customizeViewBtn.setDescription("Layout Options");
    customizeViewBtn.setStyleName(UIConstants.BUTTON_ICON_ONLY);

    this.addHeaderElement(customizeViewBtn);
}

From source file:com.esofthead.mycollab.module.crm.view.activity.MeetingListDashlet.java

License:Open Source License

public MeetingListDashlet() {
    super("My Meetings", new VerticalLayout());

    tableItem = new MeetingTableDisplay(Arrays.asList(
            new TableViewField(MeetingI18nEnum.FORM_SUBJECT, "subject", UIConstants.TABLE_X_LABEL_WIDTH),
            new TableViewField(TaskI18nEnum.FORM_START_DATE, "startdate", UIConstants.TABLE_DATE_TIME_WIDTH),
            new TableViewField(ActivityI18nEnum.FORM_STATUS, "status", UIConstants.TABLE_S_LABEL_WIDTH)));

    bodyContent.addComponent(tableItem);

    Button customizeViewBtn = new Button("", new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override/*from  ww  w . j av a  2 s. c  om*/
        public void buttonClick(ClickEvent event) {

        }
    });
    customizeViewBtn.setIcon(FontAwesome.ADJUST);
    customizeViewBtn.setDescription("Layout Options");
    customizeViewBtn.setStyleName(UIConstants.BUTTON_ICON_ONLY);

    this.addHeaderElement(customizeViewBtn);
}

From source file:com.esofthead.mycollab.module.crm.view.lead.LeadListDashlet.java

License:Open Source License

public LeadListDashlet() {
    super("My Leads", new VerticalLayout());

    tableItem = new LeadTableDisplay(
            Arrays.asList(LeadTableFieldDef.name, LeadTableFieldDef.email, LeadTableFieldDef.phoneoffice));

    tableItem.addTableListener(new TableClickListener() {

        @Override//from   www  . ja  v a 2 s  .c o  m
        public void itemClick(final TableClickEvent event) {
            final SimpleLead lead = (SimpleLead) event.getData();
            if ("leadName".equals(event.getFieldName())) {
                EventBusFactory.getInstance().post(new LeadEvent.GotoRead(LeadListDashlet.this, lead.getId()));
            }
        }
    });
    bodyContent.addComponent(tableItem);

    Button customizeViewBtn = new Button("", new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            UI.getCurrent().addWindow(new LeadListCustomizeWindow(LeadListDashlet.VIEW_DEF_ID, tableItem));

        }
    });
    customizeViewBtn.setIcon(FontAwesome.ADJUST);
    customizeViewBtn.setDescription("Layout Options");
    customizeViewBtn.setStyleName(UIConstants.BUTTON_ICON_ONLY);

    this.addHeaderElement(customizeViewBtn);
}

From source file:com.esofthead.mycollab.module.project.view.ProjectListViewImpl.java

License:Open Source License

private ComponentContainer constructTableActionControls() {
    MHorizontalLayout layout = new MHorizontalLayout().withFullWidth();
    layout.addStyleName(UIConstants.TABLE_ACTION_CONTROLS);

    selectOptionButton = new SelectionOptionButton(tableItem);
    selectOptionButton.setWidthUndefined();
    layout.addComponent(selectOptionButton);

    tableActionControls = new DefaultMassItemActionHandlerContainer();

    tableActionControls.addDownloadPdfActionItem();
    tableActionControls.addDownloadExcelActionItem();
    tableActionControls.addDownloadCsvActionItem();

    tableActionControls.setVisible(false);
    tableActionControls.setWidthUndefined();

    layout.addComponent(tableActionControls);
    selectedItemsNumberLabel.setWidth("100%");
    layout.with(selectedItemsNumberLabel).withAlign(selectedItemsNumberLabel, Alignment.MIDDLE_CENTER)
            .expand(selectedItemsNumberLabel);

    Button customizeViewBtn = new Button("", new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override/*from  w w w.j  a  v a 2  s.c o  m*/
        public void buttonClick(Button.ClickEvent event) {
            UI.getCurrent().addWindow(new ProjectListCustomizeWindow(tableItem));

        }
    });
    customizeViewBtn.setIcon(FontAwesome.ADJUST);
    customizeViewBtn.setDescription("Layout Options");
    customizeViewBtn.addStyleName(UIConstants.BUTTON_ACTION);
    layout.with(customizeViewBtn).withAlign(customizeViewBtn, Alignment.MIDDLE_RIGHT);

    return layout;
}

From source file:com.etest.view.systemadministration.curriculum.CurriculumFormWindow.java

FormLayout buildForms() {
    FormLayout form = new FormLayout();
    form.setMargin(true);/*  w w  w  .j a  v  a  2  s  .  co  m*/

    yearLevel.setWidth("75%");
    form.addComponent(yearLevel);

    subjectField.setWidth("75%");
    form.addComponent(subjectField);

    normCourseOffering.setWidth("75%");
    form.addComponent(normCourseOffering);

    descriptiveTitleField.setWidth("100%");
    descriptiveTitleField.setRows(3);
    descriptiveTitleField.setInputPrompt("Descriptive Title..");
    form.addComponent(descriptiveTitleField);

    Button save = new Button("SAVE");
    save.setWidth("100%");
    save.setIcon(FontAwesome.SAVE);
    save.addStyleName(ValoTheme.BUTTON_PRIMARY);
    save.addStyleName(ValoTheme.BUTTON_SMALL);
    save.addClickListener(buttonClickListener);

    Button update = new Button("UPDATE");
    update.setWidth("100%");
    update.setIcon(FontAwesome.ADJUST);
    update.addStyleName(ValoTheme.BUTTON_PRIMARY);
    update.addStyleName(ValoTheme.BUTTON_SMALL);
    update.addClickListener(buttonClickListener);

    Button delete = new Button("DELETE");
    delete.setWidth("100%");
    delete.setIcon(FontAwesome.ERASER);
    delete.addStyleName(ValoTheme.BUTTON_PRIMARY);
    delete.addStyleName(ValoTheme.BUTTON_SMALL);
    delete.addClickListener(buttonClickListener);

    HorizontalLayout hlayout = new HorizontalLayout();
    hlayout.setWidth("100%");
    hlayout.setSpacing(true);

    if (getCurriculumId() != 0) {
        hlayout.addComponent(update);
        hlayout.addComponent(delete);
        Curriculum c = cs.getCurriculumById(getCurriculumId());
        yearLevel.setValue(c.getYearLevel());
        subjectField.setValue(c.getSubject());
        normCourseOffering.setValue(c.getNormCourseOffering());
        descriptiveTitleField.setValue(c.getDescriptiveTitle());

        if (getButtonCaption().equals("edit")) {
            delete.setVisible(false);
        } else {
            update.setVisible(false);
        }
    } else {
        hlayout.addComponent(save);
    }

    form.addComponent(hlayout);

    return form;
}

From source file:com.github.carljmosca.ui.MainUI.java

private void addHeader() {
    HorizontalLayout hl = new HorizontalLayout();
    hl.setSpacing(true);/*w  w w. j av a2  s  .  co m*/
    cmbWidgets = new ComboBox();
    cmbWidgets.setContainerDataSource(widgets);
    cmbWidgets.setItemCaptionPropertyId("name");
    hl.addComponent(cmbWidgets);

    Button btnUpdate = new Button("Update", FontAwesome.ADJUST);
    btnUpdate.addClickListener((Button.ClickEvent event) -> {
        cmbWidgets.select(widgets.getIdByIndex(0));
    });
    hl.addComponent(btnUpdate);

    Button btnShow = new Button("Show", FontAwesome.DASHBOARD);
    btnShow.addClickListener((Button.ClickEvent event) -> {
        try {
            fgWidget.commit();
        } catch (FieldGroup.CommitException ex) {
            Logger.getLogger(MainUI.class.getName()).log(Level.SEVERE, null, ex);
        }
        System.out.println(demoAppData.getSelectedWidget().getName());
    });
    hl.addComponent(btnShow);

    Button btnChange = new Button("Change", FontAwesome.REFRESH);
    btnChange.addClickListener((Button.ClickEvent event) -> {
        Widget widget = (Widget) biDemoAppData.getItemProperty("selectedWidget").getValue();
        widget.setName("test xxxx");
        System.out.println(demoAppData.getSelectedWidget().getName());
    });
    hl.addComponent(btnChange);

    mainLayout.addComponent(hl);
}

From source file:com.mycollab.module.crm.ui.components.ComponentUtils.java

License:Open Source License

public static final MButton createCustomizeViewButton() {
    MButton customizeViewBtn = new MButton("").withIcon(FontAwesome.ADJUST)
            .withStyleName(WebThemes.BUTTON_ACTION, WebThemes.BUTTON_SMALL_PADDING);
    customizeViewBtn.setDescription(UserUIContext.getMessage(GenericI18Enum.OPT_LAYOUT_OPTIONS));
    return customizeViewBtn;
}

From source file:com.mycollab.module.crm.view.account.AccountListDashlet.java

License:Open Source License

public AccountListDashlet() {
    super(UserUIContext.getMessage(AccountI18nEnum.MY_ITEMS), new VerticalLayout());
    this.setMargin(new MarginInfo(true, false, false, false));
    tableItem = new AccountTableDisplay(Arrays.asList(AccountTableFieldDef.accountname(),
            AccountTableFieldDef.phoneoffice(), AccountTableFieldDef.email()));
    bodyContent.addComponent(tableItem);

    MButton customizeViewBtn = new MButton("",
            clickEvent -> UI.getCurrent().addWindow(new AccountListCustomizeWindow(tableItem)))
                    .withIcon(FontAwesome.ADJUST).withStyleName(WebThemes.BUTTON_SMALL_PADDING);
    customizeViewBtn.setDescription(UserUIContext.getMessage(GenericI18Enum.OPT_LAYOUT_OPTIONS));
    this.addHeaderElement(customizeViewBtn);
}