-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it easier to create FXML dialogs (#3880)
* Extract swing dialog display to dialog service * Embed preference dialog in JavaFX window * Use new version of afterburner * Fix injection into controller classes * Fix build and code cleanup
- Loading branch information
1 parent
06d6736
commit 3c4a3ef
Showing
52 changed files
with
1,677 additions
and
1,855 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<root> | ||
<item name='javafx.scene.control.Dialog dialogPane'> | ||
<annotation name='javafx.fxml.FXML'/> | ||
</item> | ||
</root> |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.jabref.gui.cleanup; | ||
|
||
import javax.swing.JScrollPane; | ||
|
||
import javafx.scene.control.ButtonType; | ||
|
||
import org.jabref.gui.util.BaseDialog; | ||
import org.jabref.gui.util.ControlHelper; | ||
import org.jabref.logic.cleanup.CleanupPreset; | ||
import org.jabref.logic.l10n.Localization; | ||
import org.jabref.model.database.BibDatabaseContext; | ||
|
||
public class CleanupDialog extends BaseDialog<CleanupPreset> { | ||
|
||
public CleanupDialog(BibDatabaseContext databaseContext, CleanupPreset initialPreset) { | ||
setTitle(Localization.lang("Cleanup entries")); | ||
getDialogPane().setPrefSize(600, 600); | ||
getDialogPane().getButtonTypes().setAll(ButtonType.OK, ButtonType.CANCEL); | ||
|
||
CleanupPresetPanel presetPanel = new CleanupPresetPanel(databaseContext, initialPreset); | ||
presetPanel.getScrollPane().setVisible(true); | ||
JScrollPane scrollPane = presetPanel.getScrollPane(); | ||
|
||
setResultConverter(button -> { | ||
if (button == ButtonType.OK) { | ||
return presetPanel.getCleanupPreset(); | ||
} else { | ||
return null; | ||
} | ||
}); | ||
|
||
ControlHelper.setSwingContent(getDialogPane(), scrollPane); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 0 additions & 59 deletions
59
src/main/java/org/jabref/gui/copyfiles/CopyFilesDialogController.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.