mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 06:40:46 +00:00
AS3: New P-code editing syntax inspired by RABCDAsm.
AS3: Multiname and namespace editing. AS3: Editing whole trait in one textarea AS3: Removed messages about adding new constants AS3: Modified colors in editor AS3: Highlighting pair parenthesis/bracket AS3: Editing various new P-code parameters
This commit is contained in:
@@ -16,43 +16,30 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.gui.abc;
|
||||
|
||||
import static com.jpexs.decompiler.flash.gui.AppStrings.translate;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTabbedPane;
|
||||
import java.awt.BorderLayout;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class MethodTraitDetailPanel extends JTabbedPane implements TraitDetail {
|
||||
public class MethodTraitDetailPanel extends JPanel implements TraitDetail {
|
||||
|
||||
public MethodCodePanel methodCodePanel;
|
||||
public MethodBodyParamsPanel methodBodyParamsPanel;
|
||||
public MethodInfoPanel methodInfoPanel;
|
||||
public ABCPanel abcPanel;
|
||||
|
||||
public MethodTraitDetailPanel(ABCPanel abcPanel) {
|
||||
this.abcPanel = abcPanel;
|
||||
methodCodePanel = new MethodCodePanel(abcPanel.decompiledTextArea);
|
||||
methodBodyParamsPanel = new MethodBodyParamsPanel(abcPanel);
|
||||
methodInfoPanel = new MethodInfoPanel();
|
||||
addTab(translate("abc.detail.methodinfo"), methodInfoPanel);
|
||||
addTab(translate("abc.detail.body.code"), methodCodePanel);
|
||||
addTab(translate("abc.detail.body.params"), new JScrollPane(methodBodyParamsPanel));
|
||||
setSelectedIndex(1);
|
||||
setLayout(new BorderLayout());
|
||||
add(methodCodePanel, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean save() {
|
||||
if (!methodInfoPanel.save()) {
|
||||
return false;
|
||||
}
|
||||
if (!methodCodePanel.save(abcPanel.abc.constants)) {
|
||||
return false;
|
||||
}
|
||||
if (!methodBodyParamsPanel.save()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -60,8 +47,6 @@ public class MethodTraitDetailPanel extends JTabbedPane implements TraitDetail {
|
||||
@Override
|
||||
public void setEditMode(boolean val) {
|
||||
methodCodePanel.setEditMode(val);
|
||||
methodBodyParamsPanel.setEditMode(val);
|
||||
methodInfoPanel.setEditMode(val);
|
||||
}
|
||||
private boolean active = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user