src/main/java/edu/kit/informatik/pcc/webinterface/gui/MyUI.java
/**
     * Sets the site up after login. Creates Menu and Navigator and the loads the VideoView.
     */
Sets the site up after login. Creates Menu and Navigator and the loads the VideoView.
Sets the site up after login . Creates Menu and Navigator and the loads the VideoView .
public void login() {
        background = new HorizontalLayout();
        background.setHeight(100, Unit.PERCENTAGE);
        setContent(background);
        contentArea.setSizeFull();
        Navigator navigator = new Navigator(this, contentArea);
        navigator.addView(AccountView.viewID, new AccountView(this));
        navigator.addView(VideoView.viewID, new VideoView());
        navigator.addView(PrivacyView.viewID, new PrivacyView());
        navigator.addView(ImpressumView.viewID, new ImpressumView());
        navigator.setErrorView(new VideoView());
        this.setNavigator(navigator);
        Menu menu = new Menu(this);
        menu.addMenuItem(messages.getString(AccountView.viewID), AccountView.viewID);
        menu.addMenuItem(messages.getString(VideoView.viewID), VideoView.viewID);
        menu.addMenuItem(messages.getString(PrivacyView.viewID), PrivacyView.viewID);
        menu.addMenuItem(messages.getString(ImpressumView.viewID), ImpressumView.viewID);
        menu.addLogout();
        menuArea.addComponent(menu);
        menuArea.setHeight(100, Unit.PERCENTAGE);
        Account account = (Account) getSession().getAttribute(SESSION_KEY_ACCOUNT);
        menu.addUserMenu(account.getMail());
        menu.setSizeUndefined();
        background.addComponent(menuArea);
        background.addComponent(contentArea);
        navigator.navigateTo(VideoView.viewID);
    }
public void login ( ) { background = new HorizontalLayout ( ) ; background . setHeight ( 100 , Unit . PERCENTAGE ) ; setContent ( background ) ; contentArea . setSizeFull ( ) ; Navigator navigator = new Navigator ( this , contentArea ) ; navigator . addView ( AccountView . viewID , new AccountView ( this ) ) ; navigator . addView ( VideoView . viewID , new VideoView ( ) ) ; navigator . addView ( PrivacyView . viewID , new PrivacyView ( ) ) ; navigator . addView ( ImpressumView . viewID , new ImpressumView ( ) ) ; navigator . setErrorView ( new VideoView ( ) ) ; this . setNavigator ( navigator ) ; Menu menu = new Menu ( this ) ; menu . addMenuItem ( messages . getString ( AccountView . viewID ) , AccountView . viewID ) ; menu . addMenuItem ( messages . getString ( VideoView . viewID ) , VideoView . viewID ) ; menu . addMenuItem ( messages . getString ( PrivacyView . viewID ) , PrivacyView . viewID ) ; menu . addMenuItem ( messages . getString ( ImpressumView . viewID ) , ImpressumView . viewID ) ; menu . addLogout ( ) ; menuArea . addComponent ( menu ) ; menuArea . setHeight ( 100 , Unit . PERCENTAGE ) ; Account account = ( Account ) getSession ( ) . getAttribute ( SESSION_KEY_ACCOUNT ) ; menu . addUserMenu ( account . getMail ( ) ) ; menu . setSizeUndefined ( ) ; background . addComponent ( menuArea ) ; background . addComponent ( contentArea ) ; navigator . navigateTo ( VideoView . viewID ) ; }
Sets the site up after login.
Sets the site up after login .
//set User after login and add menu to the view //set up the menu //menuArea.setWidth(200, Unit.PIXELS);