19 package org.sleuthkit.autopsy.contentviewers;
21 import java.awt.CardLayout;
22 import java.awt.Component;
23 import java.awt.Dimension;
24 import java.util.ArrayList;
25 import java.util.List;
26 import java.util.logging.Level;
56 videoPanelInited = videoPanel.
isInited();
59 imagePanelInited = imagePanel.
isInited();
62 LOGGER.log(Level.INFO,
"Created MediaView instance: {0}",
this);
66 add(imagePanel, IMAGE_VIEWER_LAYER);
67 add(videoPanel, VIDEO_VIEWER_LAYER);
77 @SuppressWarnings(
"unchecked")
81 setLayout(
new java.awt.CardLayout());
82 getAccessibleContext().setAccessibleDescription(
org.openide.util.NbBundle.getMessage(
MediaFileViewer.class,
"MediaFileViewer.AccessibleContext.accessibleDescription"));
95 List<String> mimeTypes =
new ArrayList<>();
118 if (file.equals(lastFile)) {
126 if (videoPanelInited && videoPanel.
isSupported(file)) {
127 videoPanel.setupVideo(file, dims);
129 }
else if (imagePanelInited && imagePanel.
isSupported(file)) {
130 imagePanel.showImageFx(file, dims);
133 }
catch (Exception e) {
134 LOGGER.log(Level.SEVERE,
"Exception while setting node", e);
144 CardLayout layout = (CardLayout) this.getLayout();
146 layout.show(
this, VIDEO_VIEWER_LAYER);
148 layout.show(
this, IMAGE_VIEWER_LAYER);
164 interface MediaViewPanel {
169 List<String> getMimeTypes();
176 List<String> getExtensionsList();
178 boolean isSupported(AbstractFile file);
void customizeComponents()
static final Logger LOGGER
boolean isSupported(AbstractFile file)
final MediaViewVideoPanel videoPanel
List< String > getMimeTypes()
boolean isSupported(AbstractFile file)
final boolean imagePanelInited
void setFile(AbstractFile file)
abstract boolean isInited()
abstract List< String > getMimeTypes()
final MediaViewImagePanel imagePanel
final boolean videoPanelInited
synchronized static Logger getLogger(String name)
void showVideoPanel(boolean showVideo)
List< String > getSupportedMIMETypes()
static final String IMAGE_VIEWER_LAYER
static final String VIDEO_VIEWER_LAYER
static MediaViewVideoPanel createVideoPanel()