Example usage for com.vaadin.ui CustomLayout CustomLayout

List of usage examples for com.vaadin.ui CustomLayout CustomLayout

Introduction

In this page you can find the example usage for com.vaadin.ui CustomLayout CustomLayout.

Prototype

public CustomLayout(String template) 

Source Link

Document

Constructor for custom layout with given template name.

Usage

From source file:ac.uk.icl.dell.vaadin.glycanbuilder.GlycanBuilderWindow.java

License:Open Source License

@Override
public void init() {
    Window mainWindow = new Window();
    setMainWindow(mainWindow);/* ww w. ja  va 2  s.  c om*/
    setTheme("ucdb_2011theme");

    SimpleFileMenu menu = new SimpleFileMenu();

    CustomLayout layout = new CustomLayout("header_content_footer_layout");
    layout.addComponent(menu, "header");
}

From source file:at.peppol.webgui.app.MainWindow.java

License:Mozilla Public License

@SuppressWarnings("unused")
private void createHeaderMenu() {
    topBarLayout.setMargin(false, false, false, false);
    topBarLayout.setSizeFull();//w ww .j  a v  a2  s.  co m
    final CustomLayout custom = new CustomLayout("header-menu");
    topBarLayout.addComponent(custom);

    // Button ok = new Button("Login");
    // ok.removeStyleName ("v-button-wrap");
    // ok.addStyleName ("btn btn-success");
    // custom.addComponent(ok, "okbutton");

    addComponent(topBarLayout);
}

From source file:ch.bfh.ti.soed.hs16.srs.white.view.TemplateLayout.java

License:Open Source License

@Override
public Component load() {
    CustomLayout customLayout = new CustomLayout("template");

    LogInView logInView = new LogInView();
    body.addComponent(logInView.load());

    customLayout.addComponent(body, "body");
    return customLayout;
}

From source file:com.esofthead.mycollab.web.CustomLayoutExt.java

License:Open Source License

public static CustomLayout createLayout(String layoutId) {
    try {/*from  w ww.j  a va 2s.co  m*/
        return new CustomLayout(
                CustomLayoutExt.class.getClassLoader().getResourceAsStream("layouts/" + layoutId + ".html"));
    } catch (Exception e) {
        throw new MyCollabException(e);
    }
}

From source file:com.esofthead.mycollab.web.CustomLayoutLoader.java

License:Open Source License

public static CustomLayout createLayout(String layoutId) {
    try {/* w w  w.jav a2 s  .c  o m*/
        return new CustomLayout(
                CustomLayoutLoader.class.getClassLoader().getResourceAsStream("layouts/" + layoutId + ".html"));
    } catch (Exception e) {
        throw new MyCollabException(e);
    }
}

From source file:com.foc.vaadin.gui.components.htmlTable.FVHtmlTable.java

License:Apache License

private void drawTable() {
    FocDataWrapper focDataWrapper = getFocDataWrapper();
    if (focDataWrapper != null) {
        FVTableColumn tableColumn = null;
        FVHtmlTableRow htmlTableRow = null;
        FVHtmlTableCell htmlTableCell = null;

        //Table Header
        openTableTag();//  ww w.j  a  v  a  2  s  .  com
        htmlTableRow = newRow(null, -1);
        for (int j = 0; j < getTableTreeDelegate().getVisiblePropertiesArrayList().size(); j++) {
            tableColumn = getTableTreeDelegate().getVisiblePropertiesArrayList().get(j);
            if (tableColumn != null) {
                htmlTableRow.newHeaderCell(tableColumn);
            }
        }
        htmlTableRow.closeRowTag();

        //Table Content
        FocObject focObject = null;
        for (int rowIndex = 0; rowIndex < focDataWrapper.size(); rowIndex++) {
            focObject = focDataWrapper.getAt(rowIndex);
            if (focObject != null) {
                htmlTableRow = newRow(focObject, rowIndex);
                for (int columnIndex = 0; columnIndex < getTableTreeDelegate().getVisiblePropertiesArrayList()
                        .size(); columnIndex++) {
                    tableColumn = getTableTreeDelegate().getVisiblePropertiesArrayList().get(columnIndex);
                    if (tableColumn != null) {
                        htmlTableCell = htmlTableRow.newCell(tableColumn);
                    }
                }
                htmlTableRow.closeRowTag();
            }
        }
        closeTableTag();
        getHtmlTableTags().closeBodyTag();
        getHtmlTableTags().closeHtmlTag();
    }

    try {
        CustomLayout customLayout = new CustomLayout(getHtmlTableTags().getTableByteArrayInputStream());
        customLayout.setSizeFull();
        //         customLayout.setHeight("-1px");
        addComponent(customLayout);
    } catch (IOException e) {
        e.printStackTrace();
    }
}

