mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
cleanup comments and imports
This commit is contained in:
parent
2c4a7fa6ff
commit
eb714b9449
@ -81,9 +81,7 @@ import org.sleuthkit.autopsy.timeline.events.ViewInTimelineRequestedEvent;
|
|||||||
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.DetailViewEvent;
|
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.DetailViewEvent;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.DefaultFilterState;
|
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.DefaultFilterState;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.DescriptionFilterState;
|
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.DescriptionFilterState;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.FilterState;
|
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.RootFilterState;
|
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.RootFilterState;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.UIFilter;
|
|
||||||
import org.sleuthkit.autopsy.timeline.utils.IntervalUtils;
|
import org.sleuthkit.autopsy.timeline.utils.IntervalUtils;
|
||||||
import org.sleuthkit.autopsy.timeline.zooming.TimeUnits;
|
import org.sleuthkit.autopsy.timeline.zooming.TimeUnits;
|
||||||
import org.sleuthkit.autopsy.timeline.zooming.ZoomState;
|
import org.sleuthkit.autopsy.timeline.zooming.ZoomState;
|
||||||
|
@ -60,7 +60,6 @@ import org.sleuthkit.autopsy.timeline.ui.AbstractTimelineChart;
|
|||||||
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.DetailViewEvent;
|
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.DetailViewEvent;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.DetailsViewModel;
|
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.DetailsViewModel;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.EventStripe;
|
import org.sleuthkit.autopsy.timeline.ui.detailview.datamodel.EventStripe;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.UIFilter;
|
|
||||||
import org.sleuthkit.autopsy.timeline.utils.MappedList;
|
import org.sleuthkit.autopsy.timeline.utils.MappedList;
|
||||||
import org.sleuthkit.autopsy.timeline.zooming.ZoomState;
|
import org.sleuthkit.autopsy.timeline.zooming.ZoomState;
|
||||||
import org.sleuthkit.datamodel.DescriptionLoD;
|
import org.sleuthkit.datamodel.DescriptionLoD;
|
||||||
|
@ -24,8 +24,6 @@ import org.controlsfx.control.action.Action;
|
|||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.DescriptionFilter;
|
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.DescriptionFilter;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.DescriptionFilterState;
|
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.DescriptionFilterState;
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.FilterState;
|
|
||||||
import org.sleuthkit.autopsy.timeline.ui.filtering.datamodel.UIFilter;
|
|
||||||
import org.sleuthkit.datamodel.DescriptionLoD;
|
import org.sleuthkit.datamodel.DescriptionLoD;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* To change this license header, choose License Headers in Project Properties.
|
* Autopsy Forensic Browser
|
||||||
* To change this template file, choose Tools | Templates
|
*
|
||||||
* and open the template in the editor.
|
* Copyright 2018 Basis Technology Corp.
|
||||||
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.timeline.ui.filtering.datamodel;
|
package org.sleuthkit.autopsy.timeline.ui.filtering.datamodel;
|
||||||
|
|
||||||
@ -13,70 +26,80 @@ import javafx.beans.property.BooleanProperty;
|
|||||||
import javafx.beans.property.SimpleBooleanProperty;
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* A FilterState implementation for DescriptionFilters
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DescriptionFilterState implements FilterState<DescriptionFilter> {
|
public class DescriptionFilterState implements FilterState<DescriptionFilter> {
|
||||||
|
|
||||||
private final DescriptionFilter filter;
|
private final DescriptionFilter filter;
|
||||||
|
|
||||||
public DescriptionFilterState(DescriptionFilter filter) {
|
public DescriptionFilterState(DescriptionFilter filter) {
|
||||||
this(filter, false);
|
this(filter, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DescriptionFilterState(DescriptionFilter filter, boolean selected) {
|
public DescriptionFilterState(DescriptionFilter filter, boolean selected) {
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
this.selected.set(selected);
|
this.selected.set(selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final SimpleBooleanProperty selected = new SimpleBooleanProperty(false);
|
private final SimpleBooleanProperty selected = new SimpleBooleanProperty(false);
|
||||||
private final SimpleBooleanProperty disabled = new SimpleBooleanProperty(false);
|
private final SimpleBooleanProperty disabled = new SimpleBooleanProperty(false);
|
||||||
private final BooleanBinding activeProp = Bindings.and(selected, disabled.not());
|
private final BooleanBinding activeProp = Bindings.and(selected, disabled.not());
|
||||||
|
|
||||||
|
@Override
|
||||||
public BooleanProperty selectedProperty() {
|
public BooleanProperty selectedProperty() {
|
||||||
return selected;
|
return selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public BooleanProperty disabledProperty() {
|
public BooleanProperty disabledProperty() {
|
||||||
return disabled;
|
return disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setSelected(Boolean act) {
|
public void setSelected(Boolean act) {
|
||||||
selected.set(act);
|
selected.set(act);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isSelected() {
|
public boolean isSelected() {
|
||||||
return selected.get();
|
return selected.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setDisabled(Boolean act) {
|
public void setDisabled(Boolean act) {
|
||||||
disabled.set(act);
|
disabled.set(act);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isDisabled() {
|
public boolean isDisabled() {
|
||||||
return disabledProperty().get();
|
return disabledProperty().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isActive() {
|
public boolean isActive() {
|
||||||
return activeProperty().get();
|
return activeProperty().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public BooleanExpression activeProperty() {
|
public BooleanExpression activeProperty() {
|
||||||
return activeProp;
|
return activeProp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return filter.getDescription();
|
return filter.getDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public DescriptionFilter getFilter() {
|
public DescriptionFilter getFilter() {
|
||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public DescriptionFilter getActiveFilter() {
|
public DescriptionFilter getActiveFilter() {
|
||||||
return isActive() ? getFilter() : null;
|
return isActive() ? getFilter() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 7;
|
int hash = 7;
|
||||||
@ -85,7 +108,7 @@ public class DescriptionFilterState implements FilterState<DescriptionFilter> {
|
|||||||
hash = 37 * hash + Objects.hashCode(this.disabled);
|
hash = 37 * hash + Objects.hashCode(this.disabled);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (this == obj) {
|
if (this == obj) {
|
||||||
@ -109,7 +132,7 @@ public class DescriptionFilterState implements FilterState<DescriptionFilter> {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DescriptionFilterState copyOf() {
|
public DescriptionFilterState copyOf() {
|
||||||
DescriptionFilterState copy = new DescriptionFilterState(filter);
|
DescriptionFilterState copy = new DescriptionFilterState(filter);
|
||||||
|
@ -20,7 +20,6 @@ package org.sleuthkit.autopsy.timeline.ui.filtering.datamodel;
|
|||||||
|
|
||||||
import javafx.beans.binding.BooleanExpression;
|
import javafx.beans.binding.BooleanExpression;
|
||||||
import javafx.beans.property.ReadOnlyBooleanProperty;
|
import javafx.beans.property.ReadOnlyBooleanProperty;
|
||||||
import org.sleuthkit.datamodel.timeline.TimelineFilter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The state of a filter: selected, disabled, active, etc.
|
* The state of a filter: selected, disabled, active, etc.
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package org.sleuthkit.autopsy.timeline.ui.filtering.datamodel;
|
package org.sleuthkit.autopsy.timeline.ui.filtering.datamodel;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import java.util.function.Predicate;
|
|
||||||
import javafx.beans.property.ReadOnlyBooleanProperty;
|
import javafx.beans.property.ReadOnlyBooleanProperty;
|
||||||
import javafx.beans.property.ReadOnlyBooleanWrapper;
|
import javafx.beans.property.ReadOnlyBooleanWrapper;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
|
@ -22,7 +22,7 @@ import java.util.function.Predicate;
|
|||||||
import org.sleuthkit.datamodel.timeline.TimelineEvent;
|
import org.sleuthkit.datamodel.timeline.TimelineEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* A Filter over TimelineEvents that is applied in the UI, not the DB. *
|
||||||
*/
|
*/
|
||||||
public interface UIFilter extends Predicate<TimelineEvent> {
|
public interface UIFilter extends Predicate<TimelineEvent> {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user