package kinectintruderalarm;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.GridLayout;
import javax.swing.*;

/**Class providing output panels for KinectTCPClient image and depth data. Contains
 * nested classes for different image purposes.
 *
 * @author Rolf Lakaemper
 */
public class KinectOutputLIGHT extends JFrame {

    // ========================================================================
    // Main Class: KinectOutput
    // ========================================================================
    /** Main class: kinect output. Frames panels for depth, rgb, point cloud and skeleton.
     * 
     */
    public KoImagePanelLIGHT depth, rgb;
    public KoDepthPanelLIGHT depthXYZ;


    public KinectOutputLIGHT() {
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        depthXYZ = new KoDepthPanelLIGHT(640, 480);

        this.getContentPane().add(depthXYZ);

        pack();
        this.setVisible(true);
    }



    // -----------------------------------------------------------------------
    public void displayDepthXYZ(int[][] xyz) {
        while (depthXYZ.painting) {
            try {
                Thread.sleep(1);
            } catch (InterruptedException ex) {
            }
        }
        depthXYZ.xyz = xyz;
        depthXYZ.repaint();
    }
}
