Example usage for com.vaadin.server FontAwesome ARROW_UP

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

Introduction

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

Prototype

FontAwesome ARROW_UP

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

Click Source Link

Usage

From source file:com.esofthead.mycollab.mobile.module.project.view.bug.BugPriorityComboBox.java

License:Open Source License

public BugPriorityComboBox() {
    super();/*from ww  w  .ja v a  2 s  . co m*/
    this.setNullSelectionAllowed(false);
    this.setCaption(null);
    this.loadData(Arrays.asList(OptionI18nEnum.bug_priorities));
    this.setItemIcon(BugPriority.Blocker.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(BugPriority.Critical.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(BugPriority.Major.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(BugPriority.Minor.name(), FontAwesome.ARROW_DOWN);
    this.setItemIcon(BugPriority.Trivial.name(), FontAwesome.ARROW_DOWN);
}

From source file:com.esofthead.mycollab.module.file.view.components.ResourcesDisplayComponent.java

License:Open Source License

public ResourcesDisplayComponent(final String rootPath, final Folder rootFolder) {
    this.setSpacing(true);
    this.baseFolder = rootFolder;
    this.rootPath = rootPath;
    externalResourceService = ApplicationContextUtil.getSpringBean(ExternalResourceService.class);
    externalDriveService = ApplicationContextUtil.getSpringBean(ExternalDriveService.class);
    resourceService = ApplicationContextUtil.getSpringBean(ResourceService.class);

    VerticalLayout mainBodyLayout = new VerticalLayout();
    mainBodyLayout.setSpacing(true);//  ww w. jav  a2 s .com
    mainBodyLayout.addStyleName("box-no-border-left");

    // file breadcrum ---------------------
    HorizontalLayout breadcrumbContainer = new HorizontalLayout();
    breadcrumbContainer.setMargin(false);
    fileBreadCrumb = new FileBreadcrumb(rootPath);
    breadcrumbContainer.addComponent(fileBreadCrumb);
    mainBodyLayout.addComponent(breadcrumbContainer);

    // Construct controllGroupBtn
    controllGroupBtn = new MHorizontalLayout().withMargin(new MarginInfo(false, false, false, true));

    final Button selectAllBtn = new Button();
    selectAllBtn.addStyleName(UIConstants.THEME_BROWN_LINK);
    selectAllBtn.setIcon(FontAwesome.SQUARE_O);
    selectAllBtn.setData(false);
    selectAllBtn.setImmediate(true);
    selectAllBtn.setDescription("Select all");

    selectAllBtn.addClickListener(new ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            if (!(Boolean) selectAllBtn.getData()) {
                selectAllBtn.setIcon(FontAwesome.CHECK_SQUARE_O);
                selectAllBtn.setData(true);
                resourcesContainer.setAllValues(true);
            } else {
                selectAllBtn.setData(false);
                selectAllBtn.setIcon(FontAwesome.SQUARE_O);
                resourcesContainer.setAllValues(false);
            }
        }
    });
    controllGroupBtn.with(selectAllBtn).withAlign(selectAllBtn, Alignment.MIDDLE_LEFT);

    Button goUpBtn = new Button("Up");
    goUpBtn.setIcon(FontAwesome.ARROW_UP);

    goUpBtn.addClickListener(new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            Folder parentFolder;
            if (baseFolder instanceof ExternalFolder) {
                if (baseFolder.getPath().equals("/")) {
                    parentFolder = baseFolder;
                } else {
                    parentFolder = externalResourceService.getParentResourceFolder(
                            ((ExternalFolder) baseFolder).getExternalDrive(), baseFolder.getPath());
                }
            } else if (!baseFolder.getPath().equals(rootPath)) {
                parentFolder = resourceService.getParentFolder(baseFolder.getPath());
            } else {
                parentFolder = baseFolder;
            }

            resourcesContainer.constructBody(parentFolder);
            baseFolder = parentFolder;
            fileBreadCrumb.gotoFolder(baseFolder);
        }
    });
    goUpBtn.setDescription("Back to parent folder");
    goUpBtn.setStyleName(UIConstants.THEME_BROWN_LINK);
    goUpBtn.setDescription("Go up");

    controllGroupBtn.with(goUpBtn).withAlign(goUpBtn, Alignment.MIDDLE_LEFT);

    ButtonGroup navButton = new ButtonGroup();
    navButton.addStyleName(UIConstants.THEME_BROWN_LINK);
    Button createBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_CREATE),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(ClickEvent event) {
                    AddNewFolderWindow addnewFolderWindow = new AddNewFolderWindow();
                    UI.getCurrent().addWindow(addnewFolderWindow);
                }
            });
    createBtn.setIcon(FontAwesome.PLUS);
    createBtn.addStyleName(UIConstants.THEME_BROWN_LINK);
    createBtn.setDescription("Create new folder");
    createBtn.setEnabled(AppContext.canWrite(RolePermissionCollections.PUBLIC_DOCUMENT_ACCESS));
    navButton.addButton(createBtn);

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

        @Override
        public void buttonClick(ClickEvent event) {
            MultiUploadContentWindow multiUploadWindow = new MultiUploadContentWindow();
            UI.getCurrent().addWindow(multiUploadWindow);
        }
    });
    uploadBtn.setIcon(FontAwesome.UPLOAD);
    uploadBtn.addStyleName(UIConstants.THEME_BROWN_LINK);
    uploadBtn.setDescription("Upload");

    uploadBtn.setEnabled(AppContext.canWrite(RolePermissionCollections.PUBLIC_DOCUMENT_ACCESS));
    navButton.addButton(uploadBtn);

    Button downloadBtn = new Button("Download");

    LazyStreamSource streamSource = new LazyStreamSource() {
        private static final long serialVersionUID = 1L;

        @Override
        protected StreamSource buildStreamSource() {
            Collection<Resource> selectedResources = getSelectedResources();
            return StreamDownloadResourceUtil.getStreamSourceSupportExtDrive(selectedResources);
        }

        @Override
        public String getFilename() {
            Collection<Resource> selectedResources = getSelectedResources();
            return StreamDownloadResourceUtil.getDownloadFileName(selectedResources);
        }
    };
    OnDemandFileDownloader downloaderExt = new OnDemandFileDownloader(streamSource);
    downloaderExt.extend(downloadBtn);

    downloadBtn.setIcon(FontAwesome.DOWNLOAD);
    downloadBtn.addStyleName(UIConstants.THEME_BROWN_LINK);
    downloadBtn.setDescription("Download");
    downloadBtn.setEnabled(AppContext.canRead(RolePermissionCollections.PUBLIC_DOCUMENT_ACCESS));
    navButton.addButton(downloadBtn);

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

        @Override
        public void buttonClick(ClickEvent event) {
            Collection<Resource> selectedResources = getSelectedResources();
            if (CollectionUtils.isNotEmpty(selectedResources)) {
                MoveResourceWindow moveResourceWindow = new MoveResourceWindow(selectedResources);
                UI.getCurrent().addWindow(moveResourceWindow);
            } else {
                NotificationUtil.showWarningNotification("Please select at least one item to move");
            }
        }
    });
    moveToBtn.setIcon(FontAwesome.ARROWS);
    moveToBtn.addStyleName(UIConstants.THEME_BROWN_LINK);
    moveToBtn.setEnabled(AppContext.canWrite(RolePermissionCollections.PUBLIC_DOCUMENT_ACCESS));
    moveToBtn.setDescription("Move to");
    navButton.addButton(moveToBtn);

    Button deleteBtn = new Button(AppContext.getMessage(GenericI18Enum.BUTTON_DELETE),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(ClickEvent event) {
                    Collection<Resource> selectedResources = getSelectedResources();
                    if (CollectionUtils.isEmpty(selectedResources)) {
                        NotificationUtil.showWarningNotification("Please select at least one item to delete");
                    } else {
                        deleteResourceAction();
                    }
                }
            });
    deleteBtn.setIcon(FontAwesome.TRASH_O);
    deleteBtn.addStyleName(UIConstants.THEME_RED_LINK);
    deleteBtn.setDescription("Delete resource");
    deleteBtn.setEnabled(AppContext.canAccess(RolePermissionCollections.PUBLIC_DOCUMENT_ACCESS));

    navButton.addButton(deleteBtn);
    controllGroupBtn.addComponent(navButton);

    mainBodyLayout.addComponent(controllGroupBtn);

    resourcesContainer = new ResourcesContainer(baseFolder);

    mainBodyLayout.addComponent(resourcesContainer);
    this.addComponent(mainBodyLayout);
}

