From 3524047c90b57f4eca007560ba3afba09ee89022 Mon Sep 17 00:00:00 2001 From: Jannis Weis <31143295+weisJ@users.noreply.github.com> Date: Tue, 26 Apr 2022 22:45:51 +0200 Subject: [PATCH] Add icons for add/remove --- .../bytecodeviewer/gui/resourcelist/ResourceListPane.java | 5 +++-- .../club/bytecodeviewer/resources/IconResources.java | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceListPane.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceListPane.java index 3dfd995d..5a1dacb8 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceListPane.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist/ResourceListPane.java @@ -26,6 +26,7 @@ import org.apache.commons.io.FilenameUtils; import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.decompilers.Decompiler; import the.bytecode.club.bytecodeviewer.gui.contextmenu.ContextMenu; +import the.bytecode.club.bytecodeviewer.resources.IconResources; import the.bytecode.club.bytecodeviewer.resources.ResourceContainer; import the.bytecode.club.bytecodeviewer.resources.importing.Import; import the.bytecode.club.bytecodeviewer.translation.TranslatedComponents; @@ -72,8 +73,8 @@ public class ResourceListPane extends TranslatedVisibleComponent implements File public final JPopupMenu rightClickMenu = new JPopupMenu(); public final JCheckBox exact = new TranslatedJCheckBox("Exact path", TranslatedComponents.EXACT_PATH); public final JCheckBox caseSensitive = new TranslatedJCheckBox("Match case", TranslatedComponents.MATCH_CASE); - public final JButton open = new JButton("+"); - public final JButton close = new JButton("-"); + public final JButton open = new JButton(IconResources.add); + public final JButton close = new JButton(IconResources.remove); public final ResourceTreeNode treeRoot = new ResourceTreeNode("Loaded Files:"); public final ResourceTree tree = new ResourceTree(treeRoot); public final JTextField quickSearch = new TranslatedJTextField("Quick file search (no file extension)", TranslatedComponents.QUICK_FILE_SEARCH_NO_FILE_EXTENSION); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/resources/IconResources.java b/src/main/java/the/bytecode/club/bytecodeviewer/resources/IconResources.java index 60ce7c76..b17d6484 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/resources/IconResources.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/resources/IconResources.java @@ -44,6 +44,8 @@ public class IconResources public static final List iconList; public static final BufferedImage icon; + public static final Icon add; + public static final Icon remove; public static final Icon nextIcon; public static final Icon prevIcon; public static final Icon busyIcon; @@ -68,6 +70,8 @@ public class IconResources { IconResolver iconResolver = IconLoader.get(); icon = loadImageFromResource("gui/bcv_icon.png"); + add = AllIcons.Action.Add.get(); + remove = AllIcons.Action.Remove.get(); nextIcon = iconResolver.getIcon("gui/next.svg", true); prevIcon = iconResolver.getIcon("gui/previous.svg", true); busyIcon = AllIcons.Misc.Progress.get();