mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
fix bugs from merge
This commit is contained in:
parent
e2856da2e7
commit
620aa4fcab
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.timeline.datamodel;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.sleuthkit.autopsy.timeline.datamodel.eventtype.EventType;
|
import org.sleuthkit.autopsy.timeline.datamodel.eventtype.EventType;
|
||||||
|
|
||||||
@ -108,4 +109,42 @@ public class CombinedEvent {
|
|||||||
public Long getRepresentitiveEventID() {
|
public Long getRepresentitiveEventID() {
|
||||||
return eventTypeMap.values().stream().findFirst().get();
|
return eventTypeMap.values().stream().findFirst().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = 3;
|
||||||
|
hash = 53 * hash + (int) (this.fileID ^ (this.fileID >>> 32));
|
||||||
|
hash = 53 * hash + (int) (this.epochMillis ^ (this.epochMillis >>> 32));
|
||||||
|
hash = 53 * hash + Objects.hashCode(this.description);
|
||||||
|
hash = 53 * hash + Objects.hashCode(this.eventTypeMap);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (getClass() != obj.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final CombinedEvent other = (CombinedEvent) obj;
|
||||||
|
if (this.fileID != other.fileID) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.epochMillis != other.epochMillis) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(this.description, other.description)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!Objects.equals(this.eventTypeMap, other.eventTypeMap)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public abstract class AbstractTimelineChart<X, Y, NodeType extends Node, ChartTy
|
|||||||
private static final Logger LOGGER = Logger.getLogger(AbstractTimelineChart.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(AbstractTimelineChart.class.getName());
|
||||||
|
|
||||||
@NbBundle.Messages("AbstractTimelineChart.defaultTooltip.text=Drag the mouse to select a time interval to zoom into.\nRight-click for more actions.")
|
@NbBundle.Messages("AbstractTimelineChart.defaultTooltip.text=Drag the mouse to select a time interval to zoom into.\nRight-click for more actions.")
|
||||||
private static final Tooltip DEFAULT_TOOLTIP = new Tooltip(Bundle.AbstractTimelineChart_Default_Tooltip_text());
|
private static final Tooltip DEFAULT_TOOLTIP = new Tooltip(Bundle.AbstractTimelineChart_defaultTooltip_text());
|
||||||
private static final Border ONLY_LEFT_BORDER = new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(0, 0, 0, 1)));
|
private static final Border ONLY_LEFT_BORDER = new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(0, 0, 0, 1)));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -206,12 +206,12 @@ class ListTimeline extends BorderPane {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the ID of the event that is selected.
|
* Set the combineded events that are selected in this view.
|
||||||
*
|
*
|
||||||
* @param selectedEventID The ID of the event that should be selected.
|
* @param selectedEvents The events that should be selected.
|
||||||
*/
|
*/
|
||||||
void selectEvents(Collection<CombinedEvent> selectedEvents) {
|
void selectEvents(Collection<CombinedEvent> selectedEvents) {
|
||||||
CombinedEvent firstSelected = selectedEvents.stream().min(Comparator.comparing(CombinedEvent::getStartMillis)).orElseGet(null);
|
CombinedEvent firstSelected = selectedEvents.stream().min(Comparator.comparing(CombinedEvent::getStartMillis)).orElse(null);
|
||||||
table.getSelectionModel().clearSelection();
|
table.getSelectionModel().clearSelection();
|
||||||
table.scrollTo(firstSelected);
|
table.scrollTo(firstSelected);
|
||||||
selectedEvents.forEach(table.getSelectionModel()::select);
|
selectedEvents.forEach(table.getSelectionModel()::select);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user