From 98114bfc527151abcf2c61050cfb0beb666837c9 Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Thu, 26 Mar 2020 01:05:32 +0100 Subject: [PATCH 01/13] Truncates the link and/or the link description in the column "linked files" in main table, if too long --- .../gui/fieldeditors/LinkedFileViewModel.java | 4 ++-- .../gui/maintable/MainTableColumnFactory.java | 2 +- .../org/jabref/model/entry/LinkedFile.java | 20 +++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java b/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java index d52a24b9f95..29ad25b19db 100644 --- a/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java +++ b/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java @@ -125,9 +125,9 @@ public String getDescription() { public String getDescriptionAndLink() { if (StringUtil.isBlank(linkedFile.getDescription())) { - return linkedFile.getLink(); + return linkedFile.getTruncatedLink(); } else { - return linkedFile.getDescription() + " (" + linkedFile.getLink() + ")"; + return linkedFile.getTruncatedDescription() + " (" + linkedFile.getTruncatedLink() + ")"; } } diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index bde67b260aa..ebfcf2ffd94 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -383,7 +383,7 @@ private TableColumn> createFilesColumn( private String createFileTooltip(List linkedFiles) { if (linkedFiles.size() > 0) { - return Localization.lang("Open file %0", linkedFiles.get(0).getLink()); + return Localization.lang("Open file %0", linkedFiles.get(0).getTruncatedLink()); } return null; } diff --git a/src/main/java/org/jabref/model/entry/LinkedFile.java b/src/main/java/org/jabref/model/entry/LinkedFile.java index 3c79ffd6812..674653b501a 100644 --- a/src/main/java/org/jabref/model/entry/LinkedFile.java +++ b/src/main/java/org/jabref/model/entry/LinkedFile.java @@ -75,6 +75,16 @@ public String getDescription() { return description.get(); } + public String getTruncatedDescription() { + String storedDescription = description.get(); + + if (storedDescription.length() > 95) { + return storedDescription.substring(0, 45) + "..." + storedDescription.substring(storedDescription.length() - 45); + } + + return storedDescription; + } + public void setDescription(String description) { this.description.setValue(description); } @@ -83,6 +93,16 @@ public String getLink() { return link.get(); } + public String getTruncatedLink() { + String storedLink = link.get(); + + if (storedLink.length() > 95) { + return storedLink.substring(0, 45) + "..." + storedLink.substring(storedLink.length() - 45); + } + + return storedLink; + } + public void setLink(String link) { if (!isOnlineLink(link)) { this.link.setValue(link.replace("\\", "/")); From efe1b2e246748ec36b5991e6d972d9cac09e355c Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Thu, 26 Mar 2020 01:29:18 +0100 Subject: [PATCH 02/13] changelog updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 149ea8d8bc7..42895c50e8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939) - We fixed an issue with inconsistent capitalization of file extensions when downloading files [#6115](https://github.com/JabRef/jabref/issues/6115) - We fixed the display of language and encoding in the preferences dialog. [#6130](https://github.com/JabRef/jabref/pull/6130) +- Now the link and/or the link description in the column "linked files" of the main table gets truncated, if too long, otherwise display issues arise. [#6178](https://github.com/JabRef/jabref/issues/6178) ### Removed From 357a605a2f8e2de7be23917a4e523bf8f14d74d1 Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Mon, 30 Mar 2020 02:12:55 +0200 Subject: [PATCH 03/13] revert changes --- .../gui/fieldeditors/LinkedFileViewModel.java | 4 ++-- .../gui/maintable/MainTableColumnFactory.java | 2 +- .../org/jabref/model/entry/LinkedFile.java | 20 ------------------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java b/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java index 29ad25b19db..d52a24b9f95 100644 --- a/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java +++ b/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java @@ -125,9 +125,9 @@ public String getDescription() { public String getDescriptionAndLink() { if (StringUtil.isBlank(linkedFile.getDescription())) { - return linkedFile.getTruncatedLink(); + return linkedFile.getLink(); } else { - return linkedFile.getTruncatedDescription() + " (" + linkedFile.getTruncatedLink() + ")"; + return linkedFile.getDescription() + " (" + linkedFile.getLink() + ")"; } } diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index ebfcf2ffd94..bde67b260aa 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -383,7 +383,7 @@ private TableColumn> createFilesColumn( private String createFileTooltip(List linkedFiles) { if (linkedFiles.size() > 0) { - return Localization.lang("Open file %0", linkedFiles.get(0).getTruncatedLink()); + return Localization.lang("Open file %0", linkedFiles.get(0).getLink()); } return null; } diff --git a/src/main/java/org/jabref/model/entry/LinkedFile.java b/src/main/java/org/jabref/model/entry/LinkedFile.java index 674653b501a..3c79ffd6812 100644 --- a/src/main/java/org/jabref/model/entry/LinkedFile.java +++ b/src/main/java/org/jabref/model/entry/LinkedFile.java @@ -75,16 +75,6 @@ public String getDescription() { return description.get(); } - public String getTruncatedDescription() { - String storedDescription = description.get(); - - if (storedDescription.length() > 95) { - return storedDescription.substring(0, 45) + "..." + storedDescription.substring(storedDescription.length() - 45); - } - - return storedDescription; - } - public void setDescription(String description) { this.description.setValue(description); } @@ -93,16 +83,6 @@ public String getLink() { return link.get(); } - public String getTruncatedLink() { - String storedLink = link.get(); - - if (storedLink.length() > 95) { - return storedLink.substring(0, 45) + "..." + storedLink.substring(storedLink.length() - 45); - } - - return storedLink; - } - public void setLink(String link) { if (!isOnlineLink(link)) { this.link.setValue(link.replace("\\", "/")); From f8995c03bc92b4a1c480b698a3a78031093dd30b Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Mon, 30 Mar 2020 10:49:14 +0200 Subject: [PATCH 04/13] fix tooltip --- .../org/jabref/gui/maintable/MainTableColumnFactory.java | 1 + .../java/org/jabref/gui/util/ValueTableCellFactory.java | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index bde67b260aa..b5cedbe630f 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -394,6 +394,7 @@ private ContextMenu createFileMenu(BibEntryTableViewModel entry, List Date: Mon, 30 Mar 2020 12:16:31 +0200 Subject: [PATCH 05/13] improvement: scaling tooltip according to primary screen width --- .../java/org/jabref/gui/util/ValueTableCellFactory.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java b/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java index 8778e8e0d68..333b0b1250d 100644 --- a/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java +++ b/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java @@ -4,6 +4,7 @@ import java.util.function.Function; import javafx.event.EventHandler; +import javafx.geometry.Rectangle2D; import javafx.scene.Node; import javafx.scene.control.ContextMenu; import javafx.scene.control.OverrunStyle; @@ -13,6 +14,7 @@ import javafx.scene.control.Tooltip; import javafx.scene.input.MouseButton; import javafx.scene.input.MouseEvent; +import javafx.stage.Screen; import javafx.util.Callback; import org.jabref.model.strings.StringUtil; @@ -103,8 +105,11 @@ protected void updateItem(T item, boolean empty) { if (toTooltip != null) { String tooltipText = toTooltip.apply(rowItem, item); if (StringUtil.isNotBlank(tooltipText)) { + Screen currentScreen = Screen.getPrimary(); + Rectangle2D bounds = currentScreen.getBounds(); + double maxWidth = bounds.getWidth(); Tooltip tooltip = new Tooltip(tooltipText); - tooltip.setMaxWidth(800); + tooltip.setMaxWidth(maxWidth - maxWidth / 3); //tooltip.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS); // info: can be enabled instead of wrapping the text tooltip.setWrapText(true); setTooltip(tooltip); From 16a2e55e59c5c6742234601da3d9371c6ac9f658 Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Mon, 30 Mar 2020 13:44:40 +0200 Subject: [PATCH 06/13] refactoring --- .../java/org/jabref/gui/util/ValueTableCellFactory.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java b/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java index 333b0b1250d..25221dfd5ad 100644 --- a/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java +++ b/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java @@ -4,10 +4,8 @@ import java.util.function.Function; import javafx.event.EventHandler; -import javafx.geometry.Rectangle2D; import javafx.scene.Node; import javafx.scene.control.ContextMenu; -import javafx.scene.control.OverrunStyle; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.scene.control.TableRow; @@ -106,10 +104,9 @@ protected void updateItem(T item, boolean empty) { String tooltipText = toTooltip.apply(rowItem, item); if (StringUtil.isNotBlank(tooltipText)) { Screen currentScreen = Screen.getPrimary(); - Rectangle2D bounds = currentScreen.getBounds(); - double maxWidth = bounds.getWidth(); + double maxWidth = currentScreen.getBounds().getWidth(); Tooltip tooltip = new Tooltip(tooltipText); - tooltip.setMaxWidth(maxWidth - maxWidth / 3); + tooltip.setMaxWidth(maxWidth * 2 / 3); //tooltip.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS); // info: can be enabled instead of wrapping the text tooltip.setWrapText(true); setTooltip(tooltip); From 861a9eb087891e8a422b67b712fb46021aa258bb Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Mon, 30 Mar 2020 17:22:26 +0200 Subject: [PATCH 07/13] extension (not fully working as expected) --- CHANGELOG.md | 2 +- .../org/jabref/gui/maintable/MainTableColumnFactory.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42895c50e8b..9db060cec47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939) - We fixed an issue with inconsistent capitalization of file extensions when downloading files [#6115](https://github.com/JabRef/jabref/issues/6115) - We fixed the display of language and encoding in the preferences dialog. [#6130](https://github.com/JabRef/jabref/pull/6130) -- Now the link and/or the link description in the column "linked files" of the main table gets truncated, if too long, otherwise display issues arise. [#6178](https://github.com/JabRef/jabref/issues/6178) +- Now the link and/or the link description in the column "linked files" of the main table gets truncated or wrapped, if too long, otherwise display issues arise. [#6178](https://github.com/JabRef/jabref/issues/6178) ### Removed diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index b5cedbe630f..2c693bcf512 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -24,6 +24,7 @@ import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; import javafx.scene.text.Text; +import javafx.stage.Screen; import org.jabref.Globals; import org.jabref.gui.DialogService; @@ -394,13 +395,17 @@ private ContextMenu createFileMenu(BibEntryTableViewModel entry, List linkedFileViewModel.open()); + menuItem.setStyle("-fx-pref-width: " + maxWidth * 2 / 3 + "; -fx-text-overrun: 'center-ellipses';"); + // -fx-min-width; -fx-pref-width; -fx-max-width; -fx-text-overrun: center-ellipses; -fx-wrap-text: true; contextMenu.getItems().add(menuItem); } From d0d8c2fe9338e92fdb47abbbe7b32d9a6b55009f Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Mon, 30 Mar 2020 17:34:54 +0200 Subject: [PATCH 08/13] minor change --- .../java/org/jabref/gui/maintable/MainTableColumnFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index 2c693bcf512..22de7777d31 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -404,7 +404,7 @@ private ContextMenu createFileMenu(BibEntryTableViewModel entry, List linkedFileViewModel.open()); - menuItem.setStyle("-fx-pref-width: " + maxWidth * 2 / 3 + "; -fx-text-overrun: 'center-ellipses';"); + menuItem.setStyle("-fx-pref-width: " + maxWidth * 2 / 3 + "; -fx-text-overrun: center-ellipses;"); // -fx-min-width; -fx-pref-width; -fx-max-width; -fx-text-overrun: center-ellipses; -fx-wrap-text: true; contextMenu.getItems().add(menuItem); } From 3ace75f6adfa4e7c0e7bc30f04a7d4eeaabc471f Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Fri, 15 May 2020 23:04:40 +0200 Subject: [PATCH 09/13] partial revert --- .../org/jabref/gui/maintable/MainTableColumnFactory.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index 5735517aac7..42cb1ddc4cb 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -24,7 +24,6 @@ import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; import javafx.scene.text.Text; -import javafx.stage.Screen; import org.jabref.Globals; import org.jabref.gui.DialogService; @@ -403,16 +402,11 @@ private ContextMenu createFileMenu(BibEntryTableViewModel entry, List linkedFileViewModel.open()); - menuItem.setStyle("-fx-pref-width: " + maxWidth * 2 / 3 + "; -fx-text-overrun: center-ellipses;"); - // -fx-min-width; -fx-pref-width; -fx-max-width; -fx-text-overrun: center-ellipses; -fx-wrap-text: true; contextMenu.getItems().add(menuItem); } From 2f0c00b22c8bd49be5613ed68cb4188e95707a8f Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Sat, 16 May 2020 00:55:37 +0200 Subject: [PATCH 10/13] truncation integrated --- .../gui/fieldeditors/LinkedFileViewModel.java | 13 ++++++ .../gui/maintable/MainTableColumnFactory.java | 2 +- .../org/jabref/gui/util/ControlHelper.java | 46 +++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java b/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java index 0d732772c27..4403cc00504 100644 --- a/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java +++ b/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java @@ -33,6 +33,7 @@ import org.jabref.gui.icon.IconTheme; import org.jabref.gui.icon.JabRefIcon; import org.jabref.gui.util.BackgroundTask; +import org.jabref.gui.util.ControlHelper; import org.jabref.gui.util.TaskExecutor; import org.jabref.logic.externalfiles.LinkedFileHandler; import org.jabref.logic.l10n.Localization; @@ -151,6 +152,18 @@ public String getDescriptionAndLink() { } } + public String getTruncatedDescriptionAndLink() { + if (StringUtil.isBlank(linkedFile.getDescription())) { + return ControlHelper.truncateString(linkedFile.getLink(), -1, "...", + ControlHelper.EllipsisPosition.CENTER); + } else { + return ControlHelper.truncateString(linkedFile.getDescription(), -1, "...", + ControlHelper.EllipsisPosition.CENTER) + " (" + + ControlHelper.truncateString(linkedFile.getLink(), -1, "...", + ControlHelper.EllipsisPosition.CENTER) + ")"; + } + } + public Optional findIn(List directories) { return linkedFile.findIn(directories); } diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index 42cb1ddc4cb..fc9f298c66b 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -405,7 +405,7 @@ private ContextMenu createFileMenu(BibEntryTableViewModel entry, List linkedFileViewModel.open()); contextMenu.getItems().add(menuItem); } diff --git a/src/main/java/org/jabref/gui/util/ControlHelper.java b/src/main/java/org/jabref/gui/util/ControlHelper.java index a682324a845..625702cffde 100644 --- a/src/main/java/org/jabref/gui/util/ControlHelper.java +++ b/src/main/java/org/jabref/gui/util/ControlHelper.java @@ -21,6 +21,8 @@ public class ControlHelper { private static PseudoClass dragOverCenter = PseudoClass.getPseudoClass("dragOver-center"); private static PseudoClass dragOverTop = PseudoClass.getPseudoClass("dragOver-top"); + public enum EllipsisPosition { BEGINNING, CENTER, ENDING } + public static void setAction(ButtonType buttonType, DialogPane dialogPane, Consumer consumer) { Button button = (Button) dialogPane.lookupButton(buttonType); button.addEventFilter(ActionEvent.ACTION, (event -> { @@ -97,4 +99,48 @@ public static void setDroppingPseudoClasses(Cell cell) { public static void removeDroppingPseudoClasses(Cell cell) { removePseudoClasses(cell, dragOverBottom, dragOverCenter, dragOverTop); } + + /** + * If needed, truncates a given string to maxCharacters, adding ellipsisString instead. + * + * @param text text which should be truncated, if needed + * @param maxCharacters maximum amount of characters which the resulting text should have, including the + * ellipsisString; if set to -1, then the default length of 75 characters will be + * used + * @param ellipsisString string which should be used for indicating the truncation + * @param ellipsisPosition location in the given text where the truncation should be performed + * @return the new, truncated string + */ + public static String truncateString(String text, int maxCharacters, String ellipsisString, EllipsisPosition ellipsisPosition) { + if (text == null || "".equals(text)) { + return text; // return original + } + + if (ellipsisString == null) { + ellipsisString = ""; + } + + if (maxCharacters == -1) { + maxCharacters = 75; // default + } + + maxCharacters = Math.max(ellipsisString.length(), maxCharacters); + + if (text.length() > maxCharacters) { + // truncation necessary + int partialLength; + + switch (ellipsisPosition) { + case BEGINNING: + return ellipsisString + text.substring(text.length() - (maxCharacters - ellipsisString.length())); + case CENTER: + partialLength = (int) Math.floor((maxCharacters - ellipsisString.length()) / 2f); + return text.substring(0, partialLength) + ellipsisString + text.substring(text.length() - partialLength); + case ENDING: + return text.substring(0, maxCharacters - ellipsisString.length()) + ellipsisString; + } + } + + return text; + } } From 8530fffa3205d247885e254ee73a971aaeb9b1cd Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Sat, 16 May 2020 01:08:11 +0200 Subject: [PATCH 11/13] minor change --- src/main/java/org/jabref/gui/util/ControlHelper.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/gui/util/ControlHelper.java b/src/main/java/org/jabref/gui/util/ControlHelper.java index 625702cffde..b4320a6bda3 100644 --- a/src/main/java/org/jabref/gui/util/ControlHelper.java +++ b/src/main/java/org/jabref/gui/util/ControlHelper.java @@ -128,13 +128,11 @@ public static String truncateString(String text, int maxCharacters, String ellip if (text.length() > maxCharacters) { // truncation necessary - int partialLength; - switch (ellipsisPosition) { case BEGINNING: return ellipsisString + text.substring(text.length() - (maxCharacters - ellipsisString.length())); case CENTER: - partialLength = (int) Math.floor((maxCharacters - ellipsisString.length()) / 2f); + int partialLength = (int) Math.floor((maxCharacters - ellipsisString.length()) / 2f); return text.substring(0, partialLength) + ellipsisString + text.substring(text.length() - partialLength); case ENDING: return text.substring(0, maxCharacters - ellipsisString.length()) + ellipsisString; From 3980a8fbb31f4f0bab405cc00610a5c5cb3d4101 Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Sat, 16 May 2020 12:47:49 +0200 Subject: [PATCH 12/13] checkstyle --- src/main/java/org/jabref/gui/util/ValueTableCellFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java b/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java index 0545bf3fc73..efb33452f66 100644 --- a/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java +++ b/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java @@ -105,7 +105,7 @@ protected void updateItem(T item, boolean empty) { double maxWidth = currentScreen.getBounds().getWidth(); Tooltip tooltip = new Tooltip(tooltipText); tooltip.setMaxWidth(maxWidth * 2 / 3); - //tooltip.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS); // info: can be enabled instead of wrapping the text + // tooltip.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS); // info: can be enabled instead of wrapping the text tooltip.setWrapText(true); setTooltip(tooltip); } From 92e241f2063b10fe003ce787036fd7dc9a7340f4 Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Mon, 18 May 2020 00:54:57 +0200 Subject: [PATCH 13/13] remove comment --- src/main/java/org/jabref/gui/util/ValueTableCellFactory.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java b/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java index efb33452f66..38fa12e1585 100644 --- a/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java +++ b/src/main/java/org/jabref/gui/util/ValueTableCellFactory.java @@ -105,7 +105,6 @@ protected void updateItem(T item, boolean empty) { double maxWidth = currentScreen.getBounds().getWidth(); Tooltip tooltip = new Tooltip(tooltipText); tooltip.setMaxWidth(maxWidth * 2 / 3); - // tooltip.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS); // info: can be enabled instead of wrapping the text tooltip.setWrapText(true); setTooltip(tooltip); }