Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.4.1
- Reinstate (but deprecate) previous methods to add close shortcuts to stages (https://github.com/qupath/qupath-fxtras/issues/73)

## v0.4.0
- Use Java and JavaFX 21
- Improved `InputDisplay` javadocs, new property to reverse scrolling (https://github.com/qupath/qupath-fxtras/pull/70)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

base {
group = "io.github.qupath"
version = "0.4.0"
version = "0.4.1"
description = "Extra classes built on JavaFX that are used to help create the QuPath user interface. " +
"These don't depend on other QuPath modules, so can be reused elsewhere."
}
Expand Down
23 changes: 23 additions & 0 deletions src/main/java/qupath/fx/utils/FXUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -612,11 +612,33 @@ public static void simplifyTitledPane(TitledPane pane, boolean boldTitle) {
}
}

/**
* Add shortcuts to close a stage using the standard shortcuts (Shortcut+W, Esc).
* @param stage
* @deprecated use {@link #addCloseWindowShortcuts(Window)}
*/
@Deprecated
public static void addCloseWindowShortcuts(Stage stage) {
addCloseWindowShortcuts((Window)stage);
}

/**
* Add shortcuts to close a stage using the specified key combinations.
* @param stage
* @param keyCombinations
* @deprecated use {@link #addCloseWindowShortcuts(Window, Collection)}
*/
@Deprecated
public static void addCloseWindowShortcuts(Stage stage, Collection<? extends KeyCombination> keyCombinations) {
addCloseWindowShortcuts((Window)stage, keyCombinations);
}


/**
* Add shortcuts to close a window using the standard shortcuts (Shortcut+W, Esc).
* @param window
* @see #addCloseWindowShortcuts(Window, Collection)
* @since v0.4.0
*/
public static void addCloseWindowShortcuts(Window window) {
addCloseWindowShortcuts(window, Arrays.asList(
Expand All @@ -632,6 +654,7 @@ public static void addCloseWindowShortcuts(Window window) {
* @param keyCombinations
* @see #addCloseWindowShortcuts(Window)
* @implSpec this only fires a window close request; any handler may still choose to consume the event quietly
* @since v0.4.0
*/
public static void addCloseWindowShortcuts(Window window, Collection<? extends KeyCombination> keyCombinations) {
if (keyCombinations.isEmpty()) {
Expand Down
Loading