First pass at Video window

This commit is contained in:
Seth Morabito committed 2013-12-27 21:40:28 -08:00
1 parent a5af522c5c
commit e7e3c77e3f
9 files changed
+496 -27

No files matched your search

@@ -0,0 +1,39 @@
package com.loomcom.symon.ui;
import javax.swing.*;
import java.awt.*;
public class VideoWindow extends JFrame {
private CrtPanel crtPanel;
public VideoWindow(CrtPanel crtPanel) {
this.crtPanel = crtPanel;
createUi();
}
public void createUi() {
setTitle("Composite Video");
int borderWidth = (int) (crtPanel.getWidth() * 0.08);
int borderHeight = (int) (crtPanel.getHeight() * 0.08);
JPanel containerPane = new JPanel();
containerPane.setBorder(BorderFactory.createEmptyBorder(borderHeight, borderWidth, borderHeight, borderWidth));
containerPane.setLayout(new BorderLayout());
containerPane.setBackground(Color.black);
containerPane.add(crtPanel, BorderLayout.CENTER);
getContentPane().add(containerPane);
setResizable(false);
pack();
}
public void refreshDisplay() {
// TODO: Verify whether this is necessary. Does `repaint()' do anything if the window is not visible?
if (isVisible()) {
repaint();
}
}
}