com.save.employee.request.EmployeeRLUI.java Source code

Java tutorial

Introduction

Here is the source code for com.save.employee.request.EmployeeRLUI.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.save.employee.request;

import com.save.employee.EmployeesDataGridProperties;
import com.vaadin.ui.HorizontalSplitPanel;

/**
 *
 * @author jetdario
 */
public class EmployeeRLUI extends HorizontalSplitPanel {

    private int employeeId;

    public EmployeeRLUI() {
        setLocked(true);
        setSplitPosition(300, Unit.PIXELS);

        setFirstComponent(new EmployeesDataGridProperties(this, "request"));
        setSecondComponent(new RLUI(0));
    }

    public EmployeeRLUI(int employeeId) {
        this.employeeId = employeeId;
        setLocked(true);
        setSplitPosition(300, Unit.PIXELS);

        removeAllComponents();
        setFirstComponent(new EmployeesDataGridProperties(this, "request"));
        setSecondComponent(new RLUI(getEmployeeId()));
    }

    int getEmployeeId() {
        return employeeId;
    }

}