Icon Resources API Change
This commit is contained in:
parent
0325c2008e
commit
c2a9c0f51e
|
@ -13,7 +13,7 @@ import javax.swing.JProgressBar;
|
|||
import javax.swing.JScrollPane;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.Configuration;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.HTMLPane;
|
||||
|
||||
import static the.bytecode.club.bytecodeviewer.Configuration.language;
|
||||
|
@ -55,7 +55,7 @@ public class InitialBootScreen extends JFrame
|
|||
System.exit(0);
|
||||
}
|
||||
});
|
||||
this.setIconImages(Resources.iconList);
|
||||
this.setIconImages(IconResources.iconList);
|
||||
|
||||
setSize(getSafeSize());
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import javax.swing.JScrollPane;
|
|||
import javax.swing.JTextArea;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.Configuration;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
|
||||
import static the.bytecode.club.bytecodeviewer.Constants.*;
|
||||
|
||||
|
@ -101,7 +101,7 @@ public class ExceptionUI extends JFrame
|
|||
*/
|
||||
private void setupFrame(String error, String author)
|
||||
{
|
||||
this.setIconImages(Resources.iconList);
|
||||
this.setIconImages(IconResources.iconList);
|
||||
setSize(new Dimension(600, 400));
|
||||
setTitle("Bytecode Viewer " + VERSION + " - Error Log - Send this to " + author);
|
||||
getContentPane().setLayout(new CardLayout(0, 0));
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.apache.commons.lang3.ArrayUtils;
|
|||
import org.objectweb.asm.tree.ClassNode;
|
||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||
import the.bytecode.club.bytecodeviewer.resources.ExternalResources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.api.ExceptionUI;
|
||||
import the.bytecode.club.bytecodeviewer.decompilers.InternalDecompiler;
|
||||
import the.bytecode.club.bytecodeviewer.translation.TranslatedStrings;
|
||||
|
|
|
@ -6,7 +6,7 @@ import javax.swing.JFrame;
|
|||
import javax.swing.JScrollPane;
|
||||
|
||||
import the.bytecode.club.bootloader.InitialBootScreen;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
|
||||
import static the.bytecode.club.bytecodeviewer.Configuration.*;
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class AboutWindow extends JFrame
|
|||
{
|
||||
public AboutWindow()
|
||||
{
|
||||
this.setIconImages(Resources.iconList);
|
||||
this.setIconImages(IconResources.iconList);
|
||||
setSize(InitialBootScreen.getSafeSize());
|
||||
setTitle("Bytecode Viewer - About - https://bytecodeviewer.com | https://the.bytecode.club");
|
||||
getContentPane().setLayout(new CardLayout(0, 0));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package the.bytecode.club.bytecodeviewer.gui.components;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
@ -35,7 +35,7 @@ public class JFrameConsole extends JFrame
|
|||
|
||||
public JFrameConsole(String title)
|
||||
{
|
||||
this.setIconImages(Resources.iconList);
|
||||
this.setIconImages(IconResources.iconList);
|
||||
setTitle(title);
|
||||
setSize(new Dimension(542, 316));
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import javax.swing.JFrame;
|
|||
import javax.swing.JLabel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
import the.bytecode.club.bytecodeviewer.api.ASMResourceUtil;
|
||||
import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
|
||||
import the.bytecode.club.bytecodeviewer.plugin.preinstalled.EZInjection;
|
||||
|
@ -45,7 +45,7 @@ public class RunOptions extends JFrame
|
|||
|
||||
public RunOptions()
|
||||
{
|
||||
this.setIconImages(Resources.iconList);
|
||||
this.setIconImages(IconResources.iconList);
|
||||
setSize(new Dimension(250, 402));
|
||||
setResizable(false);
|
||||
setTitle("Run Options");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package the.bytecode.club.bytecodeviewer.gui.components;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.GlobalHotKeys;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.listeners.PressKeyListener;
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.listeners.ReleaseKeyListener;
|
||||
import the.bytecode.club.bytecodeviewer.translation.Translation;
|
||||
|
@ -49,10 +49,10 @@ public class SearchableJTextArea extends JTextArea
|
|||
scrollPane.setColumnHeaderView(searchPanel);
|
||||
|
||||
JButton searchNext = new JButton();
|
||||
searchNext.setIcon(Resources.nextIcon);
|
||||
searchNext.setIcon(IconResources.nextIcon);
|
||||
|
||||
JButton searchPrev = new JButton();
|
||||
searchPrev.setIcon(Resources.prevIcon);
|
||||
searchPrev.setIcon(IconResources.prevIcon);
|
||||
|
||||
JPanel buttonPane = new JPanel(new BorderLayout());
|
||||
buttonPane.add(searchNext, BorderLayout.WEST);
|
||||
|
|
|
@ -4,7 +4,7 @@ import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
|
|||
import org.fife.ui.rtextarea.RTextScrollPane;
|
||||
import the.bytecode.club.bytecodeviewer.Configuration;
|
||||
import the.bytecode.club.bytecodeviewer.GlobalHotKeys;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.listeners.PressKeyListener;
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.listeners.ReleaseKeyListener;
|
||||
import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme;
|
||||
|
@ -72,8 +72,8 @@ public class SearchableRSyntaxTextArea extends RSyntaxTextArea
|
|||
JPanel buttonPane = new JPanel(new BorderLayout());
|
||||
buttonPane.add(searchNext, BorderLayout.WEST);
|
||||
buttonPane.add(searchPrev, BorderLayout.EAST);
|
||||
searchNext.setIcon(Resources.nextIcon);
|
||||
searchPrev.setIcon(Resources.prevIcon);
|
||||
searchNext.setIcon(IconResources.nextIcon);
|
||||
searchPrev.setIcon(IconResources.prevIcon);
|
||||
searchPanel.add(buttonPane, BorderLayout.WEST);
|
||||
searchPanel.add(searchInput, BorderLayout.CENTER);
|
||||
searchPanel.add(caseSensitiveSearch, BorderLayout.EAST);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package the.bytecode.club.bytecodeviewer.gui.components;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
@ -18,9 +18,9 @@ public class WaitBusyIcon extends JMenuItemIcon
|
|||
|
||||
public static Icon loadIcon()
|
||||
{
|
||||
if(Resources.busyIcon != null)
|
||||
return Resources.busyIcon;
|
||||
if(IconResources.busyIcon != null)
|
||||
return IconResources.busyIcon;
|
||||
|
||||
return Resources.busyB64Icon;
|
||||
return IconResources.busyB64Icon;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.awt.Dimension;
|
|||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTabbedPane;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
|
||||
/***************************************************************************
|
||||
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
|
||||
|
@ -35,7 +35,7 @@ public class GraphicalReflectionKit extends JFrame
|
|||
{
|
||||
public GraphicalReflectionKit()
|
||||
{
|
||||
this.setIconImages(Resources.iconList);
|
||||
this.setIconImages(IconResources.iconList);
|
||||
setSize(new Dimension(382, 356));
|
||||
setTitle("Graphical Reflection Kit");
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package the.bytecode.club.bytecodeviewer.gui.plugins;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
import the.bytecode.club.bytecodeviewer.malwarescanner.MalwareScanModule;
|
||||
import the.bytecode.club.bytecodeviewer.malwarescanner.util.MaliciousCodeOptions;
|
||||
import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
|
||||
|
@ -49,7 +49,7 @@ public class MaliciousCodeScannerOptions extends JFrame
|
|||
|
||||
public MaliciousCodeScannerOptions()
|
||||
{
|
||||
this.setIconImages(Resources.iconList);
|
||||
this.setIconImages(IconResources.iconList);
|
||||
setSize(new Dimension(250, 7 + (MalwareScanModule.values().length * SPACER_HEIGHT_BETWEEN_OPTIONS) + 90));
|
||||
setResizable(false);
|
||||
setTitle("Malicious Code Scanner Options");
|
||||
|
|
|
@ -8,7 +8,7 @@ import javax.swing.JLabel;
|
|||
import javax.swing.JTextField;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
|
||||
import the.bytecode.club.bytecodeviewer.plugin.preinstalled.ReplaceStrings;
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class ReplaceStringsOptions extends JFrame
|
|||
|
||||
public ReplaceStringsOptions()
|
||||
{
|
||||
this.setIconImages(Resources.iconList);
|
||||
this.setIconImages(IconResources.iconList);
|
||||
setSize(new Dimension(250, 176));
|
||||
setResizable(false);
|
||||
setTitle("Replace Strings");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package the.bytecode.club.bytecodeviewer.gui.resourcelist;
|
||||
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.tree.DefaultTreeCellRenderer;
|
||||
|
@ -31,61 +31,61 @@ public class ImageRenderer extends DefaultTreeCellRenderer
|
|||
|
||||
if (name.endsWith(".jar") || name.endsWith(".war") || name.endsWith(".ear"))
|
||||
{
|
||||
setIcon(Resources.jarIcon);
|
||||
setIcon(IconResources.jarIcon);
|
||||
}
|
||||
else if (name.endsWith(".zip"))
|
||||
{
|
||||
setIcon(Resources.zipIcon);
|
||||
setIcon(IconResources.zipIcon);
|
||||
}
|
||||
else if (name.endsWith(".bat"))
|
||||
{
|
||||
setIcon(Resources.batIcon);
|
||||
setIcon(IconResources.batIcon);
|
||||
}
|
||||
else if (name.endsWith(".sh"))
|
||||
{
|
||||
setIcon(Resources.shIcon);
|
||||
setIcon(IconResources.shIcon);
|
||||
}
|
||||
else if (name.endsWith(".cs"))
|
||||
{
|
||||
setIcon(Resources.csharpIcon);
|
||||
setIcon(IconResources.csharpIcon);
|
||||
}
|
||||
else if (name.endsWith(".c") || name.endsWith(".cpp") || name.endsWith(".h"))
|
||||
{
|
||||
setIcon(Resources.cplusplusIcon);
|
||||
setIcon(IconResources.cplusplusIcon);
|
||||
}
|
||||
else if (name.endsWith(".xapk") || name.endsWith(".apk") || name.endsWith(".dex"))
|
||||
{
|
||||
setIcon(Resources.androidIcon);
|
||||
setIcon(IconResources.androidIcon);
|
||||
}
|
||||
else if (name.endsWith(".png") || name.endsWith(".jpg") || name.endsWith(".jpeg")
|
||||
|| name.endsWith(".bmp") || name.endsWith(".gif"))
|
||||
{
|
||||
setIcon(Resources.imageIcon);
|
||||
setIcon(IconResources.imageIcon);
|
||||
}
|
||||
else if (name.endsWith(".class"))
|
||||
{
|
||||
setIcon(Resources.classIcon);
|
||||
setIcon(IconResources.classIcon);
|
||||
}
|
||||
else if (name.endsWith(".java"))
|
||||
{
|
||||
setIcon(Resources.javaIcon);
|
||||
setIcon(IconResources.javaIcon);
|
||||
}
|
||||
else if (name.endsWith(".txt") || name.endsWith(".md"))
|
||||
{
|
||||
setIcon(Resources.textIcon);
|
||||
setIcon(IconResources.textIcon);
|
||||
}
|
||||
else if (name.equals("decoded resources"))
|
||||
{
|
||||
setIcon(Resources.decodedIcon);
|
||||
setIcon(IconResources.decodedIcon);
|
||||
}
|
||||
else if (name.endsWith(".properties") || name.endsWith(".xml") || name.endsWith(".jsp")
|
||||
|| name.endsWith(".mf") || name.endsWith(".config") || name.endsWith(".cfg"))
|
||||
{
|
||||
setIcon(Resources.configIcon);
|
||||
setIcon(IconResources.configIcon);
|
||||
}
|
||||
else if (node.getChildCount() <= 0)
|
||||
{ //random file
|
||||
setIcon(Resources.fileIcon);
|
||||
setIcon(IconResources.fileIcon);
|
||||
}
|
||||
else
|
||||
{ //folder
|
||||
|
@ -128,10 +128,10 @@ public class ImageRenderer extends DefaultTreeCellRenderer
|
|||
}
|
||||
|
||||
if (isJava)
|
||||
setIcon(Resources.packagesIcon);
|
||||
setIcon(IconResources.packagesIcon);
|
||||
else
|
||||
{
|
||||
setIcon(Resources.folderIcon);
|
||||
setIcon(IconResources.folderIcon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package the.bytecode.club.bytecodeviewer.plugin;
|
|||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -29,7 +29,7 @@ public enum PluginTemplate
|
|||
public String getContents() throws IOException
|
||||
{
|
||||
if(contents == null)
|
||||
contents = Resources.loadResourceAsString(resourcePath);
|
||||
contents = IconResources.loadResourceAsString(resourcePath);
|
||||
|
||||
return contents;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import me.konloch.kontainer.io.DiskWriter;
|
|||
import org.apache.commons.compress.utils.FileNameUtils;
|
||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||
import the.bytecode.club.bytecodeviewer.Configuration;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.FileChooser;
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.SearchableRSyntaxTextArea;
|
||||
import the.bytecode.club.bytecodeviewer.translation.Translation;
|
||||
|
@ -53,7 +53,7 @@ public class PluginWriter extends JFrame
|
|||
public void buildGUI()
|
||||
{
|
||||
setTitle("Editing BCV Plugin: " + pluginName);
|
||||
setIconImages(Resources.iconList);
|
||||
setIconImages(IconResources.iconList);
|
||||
setSize(new Dimension(542, 316));
|
||||
|
||||
area = (SearchableRSyntaxTextArea) Configuration.rstaTheme.apply(new SearchableRSyntaxTextArea());
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.ArrayList;
|
|||
import org.objectweb.asm.tree.*;
|
||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||
import the.bytecode.club.bytecodeviewer.Constants;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
import the.bytecode.club.bytecodeviewer.api.*;
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.MultipleChoiceDialogue;
|
||||
import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
|
||||
|
@ -285,7 +285,7 @@ public class AllatoriStringDecrypter extends Plugin
|
|||
|
||||
public AllatoriStringDecrypterOptionsFrame()
|
||||
{
|
||||
this.setIconImages(Resources.iconList);
|
||||
this.setIconImages(IconResources.iconList);
|
||||
setSize(new Dimension(250, 120));
|
||||
setResizable(false);
|
||||
setTitle("Allatori String Decrypter");
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.objectweb.asm.tree.ClassNode;
|
|||
import org.objectweb.asm.tree.MethodInsnNode;
|
||||
import org.objectweb.asm.tree.MethodNode;
|
||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
import the.bytecode.club.bytecodeviewer.api.Plugin;
|
||||
import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class CodeSequenceDiagram extends Plugin
|
|||
ClassNode c = BytecodeViewer.getCurrentlyOpenedClassNode();
|
||||
JFrame frame = new JFrame("Code Sequence Diagram - " + c.name);
|
||||
|
||||
frame.setIconImages(Resources.iconList);
|
||||
frame.setIconImages(IconResources.iconList);
|
||||
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
frame.setSize(400, 320);
|
||||
mxGraph graph = new mxGraph();
|
||||
|
|
|
@ -2,7 +2,6 @@ package the.bytecode.club.bytecodeviewer.resources;
|
|||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
|
@ -16,8 +15,6 @@ import org.apache.commons.io.IOUtils;
|
|||
import org.imgscalr.Scalr;
|
||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||
|
||||
import static the.bytecode.club.bytecodeviewer.Constants.libsDirectory;
|
||||
|
||||
/***************************************************************************
|
||||
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
|
||||
* Copyright (C) 2014 Kalen 'Konloch' Kinloch - http://bytecodeviewer.com *
|
||||
|
@ -42,7 +39,7 @@ import static the.bytecode.club.bytecodeviewer.Constants.libsDirectory;
|
|||
* @author Konloch
|
||||
*/
|
||||
|
||||
public class Resources
|
||||
public class IconResources
|
||||
{
|
||||
public static List<BufferedImage> iconList;
|
||||
public static BufferedImage icon;
|
||||
|
@ -76,27 +73,27 @@ public class Resources
|
|||
+ "+BoY3H0BSbz6A2MxA6VciFyDqGAWQTWVkYEkCUrcOsDD8OwtkvMViMwAb8xEUHlHcFAAAAABJRU5ErkJggg=="));
|
||||
prevIcon = new ImageIcon(b642IMG("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAMFBMVEX"
|
||||
+ "///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAABnRSTlMANzlYgKhxpRi1AAAATElEQVR42mNgwAZYHIAEExA7qUAYLApMDmCGEwODCojByM/A8FEAyPi/moFh9QewYjCAM1iA+D2KqYwMrIlA6tUGFoa/Z4GMt1hsBgCe1wuKber+SwAAAABJRU5ErkJggg=="));
|
||||
busyIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/loading.gif")));
|
||||
busyIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/loading.gif")));
|
||||
busyB64Icon = new ImageIcon(b642IMG("R0lGODlhEAALAPQAAP"
|
||||
+ "///wAAANra2tDQ0Orq6gcHBwAAAC8vL4KCgmFhYbq6uiMjI0tLS4qKimVlZb6+vicnJwUFBU9PT"
|
||||
+ "+bm5tjY2PT09Dk5Odzc3PLy8ra2tqCgoMrKyu7u7gAAAAAAAAAAACH5BAkLAAAAIf4aQ3JlYXRlZCB3aXRoIGFqYXhsb2FkLmluZm8AIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQJCwAAACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQJCwAAACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQJCwAAACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAkLAAAALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkECQsAAAAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAkLAAAALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkECQsAAAAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7"));
|
||||
|
||||
batIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/bat.png")));
|
||||
shIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/sh.png")));
|
||||
csharpIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/c#.png")));
|
||||
cplusplusIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/c++.png")));
|
||||
configIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/config.png")));
|
||||
jarIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/jar.png")));
|
||||
zipIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/zip.png")));
|
||||
packagesIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/package.png")));
|
||||
folderIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/folder.png")));
|
||||
androidIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/android.png")));
|
||||
fileIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/file.png")));
|
||||
textIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/text.png")));
|
||||
classIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/class.png")));
|
||||
imageIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/image.png")));
|
||||
decodedIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/decoded.png")));
|
||||
javaIcon = new ImageIcon(Objects.requireNonNull(Resources.class.getResource("/gui/java.png")));
|
||||
batIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/bat.png")));
|
||||
shIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/sh.png")));
|
||||
csharpIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/c#.png")));
|
||||
cplusplusIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/c++.png")));
|
||||
configIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/config.png")));
|
||||
jarIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/jar.png")));
|
||||
zipIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/zip.png")));
|
||||
packagesIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/package.png")));
|
||||
folderIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/folder.png")));
|
||||
androidIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/android.png")));
|
||||
fileIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/file.png")));
|
||||
textIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/text.png")));
|
||||
classIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/class.png")));
|
||||
imageIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/image.png")));
|
||||
decodedIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/decoded.png")));
|
||||
javaIcon = new ImageIcon(Objects.requireNonNull(IconResources.class.getResource("/gui/java.png")));
|
||||
|
||||
iconList = new ArrayList<>();
|
||||
int size = 16;
|
||||
|
@ -109,7 +106,7 @@ public class Resources
|
|||
|
||||
public static String loadResourceAsString(String resourcePath) throws IOException
|
||||
{
|
||||
return IOUtils.toString(Resources.class.getResourceAsStream(resourcePath), StandardCharsets.UTF_8);
|
||||
return IOUtils.toString(IconResources.class.getResourceAsStream(resourcePath), StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
public static BufferedImage resize(BufferedImage image, int width, int height) {
|
|
@ -4,7 +4,7 @@ import com.google.gson.reflect.TypeToken;
|
|||
import org.apache.commons.collections4.map.HashedMap;
|
||||
import org.apache.commons.collections4.map.LinkedMap;
|
||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||
import the.bytecode.club.bytecodeviewer.resources.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -103,7 +103,7 @@ public enum Language
|
|||
printMissingLanguageKeys();
|
||||
|
||||
HashMap<String, String> translationMap = BytecodeViewer.gson.fromJson(
|
||||
Resources.loadResourceAsString(resourcePath),
|
||||
IconResources.loadResourceAsString(resourcePath),
|
||||
new TypeToken<HashMap<String, String>>(){}.getType());
|
||||
|
||||
for(Translation translation : Translation.values())
|
||||
|
@ -153,7 +153,7 @@ public enum Language
|
|||
return;
|
||||
|
||||
LinkedMap<String, String> translationMap = BytecodeViewer.gson.fromJson(
|
||||
Resources.loadResourceAsString(resourcePath),
|
||||
IconResources.loadResourceAsString(resourcePath),
|
||||
new TypeToken<LinkedMap<String, String>>(){}.getType());
|
||||
|
||||
HashSet<String> existingKeys = new HashSet<>();
|
||||
|
|
Loading…
Reference in New Issue
Block a user