format code: blank lines

This commit is contained in:
2015-01-18 21:32:37 +01:00
parent 6ffcca82e7
commit ade56d45a2
640 changed files with 12702 additions and 3882 deletions
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -47,6 +47,7 @@ public class AboutDialog extends AppDialog {
"honfika",
"+ others from GitHub and Google code"
};
private static final String AUTHOR = "JPEXS";
public AboutDialog() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -26,6 +26,7 @@ import java.awt.event.ActionListener;
public class ActionRedirector implements ActionListener {
ActionListener target;
String actionCommand;
public ActionRedirector(ActionListener target, String actionCommand) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -83,6 +83,7 @@ public class AdvancedSettingsDialog extends AppDialog implements ActionListener
Class[] types = new Class[]{
String.class, Object.class, String.class
};
boolean[] canEdit = new boolean[]{
false, true, false
};
@@ -277,7 +278,9 @@ public class AdvancedSettingsDialog extends AppDialog implements ActionListener
}
private JButton cancelButton;
private JButton okButton;
private JButton resetButton;
//private EachRowRendererEditor configurationTable;
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -25,6 +25,7 @@ import java.util.ResourceBundle;
public class AppStrings {
private static Class resourceClass;
private static ResourceBundle resourceBundle;
public static void setResourceClass(Class cls) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -39,9 +39,13 @@ import javax.swing.border.BevelBorder;
public final class BinaryPanel extends JPanel implements ComponentListener {
public HexView hexEditor = new HexView();
private byte[] data;
private JPanel swfInsidePanel;
private DefineBinaryDataTag binaryDataTag = null;
private final MainPanel mainPanel;
public BinaryPanel(final MainPanel mainPanel) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -39,8 +39,11 @@ import javax.swing.text.Document;
public class DebugLogDialog extends AppDialog implements ActionListener {
private final JTextArea logTextArea = new JTextArea();
private final String ACTION_CLOSE = "CLOSE";
private final String ACTION_CLEAR = "CLEAR";
private final Debugger debug;
public DebugLogDialog(Debugger debug) {
@@ -104,5 +107,4 @@ public class DebugLogDialog extends AppDialog implements ActionListener {
break;
}
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,6 +27,7 @@ import javax.swing.table.TableCellRenderer;
public class EachRowRendererEditor extends JTable {
private static final long serialVersionUID = 1L;
private Class editingClass;
@Override
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -59,12 +59,19 @@ public class ErrorLogFrame extends AppFrame {
private static ErrorLogFrame instance;
private final JPanel logView = new JPanel();
private final JPanel logViewInner = new JPanel();
private final Handler handler;
private final ImageIcon expandIcon;
private final ImageIcon collapseIcon;
private ErrorState errorState = ErrorState.NO_ERROR;
private static final int MAX_LOG_ITEM_COUNT = 100;
private final AtomicInteger logItemCount = new AtomicInteger();
public Handler getHandler() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -114,6 +114,7 @@ public class ExportDialog extends AppDialog {
};
private final JComboBox[] combos;
private JTextField zoomTextField = new JTextField();
public <E> E getValue(Class<E> option) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -58,20 +58,31 @@ import javax.swing.JPanel;
public class FolderPreviewPanel extends JPanel {
private static ExecutorService executor;
private List<TreeItem> items;
private int selectedIndex = -1;
private boolean repaintQueued;
private int lastWidth;
private int lastHeight;
public Map<Integer, TreeItem> selectedItems = new HashMap<>();
private Cache<Integer, SerializableImage> cachedPreviews;
private static final int PREVIEW_SIZE = 150;
private static final int BORDER_SIZE = 5;
private static final int LABEL_HEIGHT = 20;
private static final int CELL_HEIGHT = 2 * BORDER_SIZE + PREVIEW_SIZE + LABEL_HEIGHT;
private static final int CELL_WIDTH = 2 * BORDER_SIZE + PREVIEW_SIZE;
private static final SerializableImage noImage = new SerializableImage(PREVIEW_SIZE, PREVIEW_SIZE, BufferedImage.TYPE_INT_ARGB);
static {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -59,21 +59,33 @@ import javax.swing.filechooser.FileFilter;
public class FontEmbedDialog extends AppDialog implements ActionListener {
private static final String ACTION_OK = "OK";
private static final String ACTION_CANCEL = "CANCEL";
private static final String ACTION_LOAD_FROM_DISK = "LOAD_FROM_DISK";
private static final int SAMPLE_MAX_LENGTH = 50;
private final JComboBox<FontFamily> familyNamesSelection;
private final JComboBox<FontFace> faceSelection;
private final JCheckBox[] rangeCheckboxes;
private final String rangeNames[];
private final JLabel[] rangeSamples;
private final JTextField individualCharsField;
private boolean result = false;
private JLabel individialSample;
private Font customFont;
private final JCheckBox allCheckbox;
private final JCheckBox updateTextsCheckbox;
public Font getSelectedFont() {
@@ -121,6 +133,7 @@ public class FontEmbedDialog extends AppDialog implements ActionListener {
}
private JRadioButton ttfFileRadio;
private JRadioButton installedRadio;
private void updateFaceSelection() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -70,5 +70,4 @@ public class FontFace implements Comparable<FontFace> {
public int compareTo(FontFace o) {
return font.getFontName().compareTo(o.font.getFontName());
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,6 +27,7 @@ import java.util.Objects;
public class FontFamily implements Comparable<FontFamily> {
public String familyEn;
public String family;
public FontFamily(Font font) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -56,6 +56,7 @@ import layout.TableLayout;
public class FontPanel extends javax.swing.JPanel {
private final MainPanel mainPanel;
private FontTag fontTag;
/**
@@ -152,7 +153,7 @@ public class FontPanel extends javax.swing.JPanel {
}
}
if (yestoall) {
opt = 0; //yes
opt = 0; //yes
} else if (notoall) {
opt = 1; //no
} else {
@@ -296,7 +297,7 @@ public class FontPanel extends javax.swing.JPanel {
fontParamsPanel.add(fontNameIntagLabel, "1,0");
JLabel fontNameNameLabLabel = new JLabel();
fontNameNameLabLabel.setText(AppStrings.translate("font.name")); // NOI18N
fontNameNameLabLabel.setText(AppStrings.translate("font.name")); // NOI18N
fontParamsPanel.add(fontNameNameLabLabel, "0,1,R");
fontDisplayNameScrollPane.setBorder(null);
@@ -334,7 +335,7 @@ public class FontPanel extends javax.swing.JPanel {
fontParamsPanel.add(fontCopyrightScrollPane, "1,2");
jLabel4.setText(AppStrings.translate("font.isbold")); // NOI18N
jLabel4.setText(AppStrings.translate("font.isbold")); // NOI18N
fontParamsPanel.add(jLabel4, "0,3,R");
fontIsBoldCheckBox.setEnabled(false);
@@ -354,7 +355,7 @@ public class FontPanel extends javax.swing.JPanel {
fontAscentLabel.setText(AppStrings.translate("value.unknown")); // NOI18N
fontParamsPanel.add(fontAscentLabel, "1,5");
jLabel7.setText(AppStrings.translate("font.descent")); // NOI18N
jLabel7.setText(AppStrings.translate("font.descent")); // NOI18N
fontParamsPanel.add(jLabel7, "0,6,R");
fontDescentLabel.setText(AppStrings.translate("value.unknown")); // NOI18N
@@ -363,10 +364,10 @@ public class FontPanel extends javax.swing.JPanel {
jLabel8.setText(AppStrings.translate("font.leading")); // NOI18N
fontParamsPanel.add(jLabel8, "0,7,R");
fontLeadingLabel.setText(AppStrings.translate("value.unknown")); // NOI18N
fontLeadingLabel.setText(AppStrings.translate("value.unknown")); // NOI18N
fontParamsPanel.add(fontLeadingLabel, "1,7");
jLabel9.setText(AppStrings.translate("font.characters")); // NOI18N
jLabel9.setText(AppStrings.translate("font.characters")); // NOI18N
fontParamsPanel.add(jLabel9, "0,8,R");
fontCharactersScrollPane.setBorder(null);
@@ -662,29 +663,52 @@ public class FontPanel extends javax.swing.JPanel {
}
private javax.swing.JButton buttonCancel;
private javax.swing.JButton buttonEdit;
private javax.swing.JButton buttonPreviewFont;
private javax.swing.JButton buttonSetAdvanceValues;
private javax.swing.JButton buttonSave;
private javax.swing.JTextField fontAddCharactersField;
private javax.swing.JButton fontAddCharsButton;
private javax.swing.JLabel fontAscentLabel;
private javax.swing.JScrollPane fontCharactersScrollPane;
private javax.swing.JTextArea fontCharactersTextArea;
private javax.swing.JTextArea fontCopyrightTextArea;
private javax.swing.JLabel fontDescentLabel;
private javax.swing.JTextArea fontNameTextArea;
private javax.swing.JButton fontEmbedButton;
private javax.swing.JCheckBox fontIsBoldCheckBox;
private javax.swing.JCheckBox fontIsItalicCheckBox;
private javax.swing.JLabel fontLeadingLabel;
private javax.swing.JLabel fontNameIntagLabel;
private javax.swing.JComboBox<FontFamily> fontFamilyNameSelection;
private javax.swing.JComboBox<FontFace> fontFaceSelection;
private javax.swing.JLabel fontSourceLabel;
private javax.swing.JPanel fontParamsPanel;
private javax.swing.JPanel addCharsPanel;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JCheckBox updateTextsCheckBox;
private javax.swing.JButton buttonEdit;
private javax.swing.JButton buttonPreviewFont;
private javax.swing.JButton buttonSetAdvanceValues;
private javax.swing.JButton buttonSave;
private javax.swing.JTextField fontAddCharactersField;
private javax.swing.JButton fontAddCharsButton;
private javax.swing.JLabel fontAscentLabel;
private javax.swing.JScrollPane fontCharactersScrollPane;
private javax.swing.JTextArea fontCharactersTextArea;
private javax.swing.JTextArea fontCopyrightTextArea;
private javax.swing.JLabel fontDescentLabel;
private javax.swing.JTextArea fontNameTextArea;
private javax.swing.JButton fontEmbedButton;
private javax.swing.JCheckBox fontIsBoldCheckBox;
private javax.swing.JCheckBox fontIsItalicCheckBox;
private javax.swing.JLabel fontLeadingLabel;
private javax.swing.JLabel fontNameIntagLabel;
private javax.swing.JComboBox<FontFamily> fontFamilyNameSelection;
private javax.swing.JComboBox<FontFace> fontFaceSelection;
private javax.swing.JLabel fontSourceLabel;
private javax.swing.JPanel fontParamsPanel;
private javax.swing.JPanel addCharsPanel;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JCheckBox updateTextsCheckBox;
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -69,21 +69,35 @@ import javax.swing.SpringLayout;
public class GenericTagPanel extends JPanel implements ChangeListener {
private final JEditorPane genericTagPropertiesEditorPane;
private final JPanel genericTagPropertiesEditPanel;
private final JScrollPane genericTagPropertiesEditorPaneScrollPanel;
private final JScrollPane genericTagPropertiesEditPanelScrollPanel;
private Tag tag;
private Tag editedTag;
private List<String> keys = new ArrayList<>();
private Map<String, GenericTagEditor> editors = new HashMap<>();
private Map<String, Component> labels = new HashMap<>();
private Map<String, Component> types = new HashMap<>();
private Map<String, List<Field>> fieldPaths = new HashMap<>();
private Map<String, List<Integer>> fieldIndices = new HashMap<>();
private HeaderLabel hdr;
private Set<String> addKeys = new HashSet<>();
private Map<String, Component> addButtons = new HashMap<>();
private Map<String, Component> removeButtons = new HashMap<>();
public GenericTagPanel() {
@@ -174,7 +188,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener {
SpringUtilities.makeCompactGrid(genericTagPropertiesEditPanel,
propCount, 3, //rows, cols
6, 6, //initX, initY
6, 6); //xPad, yPad
6, 6); //xPad, yPad
revalidate();
repaint();
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -83,6 +83,7 @@ import javax.swing.tree.TreePath;
public class GenericTagTreePanel extends GenericTagPanel {
private JTree tree;
private Tag editedTag;
private class MyTree extends JTree {
@@ -108,7 +109,9 @@ public class GenericTagTreePanel extends GenericTagPanel {
private class MyTreeCellEditor extends AbstractCellEditor implements TreeCellEditor {
private GenericTagEditor editor = null;
private final JTree tree;
private FieldNode fnode;
public MyTreeCellEditor(JTree tree) {
@@ -205,14 +208,13 @@ public class GenericTagTreePanel extends GenericTagPanel {
/*List<FieldNode> depends = ((MyTreeModel) tree.getModel()).getDependentFields(fnode);
boolean dep = false;
if (!depends.isEmpty()) {
dep = true;
dep = true;
} */
editor.save();
((MyTreeModel) tree.getModel()).vchanged(tree.getSelectionPath());
refreshTree();
return true;
}
}
public GenericTagTreePanel() {
@@ -350,7 +352,6 @@ public class GenericTagTreePanel extends GenericTagPanel {
setBackgroundNonSelectionColor(Color.white);
return this;
}
}
@Override
@@ -361,7 +362,9 @@ public class GenericTagTreePanel extends GenericTagPanel {
private static class FieldNode extends DefaultMutableTreeNode {
private Object obj;
private Field field;
private int index;
public FieldNode(Object obj, Field field, int index) {
@@ -486,8 +489,11 @@ public class GenericTagTreePanel extends GenericTagPanel {
private static class MyTreeModel extends DefaultTreeModel {
private final Object mtroot;
private final List<TreeModelListener> listeners = new ArrayList<>();
private final Map<String, Object> nodeCache = new HashMap<>();
// it is much faster to store the reverse mappings, too
private final Map<Object, String> nodeCacheReverse = new HashMap<>();
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -44,14 +44,23 @@ public class GraphDialog extends AppDialog {
private class GraphPanel extends JPanel {
private static final int SPACE_VERTICAL = 16;
private static final int SPACE_HORIZONTAL = 10;
private static final int SPACE_BACKLINKS = 5;
private static final int BLOCK_WIDTH = 200;
private static final int BLOCK_HEIGHT = 20;
private final HashMap<GraphPart, Point> partPos = new HashMap<>();
private final Point size;
private int backLinksLeft = 0;
private int backLinksRight = 0;
private final GraphPart head;
public GraphPanel(Graph graph) throws InterruptedException {
@@ -241,10 +250,15 @@ public class GraphDialog extends AppDialog {
return w;
}
}
GraphPanel gp;
int scrollBarWidth;
int scrollBarHeight;
int frameWidthDiff;
int frameHeightDiff;
public GraphDialog(Window owner, Graph graph, String name) throws InterruptedException {
@@ -277,7 +291,7 @@ public class GraphDialog extends AppDialog {
Dimension screen = getToolkit().getScreenSize();
Dimension dim = new Dimension(0, 0);
Dimension panDim = gp.getPreferredSize();
// add some magic constants
// add some magic constants
panDim = new Dimension(panDim.width + 3, panDim.height + 2);
boolean tooHigh = false;
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -38,5 +38,4 @@ public class GuiAbortRetryIgnoreHandler implements AbortRetryIgnoreHandler {
// there are no non-static field in this class, so return the original instance
return this;
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,13 +29,21 @@ import javax.swing.SpringLayout;
public class HeaderInfoPanel extends JPanel {
private final JLabel signatureLabel = new JLabel();
private final JLabel compressionLabel = new JLabel();
private final JLabel gfxLabel = new JLabel();
private final JLabel versionLabel = new JLabel();
private final JLabel fileSizeLabel = new JLabel();
private final JLabel frameRateLabel = new JLabel();
private final JLabel frameCountLabel = new JLabel();
private final JLabel displayRectTwipsLabel = new JLabel();
private final JLabel displayRectPixelsLabel = new JLabel();
public HeaderInfoPanel() {
@@ -103,5 +111,4 @@ public class HeaderInfoPanel extends JPanel {
}
return r;
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -73,27 +73,49 @@ import javax.swing.JPanel;
public final class ImagePanel extends JPanel implements ActionListener, MediaDisplay {
private Timelined timelined;
private boolean stillFrame = false;
private Timer timer;
private int frame = -1;
private boolean zoomAvailable = false;
private int counter = 0;
private AtomicBoolean shouldDraw = new AtomicBoolean();
private SWF swf;
private boolean loaded;
private int mouseButton;
private final JLabel debugLabel = new JLabel("-");
private DepthState stateUnderCursor = null;
private MouseEvent lastMouseEvent = null;
private final List<SoundTagPlayer> soundPlayers = new ArrayList<>();
private final IconPanel iconPanel;
private int time = 0;
private int selectedDepth = -1;
private Zoom zoom = new Zoom();
private final Object delayObject = new Object();
private boolean drawReady;
private final int drawWaitLimit = 50; // ms
private TextTag textTag;
private TextTag newTextTag;
public synchronized void selectDepth(int depth) {
@@ -108,7 +130,9 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
private SerializableImage img;
private Rectangle rect = null;
private List<DepthState> dss;
private List<Shape> outlines;
public BufferedImage getLastImage() {
@@ -837,6 +861,7 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
shouldDraw.set(true);
TimerTask task = new TimerTask() {
public int counter = cnt;
private final AtomicBoolean first = shouldDraw;
@Override
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,6 +23,7 @@ package com.jpexs.decompiler.flash.gui;
public class Language {
public String code;
public String name;
public Language(String code, String name) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -58,16 +58,25 @@ import javax.swing.filechooser.FileFilter;
public class LoadFromCacheFrame extends AppFrame implements ActionListener {
private static final String ACTION_OPEN = "OPEN";
private static final String ACTION_SAVE = "SAVE";
private static final String ACTION_REFRESH = "REFRESH";
private final JList<CacheEntry> list;
private final JTextField searchField;
private List<CacheImplementation> caches;
private List<CacheEntry> entries;
private final JProgressBar progressBar;
private final JButton saveButton;
private final JButton refreshButton;
private final JButton openButton;
public LoadFromCacheFrame() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -78,20 +78,33 @@ import javax.swing.table.TableRowSorter;
public class LoadFromMemoryFrame extends AppFrame implements ActionListener {
private static final String ACTION_SELECT_PROCESS = "SELECTPROCESS";
private static final String ACTION_REFRESH_PROCESS_LIST = "REFRESHPROCESSLIST";
private static final String ACTION_OPEN_SWF = "OPENSWF";
private static final String ACTION_SAVE = "SAVE";
private MainFrame mainFrame;
private List<com.jpexs.process.Process> processlist;
private List<SwfInMemory> foundIs;
private List<com.jpexs.process.Process> selProcesses;
private JList<com.jpexs.process.Process> list;
private DefaultListModel<com.jpexs.process.Process> model;
private DefaultTableModel resTableModel;
private final JTable tableRes;
private final JLabel stateLabel;
private boolean processing = false;
private final JProgressBar progress;
private class SelectProcessWorker extends SwingWorker<List<SwfInMemory>, Object> {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -38,7 +38,9 @@ import javax.swing.SwingConstants;
public class LoadingDialog extends AppDialog implements ImageObserver {
private final JLabel detailLabel;
private LoadingPanel loadingPanel;
JProgressBar progressBar = new JProgressBar(0, 100);
public void setDetail(String d) {
@@ -98,7 +100,7 @@ public class LoadingDialog extends AppDialog implements ImageObserver {
cnt.add(pan, BorderLayout.CENTER);
//progressBar.setVisible(false);
progressBar.setStringPainted(true);
//progressBar.setVisible(false);
//progressBar.setVisible(false);
View.setWindowIcon(this);
detailLabel.setHorizontalAlignment(SwingConstants.LEFT);
addWindowListener(new WindowAdapter() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -37,9 +37,13 @@ import javax.swing.JPanel;
public class LoadingPanel extends JPanel {
BufferedImage lastImage;
int lastSize = 0;
Color col;
double rotation = 0;
Timer drawTimer;
public LoadingPanel(int width, int height) {
@@ -135,5 +139,4 @@ public class LoadingPanel extends JPanel {
g2.setTransform(t);
g2.drawImage(lastImage, 0, 0, this);
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -32,6 +32,7 @@ import java.util.logging.LogRecord;
public class LogFormatter extends Formatter {
private static final String lineSep = System.getProperty("line.separator");
private DateFormat dateFormat;
@Override
+19 -3
View File
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -108,20 +108,35 @@ import javax.swing.filechooser.FileFilter;
public class Main {
public static ProxyFrame proxyFrame;
private static List<SWFSourceInfo> sourceInfos = new ArrayList<>();
public static LoadingDialog loadingDialog;
public static ModeFrame modeFrame;
private static boolean working = false;
private static TrayIcon trayIcon;
private static MenuItem stopMenuItem;
private static MainFrame mainFrame;
public static final int UPDATE_SYSTEM_MAJOR = 1;
public static final int UPDATE_SYSTEM_MINOR = 2;
public static LoadFromMemoryFrame loadFromMemoryFrame;
public static LoadFromCacheFrame loadFromCacheFrame;
private static final Logger logger = Logger.getLogger(Main.class.getName());
private static Debugger debugger;
public static DebugLogDialog debugDialog;
public static final String DEBUGGER_PACKAGE = "com.jpexs.decompiler.flash.debugger";
private static ABCContainerTag getDebuggerABCTag(SWF swf) {
@@ -1447,6 +1462,7 @@ public class Main {
Configuration.lastUpdatesCheckDate.set(Calendar.getInstance());
return false;
}
private static FileHandler fileTxt;
public static void clearLogFile() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -36,6 +36,7 @@ import javax.swing.JFrame;
public final class MainFrameClassic extends AppFrame implements MainFrame {
private final MainPanel panel;
private final MainFrameMenu mainMenu;
public MainFrameClassic() {
@@ -125,5 +126,4 @@ public final class MainFrameClassic extends AppFrame implements MainFrame {
public Window getWindow() {
return this;
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -40,66 +40,119 @@ import javax.swing.JOptionPane;
public class MainFrameClassicMenu extends MainFrameMenu implements ActionListener {
private static final String ACTION_RELOAD = "RELOAD";
private static final String ACTION_ADVANCED_SETTINGS = "ADVANCEDSETTINGS";
private static final String ACTION_LOAD_MEMORY = "LOADMEMORY";
private static final String ACTION_LOAD_CACHE = "LOADCACHE";
private static final String ACTION_GOTO_DOCUMENT_CLASS_ON_STARTUP = "GOTODOCUMENTCLASSONSTARTUP";
private static final String ACTION_AUTO_RENAME_IDENTIFIERS = "AUTORENAMEIDENTIFIERS";
private static final String ACTION_CACHE_ON_DISK = "CACHEONDISK";
private static final String ACTION_SET_LANGUAGE = "SETLANGUAGE";
private static final String ACTION_DISABLE_DECOMPILATION = "DISABLEDECOMPILATION";
private static final String ACTION_ASSOCIATE = "ASSOCIATE";
private static final String ACTION_GOTO_DOCUMENT_CLASS = "GOTODOCUMENTCLASS";
private static final String ACTION_PARALLEL_SPEED_UP = "PARALLELSPEEDUP";
private static final String ACTION_INTERNAL_VIEWER_SWITCH = "INTERNALVIEWERSWITCH";
private static final String ACTION_SEARCH = "SEARCH";
private static final String ACTION_AUTO_DEOBFUSCATE = "AUTODEOBFUSCATE";
private static final String ACTION_EXIT = "EXIT";
private static final String ACTION_RENAME_ONE_IDENTIFIER = "RENAMEONEIDENTIFIER";
private static final String ACTION_ABOUT = "ABOUT";
private static final String ACTION_SHOW_PROXY = "SHOWPROXY";
private static final String ACTION_SUB_LIMITER = "SUBLIMITER";
private static final String ACTION_SAVE = "SAVE";
private static final String ACTION_SAVE_AS = "SAVEAS";
private static final String ACTION_SAVE_AS_EXE = "SAVEASEXE";
private static final String ACTION_OPEN = "OPEN";
private static final String ACTION_EXPORT_FLA = "EXPORTFLA";
private static final String ACTION_EXPORT_SEL = "EXPORTSEL";
private static final String ACTION_EXPORT = "EXPORT";
private static final String ACTION_CHECK_UPDATES = "CHECKUPDATES";
private static final String ACTION_HELP_US = "HELPUS";
private static final String ACTION_HOMEPAGE = "HOMEPAGE";
private static final String ACTION_RESTORE_CONTROL_FLOW = "RESTORECONTROLFLOW";
private static final String ACTION_RESTORE_CONTROL_FLOW_ALL = "RESTORECONTROLFLOWALL";
private static final String ACTION_RENAME_IDENTIFIERS = "RENAMEIDENTIFIERS";
private static final String ACTION_DEOBFUSCATE = "DEOBFUSCATE";
private static final String ACTION_DEOBFUSCATE_ALL = "DEOBFUSCATEALL";
private static final String ACTION_REMOVE_NON_SCRIPTS = "REMOVENONSCRIPTS";
private static final String ACTION_REFRESH_DECOMPILED = "REFRESHDECOMPILED";
private final MainFrameClassic mainFrame;
private JCheckBoxMenuItem miAutoDeobfuscation;
private JCheckBoxMenuItem miInternalViewer;
private JCheckBoxMenuItem miParallelSpeedUp;
private JCheckBoxMenuItem miAssociate;
private JCheckBoxMenuItem miDecompile;
private JCheckBoxMenuItem miCacheDisk;
private JCheckBoxMenuItem miGotoMainClassOnStartup;
private JCheckBoxMenuItem miAutoRenameIdentifiers;
private JMenuItem saveCommandButton;
private JMenuItem saveasCommandButton;
private JMenuItem saveasexeCommandButton;
private JMenuItem exportAllCommandButton;
private JMenuItem exportFlaCommandButton;
private JMenuItem exportSelectionCommandButton;
private JMenuItem reloadCommandButton;
private JMenuItem renameInvalidCommandButton;
private JMenuItem globalRenameCommandButton;
private JMenuItem deobfuscationCommandButton;
private JMenuItem searchCommandButton;
private JMenuItem gotoDocumentClassCommandButton;
public MainFrameClassicMenu(MainFrameClassic mainFrame, boolean externalFlashPlayerUnavailable) {
@@ -501,5 +554,4 @@ public class MainFrameClassicMenu extends MainFrameMenu implements ActionListene
break;
}
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -46,6 +46,7 @@ import javax.swing.JOptionPane;
public abstract class MainFrameMenu {
private final MainFrame mainFrame;
private SWF swf;
public abstract boolean isInternalFlashViewerSelected();
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -41,6 +41,7 @@ import org.pushingpixels.flamingo.internal.ui.ribbon.appmenu.JRibbonApplicationM
public final class MainFrameRibbon extends AppRibbonFrame implements MainFrame {
private final MainPanel panel;
private final MainFrameMenu mainMenu;
public MainFrameRibbon() {
@@ -147,5 +148,4 @@ public final class MainFrameRibbon extends AppRibbonFrame implements MainFrame {
public Window getWindow() {
return this;
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -61,106 +61,195 @@ import org.pushingpixels.flamingo.internal.ui.ribbon.AbstractBandControlPanel;
public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener {
private static final String ACTION_RELOAD = "RELOAD";
private static final String ACTION_ADVANCED_SETTINGS = "ADVANCEDSETTINGS";
private static final String ACTION_LOAD_MEMORY = "LOADMEMORY";
private static final String ACTION_LOAD_CACHE = "LOADCACHE";
private static final String ACTION_GOTO_DOCUMENT_CLASS_ON_STARTUP = "GOTODOCUMENTCLASSONSTARTUP";
private static final String ACTION_AUTO_RENAME_IDENTIFIERS = "AUTORENAMEIDENTIFIERS";
private static final String ACTION_CACHE_ON_DISK = "CACHEONDISK";
private static final String ACTION_SET_LANGUAGE = "SETLANGUAGE";
private static final String ACTION_DISABLE_DECOMPILATION = "DISABLEDECOMPILATION";
private static final String ACTION_ASSOCIATE = "ASSOCIATE";
private static final String ACTION_GOTO_DOCUMENT_CLASS = "GOTODOCUMENTCLASS";
private static final String ACTION_PARALLEL_SPEED_UP = "PARALLELSPEEDUP";
private static final String ACTION_INTERNAL_VIEWER_SWITCH = "INTERNALVIEWERSWITCH";
private static final String ACTION_SEARCH = "SEARCH";
private static final String ACTION_REPLACE = "REPLACE";
private static final String ACTION_TIMELINE = "TIMELINE";
private static final String ACTION_AUTO_DEOBFUSCATE = "AUTODEOBFUSCATE";
private static final String ACTION_EXIT = "EXIT";
private static final String ACTION_DEBUGGER_SWITCH = "DEBUGGER_SWITCH";
private static final String ACTION_DEBUGGER_REPLACE_TRACE = "DEBUGGER_REPLACE_TRACE";
private static final String ACTION_DEBUGGER_LOG = "DEBUGGER_LOG";
private static final String ACTION_RENAME_ONE_IDENTIFIER = "RENAMEONEIDENTIFIER";
private static final String ACTION_ABOUT = "ABOUT";
private static final String ACTION_SHOW_PROXY = "SHOWPROXY";
private static final String ACTION_SUB_LIMITER = "SUBLIMITER";
private static final String ACTION_SAVE = "SAVE";
private static final String ACTION_SAVE_AS = "SAVEAS";
private static final String ACTION_SAVE_AS_EXE = "SAVEASEXE";
private static final String ACTION_OPEN = "OPEN";
private static final String ACTION_CLOSE = "CLOSE";
private static final String ACTION_CLOSE_ALL = "CLOSEALL";
private static final String ACTION_EXPORT_FLA = "EXPORTFLA";
public static final String ACTION_EXPORT_SEL = "EXPORTSEL";
public static final String ACTION_EXPORT_JAVA_SOURCE = "EXPORTJAVASOURCE";
public static final String ACTION_EXPORT_SWF_XML = "EXPORTSWFXML";
public static final String ACTION_IMPORT_SWF_XML = "IMPORTSWFXML";
private static final String ACTION_EXPORT = "EXPORT";
private static final String ACTION_IMPORT_TEXT = "IMPORTTEXT";
private static final String ACTION_CHECK_UPDATES = "CHECKUPDATES";
private static final String ACTION_HELP_US = "HELPUS";
private static final String ACTION_HOMEPAGE = "HOMEPAGE";
private static final String ACTION_RESTORE_CONTROL_FLOW = "RESTORECONTROLFLOW";
private static final String ACTION_RESTORE_CONTROL_FLOW_ALL = "RESTORECONTROLFLOWALL";
private static final String ACTION_RENAME_IDENTIFIERS = "RENAMEIDENTIFIERS";
private static final String ACTION_DEOBFUSCATE = "DEOBFUSCATE";
private static final String ACTION_DEOBFUSCATE_ALL = "DEOBFUSCATEALL";
private static final String ACTION_REMOVE_NON_SCRIPTS = "REMOVENONSCRIPTS";
private static final String ACTION_REFRESH_DECOMPILED = "REFRESHDECOMPILED";
private static final String ACTION_CLEAR_RECENT_FILES = "CLEARRECENTFILES";
private static final String ACTION_CHECK_RESOURCES = "CHECKRESOURCES";
private static final String ACTION_VIEWMODE_RESOURCES = "VIEWMODERESOURCES";
private static final String ACTION_VIEWMODE_HEX_DUMP = "VIEWMODEHEXDUMP";
private static final String ACTION_DEOBFUSCATION_MODE_OLD = "DEOBFUSCATIONMODEOLD";
private static final String ACTION_DEOBFUSCATION_MODE_NEW = "DEOBFUSCATIONMODENEW";
private final MainFrameRibbon mainFrame;
private JCheckBox miAutoDeobfuscation;
private JCheckBox miInternalViewer;
private JCheckBox miParallelSpeedUp;
private JCheckBox miAssociate;
private JCheckBox miDecompile;
private JCheckBox miCacheDisk;
private JCheckBox miGotoMainClassOnStartup;
private JCheckBox miAutoRenameIdentifiers;
private JCommandButton saveCommandButton;
private JCommandButton saveasCommandButton;
private JCommandButton saveasexeCommandButton;
private JCommandButton exportAllCommandButton;
private JCommandButton exportFlaCommandButton;
private JCommandButton exportSelectionCommandButton;
private JCommandButton importTextCommandButton;
private JCommandToggleButton viewModeResourcesToggleButton;
private JCommandToggleButton viewModeHexToggleButton;
private JCommandToggleButton deobfuscationModeOldToggleButton;
private JCommandToggleButton deobfuscationModeNewToggleButton;
private JCommandButton reloadCommandButton;
private JCommandButton renameInvalidCommandButton;
private JCommandButton globalRenameCommandButton;
private JCommandButton deobfuscationCommandButton;
private JCommandButton searchCommandButton;
private JCommandButton replaceCommandButton;
private JCommandToggleButton timeLineToggleButton;
private CommandToggleButtonGroup timeLineToggleGroup;
private JCommandButton gotoDocumentClassCommandButton;
private JCommandButton clearRecentFilesCommandButton;
private JCommandToggleButton debuggerSwitchCommandButton;
private CommandToggleButtonGroup debuggerSwitchGroup;
private JCommandButton debuggerReplaceTraceCommandButton;
private JCommandButton debuggerLogCommandButton;
private CommandToggleButtonGroup viewModeToggleGroup;
RibbonApplicationMenuEntryPrimary exportFlaMenu;
RibbonApplicationMenuEntryPrimary exportAllMenu;
RibbonApplicationMenuEntryPrimary exportSelMenu;
RibbonApplicationMenuEntryPrimary saveFileMenu;
RibbonApplicationMenuEntryPrimary saveAsFileMenu;
RibbonApplicationMenuEntryPrimary closeFileMenu;
RibbonApplicationMenuEntryPrimary closeAllFilesMenu;
public MainFrameRibbonMenu(MainFrameRibbon mainFrame, JRibbon ribbon, boolean externalFlashPlayerUnavailable) {
@@ -887,5 +976,4 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
break;
}
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -43,12 +43,17 @@ public class MainFrameStatusPanel extends JPanel implements ActionListener {
private final MainPanel mainPanel;
private final LoadingPanel loadingPanel = new LoadingPanel(20, 20);
private final JLabel statusLabel = new JLabel("");
private final JButton cancelButton = new JButton();
private JButton errorNotificationButton;
private Icon currentIcon;
private Timer blinkTimer;
private int blinkPos;
private CancellableWorker currentWorker;
@@ -184,5 +189,4 @@ public class MainFrameStatusPanel extends JPanel implements ActionListener {
}, 500, 500);
}
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -194,52 +194,97 @@ import javax.swing.tree.TreePath;
public final class MainPanel extends JPanel implements ActionListener, TreeSelectionListener, SearchListener<TextTag>, Freed {
private final MainFrame mainFrame;
private final List<SWFList> swfs;
private ABCPanel abcPanel;
private ActionPanel actionPanel;
private final JPanel welcomePanel;
private final TimelineViewPanel timelineViewPanel;
private final MainFrameStatusPanel statusPanel;
private final MainFrameMenu mainMenu;
private final JProgressBar progressBar = new JProgressBar(0, 100);
private DeobfuscationDialog deobfuscationDialog;
public TagTree tagTree;
public DumpTree dumpTree;
private final FlashPlayerPanel flashPanel;
private final JPanel contentPanel;
private final JPanel displayPanel;
public FolderPreviewPanel folderPreviewPanel;
private boolean isWelcomeScreen = true;
private static final String CARDPREVIEWPANEL = "Preview card";
private static final String CARDFOLDERPREVIEWPANEL = "Folder preview card";
private static final String CARDEMPTYPANEL = "Empty card";
private static final String CARDDUMPVIEW = "Dump view";
private static final String CARDACTIONSCRIPTPANEL = "ActionScript card";
private static final String CARDACTIONSCRIPT3PANEL = "ActionScript3 card";
private static final String CARDHEADER = "Header card";
private static final String DETAILCARDAS3NAVIGATOR = "Traits list";
private static final String DETAILCARDEMPTYPANEL = "Empty card";
private static final String SPLIT_PANE1 = "SPLITPANE1";
private static final String WELCOME_PANEL = "WELCOMEPANEL";
private static final String TIMELINE_PANEL = "TIMELINEPANEL";
private final JSplitPane splitPane1;
private final JSplitPane splitPane2;
private boolean splitsInited = false;
private JPanel detailPanel;
private JTextField filterField = new MyTextField("");
private JPanel searchPanel;
private final PreviewPanel previewPanel;
private final HeaderInfoPanel headerPanel;
private DumpViewPanel dumpViewPanel;
private final JPanel treePanel;
private TreePanelMode treePanelMode;
private AbortRetryIgnoreHandler errorHandler = new GuiAbortRetryIgnoreHandler();
private CancellableWorker setSourceWorker;
public TreeItem oldItem;
private SearchDialog searchDialog;
private SearchDialog replaceDialog;
public static final String ACTION_SELECT_BKCOLOR = "SELECTCOLOR";
public static final String ACTION_REPLACE = "REPLACE";
// play morph shape in 2 second(s)
@@ -1487,6 +1532,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
// "configuration items" for the current replace only
private final ConfigurationItem<Boolean> showAgainImportError = new ConfigurationItem<>("showAgainImportError", true, true);
private final ConfigurationItem<Boolean> showAgainInvalidText = new ConfigurationItem<>("showAgainInvalidText", true, true);
private String getTextTagInfo(TextTag textTag) {
@@ -1883,6 +1929,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
// "configuration items" for the current replace only
private final ConfigurationItem<Boolean> showAgainIgnoreMissingCharacters = new ConfigurationItem<>("showAgainIgnoreMissingCharacters", true, true);
private boolean ignoreMissingCharacters = false;
@Override
@@ -2169,7 +2216,9 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
}
public static final int VIEW_RESOURCES = 0;
public static final int VIEW_DUMP = 1;
public static final int VIEW_TIMELINE = 2;
private int getCurrentView() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -34,11 +34,15 @@ import javax.swing.JLabel;
public class ModeFrame extends AppFrame implements ActionListener {
private static final String ACTION_OPEN = "OPEN";
private static final String ACTION_PROXY = "PROXY";
private static final String ACTION_EXIT = "EXIT";
private final JButton openButton = new JButton(translate("button.open"));
private final JButton proxyButton = new JButton(translate("button.proxy"));
private final JButton exitButton = new JButton(translate("button.exit"));
/**
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -90,5 +90,4 @@ public class MyCommandButtonUI extends SubstanceCommandButtonUI {
};
this.commandButton.addActionListener(disposePopupsActionListener);
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -32,6 +32,7 @@ import org.pushingpixels.flamingo.internal.utils.FlamingoUtilities;
public class MyResizableIcon implements Icon {
protected BufferedImage originalImage;
protected Map<String, BufferedImage> cachedImages = new HashMap<>();
public MyResizableIcon(BufferedImage originalImage) {
@@ -41,7 +42,9 @@ public class MyResizableIcon implements Icon {
}
protected int width;
protected int height;
protected BufferedImage image;
public void setDimension(Dimension dim) {
@@ -91,5 +94,4 @@ public class MyResizableIcon implements Icon {
public int getIconHeight() {
return height;
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -45,8 +45,11 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
ActionPopupTransitionAwareUI {
private MyResizableIcon hoverIcon = null;
private MyResizableIcon clickIcon = null;
private MyResizableIcon normalIcon = null;
private final boolean buttonResized = false;
public MyResizableIcon getClickIcon() {
@@ -64,6 +67,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
* Model change listener for ghost image effects.
*/
private GhostingListener substanceModelChangeListener;
/**
* Tracker for visual state transitions.
*/
@@ -75,7 +79,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
/*
* (non-Javadoc)
*
*
* @see org.jvnet.flamingo.common.ui.BasicCommandButtonUI#installListeners()
*/
@Override
@@ -92,7 +96,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
/*
* (non-Javadoc)
*
*
* @see
* org.jvnet.flamingo.common.ui.BasicCommandButtonUI#uninstallListeners()
*/
@@ -118,7 +122,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
/*
* (non-Javadoc)
*
*
* @see javax.swing.plaf.basic.BasicButtonUI#paint(java.awt.Graphics,
* javax.swing.JComponent)
*/
@@ -163,7 +167,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
/*
* (non-Javadoc)
*
*
* @see
* org.jvnet.flamingo.common.ui.BasicCommandButtonUI#paintButtonIcon(java
* .awt.Graphics, java.awt.Rectangle)
@@ -182,7 +186,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
/*
* (non-Javadoc)
*
*
* @see
* org.jvnet.flamingo.ribbon.ui.appmenu.BasicRibbonApplicationMenuButtonUI
* #update(java.awt.Graphics, javax.swing.JComponent)
@@ -194,7 +198,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
/*
* (non-Javadoc)
*
*
* @see
* org.jvnet.substance.SubstanceButtonUI#contains(javax.swing.JComponent,
* int, int)
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -47,6 +47,7 @@ import javax.swing.UIManager;
public class NewVersionDialog extends AppDialog implements ActionListener {
private static final String ACTION_OK = "OK";
private static final String ACTION_CANCEL = "CANCEL";
private Version latestVersion;
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -102,38 +102,52 @@ import javax.swing.SwingConstants;
public class PreviewPanel extends JSplitPane implements ActionListener {
private static final String FLASH_VIEWER_CARD = "FLASHVIEWER";
private static final String DRAW_PREVIEW_CARD = "DRAWPREVIEW";
private static final String GENERIC_TAG_CARD = "GENERICTAG";
private static final String BINARY_TAG_CARD = "BINARYTAG";
private static final String CARDTEXTPANEL = "Text card";
private static final String CARDFONTPANEL = "Font card";
private static final String ACTION_EDIT_GENERIC_TAG = "EDITGENERICTAG";
private static final String ACTION_SAVE_GENERIC_TAG = "SAVEGENERICTAG";
private static final String ACTION_CANCEL_GENERIC_TAG = "CANCELGENERICTAG";
private static final String ACTION_PREV_FONTS = "PREVFONTS";
private static final String ACTION_NEXT_FONTS = "NEXTFONTS";
private final MainPanel mainPanel;
private final JPanel viewerCards;
private final FlashPlayerPanel flashPanel;
private File tempFile;
private ImagePanel imagePanel;
private PlayerControls imagePlayControls;
private MediaDisplay media;
private BinaryPanel binaryPanel;
private GenericTagPanel genericTagPanel;
private JPanel displayWithPreview;
// Image tag buttons
private JButton replaceImageButton;
private JButton prevFontsButton;
private JButton nextFontsButton;
// Binary tag buttons
@@ -141,12 +155,17 @@ public class PreviewPanel extends JSplitPane implements ActionListener {
// Generic tag buttons
private JButton editButton;
private JButton saveButton;
private JButton cancelButton;
private JPanel parametersPanel;
private FontPanel fontPanel;
private int fontPageNum;
private TextPanel textPanel;
private boolean splitsInited;
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -48,13 +48,19 @@ import jsyntaxpane.components.Markers;
public class QuickFindPanel extends JPanel implements ActionListener {
public JTextField findTextField;
public JButton prevButton, nextButton;
public JCheckBox ignoreCaseCheckbox, regExpCheckbox, wrapCheckbox;
public JLabel statusLabel;
private final Markers.SimpleMarker marker = new Markers.SimpleMarker(Color.pink);
private WeakReference<JTextComponent> target;
private WeakReference<DocumentSearchData> dsd;
private int oldCaretPosition;
public QuickFindPanel() {
@@ -235,7 +241,7 @@ public class QuickFindPanel extends JPanel implements ActionListener {
/*
@Override
public void focusGained(FocusEvent e) {
}
@Override
@@ -245,5 +251,4 @@ public class QuickFindPanel extends JPanel implements ActionListener {
getParent().revalidate();
getParent().repaint();
}*/
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -30,5 +30,4 @@ public class RecentFilesButton extends JCommandButton {
public RecentFilesButton(String title, ResizableIcon icon) {
super(title, icon);
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -37,12 +37,17 @@ import javax.swing.JRadioButton;
public class RenameDialog extends AppDialog implements ActionListener {
private static final String ACTION_OK = "OK";
private static final String ACTION_CANCEL = "CANCEL";
private final JRadioButton typeNumberRadioButton = new JRadioButton(translate("rename.type.typenumber"));
private final JRadioButton randomWordRadioButton = new JRadioButton(translate("rename.type.randomword"));
private final JButton okButton = new JButton(translate("button.ok"));
private final JButton cancelButton = new JButton(translate("button.cancel"));
private boolean confirmed = false;
public RenameType getRenameType() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -34,7 +34,9 @@ import javax.swing.JRadioButton;
public class ReplaceTraceDialog extends AppDialog {
private JRadioButton debugAlertRadio;
private JRadioButton debugConsoleRadio;
private JRadioButton debugSocketRadio;
private String value = null;
@@ -120,5 +122,4 @@ public class ReplaceTraceDialog extends AppDialog {
View.centerScreen(this);
setValue(defaultVal);
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -45,15 +45,23 @@ import javax.swing.JTextField;
public class SearchDialog extends AppDialog implements ActionListener {
private static final String ACTION_OK = "OK";
private static final String ACTION_CANCEL = "CANCEL";
public JTextField searchField = new MyTextField();
public JTextField replaceField = new MyTextField();
public JCheckBox ignoreCaseCheckBox = new JCheckBox(translate("checkbox.ignorecase"));
public JCheckBox regexpCheckBox = new JCheckBox(translate("checkbox.regexp"));
public JCheckBox replaceInParametersCheckBox = new JCheckBox(translate("checkbox.replaceInParameters"));
public JRadioButton searchInASRadioButton = new JRadioButton(translate("checkbox.searchAS"));
public JRadioButton searchInTextsRadioButton = new JRadioButton(translate("checkbox.searchText"));
public boolean result = false;
public SearchDialog(Window owner, boolean replace) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -36,17 +36,25 @@ import jsyntaxpane.actions.DocumentSearchData;
public class SearchPanel<E> extends JPanel implements ActionListener {
private static final String ACTION_SEARCH_PREV = "SEARCHPREV";
private static final String ACTION_SEARCH_NEXT = "SEARCHNEXT";
private static final String ACTION_SEARCH_CANCEL = "SEARCHCANCEL";
private final SearchListener<E> listener;
private final JLabel searchPos;
private int foundPos = 0;
private final JLabel searchForLabel;
private String searchFor;
private boolean searchIgnoreCase;
private boolean searchRegexp;
private List<E> found = new ArrayList<>();
public SearchPanel(LayoutManager lm, SearchListener<E> listener) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -40,13 +40,17 @@ import javax.swing.JScrollPane;
public class SearchResultsDialog<E> extends AppDialog implements ActionListener {
private final JList<E> resultsList;
private final DefaultListModel<E> model;
private final SearchListener<E> listener;
private static final String ACTION_GOTO = "GOTO";
private static final String ACTION_CANCEL = "CLOSE";
private final JButton gotoButton = new JButton(translate("button.goto"));
private final JButton closeButton = new JButton(translate("button.close"));
public SearchResultsDialog(Window owner, String text, SearchListener<E> listener) {
@@ -118,5 +122,4 @@ public class SearchResultsDialog<E> extends AppDialog implements ActionListener
});
}
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -39,10 +39,13 @@ import jsyntaxpane.DefaultSyntaxKit;
public class SelectLanguageDialog extends AppDialog implements ActionListener {
private static final String ACTION_OK = "OK";
private static final String ACTION_CANCEL = "CANCEL";
JComboBox<Language> languageCombobox = new JComboBox<>();
public String languageCode = null;
public static final String[] languages = new String[]{"en", "ca", "cs", "zh", "de", "es", "fr", "hu", "nl", "pl", "pt", "pt-BR", "ru", "sv", "uk"};
public SelectLanguageDialog() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -48,9 +48,13 @@ public class SoundTagPlayer implements MediaDisplay {
private final Clip clip;
private int loopCount;
private boolean paused = false;
private final Object playLock = new Object();
private final SoundTag tag;
private final List<PlayerListener> listeners = new ArrayList<>();
public void addListener(PlayerListener l) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -26,8 +26,11 @@ import java.util.ResourceBundle;
public class SwfInMemory {
public ReReadableInputStream is;
public int version;
public long fileSize;
public com.jpexs.process.Process process;
public SwfInMemory(ReReadableInputStream is, int version, long fileSize, com.jpexs.process.Process process) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -44,14 +44,21 @@ import jsyntaxpane.DefaultSyntaxKit;
public class TextPanel extends JPanel implements ActionListener {
private static final String ACTION_EDIT_TEXT = "EDITTEXT";
private static final String ACTION_CANCEL_TEXT = "CANCELTEXT";
private static final String ACTION_SAVE_TEXT = "SAVETEXT";
private final MainPanel mainPanel;
private final SearchPanel<TextTag> textSearchPanel;
private final LineMarkedEditorPane textValue;
private final JButton textSaveButton;
private final JButton textEditButton;
private final JButton textCancelButton;
public TextPanel(final MainPanel mainPanel) {
+13 -3
View File
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -99,12 +99,15 @@ import org.pushingpixels.substance.internal.utils.SubstanceColorSchemeUtilities;
public class View {
public static final Color DEFAULT_BACKGROUND_COLOR = new Color(217, 231, 250);
public static Color swfBackgroundColor = DEFAULT_BACKGROUND_COLOR;
private static final BufferedImage transparentTexture;
public static final TexturePaint transparentPaint;
private static final Color transparentColor1 = new Color(0x99, 0x99, 0x99);
private static final Color transparentColor2 = new Color(0x66, 0x66, 0x66);
static {
@@ -160,10 +163,15 @@ public class View {
private final FontSet fontSet = new FontSet() {
private FontUIResource controlFont;
private FontUIResource menuFont;
private FontUIResource titleFont;
private FontUIResource windowTitleFont;
private FontUIResource smallFont;
private FontUIResource messageFont;
@Override
@@ -305,7 +313,9 @@ public class View {
public static ImageIcon getIcon(String name) {
return new ImageIcon(View.class.getClassLoader().getResource("com/jpexs/decompiler/flash/gui/graphics/" + name + ".png"));
}
private static final KeyStroke escapeStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
private static final String dispatchWindowClosingActionMapKey = "com.jpexs.dispatch:WINDOW_CLOSING";
public static void installEscapeCloseOperation(final JDialog dialog) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -25,7 +25,9 @@ import javax.swing.event.ListDataListener;
public class ABCComboBoxModel implements ComboBoxModel<ABCContainerTag> {
public List<ABCContainerTag> list;
public int itemIndex = 0;
public static final ABCContainerTag ROOT = new RootABCContainerTag();
public ABCComboBoxModel(List<ABCContainerTag> list) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -114,32 +114,53 @@ import jsyntaxpane.TokenType;
public class ABCPanel extends JPanel implements ItemListener, ActionListener, SearchListener<ABCPanelSearchResult>, Freed {
private MainPanel mainPanel;
public TraitsList navigator;
public ABC abc;
public JComboBox<ABCContainerTag> abcComboBox;
public DecompiledEditorPane decompiledTextArea;
public JScrollPane decompiledScrollPane;
public JSplitPane splitPane;
//public JSplitPane splitPaneTreeVSNavigator;
//public JSplitPane splitPaneTreeNavVSDecompiledDetail;
private JTable constantTable;
public JComboBox<String> constantTypeList;
public JLabel asmLabel = new HeaderLabel(AppStrings.translate("panel.disassembled"));
public JLabel decLabel = new HeaderLabel(AppStrings.translate("panel.decompiled"));
public DetailPanel detailPanel;
public JPanel navPanel;
public JTabbedPane tabbedPane;
public SearchPanel<ABCPanelSearchResult> searchPanel;
private NewTraitDialog newTraitDialog;
public JLabel scriptNameLabel;
private static final String ACTION_SAVE_DECOMPILED = "SAVEDECOMPILED";
private static final String ACTION_EDIT_DECOMPILED = "EDITDECOMPILED";
private static final String ACTION_CANCEL_DECOMPILED = "CANCELDECOMPILED";
public JLabel experimentalLabel = new JLabel(AppStrings.translate("action.edit.experimental"));
public JButton editDecompiledButton = new JButton(AppStrings.translate("button.edit"), View.getIcon("edit16"));
public JButton saveDecompiledButton = new JButton(AppStrings.translate("button.save"), View.getIcon("save16"));
public JButton cancelDecompiledButton = new JButton(AppStrings.translate("button.cancel"), View.getIcon("cancel16"));
private static final String ACTION_ADD_TRAIT = "ADDTRAIT";
@@ -634,7 +655,6 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
decompiledTextArea.setCursor(Cursor.getDefaultCursor());
}
}
}
public void reload() {
@@ -709,8 +729,11 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
}
public String lastDecompiled = null;
public boolean directEditing = false;
private int detWidth = 0;
private int detsp = 0;
public void setDecompiledEditMode(boolean val) {
@@ -807,7 +830,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
decompiledTextArea.markError();
View.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", ex.text).replace("%line%", Long.toString(ex.line)), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
} catch (IOException | InterruptedException ex) {
//ignore
//ignore
}
break;
case ACTION_ADD_TRAIT:
@@ -913,5 +936,4 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
break;
}
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -26,11 +26,11 @@ import com.jpexs.decompiler.flash.abc.ScriptPack;
public class ABCPanelSearchResult {
public ScriptPack scriptPack;
public ClassPath classPath;
@Override
public String toString() {
return classPath.toString();
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -49,16 +49,27 @@ import javax.swing.event.CaretListener;
public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretListener {
public ABC abc;
public int bodyIndex = -1;
private List<Highlighting> disassembledHilights = new ArrayList<>();
private List<Highlighting> specialHilights = new ArrayList<>();
private final DecompiledEditorPane decompiledEditor;
private boolean ignoreCarret = false;
private String name;
private HighlightedText textWithHex;
private HighlightedText textNoHex;
private HighlightedText textHexOnly;
private ScriptExportMode exportMode = ScriptExportMode.PCODE;
private Trait trait;
public ABCPanel getAbcPanel() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -36,8 +36,11 @@ import javax.swing.tree.TreePath;
public class ClassesListTreeModel extends AS3ClassTreeItem implements TreeModel {
private SWF swf;
private List<MyEntry<ClassPath, ScriptPack>> list;
private AS3Package root;
private final List<TreeModelListener> listeners = new ArrayList<>();
public List<MyEntry<ClassPath, ScriptPack>> getList() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -25,14 +25,23 @@ import javax.swing.event.ListDataListener;
public class ConstantsListModel implements ListModel {
private final AVM2ConstantPool constants;
public static final int TYPE_UINT = 0;
public static final int TYPE_INT = 1;
public static final int TYPE_DOUBLE = 2;
public static final int TYPE_DECIMAL = 3;
public static final int TYPE_STRING = 4;
public static final int TYPE_NAMESPACE = 5;
public static final int TYPE_NAMESPACESET = 6;
public static final int TYPE_MULTINAME = 7;
private int type = TYPE_INT;
public ConstantsListModel(AVM2ConstantPool constants, int type) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -55,18 +55,31 @@ import jsyntaxpane.TokenType;
public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretListener {
private List<Highlighting> highlights = new ArrayList<>();
private List<Highlighting> specialHighlights = new ArrayList<>();
private List<Highlighting> traitHighlights = new ArrayList<>();
private List<Highlighting> methodHighlights = new ArrayList<>();
private List<Highlighting> classHighlights = new ArrayList<>();
private Highlighting currentMethodHighlight;
private Highlighting currentTraitHighlight;
private ScriptPack script;
public int lastTraitIndex = 0;
public boolean ignoreCarret = false;
private boolean reset = false;
private final ABCPanel abcPanel;
private int classIndex = -1;
private boolean isStatic = false;
private final List<Runnable> scriptListeners = new ArrayList<>();
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -39,13 +39,19 @@ import javax.swing.JSlider;
public class DeobfuscationDialog extends AppDialog implements ActionListener {
private static final String ACTION_OK = "OK";
private static final String ACTION_CANCEL = "CANCEL";
public JCheckBox processAllCheckbox = new JCheckBox(translate("processallclasses"));
public JSlider codeProcessingLevel;
public boolean ok = false;
public static final int LEVEL_REMOVE_DEAD_CODE = 1;
public static final int LEVEL_REMOVE_TRAPS = 2;
public static final int LEVEL_RESTORE_CONTROL_FLOW = 3;
@SuppressWarnings("unchecked")
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -44,25 +44,43 @@ import javax.swing.border.BevelBorder;
public class DetailPanel extends JPanel implements ActionListener {
private static final String ACTION_SAVE_DETAIL = "SAVEDETAIL";
private static final String ACTION_EDIT_DETAIL = "EDITDETAIL";
private static final String ACTION_CANCEL_DETAIL = "CANCELDETAIL";
public MethodTraitDetailPanel methodTraitPanel;
public JPanel unsupportedTraitPanel;
public SlotConstTraitDetailPanel slotConstTraitPanel;
public static final String METHOD_TRAIT_CARD = AppStrings.translate("abc.detail.methodtrait");
public static final String UNSUPPORTED_TRAIT_CARD = AppStrings.translate("abc.detail.unsupported");
public static final String SLOT_CONST_TRAIT_CARD = AppStrings.translate("abc.detail.slotconsttrait");
private final JPanel innerPanel;
public JButton saveButton = new JButton(AppStrings.translate("button.save"), View.getIcon("save16"));
public JButton editButton = new JButton(AppStrings.translate("button.edit"), View.getIcon("edit16"));
public JButton cancelButton = new JButton(AppStrings.translate("button.cancel"), View.getIcon("cancel16"));
private final HashMap<String, JComponent> cardMap = new HashMap<>();
private String selectedCard;
private final JLabel selectedLabel;
private boolean editMode = false;
private final JPanel buttonsPanel;
private final ABCPanel abcPanel;
private final JLabel traitNameLabel;
public DetailPanel(ABCPanel abcPanel) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -28,7 +28,9 @@ import javax.swing.JList;
public class IconListRenderer extends DefaultListCellRenderer {
private final Icon constIcon;
private final Icon functionIcon;
private final Icon variableIcon;
private Icon loadIcon(String path) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -54,7 +54,9 @@ import jsyntaxpane.actions.ActionUtils;
public class LineMarkedEditorPane extends UndoFixedEditorPane implements LinkHandler {
private static final int truncateLimit = 2 * 1024 * 1024;
private int lastLine = -1;
private boolean error = false;
public int getLine() {
@@ -141,13 +143,17 @@ public class LineMarkedEditorPane extends UndoFixedEditorPane implements LinkHan
}
});
}
private Token lastUnderlined = null;
private static final HighlightPainter underLinePainter = new UnderLinePainter(new Color(0, 0, 255));
private LinkHandler linkHandler = this;
private class LinkAdapter extends MouseAdapter implements KeyListener {
private Point lastPos = new Point(0, 0);
private boolean ctrlDown = false;
@Override
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -41,12 +41,17 @@ import javax.swing.JToggleButton;
public class MethodCodePanel extends JPanel implements ActionListener {
private static final String ACTION_GRAPH = "GRAPH";
private static final String ACTION_HEX = "HEX";
private static final String ACTION_HEX_ONLY = "HEXONLY";
private final ASMSourceEditorPane sourceTextArea;
public JPanel buttonsPanel;
private final JToggleButton hexButton;
private final JToggleButton hexOnlyButton;
public void focusEditor() {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -26,6 +26,7 @@ import javax.swing.JPanel;
public class MethodTraitDetailPanel extends JPanel implements TraitDetail {
public MethodCodePanel methodCodePanel;
public ABCPanel abcPanel;
public MethodTraitDetailPanel(ABCPanel abcPanel) {
@@ -48,6 +49,7 @@ public class MethodTraitDetailPanel extends JPanel implements TraitDetail {
public void setEditMode(boolean val) {
methodCodePanel.setEditMode(val);
}
private boolean active = false;
@Override
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -124,5 +124,4 @@ public class MyMarkers {
markText(pane, matcher.start(), matcher.end(), marker);
}
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -44,6 +44,7 @@ import javax.swing.event.AncestorListener;
public class NewTraitDialog extends AppDialog implements ActionListener {
private static final String ACTION_OK = "OK";
private static final String ACTION_CANCEL = "CANCEL";
private static final int modifiers[] = new int[]{
@@ -55,6 +56,7 @@ public class NewTraitDialog extends AppDialog implements ActionListener {
Namespace.KIND_EXPLICIT,
Namespace.KIND_STATIC_PROTECTED
};
private static final int types[] = new int[]{
Trait.TRAIT_METHOD,
Trait.TRAIT_GETTER,
@@ -62,9 +64,13 @@ public class NewTraitDialog extends AppDialog implements ActionListener {
Trait.TRAIT_CONST,
Trait.TRAIT_SLOT
};
private final JComboBox<String> accessComboBox;
private final JComboBox<String> typeComboBox;
private final JCheckBox staticCheckbox;
private final JTextField nameField;
public boolean getStatic() {
@@ -156,6 +162,7 @@ public class NewTraitDialog extends AppDialog implements ActionListener {
setVisible(true);
return result;
}
private boolean result = false;
@Override
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -48,5 +48,4 @@ public class RootABCContainerTag implements ABCContainerTag {
public String toString() {
return " - all - ";
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -47,10 +47,15 @@ import javax.swing.event.CaretListener;
public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail {
public JEditorPane slotConstEditor;
private ABC abc;
private TraitSlotConst trait;
private boolean showWarning = false;
private List<Highlighting> specialHilights;
private boolean ignoreCaret = false;
public SlotConstTraitDetailPanel(final DecompiledEditorPane editor) {
@@ -134,6 +139,7 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail {
}
slotConstEditor.setEditable(val);
}
private boolean active = false;
@Override
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -31,8 +31,11 @@ import javax.swing.event.ListSelectionListener;
public class TraitsList extends JList<Object> implements ListSelectionListener {
private ABC abc;
private int classIndex = -1;
private final ABCPanel abcPanel;
private boolean sorted = false;
public void setSorted(boolean sorted) {
@@ -82,6 +85,7 @@ public class TraitsList extends JList<Object> implements ListSelectionListener {
}
}
}
private int lastSelected = -1;
@Override
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -36,12 +36,19 @@ import java.util.logging.Logger;
public class TraitsListItem {
private final Type type;
private final boolean isStatic;
private final ABC abc;
private final int classIndex;
private final int index;
private final int scriptIndex;
public String STR_INSTANCE_INITIALIZER = AppStrings.translate("abc.traitslist.instanceinitializer");
public String STR_CLASS_INITIALIZER = AppStrings.translate("abc.traitslist.classinitializer");
public TraitsListItem(Type type, int index, boolean isStatic, ABC abc, int classIndex, int scriptIndex) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,8 +27,11 @@ import javax.swing.event.ListDataListener;
public final class TraitsListModel implements ListModel<Object> {
private List<TraitsListItem> items;
private final ABC abc;
private final int classIndex;
private final int scriptIndex;
public void setSorted(boolean sorted) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -37,6 +37,7 @@ import jsyntaxpane.SyntaxDocument;
public class UndoFixedEditorPane extends JEditorPane {
private static final Object setTextLock = new Object();
private String originalContentType;
@Override
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -47,12 +47,17 @@ import javax.swing.JScrollPane;
public class UsageFrame extends AppDialog implements ActionListener, MouseListener {
private static final String ACTION_GOTO = "GOTO";
private static final String ACTION_CANCEL = "CANCEL";
private final JButton gotoButton = new JButton(translate("button.goto"));
private final JButton cancelButton = new JButton(translate("button.cancel"));
private final JList usageList;
private final UsageListModel usageListModel;
private final ABCPanel abcPanel;
public UsageFrame(ABC abc, int multinameIndex, ABCPanel abcPanel, boolean definitions) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
public class DecimalTableModel implements TableModel {
private final ABC abc;
private static final String[] columnNames = new String[]{"Index", "Value"};
private static final Class[] classes = new Class[]{Long.class, String.class};
public DecimalTableModel(ABC abc) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
public class DoubleTableModel implements TableModel {
private final ABC abc;
private static final String[] columnNames = new String[]{"Index", "Value"};
private static final Class[] classes = new Class[]{Long.class, String.class};
public DoubleTableModel(ABC abc) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
public class IntTableModel implements TableModel {
private final ABC abc;
private static final String[] columnNames = new String[]{"Index", "Value"};
private static final Class[] classes = new Class[]{Long.class, Long.class};
public IntTableModel(ABC abc) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -24,7 +24,9 @@ import javax.swing.table.TableModel;
public class MultinameTableModel implements TableModel {
private final ABC abc;
private static final String[] columnNames = new String[]{"Index", "Kind", "Name", "Namespace", "NamespaceSet"};
private static final Class[] classes = new Class[]{Long.class, String.class, String.class, String.class, String.class};
public MultinameTableModel(ABC abc) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
public class NamespaceSetTableModel implements TableModel {
private final ABC abc;
private static final String[] columnNames = new String[]{"Index", "NameSpaces"};
private static final Class[] classes = new Class[]{Long.class, String.class, String.class};
public NamespaceSetTableModel(ABC abc) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
public class NamespaceTableModel implements TableModel {
private final ABC abc;
private static final String[] columnNames = new String[]{"Index", "Kind", "Name"};
private static final Class[] classes = new Class[]{Long.class, String.class, String.class};
public NamespaceTableModel(ABC abc) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
public class StringTableModel implements TableModel {
private final ABC abc;
private static final String[] columnNames = new String[]{"Index", "Value"};
private static final Class[] classes = new Class[]{Long.class, String.class};
public StringTableModel(ABC abc) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
public class UIntTableModel implements TableModel {
private final ABC abc;
private static final String[] columnNames = new String[]{"Index", "Value"};
private static final Class[] classes = new Class[]{Long.class, Long.class};
public UIntTableModel(ABC abc) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -91,44 +91,81 @@ import jsyntaxpane.actions.ActionUtils;
public class ActionPanel extends JPanel implements ActionListener, SearchListener<ActionSearchResult> {
private static final String ACTION_GRAPH = "GRAPH";
private static final String ACTION_HEX = "HEX";
private static final String ACTION_HEX_ONLY = "HEXONLY";
private static final String ACTION_SAVE_ACTION = "SAVEACTION";
private static final String ACTION_EDIT_ACTION = "EDITACTION";
private static final String ACTION_CANCEL_ACTION = "CANCELACTION";
private static final String ACTION_SAVE_DECOMPILED = "SAVEDECOMPILED";
private static final String ACTION_EDIT_DECOMPILED = "EDITDECOMPILED";
private static final String ACTION_CANCEL_DECOMPILED = "CANCELDECOMPILED";
private MainPanel mainPanel;
public LineMarkedEditorPane editor;
public LineMarkedEditorPane decompiledEditor;
public JSplitPane splitPane;
public JButton saveButton = new JButton(AppStrings.translate("button.save"), View.getIcon("save16"));
public JButton editButton = new JButton(AppStrings.translate("button.edit"), View.getIcon("edit16"));
public JButton cancelButton = new JButton(AppStrings.translate("button.cancel"), View.getIcon("cancel16"));
public JLabel experimentalLabel = new JLabel(AppStrings.translate("action.edit.experimental"));
public JButton editDecompiledButton = new JButton(AppStrings.translate("button.edit"), View.getIcon("edit16"));
public JButton saveDecompiledButton = new JButton(AppStrings.translate("button.save"), View.getIcon("save16"));
public JButton cancelDecompiledButton = new JButton(AppStrings.translate("button.cancel"), View.getIcon("cancel16"));
public JToggleButton hexButton;
public JToggleButton hexOnlyButton;
public JLabel asmLabel = new HeaderLabel(AppStrings.translate("panel.disassembled"));
public JLabel decLabel = new HeaderLabel(AppStrings.translate("panel.decompiled"));
public List<Highlighting> decompiledHilights = new ArrayList<>();
public List<Highlighting> disassembledHilights = new ArrayList<>();
private boolean ignoreCarret = false;
private boolean editMode = false;
private boolean editDecompiledMode = false;
private ActionList lastCode;
private ASMSource src;
public JPanel topButtonsPan;
private HighlightedText srcWithHex;
private HighlightedText srcNoHex;
private HighlightedText srcHexOnly;
private String lastDecompiled = "";
private ASMSource lastASM;
public SearchPanel<ActionSearchResult> searchPanel;
private CancellableWorker setSourceWorker;
public void clearSource() {
@@ -348,6 +385,7 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
private DisassemblyListener getDisassemblyListener() {
DisassemblyListener listener = new DisassemblyListener() {
int percent = 0;
String phase = "";
private void progress(String phase, long pos, long total) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -25,6 +25,7 @@ import com.jpexs.decompiler.flash.tags.base.ASMSource;
public class ActionSearchResult {
public ASMSource src;
public String path;
public ActionSearchResult(ASMSource src, String path) {
@@ -36,5 +37,4 @@ public class ActionSearchResult {
public String toString() {
return path;
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -48,9 +48,13 @@ public class Debugger {
private static class DebugHandler extends Thread {
private final Socket s;
private final int serverPort;
private static int maxid = 0;
private final int id;
public boolean finished = false;
public DebugHandler(int serverPort, Socket s) {
@@ -135,13 +139,14 @@ public class Debugger {
l.onFinish(clientName);
}
}
}
private static class DebugServerThread extends Thread {
private final int port;
private ServerSocket ss;
private final Map<Integer, DebugHandler> handlers = new WeakHashMap<>();
public DebugServerThread(int port) {
@@ -165,7 +170,6 @@ public class Debugger {
//ignore
}
}
}
private final int port;
@@ -205,5 +209,4 @@ public class Debugger {
server = null;
}
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -64,10 +64,15 @@ import javax.swing.tree.TreePath;
public class DumpTree extends JTree implements ActionListener {
private static final String ACTION_CLOSE_SWF = "CLOSESWF";
private static final String ACTION_EXPAND_RECURSIVE = "EXPANDRECURSIVE";
private static final String ACTION_SAVE_TO_FILE = "SAVETOFILE";
private static final String ACTION_PARSE_ACTIONS = "PARSEACTIONS";
private static final String ACTION_PARSE_ABC = "PARSEABC";
private static final String ACTION_PARSE_INSTRUCTIONS = "PARSEINSTRUCTIONS";
private final MainPanel mainPanel;
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -132,5 +132,4 @@ public class DumpTreeModel implements TreeModel {
@Override
public void removeTreeModelListener(TreeModelListener tl) {
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -38,11 +38,17 @@ import javax.swing.tree.TreePath;
public class DumpViewPanel extends JPanel {
private final JLabel selectedByteInfo;
private final JLabel dumpViewLabel;
private final HexView dumpViewHexTable;
private final DumpTree dumpTree;
private DumpInfo selectedDumpInfo;
private boolean skipNextScroll;
private boolean skipValueChange;
public DumpViewPanel(final DumpTree dumpTree) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -29,9 +29,13 @@ import javax.swing.JCheckBox;
public class BooleanEditor extends JCheckBox implements GenericTagEditor {
private final Object obj;
private final Field field;
private final int index;
private final Class<?> type;
private final String fieldName;
public BooleanEditor(String fieldName, Object obj, Field field, int index, Class<?> type) {
@@ -88,5 +92,4 @@ public class BooleanEditor extends JCheckBox implements GenericTagEditor {
public String getReadOnlyValue() {
return getChangedValue().toString();
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -50,15 +50,25 @@ import javax.swing.colorchooser.AbstractColorChooserPanel;
public class ColorEditor extends JPanel implements GenericTagEditor, ActionListener {
private final Object obj;
private final Field field;
private final int index;
private final Class<?> type;
private final String fieldName;
private Color color;
public static final int COLOR_TYPE_RGB = 0;
public static final int COLOR_TYPE_RGBA = 1;
public static final int COLOR_TYPE_ARGB = 2;
private int colorType;
private JButton buttonChange;
public int getColorType() {
@@ -236,5 +246,4 @@ public class ColorEditor extends JPanel implements GenericTagEditor, ActionListe
int h = System.identityHashCode(this);
return "<cite style=\"background-color:rgb(" + color.getRed() + "," + color.getGreen() + "," + color.getBlue() + ");\">&nbsp;&nbsp;&nbsp;&nbsp;</cite> " + getChangedValue().toString();
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -36,10 +36,15 @@ import javax.swing.text.DefaultFormatter;
public class NumberEditor extends JSpinner implements GenericTagEditor {
private final Object obj;
private final Field field;
private final int index;
private final Class<?> type;
private final SWFType swfType;
private String fieldName;
@Override
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -32,10 +32,15 @@ import javax.swing.JTextArea;
public class StringEditor extends JTextArea implements GenericTagEditor {
private final Object obj;
private final Field field;
private final int index;
private final Class<?> type;
private String fieldName;
private boolean multiline;
@Override
@@ -121,5 +126,4 @@ public class StringEditor extends JTextArea implements GenericTagEditor {
public String getReadOnlyValue() {
return Helper.escapeHTML(getChangedValue().toString());
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -42,13 +42,21 @@ import javax.swing.table.TableModel;
public class HexView extends JTable {
private static final int bytesInRow = 16;
private long[] highlightStarts;
private long[] highlightEnds;
private final String[] highlightColorsStr = new String[]{/*"EEEEEE", */"29AEC2", "9AC88C", "DF5F80", "EEA32E", "FFD200", "5E9B4C", "D3E976", "A3AEC2"};
private final Color[] highlightColors;
private final Color bgColor = Color.decode("#F7F7F7");
private final Color bgColorAlternate = Color.decode("#EDEDED");
private int mouseOverIdx = -1;
private HexViewListener listener;
private class HighlightCellRenderer extends DefaultTableCellRenderer {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -25,6 +25,7 @@ import javax.swing.table.AbstractTableModel;
public class HexViewTableModel extends AbstractTableModel {
private byte[] data;
private final int bytesInRow;
public HexViewTableModel(int bytesInRow) {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -46,6 +46,7 @@ public class FlashPlayerPanel extends Panel implements Closeable, MediaDisplay {
private ShockwaveFlash flash;
private boolean stopped = true;
private int frameRate;
@Override
@@ -260,5 +261,4 @@ public class FlashPlayerPanel extends Panel implements Closeable, MediaDisplay {
public boolean isLoaded() {
return !isStopped();
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -66,40 +66,67 @@ import javax.swing.event.AncestorListener;
public class PlayerControls extends JPanel implements ActionListener {
private static final String ACTION_PAUSE = "PAUSE";
private static final String ACTION_STOP = "STOP";
private static final String ACTION_SELECT_BKCOLOR = "SELECTCOLOR";
private static final String ACTION_ZOOMIN = "ZOOMIN";
private static final String ACTION_ZOOMOUT = "ZOOMOUT";
private static final String ACTION_ZOOMFIT = "ZOOMFIT";
private static final String ACTION_ZOOMNONE = "ZOOMNONE";
private static final String ACTION_SNAPSHOT = "SNAPSHOT";
private static final String ACTION_NEXTFRAME = "NEXTFRAME";
private static final String ACTION_PREVFRAME = "PREVFRAME";
private static final String ACTION_GOTOFRAME = "SELECTFRAME";
private final JButton pauseButton;
private boolean paused = false;
private MediaDisplay display;
private JProgressBar progress;
private final Timer timer;
private final JLabel timeLabel;
private final JLabel frameLabel;
private final JLabel totalTimeLabel;
private final JLabel totalFrameLabel;
private static final Icon pauseIcon = View.getIcon("pause16");
private static final Icon playIcon = View.getIcon("play16");
private final JLabel percentLabel = new JLabel("100%");
private final JPanel zoomPanel;
private final JPanel graphicControls;
private final JPanel playbackControls;
private final JPanel frameControls;
private boolean zoomToFit = false;
private double realZoom = 1.0;
private final JButton zoomFitButton;
public static final int ZOOM_DECADE_STEPS = 10;
public static final double ZOOM_MULTIPLIER = Math.pow(10, 1.0 / ZOOM_DECADE_STEPS);
private static String underline(String s) {
@@ -107,6 +134,7 @@ public class PlayerControls extends JPanel implements ActionListener {
}
private static Font underlinedFont = null;
private static Font notUnderlinedFont = null;
static {
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -28,5 +28,4 @@ public class Zoom {
public Zoom() {
}
}
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -92,21 +92,35 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe
private static final String REPLACEMENTS_NAME = "replacements.cfg";
private static final String ACTION_SWITCH_STATE = "SWITCHSTATE";
private static final String ACTION_OPEN = "OPEN";
private static final String ACTION_CLEAR = "CLEAR";
private static final String ACTION_RENAME = "RENAME";
private static final String ACTION_REMOVE = "REMOVE";
private static final String ACTION_COPYURL = "COPYURL";
private static final String ACTION_SAVEAS = "SAVEAS";
private static final String ACTION_REPLACE = "REPLACE";
private JTable replacementsTable;
private JButton switchButton = new JButton(translate("proxy.start"));
private boolean started = false;
private JTextField portField = new JTextField("55555");
private JCheckBox sniffSWFCheckBox = new JCheckBox("SWF", false);
private JCheckBox sniffOSCheckBox = new JCheckBox("OctetStream", false);
private JCheckBox sniffJSCheckBox = new JCheckBox("JS", false);
private JCheckBox sniffXMLCheckBox = new JCheckBox("XML", false);
/**
@@ -144,10 +158,10 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe
public int compareTo(SizeItem o) {
return (int) (new File(file).length() - new File(o.file).length());
}
}
DefaultTableModel tableModel;
private SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
/**
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -31,6 +31,7 @@ import javax.swing.event.ListDataListener;
public class SWFListModel implements ListModel<Replacement> {
private final List<ListDataListener> listeners = new ArrayList<>();
private final List<Replacement> replacements;
/**
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -134,6 +134,7 @@ import javax.swing.tree.TreeSelectionModel;
public class TagTree extends JTree {
public TagTreeContextMenu contextPopupMenu;
private final MainPanel mainPanel;
public class TagTreeCellRenderer extends DefaultTreeCellRenderer {

Some files were not shown because too many files have changed in this diff Show More