From source file:com.esofthead.mycollab.module.project.view.bug.components.BugPriorityComboBox.java

License:Open Source License

public BugPriorityComboBox() {
    super();/*from w  w w .ja  v  a 2s.co  m*/
    this.setNullSelectionAllowed(false);
    this.setCaption(null);
    this.loadData(Arrays.asList(OptionI18nEnum.bug_priorities));
    this.setItemIcon(BugPriority.Blocker.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(BugPriority.Critical.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(BugPriority.Major.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(BugPriority.Minor.name(), FontAwesome.ARROW_DOWN);
    this.setItemIcon(BugPriority.Trivial.name(), FontAwesome.ARROW_DOWN);

    this.setItemStyleGenerator(new ItemStyleGenerator() {
        @Override
        public String getStyle(ComboBox source, Object itemId) {
            if (itemId != null) {
                return String.format("bug-%s", itemId.toString().toLowerCase());
            }
            return null;
        }
    });
}

From source file:com.esofthead.mycollab.module.project.view.task.components.TaskPriorityComboBox.java

License:Open Source License

public TaskPriorityComboBox() {
    this.setNullSelectionAllowed(false);
    this.setWidth("150px");

    this.loadData(Arrays.asList(TaskPriority.Urgent, TaskPriority.High, TaskPriority.Medium, TaskPriority.Low,
            TaskPriority.None));/*w  w  w.  java 2 s  .c  o m*/

    this.setItemIcon(TaskPriority.Urgent.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(TaskPriority.High.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(TaskPriority.Medium.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(TaskPriority.Low.name(), FontAwesome.ARROW_DOWN);
    this.setItemIcon(TaskPriority.None.name(), FontAwesome.ARROW_DOWN);

    this.setItemStyleGenerator(new ItemStyleGenerator() {
        @Override
        public String getStyle(ComboBox source, Object itemId) {
            if (itemId != null) {
                return String.format("task-%s", itemId.toString().toLowerCase());
            }
            return null;
        }
    });
}

From source file:com.foc.vaadin.gui.layouts.validationLayout.FVStageLayout_Button.java

License:Apache License

public FVStageLayout_Button(FocXMLLayout xmlLayout, FocObject focObject) {
    this.focObject = focObject;
    this.xmlLayout = xmlLayout;
    init();/*from  ww  w  . j  ava2s .c  o  m*/
    setIcon(FontAwesome.ARROW_UP);
    addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            buttonClicked();
        }
    });
}

From source file:com.foc.vaadin.gui.layouts.validationLayout.FVStageLayout_Button.java

License:Apache License

public void buttonClicked() {
    FVValidationLayout vLayout = getValidationLayout();
    if (vLayout != null) {
        vLayout.setVisible_WorkflowConsole(!vLayout.isVisible_WorkflowConsole());
        vLayout.setVisible_LogLayout(!vLayout.isVisible_LogLayout());

        if (vLayout.isVisible_WorkflowConsole()) {
            setIcon(FontAwesome.ARROW_DOWN);
        } else {//from w w w  .  j  a  v a  2  s.c  o  m
            setIcon(FontAwesome.ARROW_UP);
        }
    }
}

From source file:com.hybridbpm.ui.component.bpm.TaskLayout.java

License:Apache License

public TaskLayout(String taskId, String processName, String taskName, boolean showHeader) {
    this.taskId = taskId;
    this.processName = processName;
    this.taskName = taskName;
    this.showHeader = showHeader;

    Responsive.makeResponsive(this);
    btnAccept.setIcon(FontAwesome.CHECK);
    btnEscalate.setIcon(FontAwesome.ARROW_UP);
    btnDelegate.setIcon(FontAwesome.ARROW_DOWN);
    btnSchedule.setIcon(FontAwesome.CALENDAR);
    btnSave.setIcon(FontAwesome.SAVE);//  www  . ja  v  a 2s .  co  m
    btnSend.setIcon(FontAwesome.SEND);
    //        btnClose.setIcon(FontAwesome.TIMES);

    btnSend.setStyleName(ValoTheme.BUTTON_PRIMARY);

    btnAccept.addStyleName(ValoTheme.BUTTON_SMALL);
    btnEscalate.addStyleName(ValoTheme.BUTTON_SMALL);
    btnDelegate.addStyleName(ValoTheme.BUTTON_SMALL);
    btnSchedule.addStyleName(ValoTheme.BUTTON_SMALL);
    btnSave.addStyleName(ValoTheme.BUTTON_SMALL);
    btnSend.addStyleName(ValoTheme.BUTTON_SMALL);
    btnClose.addStyleName(ValoTheme.BUTTON_SMALL);

    priorityMenubar.setStyleName(ValoTheme.MENUBAR_SMALL);

    //        buttonBar.setWidth(100, Unit.PERCENTAGE);
    buttonBar.setSpacing(true);
    buttonBar.addStyleName("toolbar");
    //        buttonBar.setExpandRatio(btnAccept, 1f);
    //        buttonBar.setComponentAlignment(priorityMenubar, Alignment.MIDDLE_LEFT);
    buttonBar.setComponentAlignment(btnAccept, Alignment.MIDDLE_RIGHT);
    //        buttonBar.setComponentAlignment(btnEscalate, Alignment.MIDDLE_RIGHT);
    //        buttonBar.setComponentAlignment(btnDelegate, Alignment.MIDDLE_RIGHT);
    buttonBar.setComponentAlignment(btnSchedule, Alignment.MIDDLE_RIGHT);
    buttonBar.setComponentAlignment(btnSave, Alignment.MIDDLE_RIGHT);
    buttonBar.setComponentAlignment(btnSend, Alignment.MIDDLE_RIGHT);
    buttonBar.setComponentAlignment(btnClose, Alignment.MIDDLE_RIGHT);

    tabSheet.setStyleName(ValoTheme.TABSHEET_COMPACT_TABBAR);
    tabSheet.setStyleName(ValoTheme.TABSHEET_FRAMED);
    tabSheet.setSizeFull();

    setSizeFull();
    setSpacing(true);
    if (showHeader) {
        addComponent(taskFormHeader);
    }
    addComponent(buttonBar);
    setComponentAlignment(buttonBar, Alignment.MIDDLE_RIGHT);
    addComponent(tabSheet);
    setExpandRatio(tabSheet, 1f);
    loadForm();
}

From source file:com.mycollab.module.project.ui.components.PriorityComboBox.java

License:Open Source License

public PriorityComboBox() {
    this.setNullSelectionAllowed(false);
    this.setWidth("150px");

    this.loadData(Arrays.asList(Priority.Urgent, Priority.High, Priority.Medium, Priority.Low, Priority.None));

    this.setItemIcon(Priority.Urgent.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(Priority.High.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(Priority.Medium.name(), FontAwesome.ARROW_UP);
    this.setItemIcon(Priority.Low.name(), FontAwesome.ARROW_DOWN);
    this.setItemIcon(Priority.None.name(), FontAwesome.ARROW_DOWN);

    this.setItemStyleGenerator((source, itemId) -> {
        if (itemId != null) {
            return String.format("task-%s", itemId.toString().toLowerCase());
        }/*  w  w  w .ja v  a  2 s  . co m*/
        return null;
    });
}

From source file:com.mycollab.module.project.ui.ProjectAssetsManager.java

License:Open Source License

public static FontAwesome getPriority(String priority) {
    if (Priority.Urgent.name().equals(priority) || Priority.High.name().equals(priority)
            || Priority.Medium.name().equals(priority) || priority == null) {
        return FontAwesome.ARROW_UP;
    } else {/*w  w  w .  jav a  2 s .com*/
        return FontAwesome.ARROW_DOWN;
    }
}

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

License:Open Source License

protected void buildButtonBar() {
    ButtonBar buttonBar = new ButtonBar();
    addComponent(buttonBar);/*from   w w w. j  ava 2s. c om*/
    if (!readOnly) {
        editButton = buttonBar.addButton("Edit Columns", FontAwesome.EDIT);
        editButton.addClickListener(new EditButtonClickListener());
    }
    entityFilterField = buttonBar.addFilter();
    entityFilterField.addTextChangeListener(event -> updateEntityTable(event.getText()));

    if (!readOnly) {
        Button moveUpButton = buttonBar.addButton("Move Up", FontAwesome.ARROW_UP);
        moveUpButton.addClickListener(new MoveUpClickListener());

        Button moveDownButton = buttonBar.addButton("Move Down", FontAwesome.ARROW_DOWN);
        moveDownButton.addClickListener(new MoveDownClickListener());

        Button moveTopButton = buttonBar.addButton("Move Top", FontAwesome.ANGLE_DOUBLE_UP);
        moveTopButton.addClickListener(new MoveTopClickListener());

        Button moveBottomButton = buttonBar.addButton("Move Bottom", FontAwesome.ANGLE_DOUBLE_DOWN);
        moveBottomButton.addClickListener(new MoveBottomClickListener());

        Button cutButton = buttonBar.addButton("Cut", FontAwesome.CUT);
        cutButton.addClickListener(new CutClickListener());

        Button pasteButton = buttonBar.addButton("Paste", FontAwesome.PASTE);
        pasteButton.addClickListener(new PasteClickListener());
    }

    addComponent(buttonBar);
}