Enhanced `Conflict Dialog` with detailed explanations

This commit is contained in:
Reinhard Pointner 2019-06-14 00:53:11 +07:00
parent bd79bbf5bf
commit 2553d11494
2 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,7 @@
Next Release (4.8.6)
====================
* Enhanced `Selection Dialog` with thumbnails and tooltips
* Enhanced `Conflict Dialog` with detailed explanations
* Improved support for mapping episode information between different databases and numbering schemes (e.g. via `AnimeLists` or `XEM`)
* Added `{seasonize}` binding (e.g. map `AniDB` numbers to `TheTVDB` SxE numbers and vice versa)
* Added `{history}` binding for looking up the original file path of `{f}` (e.g. useful for `-exec` post-processing commands)

View File

@ -29,6 +29,7 @@ import javax.swing.JScrollPane;
import javax.swing.KeyStroke;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.border.CompoundBorder;
import ca.odell.glazedlists.BasicEventList;
import ca.odell.glazedlists.EventList;
@ -36,6 +37,7 @@ import ca.odell.glazedlists.swing.DefaultEventListModel;
import net.filebot.ResourceManager;
import net.filebot.UserFiles;
import net.filebot.media.VideoQuality;
import net.filebot.util.ui.DashedSeparator;
import net.filebot.util.ui.DefaultFancyListCellRenderer;
import net.miginfocom.swing.MigLayout;
@ -135,14 +137,20 @@ class ConflictDialog extends JDialog {
private static class ConflictCellRenderer extends DefaultFancyListCellRenderer {
public ConflictCellRenderer() {
setHighlightingEnabled(false);
setBorder(new CompoundBorder(new DashedSeparator(2, 4, getColor(0xEEEEEE), getPanelBackground()), getBorder()));
}
@Override
protected void configureListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
setHighlightingEnabled(false);
Conflict conflict = (Conflict) value;
super.configureListCellRendererComponent(list, conflict.getDetails(), index, isSelected, cellHasFocus);
setIcon(ResourceManager.getIcon("status.warning"));
setToolTipText(formatToolTip(conflict));
// don't paint border on last element
setBorderPainted(index < list.getModel().getSize() - 1);
}
private String formatToolTip(Conflict conflict) {