com.squadd.UI.MainPageLayout.java Source code

Java tutorial

Introduction

Here is the source code for com.squadd.UI.MainPageLayout.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.squadd.UI;

import com.squadd.javaBeans.Contact;
import com.squadd.technical.Display;
import com.vaadin.server.Resource;
import com.vaadin.server.ThemeResource;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Image;
import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
import java.awt.Dimension;
import java.awt.Toolkit;

/**
 *
 * @author SharkNado
 */
public class MainPageLayout extends HorizontalLayout {
    private HeaderLayout header;
    private MenuLayout menu;
    private ContentLayout content;

    public MainPageLayout(Contact contact, Panel contentPanel) {
        header = new HeaderLayout(contact);
        menu = new MenuLayout();
        content = new ContentLayout(contentPanel);

        HorizontalLayout f0 = new HorizontalLayout();
        HorizontalLayout f1 = new HorizontalLayout();
        VerticalLayout f01 = new VerticalLayout();
        f0.addComponent(header);
        f1.addComponents(menu, content);
        f01.addComponents(f0, f1);
        addComponent(f01);
    }

    public HeaderLayout getHeader() {
        return header;
    }

    public MenuLayout getMenu() {
        return menu;
    }

    public ContentLayout getContent() {
        return content;
    }

    public void setContent(Panel panel) {
        content.setContentPanel(panel);
    }

}