com.squadd.UI.ChatAndParticipantsLayout.java Source code

Java tutorial

Introduction

Here is the source code for com.squadd.UI.ChatAndParticipantsLayout.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.Group;
import com.squadd.technical.Display;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;

/**
 *
 * @author SharkNado
 */
public class ChatAndParticipantsLayout extends HorizontalLayout {
    private Panel parts;
    private Panel grChat;
    private GroupChatLayout groupChat;
    private GroupParticipantsLayout groupPart;
    private boolean isClickedpart;
    private boolean isClickedchat;

    public ChatAndParticipantsLayout(Group group) {
        Label label = new Label("Participants");
        label.setSizeUndefined();
        HorizontalLayout hor = new HorizontalLayout();
        hor.setWidth(0.67 * Display.width + "px");
        hor.addComponent(label);
        hor.setComponentAlignment(label, Alignment.TOP_CENTER);
        parts.setWidth(0.68 * Display.width + "px");
        parts.setContent(hor);
        parts.setStyleName("backColorGrey");

        Label label1 = new Label("Group Chat");
        label1.setSizeUndefined();
        HorizontalLayout hor1 = new HorizontalLayout();
        hor1.setWidth(0.67 * Display.width + "px");
        hor1.addComponent(label);
        hor1.setComponentAlignment(label, Alignment.TOP_CENTER);
        grChat.setWidth(0.68 * Display.width + "px");
        grChat.setContent(hor);
        grChat.setStyleName("backColorGrey");

    }
}