Commit b4cfee9a authored by Nils Christian Ehmke's avatar Nils Christian Ehmke

#49 [Close dialogs with escape button]

parent d0a69720
2.0.0:
09 July 2017
10 Jul 2017
Feature (#49)
Dialogs can now be closed by using the escape button.
09 Jul 2017
Feature (#48)
Added more fine grained possibilites to aggregate method calls in traces.
......
......@@ -20,6 +20,9 @@ import kieker.diagnosis.architecture.gui.AbstractController;
import java.util.Optional;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import org.springframework.stereotype.Component;
/**
......@@ -47,4 +50,13 @@ public class AboutDialogController extends AbstractController<AboutDialogView> {
getView( ).getStage( ).hide( );
}
/**
* The action which is performed when the user presses a key.
*/
public void performOnKeyPressed( final KeyEvent aKeyEvent ) {
if ( aKeyEvent.getCode( ) == KeyCode.ESCAPE ) {
performCloseDialog( );
}
}
}
......@@ -27,6 +27,9 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.util.Optional;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -67,4 +70,13 @@ public class BugReportingDialogController extends AbstractController<BugReportin
getView( ).getStage( ).hide( );
}
/**
* The action which is performed when the user presses a key.
*/
public void performOnKeyPressed( final KeyEvent aKeyEvent ) {
if ( aKeyEvent.getCode( ) == KeyCode.ESCAPE ) {
performCloseDialog( );
}
}
}
......@@ -43,6 +43,8 @@ import java.util.concurrent.TimeUnit;
import javafx.beans.binding.BooleanBinding;
import javafx.beans.property.ObjectProperty;
import javafx.collections.FXCollections;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -153,4 +155,13 @@ public class SettingsDialogController extends AbstractController<SettingsDialogV
}
}
/**
* The action which is performed when the user presses a key.
*/
public void performOnKeyPressed( final KeyEvent aKeyEvent ) {
if ( aKeyEvent.getCode( ) == KeyCode.ESCAPE ) {
closeDialog( );
}
}
}
......@@ -2,7 +2,7 @@
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.cell.*?>
<VBox xmlns:fx="http://javafx.com/fxml" fx:id="ivView">
<VBox xmlns:fx="http://javafx.com/fxml" fx:id="ivView" onKeyPressed="#performOnKeyPressed">
<spacing>10</spacing>
......
......@@ -5,7 +5,7 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.text.TextFlow?>
<VBox xmlns:fx="http://javafx.com/fxml" fx:id="ivView" AnchorPane.bottomAnchor="0.0" AnchorPane.topAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
<VBox xmlns:fx="http://javafx.com/fxml" fx:id="ivView" AnchorPane.bottomAnchor="0.0" AnchorPane.topAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" onKeyPressed="#performOnKeyPressed">
<spacing>10</spacing>
......
......@@ -5,7 +5,7 @@
<?import javafx.scene.control.TextField?>
<?import kieker.diagnosis.application.gui.components.converter.*?>
<VBox fx:id="ivView" xmlns:fx="http://javafx.com/fxml">
<VBox fx:id="ivView" xmlns:fx="http://javafx.com/fxml" onKeyPressed="#performOnKeyPressed">
<spacing>10</spacing>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment