Example usage for com.vaadin.server FontAwesome CARET_SQUARE_O_RIGHT

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

Introduction

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

Prototype

FontAwesome CARET_SQUARE_O_RIGHT

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

Click Source Link

Usage

From source file:com.mycollab.module.project.view.ProjectVerticalTabsheet.java

License:Open Source License

@Override
public void setNavigatorVisibility(boolean visibility) {
    if (!visibility) {
        navigatorWrapper.setWidth("70px");
        navigatorContainer.setWidth("70px");
        this.hideTabsCaption();

        toggleBtn.setIcon(FontAwesome.CARET_SQUARE_O_RIGHT);
        toggleBtn.setDescription(UserUIContext.getMessage(ProjectI18nEnum.ACTION_EXPAND_MENU));
        toggleBtn.setCaption("");
    } else {/*from w w  w.j av a  2s  . co  m*/
        navigatorWrapper.setWidth("200px");
        navigatorContainer.setWidth("200px");
        this.showTabsCaption();

        toggleBtn.setIcon(FontAwesome.CARET_SQUARE_O_LEFT);
        toggleBtn.setDescription("");
        toggleBtn.setCaption(UserUIContext.getMessage(ProjectI18nEnum.ACTION_COLLAPSE_MENU));
    }

    CurrentProjectVariables.setProjectToggleMenu(visibility);
}

From source file:com.selzlein.lojavirtual.vaadin.core.AppLayout.java

License:Open Source License

private void buildMenu() {
    if (user.hasRight(HumanRights.READ_ALL_TODO) || user.hasRight(HumanRights.READ_OWN_TODO)) {
        todoMenuItem = menu.addViewMenuItem(TodoListView.TITLE, TodoListView.ID, FontAwesome.LIST, todoBadge);
    }/*  w  w  w. ja  v  a2s  .c  o m*/
    if (user.hasRight(HumanRights.ACCESS_DOCUMENTS)) {
        documentMenuItem = menu.addViewMenuItem(DocumentsView.TITLE, DocumentsView.ID, FontAwesome.FILE_TEXT_O,
                documentBadge);

    }
    if (user.hasRight(EngineRights.READ_MODEL) && user.hasRight(EngineRights.CREATE_MODEL_INSTANCE)) {
        runModelMenuItem = menu.addViewMenuItem(RunModelView.TITLE, RunModelView.ID,
                FontAwesome.CARET_SQUARE_O_RIGHT, runModelBadge);
    }

    // Examples:
    // 1. add link to a custom document but only if the user has rights to access it.
    //      if (hasRightToOpenDocument("ExampleModule::exampleDoc")) {
    //         menu.addDocumentItem("example", "ExampleModule::exampleDoc", null, FontAwesome.ADN, null);
    //      }

    // 2. run model instance
    //      menu.addRunModelItem("example2", "ExampleModule", null, FontAwesome.ADJUST, null);

    // 3. menu separator
    //      menu.addMenuSeparator("example", 123);
}