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.joda.time.Interval;
 
   28 import org.openide.awt.ActionID;
 
   29 import org.openide.awt.ActionReference;
 
   30 import org.openide.awt.ActionReferences;
 
   31 import org.openide.awt.ActionRegistration;
 
   32 import org.openide.util.HelpCtx;
 
   33 import org.openide.util.NbBundle;
 
   34 import org.openide.util.actions.CallableSystemAction;
 
   50 @ActionID(category = 
"Tools", 
id = 
"org.sleuthkit.autopsy.timeline.Timeline")
 
   51 @ActionRegistration(displayName = 
"#CTL_MakeTimeline", lazy = 
false)
 
   52 @ActionReferences(value = {
 
   53     @ActionReference(path = 
"Menu/Tools", position = 104),
 
   54     @ActionReference(path = 
"Toolbars/Case", position = 104)})
 
   57     private static final long serialVersionUID = 1L;
 
   59     private static final int FILE_LIMIT = 6_000_000;
 
   62     private final JButton toolbarButton = 
new JButton(getName(),
 
   63             new ImageIcon(getClass().getResource(
"images/btn_icon_timeline_colorized_26.png"))); 
 
   66         toolbarButton.addActionListener(actionEvent -> performAction());
 
   67         menuItem = super.getMenuPresenter();
 
   68         this.setEnabled(
false);
 
   84     public 
void performAction() {
 
   86             Platform.runLater(PromptDialogManager::showTooManyFiles);
 
   89             Platform.runLater(PromptDialogManager::showTimeLineDisabledMessage);
 
   96                 logger.log(Level.SEVERE, 
"Error showingtimeline.", ex);
 
  102         "OpenTimelineAction.settingsErrorMessage=Failed to initialize timeline settings.",
 
  103         "OpenTimeLineAction.msgdlg.text=Could not create timeline, there are no data sources."})
 
  109                 logger.log(Level.INFO, 
"Could not create timeline, there are no data sources.");
 
  115             if (file == null && artifact == null) {
 
  116                 if (timeSpan == null) {
 
  117                     controller.showFullRange();
 
  122             controller.showTimeLine(file, artifact);
 
  133         showTimeline(null, null, null);
 
  144         showTimeline(null, null, timeSpan);
 
  156         showTimeline(file, null, null);
 
  167         showTimeline(null, artifact, null);
 
  171     @NbBundle.Messages(
"OpenTimelineAction.displayName=Timeline")
 
  173         return Bundle.OpenTimelineAction_displayName();
 
  178         return HelpCtx.DEFAULT_HELP;
 
  193         super.setEnabled(enable);
 
  194         menuItem.setEnabled(enable);
 
  195         toolbarButton.setEnabled(enable);
 
  205         return toolbarButton;
 
  217             logger.log(Level.SEVERE, 
"Can not open timeline with no case open.", ex);
 
  219             logger.log(Level.SEVERE, 
"Error counting files in the DB.", ex);
 
static synchronized String getConfigSetting(String moduleName, String settingName)
 
Component getToolbarPresenter()
 
static boolean isJavaFxInited()
 
synchronized void showTimeline(AbstractFile file, BlackboardArtifact artifact, Interval timeSpan)
 
void setEnabled(boolean enable)
 
volatile boolean hasDataSource
 
synchronized boolean pushTimeRange(Interval timeRange)
 
long countFilesWhere(String sqlWhereClause)
 
JMenuItem getMenuPresenter()
 
SleuthkitCase getSleuthkitCase()
 
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)