mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 02:07:42 +00:00
Merge pull request #1712 from millmanorama/TL-no-events-back
add "back" to actions available form no events dialog
This commit is contained in:
commit
7da4b34d43
@ -32,13 +32,16 @@ import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||
*/
|
||||
//TODO: This and the corresponding imageanalyzer action are identical except for the type of the controller... abstract something! -jm
|
||||
public class Back extends Action {
|
||||
|
||||
|
||||
private static final Image BACK_IMAGE = new Image("/org/sleuthkit/autopsy/timeline/images/arrow-180.png", 16, 16, true, true, true); // NON-NLS
|
||||
|
||||
private final TimeLineController controller;
|
||||
|
||||
|
||||
@NbBundle.Messages({"Back.text=Back",
|
||||
"Back.longText=Go back to the last view settings."})
|
||||
public Back(TimeLineController controller) {
|
||||
super(NbBundle.getMessage(Back.class, "Back.actions.name.text"));
|
||||
super(Bundle.Back_text());
|
||||
setLongText(Bundle.Back_longText());
|
||||
setGraphic(new ImageView(BACK_IMAGE));
|
||||
setAccelerator(new KeyCodeCombination(KeyCode.LEFT, KeyCodeCombination.ALT_DOWN));
|
||||
this.controller = controller;
|
||||
|
@ -1,4 +0,0 @@
|
||||
Back.actions.name.text=Back
|
||||
DefaultFilters.action.name.text=apply default filters
|
||||
Forward.action.name.text=Forward
|
||||
|
@ -37,8 +37,9 @@ public class Forward extends Action {
|
||||
|
||||
private final TimeLineController controller;
|
||||
|
||||
@NbBundle.Messages("Forward.text=Forward")
|
||||
public Forward(TimeLineController controller) {
|
||||
super(NbBundle.getMessage(Forward.class, "Forward.action.name.text"));
|
||||
super(Bundle.Forward_text());
|
||||
setGraphic(new ImageView(BACK_IMAGE));
|
||||
setAccelerator(new KeyCodeCombination(KeyCode.RIGHT, KeyCodeCombination.ALT_DOWN));
|
||||
this.controller = controller;
|
||||
|
@ -32,8 +32,11 @@ public class ResetFilters extends Action {
|
||||
|
||||
private FilteredEventsModel eventsModel;
|
||||
|
||||
@NbBundle.Messages({"ResetFilters.text=Reset all filters",
|
||||
"RestFilters.longText=Reset all filters to their default state."})
|
||||
public ResetFilters(final TimeLineController controller) {
|
||||
super(NbBundle.getMessage(ResetFilters.class, "DefaultFilters.action.name.text"));
|
||||
super(Bundle.ResetFilters_text());
|
||||
setLongText(Bundle.RestFilters_longText());
|
||||
eventsModel = controller.getEventsModel();
|
||||
disabledProperty().bind(new BooleanBinding() {
|
||||
{
|
||||
|
@ -7,68 +7,94 @@
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<fx:root collapsible="false" contentDisplay="RIGHT" maxHeight="-Infinity" maxWidth="-Infinity" text="No Visible Events" type="TitledPane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<graphic><HBox>
|
||||
<children><Region prefWidth="150.0" /><Button fx:id="dismissButton" contentDisplay="GRAPHIC_ONLY" graphicTextGap="0.0" minHeight="16.0" minWidth="16.0" mnemonicParsing="false" prefHeight="16.0" prefWidth="16.0">
|
||||
<graphic><ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
|
||||
<fx:root alignment="TOP_RIGHT" maxHeight="-Infinity" maxWidth="-Infinity" type="StackPane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<TitledPane collapsible="false" contentDisplay="RIGHT" text="No Visible Events">
|
||||
<content>
|
||||
<VBox alignment="CENTER_LEFT" spacing="5.0">
|
||||
<children>
|
||||
<Label fx:id="noEventsDialogLabel" contentDisplay="RIGHT" graphicTextGap="10.0" text="There are no events visible with the current zoom / filter settings." wrapText="true" GridPane.columnIndex="1" VBox.vgrow="ALWAYS">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</GridPane.margin>
|
||||
<font>
|
||||
<Font size="18.0" />
|
||||
</font>
|
||||
<VBox.margin>
|
||||
<Insets bottom="10.0" />
|
||||
</VBox.margin>
|
||||
<graphic>
|
||||
<ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
||||
<image>
|
||||
<Image url="@../images/information.png" />
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets />
|
||||
</GridPane.margin>
|
||||
<HBox.margin>
|
||||
<Insets />
|
||||
</HBox.margin>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Label>
|
||||
<Button fx:id="backButton" alignment="BASELINE_LEFT" layoutX="269.0" layoutY="104.0" maxWidth="1.7976931348623157E308" mnemonicParsing="false">
|
||||
<graphic>
|
||||
<ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../images/arrow-180.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="zoomButton" alignment="BASELINE_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
|
||||
<graphic>
|
||||
<ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../images/magnifier-zoom-out-red.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</GridPane.margin>
|
||||
<VBox.margin>
|
||||
<Insets />
|
||||
</VBox.margin>
|
||||
</Button>
|
||||
<Button fx:id="resetFiltersButton" alignment="BASELINE_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
|
||||
<graphic>
|
||||
<ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../images/arrow-circle-double-135.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</GridPane.margin>
|
||||
<VBox.margin>
|
||||
<Insets />
|
||||
</VBox.margin>
|
||||
</Button>
|
||||
</children>
|
||||
<HBox.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</HBox.margin>
|
||||
</VBox>
|
||||
</content>
|
||||
</TitledPane>
|
||||
<Button fx:id="dismissButton" contentDisplay="GRAPHIC_ONLY" graphicTextGap="0.0" mnemonicParsing="false" style="-fx-background-color: rgba(0,0,0,0);">
|
||||
<graphic>
|
||||
<ImageView fitHeight="20.0" fitWidth="20.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../images/cross-circle.png" />
|
||||
</image></ImageView>
|
||||
</graphic></Button>
|
||||
</children></HBox>
|
||||
</graphic>
|
||||
<content>
|
||||
<VBox alignment="CENTER_RIGHT" fillWidth="false" prefHeight="130.0" prefWidth="259.0" spacing="5.0">
|
||||
<children><Label fx:id="noEventsDialogLabel" graphicTextGap="10.0" wrapText="true" GridPane.columnIndex="1" VBox.vgrow="ALWAYS">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</GridPane.margin>
|
||||
<font>
|
||||
<Font size="14.0" />
|
||||
</font>
|
||||
<VBox.margin>
|
||||
<Insets bottom="10.0" />
|
||||
</VBox.margin>
|
||||
<graphic><ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
||||
<image>
|
||||
<Image url="@../images/information.png" />
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets />
|
||||
</GridPane.margin>
|
||||
<HBox.margin>
|
||||
<Insets />
|
||||
</HBox.margin></ImageView>
|
||||
</graphic></Label><Button fx:id="zoomButton" alignment="BASELINE_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
|
||||
<graphic><ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../images/magnifier-zoom-out-red.png" />
|
||||
</image></ImageView>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</GridPane.margin>
|
||||
<VBox.margin>
|
||||
<Insets />
|
||||
</VBox.margin></Button><Button fx:id="resetFiltersButton" alignment="BASELINE_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
|
||||
<graphic>
|
||||
<ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
|
||||
<image>
|
||||
<Image url="@../images/arrow-circle-double-135.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</GridPane.margin>
|
||||
<VBox.margin>
|
||||
<Insets />
|
||||
</VBox.margin>
|
||||
</Button>
|
||||
</children>
|
||||
<HBox.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</HBox.margin>
|
||||
</VBox>
|
||||
</content>
|
||||
<StackPane.margin>
|
||||
<Insets />
|
||||
</StackPane.margin>
|
||||
</Button>
|
||||
</children>
|
||||
</fx:root>
|
||||
|
@ -37,7 +37,6 @@ import javafx.geometry.Insets;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.MenuButton;
|
||||
import javafx.scene.control.TitledPane;
|
||||
import javafx.scene.control.Toggle;
|
||||
import javafx.scene.control.ToggleButton;
|
||||
import javafx.scene.control.ToolBar;
|
||||
@ -74,6 +73,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||
import org.sleuthkit.autopsy.timeline.VisualizationMode;
|
||||
import org.sleuthkit.autopsy.timeline.actions.Back;
|
||||
import org.sleuthkit.autopsy.timeline.actions.ResetFilters;
|
||||
import org.sleuthkit.autopsy.timeline.actions.SaveSnapshotAsReport;
|
||||
import org.sleuthkit.autopsy.timeline.actions.ZoomIn;
|
||||
@ -537,8 +537,10 @@ final public class VisualizationPanel extends BorderPane {
|
||||
}
|
||||
}
|
||||
|
||||
private class NoEventsDialog extends TitledPane {
|
||||
private class NoEventsDialog extends StackPane {
|
||||
|
||||
@FXML
|
||||
private Button backButton;
|
||||
@FXML
|
||||
private Button resetFiltersButton;
|
||||
@FXML
|
||||
@ -562,13 +564,12 @@ final public class VisualizationPanel extends BorderPane {
|
||||
assert zoomButton != null : "fx:id=\"zoomButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'."; // NON-NLS
|
||||
|
||||
noEventsDialogLabel.setText(NbBundle.getMessage(NoEventsDialog.class, "VisualizationPanel.noEventsDialogLabel.text")); // NON-NLS
|
||||
ActionUtils.configureButton(new ZoomToEvents(controller), zoomButton);
|
||||
|
||||
|
||||
dismissButton.setOnAction(actionEvent -> closeCallback.run());
|
||||
Action defaultFiltersAction = new ResetFilters(controller);
|
||||
resetFiltersButton.setOnAction(defaultFiltersAction);
|
||||
resetFiltersButton.disableProperty().bind(defaultFiltersAction.disabledProperty());
|
||||
resetFiltersButton.setText(NbBundle.getMessage(NoEventsDialog.class, "VisualizationPanel.resetFiltersButton.text")); // NON-NLS
|
||||
|
||||
ActionUtils.configureButton(new ZoomToEvents(controller), zoomButton);
|
||||
ActionUtils.configureButton(new Back(controller), backButton);
|
||||
ActionUtils.configureButton(new ResetFilters(controller), resetFiltersButton);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user