Example usage for com.vaadin.server FontAwesome FOLDER_O

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

Introduction

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

Prototype

FontAwesome FOLDER_O

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

Click Source Link

Usage

From source file:com.hybridbpm.ui.view.DocumentView.java

License:Apache License

public DocumentView() {
    Design.read(this);
    tabSheet.getTab(documentsLayout).setCaption(Translate.getMessage("Documents"));
    btnSearch.setCaption(Translate.getMessage("btnSearch"));
    btnRefresh.setCaption(Translate.getMessage("btnRefresh"));
    btnAddFile.setCaption(Translate.getMessage("btnAddFile"));
    btnAddFolder.setCaption(Translate.getMessage("btnAddFolder"));
    textFieldSearch.setCaption(Translate.getMessage("textFieldSearch"));

    Responsive.makeResponsive(panelLayout);
    btnAddFolder.setIcon(FontAwesome.FOLDER_O);
    btnAddFolder.addClickListener(this);
    btnAddFile.setIcon(FontAwesome.FILE_O);
    btnAddFile.addClickListener(this);

    btnRefresh.setIcon(FontAwesome.REFRESH);
    btnRefresh.addClickListener(this);

    textFieldSearch.setIcon(FontAwesome.SEARCH);

    documentsLayout.setMargin(new MarginInfo(true, false, false, false));
    documentsLayout.setExpandRatio(documentTable, 1f);

    documentTable.addContainerProperty("name", String.class, null, Translate.getMessage("tableDocumentsName"),
            null, Table.Align.LEFT);/*from w ww  . jav  a 2 s.c  o  m*/
    documentTable.setColumnExpandRatio("name", 1f);
    documentTable.addContainerProperty("description", String.class, null,
            Translate.getMessage("tableDocumentsTitle"), null, Table.Align.LEFT);
    documentTable.addContainerProperty("creator", String.class, null,
            Translate.getMessage("tableDocumentsCreator"), null, Table.Align.LEFT);
    documentTable.addContainerProperty("createDate", Date.class, null,
            Translate.getMessage("tableDocumentsCreateDate"), null, Table.Align.LEFT);
    documentTable.addContainerProperty("updateDate", Date.class, null,
            Translate.getMessage("tableDocumentsUpdateDate"), null, Table.Align.LEFT);
    documentTable.addContainerProperty("actions", TableButtonBar.class, null,
            Translate.getMessage("tableDocumentsActions"), null, Table.Align.LEFT);
    documentTable.setColumnWidth("createDate", 150);
    documentTable.setColumnWidth("updateDate", 150);
    documentTable.setColumnWidth("actions", 55);
    documentTable.addGeneratedColumn("name", new DocumentColumnGenerator(this));
    documentTable.addGeneratedColumn("createDate", new DateColumnGenerator());
    documentTable.addGeneratedColumn("updateDate", new DateColumnGenerator());
    documentTable.setVisibleColumns("name", "description", "creator", "createDate", "updateDate", "actions");
    tabSheet.addSelectedTabChangeListener(this);
}