From 5818685e1f25da9823073e5434808c7ef55645b9 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 10 Aug 2016 19:37:27 +0800 Subject: [PATCH] Hide "Count" column in HistoryDialog --- .../net/filebot/ui/rename/HistoryDialog.java | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/source/net/filebot/ui/rename/HistoryDialog.java b/source/net/filebot/ui/rename/HistoryDialog.java index ed3a9782..83ab8f95 100644 --- a/source/net/filebot/ui/rename/HistoryDialog.java +++ b/source/net/filebot/ui/rename/HistoryDialog.java @@ -170,14 +170,10 @@ class HistoryDialog extends JDialog { }); // clear sequence selection when elements are selected - elementTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() { - - @Override - public void valueChanged(ListSelectionEvent e) { - if (elementTable.getSelectedRow() >= 0) { - // allow selected rows only in one of the two tables - sequenceTable.getSelectionModel().clearSelection(); - } + elementTable.getSelectionModel().addListSelectionListener(evt -> { + if (elementTable.getSelectedRow() >= 0) { + // allow selected rows only in one of the two tables + sequenceTable.getSelectionModel().clearSelection(); } }); @@ -718,17 +714,14 @@ class HistoryDialog extends JDialog { case 1: return "Name"; case 2: - return "Count"; - case 3: return "Date"; - default: - return null; } + return null; } @Override public int getColumnCount() { - return 4; + return 3; } @Override @@ -744,12 +737,9 @@ class HistoryDialog extends JDialog { case 1: return String.class; case 2: - return Integer.class; - case 3: return Date.class; - default: - return null; } + return null; } @Override @@ -760,12 +750,9 @@ class HistoryDialog extends JDialog { case 1: return getName(data.get(row)); case 2: - return data.get(row).elements().size(); - case 3: return data.get(row).date(); - default: - return null; } + return null; } public Sequence getRow(int row) {