Enhanced `Conflict Dialog` with detailed explanations
This commit is contained in:
parent
bd79bbf5bf
commit
2553d11494
|
@ -1,6 +1,7 @@
|
||||||
Next Release (4.8.6)
|
Next Release (4.8.6)
|
||||||
====================
|
====================
|
||||||
* Enhanced `Selection Dialog` with thumbnails and tooltips
|
* 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`)
|
* 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 `{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)
|
* Added `{history}` binding for looking up the original file path of `{f}` (e.g. useful for `-exec` post-processing commands)
|
||||||
|
|
|
@ -29,6 +29,7 @@ import javax.swing.JScrollPane;
|
||||||
import javax.swing.KeyStroke;
|
import javax.swing.KeyStroke;
|
||||||
import javax.swing.ListSelectionModel;
|
import javax.swing.ListSelectionModel;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
import javax.swing.border.CompoundBorder;
|
||||||
|
|
||||||
import ca.odell.glazedlists.BasicEventList;
|
import ca.odell.glazedlists.BasicEventList;
|
||||||
import ca.odell.glazedlists.EventList;
|
import ca.odell.glazedlists.EventList;
|
||||||
|
@ -36,6 +37,7 @@ import ca.odell.glazedlists.swing.DefaultEventListModel;
|
||||||
import net.filebot.ResourceManager;
|
import net.filebot.ResourceManager;
|
||||||
import net.filebot.UserFiles;
|
import net.filebot.UserFiles;
|
||||||
import net.filebot.media.VideoQuality;
|
import net.filebot.media.VideoQuality;
|
||||||
|
import net.filebot.util.ui.DashedSeparator;
|
||||||
import net.filebot.util.ui.DefaultFancyListCellRenderer;
|
import net.filebot.util.ui.DefaultFancyListCellRenderer;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
|
||||||
|
@ -135,14 +137,20 @@ class ConflictDialog extends JDialog {
|
||||||
|
|
||||||
private static class ConflictCellRenderer extends DefaultFancyListCellRenderer {
|
private static class ConflictCellRenderer extends DefaultFancyListCellRenderer {
|
||||||
|
|
||||||
|
public ConflictCellRenderer() {
|
||||||
|
setHighlightingEnabled(false);
|
||||||
|
setBorder(new CompoundBorder(new DashedSeparator(2, 4, getColor(0xEEEEEE), getPanelBackground()), getBorder()));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configureListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
protected void configureListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||||
setHighlightingEnabled(false);
|
|
||||||
|
|
||||||
Conflict conflict = (Conflict) value;
|
Conflict conflict = (Conflict) value;
|
||||||
super.configureListCellRendererComponent(list, conflict.getDetails(), index, isSelected, cellHasFocus);
|
super.configureListCellRendererComponent(list, conflict.getDetails(), index, isSelected, cellHasFocus);
|
||||||
setIcon(ResourceManager.getIcon("status.warning"));
|
setIcon(ResourceManager.getIcon("status.warning"));
|
||||||
setToolTipText(formatToolTip(conflict));
|
setToolTipText(formatToolTip(conflict));
|
||||||
|
|
||||||
|
// don't paint border on last element
|
||||||
|
setBorderPainted(index < list.getModel().getSize() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String formatToolTip(Conflict conflict) {
|
private String formatToolTip(Conflict conflict) {
|
||||||
|
|
Loading…
Reference in New Issue