General Refactoring

This commit is contained in:
Konloch 2024-08-21 11:41:34 -06:00
parent b1933d2760
commit 761ef12bdb

AI 샘플 코드 생성 중입니다

Loading...
3 changed files with 11 additions and 6 deletions

View File

@ -130,11 +130,14 @@ public class ClassViewer extends ResourceViewer
if (bytecodeViewPanel1.decompiler != Decompiler.NONE) if (bytecodeViewPanel1.decompiler != Decompiler.NONE)
bytecodeViewPanel1.updateThread.startNewThread(); bytecodeViewPanel1.updateThread.startNewThread();
if (bytecodeViewPanel2.decompiler != Decompiler.NONE) if (bytecodeViewPanel2.decompiler != Decompiler.NONE)
bytecodeViewPanel2.updateThread.startNewThread(); bytecodeViewPanel2.updateThread.startNewThread();
if (bytecodeViewPanel3.decompiler != Decompiler.NONE) if (bytecodeViewPanel3.decompiler != Decompiler.NONE)
bytecodeViewPanel3.updateThread.startNewThread(); bytecodeViewPanel3.updateThread.startNewThread();
}, "ClassViewer Temp Dump"); }, "ClassViewer Temp Dump");
dumpBuild.start(); dumpBuild.start();
if (isPanel1Editable() || isPanel2Editable() || isPanel3Editable()) if (isPanel1Editable() || isPanel2Editable() || isPanel3Editable())
@ -195,9 +198,11 @@ public class ClassViewer extends ResourceViewer
case 0: case 0:
area = classViewer.bytecodeViewPanel1.updateThread.updateUpdaterTextArea; area = classViewer.bytecodeViewPanel1.updateThread.updateUpdaterTextArea;
break; break;
case 1: case 1:
area = classViewer.bytecodeViewPanel2.updateThread.updateUpdaterTextArea; area = classViewer.bytecodeViewPanel2.updateThread.updateUpdaterTextArea;
break; break;
case 2: case 2:
area = classViewer.bytecodeViewPanel3.updateThread.updateUpdaterTextArea; area = classViewer.bytecodeViewPanel3.updateThread.updateUpdaterTextArea;
break; break;
@ -209,10 +214,9 @@ public class ClassViewer extends ResourceViewer
if (methods != null) if (methods != null)
{ {
int methodLine = methods.findMethod(method); int methodLine = methods.findMethod(method);
if (methodLine != -1) if (methodLine != -1)
{
selectMethod(area, methodLine); selectMethod(area, methodLine);
}
} }
} }
} }
@ -220,6 +224,7 @@ public class ClassViewer extends ResourceViewer
public static int getMaxViewLine(RSyntaxTextArea area) public static int getMaxViewLine(RSyntaxTextArea area)
{ {
Container parent = area.getParent(); Container parent = area.getParent();
if (parent instanceof JViewport) if (parent instanceof JViewport)
{ {
JViewport viewport = (JViewport) parent; JViewport viewport = (JViewport) parent;
@ -234,6 +239,7 @@ public class ClassViewer extends ResourceViewer
public static int getViewLine(RSyntaxTextArea area) public static int getViewLine(RSyntaxTextArea area)
{ {
Container parent = area.getParent(); Container parent = area.getParent();
if (parent instanceof JViewport) if (parent instanceof JViewport)
{ {
JViewport viewport = (JViewport) parent; JViewport viewport = (JViewport) parent;
@ -248,6 +254,7 @@ public class ClassViewer extends ResourceViewer
public static void setViewLine(RSyntaxTextArea area, int line) public static void setViewLine(RSyntaxTextArea area, int line)
{ {
Container parent = area.getParent(); Container parent = area.getParent();
if (parent instanceof JViewport) if (parent instanceof JViewport)
{ {
JViewport viewport = (JViewport) parent; JViewport viewport = (JViewport) parent;
@ -291,9 +298,7 @@ public class ClassViewer extends ResourceViewer
sp2.setResizeWeight(0.7); sp2.setResizeWeight(0.7);
setDividerLocation(sp2, 0.7); setDividerLocation(sp2, 0.7);
if ((bytecodeViewPanel2.decompiler == Decompiler.NONE && bytecodeViewPanel1.decompiler != Decompiler.NONE) || (bytecodeViewPanel1.decompiler == Decompiler.NONE && bytecodeViewPanel2.decompiler != Decompiler.NONE)) if ((bytecodeViewPanel2.decompiler == Decompiler.NONE && bytecodeViewPanel1.decompiler != Decompiler.NONE) || (bytecodeViewPanel1.decompiler == Decompiler.NONE && bytecodeViewPanel2.decompiler != Decompiler.NONE))
{
setDividerLocation(sp2, 0.5); setDividerLocation(sp2, 0.5);
}
else if (bytecodeViewPanel1.decompiler == Decompiler.NONE) else if (bytecodeViewPanel1.decompiler == Decompiler.NONE)
setDividerLocation(sp2, 0); setDividerLocation(sp2, 0);
} }

View File

@ -27,5 +27,5 @@ public interface ITabPopupEventListener {
* @param index, index of tab * @param index, index of tab
* @param e * @param e
*/ */
public void onTabPopupEvent(JTabbedPane tabbedPane, int index, TabPopupEvent e); void onTabPopupEvent(JTabbedPane tabbedPane, int index, TabPopupEvent e);
} }

View File

@ -25,5 +25,5 @@ public interface ITabZeroComponentEventListener {
* *
* @param tabbedPane * @param tabbedPane
*/ */
public void onTabZeroComponent(JTabbedPane tabbedPane); void onTabZeroComponent(JTabbedPane tabbedPane);
} }