From 65731ac66e19323f6512cdf07c15d8bd0c4adb43 Mon Sep 17 00:00:00 2001 From: "Christian F." Date: Sat, 26 Oct 2024 14:35:54 +0200 Subject: [PATCH] - code cleanup --- .../mediathek/gui/dialogEinstellungen/PanelPsetKurz.java | 4 +--- .../gui/duplicates/overview/CustomTreeCellRenderer.java | 1 + .../java/mediathek/gui/filmInformation/FilmInfoDialog.java | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/mediathek/gui/dialogEinstellungen/PanelPsetKurz.java b/src/main/java/mediathek/gui/dialogEinstellungen/PanelPsetKurz.java index 95b9bc8c50..0a6ed244e1 100644 --- a/src/main/java/mediathek/gui/dialogEinstellungen/PanelPsetKurz.java +++ b/src/main/java/mediathek/gui/dialogEinstellungen/PanelPsetKurz.java @@ -24,7 +24,6 @@ import java.io.File; public class PanelPsetKurz extends PanelVorlage { - public boolean ok; private DatenPset pSet; private final ListePset listePset; private static final Logger logger = LogManager.getLogger(); @@ -37,7 +36,7 @@ public PanelPsetKurz(Daten d, JFrame parentComponent, ListePset llistePset) { if (!listePset.isEmpty()) { jListPset.setSelectedIndex(0); init(); - jListPset.addListSelectionListener(e -> { + jListPset.addListSelectionListener(_ -> { if (!stopBeob) { stopBeob = true; init(); @@ -149,7 +148,6 @@ private void setFeld(JPanel panel, String name, String[] arr) { c.insets = new Insets(4, 10, 4, 10); c.weightx = 1; c.weighty = 0; - // c.gridx = 0; c.gridy = 0; // Label diff --git a/src/main/java/mediathek/gui/duplicates/overview/CustomTreeCellRenderer.java b/src/main/java/mediathek/gui/duplicates/overview/CustomTreeCellRenderer.java index 889c01fbed..b702883d9b 100644 --- a/src/main/java/mediathek/gui/duplicates/overview/CustomTreeCellRenderer.java +++ b/src/main/java/mediathek/gui/duplicates/overview/CustomTreeCellRenderer.java @@ -9,6 +9,7 @@ class CustomTreeCellRenderer extends DefaultTreeCellRenderer { + @Override public Component getTreeCellRendererComponent( JTree tree, Object value, diff --git a/src/main/java/mediathek/gui/filmInformation/FilmInfoDialog.java b/src/main/java/mediathek/gui/filmInformation/FilmInfoDialog.java index 6d80e16ac7..144e04262e 100644 --- a/src/main/java/mediathek/gui/filmInformation/FilmInfoDialog.java +++ b/src/main/java/mediathek/gui/filmInformation/FilmInfoDialog.java @@ -250,9 +250,9 @@ private void prepareHyperlink(String url) { hyperlink.setEnabled(true); hyperlink.setToolTipText(url); hyperlink.setClicked(false); - var popupMenu = new JPopupMenu(); - popupMenu.add(new CopyToClipboardAction(url)); - hyperlink.setComponentPopupMenu(popupMenu); + var urlPopupMenu = new JPopupMenu(); + urlPopupMenu.add(new CopyToClipboardAction(url)); + hyperlink.setComponentPopupMenu(urlPopupMenu); } private void initComponents() {