From source file:com.foc.vaadin.gui.layouts.FVHTMLLayout.java

License:Apache License

public void parseAndBuildHtml(String html) {
    BufferedReader bufferedReader = new BufferedReader(new StringReader(html));
    String line = null;//from  ww  w . j ava 2 s  . c om
    StringBuilder stringBuilder = new StringBuilder();
    try {
        while ((line = bufferedReader.readLine()) != null) {
            if (line != null && !line.isEmpty()) {
                if (line.contains("$")) {
                    String value = resolveExpression(line);
                    line = line.replace(line, value);
                }
                stringBuilder.append(line);
            }
        }
    } catch (IOException e1) {
        Globals.logException(e1);
    }

    InputStream inputStream = new ByteArrayInputStream(stringBuilder.toString().getBytes());
    try {
        customLayout = new CustomLayout(inputStream);
    } catch (IOException e) {
        Globals.logException(e);
    }
    addComponent(customLayout);
    stringBuilder = null;
    bufferedReader = null;
}

From source file:com.haulmont.cuba.web.gui.components.WebHtmlBoxLayout.java

License:Apache License

public WebHtmlBoxLayout() {
    component = new CustomLayout("");
}

From source file:com.klwork.explorer.project.ProjectSearchPanel.java

License:Apache License

protected void initInputField() {
    // Csslayout is used to style inputtext as rounded
    //CssLayout csslayout2 = new CssLayout();
    CustomLayout csslayout = new CustomLayout("circularButton");
    csslayout.setHeight(24, Unit.PIXELS);
    csslayout.setWidth(100, Unit.PERCENTAGE);
    layout.addComponent(csslayout);/*w w w  .java  2  s .c  o m*/

    inputField = new TextField();
    inputField.setWidth(50, Unit.PERCENTAGE);
    inputField.addStyleName(ExplorerLayout.STYLE_SEARCHBOX);
    inputField.setInputPrompt("??");
    inputField.focus();
    csslayout.addComponent(inputField, "searchInput");

    layout.setComponentAlignment(csslayout, Alignment.MIDDLE_LEFT);
    layout.setExpandRatio(csslayout, 1.0f);
}

From source file:com.klwork.explorer.ui.business.outproject.ProjectSearchPanel.java

License:Apache License

protected void initInputField() {
    // Csslayout is used to style inputtext as rounded
    //CssLayout csslayout2 = new CssLayout();
    CustomLayout csslayout = new CustomLayout("circularButton");
    //csslayout.setHeight(24, Unit.PIXELS);
    csslayout.setWidth(100, Unit.PERCENTAGE);
    layout.addComponent(csslayout);/* ww  w .ja  v a  2  s . c  o m*/

    inputField = new TextField();
    inputField.setWidth(50, Unit.PERCENTAGE);
    inputField.addStyleName(ExplorerLayout.STYLE_SEARCHBOX);
    inputField.setInputPrompt("??");
    inputField.focus();
    csslayout.addComponent(inputField, "searchInput");

    layout.setComponentAlignment(csslayout, Alignment.MIDDLE_LEFT);
    layout.setExpandRatio(csslayout, 1.0f);
}