Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup window has a scrollbar now. #2614

Merged
merged 4 commits into from
Mar 6, 2017
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ We refer to [GitHub issues](/~https://github.com/JabRef/jabref/issues) by using `#
- We removed the ordinals-to-superscript formatter from the recommendations for biblatex save actions [#2596](/~https://github.com/JabRef/jabref/issues/2596)
- The `Move linked files to default file directory`-Cleanup operation respects the `File directory pattern` setting
- We separated the `Move file` and `Rename Pdfs` logic and context menu entries in the `General`-Tab for the Field `file` to improve the semantics
- A scrollbar was added to the cleanup panel, as a result of issue [#2501](/~https://github.com/JabRef/jabref/issues/2501)

### Fixed
- We fixed an issue where authors with multiple surnames were not presented correctly in the main table. [#2534](/~https://github.com/JabRef/jabref/issues/2534)
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/jabref/gui/actions/CleanupAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ public void update() {

private int showDialog(CleanupPresetPanel presetPanel) {
String dialogTitle = Localization.lang("Cleanup entries");

Object[] messages = {Localization.lang("What would you like to clean up?"), presetPanel.getPanel()};
Object[] messages = {Localization.lang("What would you like to clean up?"), presetPanel.getScrollPane()};
return JOptionPane.showConfirmDialog(frame, messages, dialogTitle, JOptionPane.OK_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
}
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/org/jabref/gui/cleanup/CleanupPresetPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import org.jabref.Globals;
import org.jabref.logic.cleanup.CleanupPreset;
Expand All @@ -35,6 +36,7 @@ public class CleanupPresetPanel {
private FieldFormatterCleanupsPanel cleanUpFormatters;

private JPanel panel;
private JScrollPane scrollPane;
private CleanupPreset cleanupPreset;

public CleanupPresetPanel(BibDatabaseContext databaseContext, CleanupPreset cleanupPreset) {
Expand Down Expand Up @@ -92,6 +94,10 @@ private void init() {
builder.add(cleanUpISSN).xyw(1, 9, 2);
builder.add(cleanUpFormatters).xyw(1, 10, 2);
panel = builder.build();
scrollPane = new JScrollPane(panel);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
scrollPane.setVisible(true);
scrollPane.setBorder(null);
}

private void updateDisplay(CleanupPreset preset) {
Expand All @@ -109,8 +115,8 @@ private void updateDisplay(CleanupPreset preset) {
cleanUpFormatters.setValues(preset.getFormatterCleanups());
}

public JPanel getPanel() {
return panel;
public JScrollPane getScrollPane() {
return scrollPane;
}

public CleanupPreset getCleanupPreset() {
Expand Down