mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 05:21:09 +00:00
Updated gui
This commit is contained in:
@@ -42,8 +42,8 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener {
|
||||
public JPanel statusPanel = new JPanel();
|
||||
public LoadingPanel loadingPanel = new LoadingPanel(20, 20);
|
||||
public JLabel statusLabel = new JLabel("");
|
||||
public JLabel asmLabel = new JLabel("Disassembled code:");
|
||||
public JLabel decLabel = new JLabel("Decompiled code:");
|
||||
public JLabel asmLabel = new JLabel("P-code source (editable)");
|
||||
public JLabel decLabel = new JLabel("ActionScript source");
|
||||
|
||||
public void setStatus(String s) {
|
||||
if (s.equals("")) {
|
||||
@@ -156,8 +156,6 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener {
|
||||
setSize(800, 600);
|
||||
this.abc = list.get(listIndex).abc;
|
||||
getContentPane().setLayout(new BorderLayout());
|
||||
//codeView = new CodeViewPanel(abc);
|
||||
//codeView
|
||||
sourceTextArea = new ASMSourceEditorPane();
|
||||
|
||||
JPanel rightPanel = new JPanel();
|
||||
@@ -175,7 +173,6 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener {
|
||||
saveButton.addActionListener(this);
|
||||
|
||||
|
||||
//buttonsPan.add(verifyButton);
|
||||
buttonsPan.add(saveButton);
|
||||
rightPanel.add(buttonsPan, BorderLayout.SOUTH);
|
||||
decompiledTextArea = new DecompiledEditorPane();
|
||||
@@ -186,6 +183,7 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener {
|
||||
panA.setLayout(new BorderLayout());
|
||||
panA.add(rightPanel, BorderLayout.CENTER);
|
||||
panA.add(asmLabel, BorderLayout.NORTH);
|
||||
|
||||
asmLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
asmLabel.setBorder(new BevelBorder(BevelBorder.RAISED));
|
||||
JPanel panB = new JPanel();
|
||||
@@ -380,13 +378,7 @@ public class MainFrame extends JFrame implements ActionListener, ItemListener {
|
||||
|
||||
public void display() {
|
||||
setVisible(true);
|
||||
|
||||
splitPane2.setDividerLocation(0.5); //Traitlist-classtree
|
||||
|
||||
//splitPane3.setDividerLocation(0.1); //classtree|right
|
||||
|
||||
splitPane1.setDividerLocation(0.5); //disassembled|decompiled
|
||||
|
||||
|
||||
splitPane2.setDividerLocation(0.5);
|
||||
splitPane1.setDividerLocation(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.jpexs.asdec.tags.Tag;
|
||||
import jsyntaxpane.DefaultSyntaxKit;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.BevelBorder;
|
||||
import javax.swing.event.TreeSelectionEvent;
|
||||
import javax.swing.event.TreeSelectionListener;
|
||||
import javax.swing.tree.DefaultTreeCellRenderer;
|
||||
@@ -30,6 +31,8 @@ public class MainFrame extends JFrame implements TreeSelectionListener, ActionLi
|
||||
public JSplitPane splitPane;
|
||||
public JSplitPane splitPane2;
|
||||
public JButton saveButton = new JButton("Save");
|
||||
public JLabel asmLabel = new JLabel("P-code source (editable)");
|
||||
public JLabel decLabel = new JLabel("ActionScript source");
|
||||
|
||||
public MainFrame(List<Tag> list) {
|
||||
this.list = list;
|
||||
@@ -45,15 +48,30 @@ public class MainFrame extends JFrame implements TreeSelectionListener, ActionLi
|
||||
treeRenderer.setLeafIcon(leafIcon);
|
||||
tagTree.setCellRenderer(treeRenderer);
|
||||
|
||||
JPanel centerPanel = new JPanel();
|
||||
centerPanel.setLayout(new BorderLayout());
|
||||
centerPanel.add(new JScrollPane(editor), BorderLayout.CENTER);
|
||||
centerPanel.add(saveButton, BorderLayout.SOUTH);
|
||||
JPanel panB = new JPanel();
|
||||
panB.setLayout(new BorderLayout());
|
||||
asmLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
asmLabel.setBorder(new BevelBorder(BevelBorder.RAISED));
|
||||
panB.add(asmLabel,BorderLayout.NORTH);
|
||||
panB.add(new JScrollPane(editor), BorderLayout.CENTER);
|
||||
|
||||
JPanel buttonsPan = new JPanel();
|
||||
buttonsPan.setLayout(new FlowLayout());
|
||||
buttonsPan.add(saveButton);
|
||||
panB.add(buttonsPan, BorderLayout.SOUTH);
|
||||
|
||||
saveButton.addActionListener(this);
|
||||
saveButton.setActionCommand("SAVEACTION");
|
||||
|
||||
JPanel panA=new JPanel();
|
||||
panA.setLayout(new BorderLayout());
|
||||
panA.add(new JScrollPane(decompiledEditor),BorderLayout.CENTER);
|
||||
panA.add(decLabel, BorderLayout.NORTH);
|
||||
decLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
decLabel.setBorder(new BevelBorder(BevelBorder.RAISED));
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
add(splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(tagTree), splitPane2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centerPanel, new JScrollPane(decompiledEditor))), BorderLayout.CENTER);
|
||||
add(splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(tagTree), splitPane2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panA, panB)), BorderLayout.CENTER);
|
||||
editor.setContentType("text/flasm");
|
||||
decompiledEditor.setContentType("text/actionscript");
|
||||
setSize(640, 480);
|
||||
@@ -124,6 +142,7 @@ public class MainFrame extends JFrame implements TreeSelectionListener, ActionLi
|
||||
public void display() {
|
||||
setVisible(true);
|
||||
splitPane.setDividerLocation(0.5);
|
||||
splitPane2.setDividerLocation(0.5);
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
Reference in New Issue
Block a user