A LOT of changes!
Firstly a desktop icon system, secondly in the cameras ui you can now see time, thirdly you can now set the recording quality, lastly you have a desktop icon specifically for exporting!
This commit is contained in:
@@ -2,6 +2,8 @@ package io.swtc;
|
||||
|
||||
import com.github.sarxos.webcam.Webcam;
|
||||
import io.swtc.proccessing.ui.IconSetter;
|
||||
import io.swtc.proccessing.ui.desktop.DIM;
|
||||
import io.swtc.proccessing.ui.desktop.evidence.EvidenceExportFrame;
|
||||
import io.swtc.proccessing.ui.iframe.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -15,6 +17,7 @@ import java.util.Objects;
|
||||
public class SwingIFrame {
|
||||
private final JFrame mainFrame;
|
||||
private final DesktopPane desktopPane;
|
||||
private final DIM desktopIconManager;
|
||||
private final Map<JInternalFrame, EffectsPanelFrame> cameraToEffects = new HashMap<>();
|
||||
|
||||
private boolean fullscreen = false;
|
||||
@@ -25,6 +28,7 @@ public class SwingIFrame {
|
||||
|
||||
private final JPopupMenu popupMenu = new JPopupMenu();
|
||||
|
||||
|
||||
public SwingIFrame() {
|
||||
mainFrame = new JFrame("Viewer");
|
||||
mainFrame.setSize(1280, 720);
|
||||
@@ -36,6 +40,10 @@ public class SwingIFrame {
|
||||
desktopPane.setBackground(defDesktopBg);
|
||||
mainFrame.add(desktopPane, BorderLayout.CENTER);
|
||||
|
||||
desktopIconManager = new DIM(desktopPane);
|
||||
|
||||
setupDesktopExportFrame();
|
||||
|
||||
setupFullscreenToggle();
|
||||
setupBlackBg();
|
||||
initPopupMenu();
|
||||
@@ -43,6 +51,14 @@ public class SwingIFrame {
|
||||
desktopPane.addMouseListener(popupListener());
|
||||
}
|
||||
|
||||
private void setupDesktopExportFrame() {
|
||||
desktopIconManager.addIcon(
|
||||
"Export Evidence",
|
||||
IconSetter.getSaveIconAsImageIcon(),
|
||||
EvidenceExportFrame::showExport
|
||||
);
|
||||
}
|
||||
|
||||
public void addCameraInternalFrame(Webcam webcam) {
|
||||
CameraInternalFrame cameraFrame = new CameraInternalFrame(webcam, this::handleEffectsRequest);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user