19 package org.sleuthkit.autopsy.timeline;
21 import java.awt.Component;
22 import java.util.logging.Level;
23 import javafx.application.Platform;
24 import javax.swing.ImageIcon;
25 import javax.swing.JButton;
26 import javax.swing.JMenuItem;
27 import org.openide.awt.ActionID;
28 import org.openide.awt.ActionReference;
29 import org.openide.awt.ActionReferences;
30 import org.openide.awt.ActionRegistration;
31 import org.openide.util.HelpCtx;
32 import org.openide.util.NbBundle;
33 import org.openide.util.actions.CallableSystemAction;
51 @ActionID(category =
"Tools",
id =
"org.sleuthkit.autopsy.timeline.Timeline")
52 @ActionRegistration(displayName =
"#CTL_MakeTimeline", lazy =
false)
53 @ActionReferences(value = {
54 @ActionReference(path =
"Menu/Tools", position = 104)
56 @ActionReference(path =
"Toolbars/Case", position = 104)})
59 private static final long serialVersionUID = 1L;
61 private static final int FILE_LIMIT = 6_000_000;
64 private final JButton toolbarButton =
new JButton(getName(),
65 new ImageIcon(getClass().getResource(
"images/btn_icon_timeline_colorized_26.png")));
69 toolbarButton.addActionListener(actionEvent -> performAction());
70 menuItem = super.getMenuPresenter();
71 this.setEnabled(
false);
86 public
void performAction() {
88 Platform.runLater(PromptDialogManager::showTooManyFiles);
91 Platform.runLater(PromptDialogManager::showTimeLineDisabledMessage);
96 }
catch (TskCoreException ex) {
98 logger.log(Level.SEVERE,
"Error showingtimeline.", ex);
104 "OpenTimelineAction.settingsErrorMessage=Failed to initialize timeline settings.",
105 "OpenTimeLineAction.msgdlg.text=Could not create timeline, there are no data sources."})
106 synchronized private void showTimeline(AbstractFile file, BlackboardArtifact artifact)
throws TskCoreException {
109 if (currentCase.
hasData() ==
false) {
111 logger.log(Level.INFO,
"Could not create timeline, there are no data sources.");
115 controller.showTimeLine(file, artifact);
125 public
void showTimeline() throws TskCoreException {
126 showTimeline(null, null);
137 public
void showFileInTimeline(AbstractFile file) throws TskCoreException {
138 showTimeline(file, null);
148 public
void showArtifactInTimeline(BlackboardArtifact artifact) throws TskCoreException {
149 showTimeline(null, artifact);
153 @NbBundle.Messages(
"OpenTimelineAction.displayName=Timeline")
155 return Bundle.OpenTimelineAction_displayName();
160 return HelpCtx.DEFAULT_HELP;
175 super.setEnabled(enable);
176 menuItem.setEnabled(enable);
177 toolbarButton.setEnabled(enable);
187 return toolbarButton;
199 logger.log(Level.SEVERE,
"Can not open timeline with no case open.", ex);
200 }
catch (TskCoreException ex) {
201 logger.log(Level.SEVERE,
"Error counting files in the DB.", ex);
static synchronized String getConfigSetting(String moduleName, String settingName)
Component getToolbarPresenter()
static boolean isJavaFxInited()
void setEnabled(boolean enable)
JMenuItem getMenuPresenter()
SleuthkitCase getSleuthkitCase()
synchronized void showTimeline(AbstractFile file, BlackboardArtifact artifact)
synchronized static Logger getLogger(String name)
static Case getCurrentCaseThrows()
static TimeLineController getController()
static void info(String message)
static boolean isCaseOpen()
static void error(String message)