Code Cleanup
This commit is contained in:
parent
cf6378d334
commit
80c4b4fb72
4 changed files with 4 additions and 20 deletions
|
@ -70,7 +70,7 @@ public class MainViewerGUI extends JFrame
|
||||||
public final List<JMenuItem> waitIcons = new ArrayList<>();
|
public final List<JMenuItem> waitIcons = new ArrayList<>();
|
||||||
|
|
||||||
//main UI components
|
//main UI components
|
||||||
private static final ArrayList<VisibleComponent> uiComponents = new ArrayList<>();
|
public final ArrayList<VisibleComponent> uiComponents = new ArrayList<>();
|
||||||
public final Workspace workPane = new Workspace();
|
public final Workspace workPane = new Workspace();
|
||||||
public final ResourceListPane resourcePane = new ResourceListPane();
|
public final ResourceListPane resourcePane = new ResourceListPane();
|
||||||
public final SearchBoxPane searchBoxPane = new SearchBoxPane();
|
public final SearchBoxPane searchBoxPane = new SearchBoxPane();
|
||||||
|
|
|
@ -3,23 +3,13 @@ package the.bytecode.club.bytecodeviewer.gui.resourceviewer;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URI;
|
|
||||||
import java.net.URISyntaxException;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
import com.github.weisj.darklaf.icons.ThemedSVGIcon;
|
|
||||||
import com.sun.java.swing.plaf.windows.WindowsInternalFrameTitlePane;
|
|
||||||
import me.konloch.kontainer.io.DiskWriter;
|
|
||||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||||
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.ClassViewer;
|
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.ClassViewer;
|
||||||
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.FileViewer;
|
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.FileViewer;
|
||||||
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.ResourceViewer;
|
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.ResourceViewer;
|
||||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
|
||||||
import the.bytecode.club.bytecodeviewer.translation.Translation;
|
import the.bytecode.club.bytecodeviewer.translation.Translation;
|
||||||
import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJButton;
|
import the.bytecode.club.bytecodeviewer.translation.components.TranslatedJButton;
|
||||||
import the.bytecode.club.bytecodeviewer.translation.components.TranslatedVisibleComponent;
|
import the.bytecode.club.bytecodeviewer.translation.components.TranslatedVisibleComponent;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.github.weisj.darklaf.LafManager;
|
||||||
import com.github.weisj.darklaf.theme.*;
|
import com.github.weisj.darklaf.theme.*;
|
||||||
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
|
||||||
import the.bytecode.club.bytecodeviewer.Configuration;
|
import the.bytecode.club.bytecodeviewer.Configuration;
|
||||||
|
import the.bytecode.club.bytecodeviewer.gui.components.VisibleComponent;
|
||||||
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.BytecodeViewPanel;
|
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.BytecodeViewPanel;
|
||||||
import the.bytecode.club.bytecodeviewer.translation.Translation;
|
import the.bytecode.club.bytecodeviewer.translation.Translation;
|
||||||
|
|
||||||
|
@ -55,6 +56,7 @@ public enum LAFTheme
|
||||||
public void setLAF() throws ClassNotFoundException, UnsupportedLookAndFeelException, InstantiationException, IllegalAccessException
|
public void setLAF() throws ClassNotFoundException, UnsupportedLookAndFeelException, InstantiationException, IllegalAccessException
|
||||||
{
|
{
|
||||||
boolean darkLAF = true;
|
boolean darkLAF = true;
|
||||||
|
|
||||||
switch(this)
|
switch(this)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
@ -94,18 +96,12 @@ public enum LAFTheme
|
||||||
|
|
||||||
//test theme installed correctly
|
//test theme installed correctly
|
||||||
if(darkLAF)
|
if(darkLAF)
|
||||||
{
|
|
||||||
failSafe();
|
failSafe();
|
||||||
}
|
|
||||||
|
|
||||||
Configuration.showDarkLAFComponentIcons = darkLAF;
|
Configuration.showDarkLAFComponentIcons = darkLAF;
|
||||||
|
|
||||||
if(BytecodeViewer.viewer != null)
|
if(BytecodeViewer.viewer != null)
|
||||||
{
|
BytecodeViewer.viewer.uiComponents.forEach(VisibleComponent::setDefaultIcon);
|
||||||
BytecodeViewer.viewer.resourcePane.setDefaultIcon();
|
|
||||||
BytecodeViewer.viewer.workPane.setDefaultIcon();
|
|
||||||
BytecodeViewer.viewer.searchBoxPane.setDefaultIcon();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package the.bytecode.club.bytecodeviewer.translation.components;
|
package the.bytecode.club.bytecodeviewer.translation.components;
|
||||||
|
|
||||||
import com.github.weisj.darklaf.icons.ThemedSVGIcon;
|
|
||||||
import the.bytecode.club.bytecodeviewer.gui.components.VisibleComponent;
|
import the.bytecode.club.bytecodeviewer.gui.components.VisibleComponent;
|
||||||
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.Workspace;
|
|
||||||
import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference;
|
import the.bytecode.club.bytecodeviewer.translation.TranslatedComponentReference;
|
||||||
import the.bytecode.club.bytecodeviewer.translation.Translation;
|
import the.bytecode.club.bytecodeviewer.translation.Translation;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue