diff --git a/trunk/graphics/as.svg b/trunk/graphics/as.svg new file mode 100644 index 000000000..9ccbc9afa --- /dev/null +++ b/trunk/graphics/as.svg @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + { } + + diff --git a/trunk/graphics/button.svg b/trunk/graphics/button.svg new file mode 100644 index 000000000..dd4aa5864 --- /dev/null +++ b/trunk/graphics/button.svg @@ -0,0 +1,88 @@ + + + + + + + + + + image/svg+xml + + + + + + + + ok + + + + diff --git a/trunk/graphics/exit2.svg b/trunk/graphics/exit2.svg new file mode 100644 index 000000000..2bb6a3965 --- /dev/null +++ b/trunk/graphics/exit2.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/trunk/graphics/font.svg b/trunk/graphics/font.svg new file mode 100644 index 000000000..92a23d9d5 --- /dev/null +++ b/trunk/graphics/font.svg @@ -0,0 +1,71 @@ + + + + + + + + + + image/svg+xml + + + + + + + Aa + + diff --git a/trunk/graphics/image.svg b/trunk/graphics/image.svg new file mode 100644 index 000000000..73ea7e61e --- /dev/null +++ b/trunk/graphics/image.svg @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/trunk/graphics/morphshape.svg b/trunk/graphics/morphshape.svg new file mode 100644 index 000000000..cdc882072 --- /dev/null +++ b/trunk/graphics/morphshape.svg @@ -0,0 +1,87 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/trunk/graphics/open3.svg b/trunk/graphics/open3.svg index 4dc7f1a97..536682352 100644 --- a/trunk/graphics/open3.svg +++ b/trunk/graphics/open3.svg @@ -17,11 +17,22 @@ version="1.1" inkscape:version="0.48.1 " sodipodi:docname="open3.svg" - inkscape:export-filename="D:\Dokumenty\Programovani\JavaSE\ASDec\trunk\src\com\jpexs\asdec\gui\graphics\open16.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> + inkscape:export-filename="D:\Dokumenty\Programovani\JavaSE\ASDec\trunk\src\com\jpexs\asdec\gui\graphics\open24.png" + inkscape:export-xdpi="135" + inkscape:export-ydpi="135"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + PC + + diff --git a/trunk/graphics/proxy2.svg b/trunk/graphics/proxy2.svg new file mode 100644 index 000000000..2fd06c5ac --- /dev/null +++ b/trunk/graphics/proxy2.svg @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + P + + + + + + + + + + + + diff --git a/trunk/graphics/shape.svg b/trunk/graphics/shape.svg new file mode 100644 index 000000000..2f527f88e --- /dev/null +++ b/trunk/graphics/shape.svg @@ -0,0 +1,82 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/trunk/graphics/sprite.svg b/trunk/graphics/sprite.svg new file mode 100644 index 000000000..67a9c4dbb --- /dev/null +++ b/trunk/graphics/sprite.svg @@ -0,0 +1,116 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/trunk/graphics/text.svg b/trunk/graphics/text.svg new file mode 100644 index 000000000..44450716b --- /dev/null +++ b/trunk/graphics/text.svg @@ -0,0 +1,90 @@ + + + + + + + + + + image/svg+xml + + + + + + + T xt + + + + + + + diff --git a/trunk/src/com/jpexs/asdec/Main.java b/trunk/src/com/jpexs/asdec/Main.java index 76670345e..0026c5a5e 100644 --- a/trunk/src/com/jpexs/asdec/Main.java +++ b/trunk/src/com/jpexs/asdec/Main.java @@ -170,9 +170,7 @@ public class Main { public static void stopWork() { working = false; if (mainFrame != null) { - if (mainFrame.abcPanel != null) { - mainFrame.setStatus(""); - } + mainFrame.setStatus(""); } if (loadingDialog != null) { loadingDialog.setDetail(""); diff --git a/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTree.java b/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTree.java index c941d2edf..2469e0090 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTree.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/ClassesListTree.java @@ -53,7 +53,7 @@ public class ClassesListTree extends JTree implements TreeSelectionListener { addTreeSelectionListener(this); DefaultTreeCellRenderer treeRenderer = new DefaultTreeCellRenderer(); ClassLoader cldr = this.getClass().getClassLoader(); - java.net.URL imageURL = cldr.getResource("com/jpexs/asdec/abc/gui/graphics/class.png"); + java.net.URL imageURL = cldr.getResource("com/jpexs/asdec/gui/graphics/as16.png"); ImageIcon leafIcon = new ImageIcon(imageURL); treeRenderer.setLeafIcon(leafIcon); setCellRenderer(treeRenderer); diff --git a/trunk/src/com/jpexs/asdec/abc/gui/graphics/class.png b/trunk/src/com/jpexs/asdec/abc/gui/graphics/class.png deleted file mode 100644 index 1d30295f9..000000000 Binary files a/trunk/src/com/jpexs/asdec/abc/gui/graphics/class.png and /dev/null differ diff --git a/trunk/src/com/jpexs/asdec/action/gui/ActionPanel.java b/trunk/src/com/jpexs/asdec/action/gui/ActionPanel.java index f3e52b2b5..0ecccff45 100644 --- a/trunk/src/com/jpexs/asdec/action/gui/ActionPanel.java +++ b/trunk/src/com/jpexs/asdec/action/gui/ActionPanel.java @@ -65,7 +65,7 @@ public class ActionPanel extends JPanel implements TreeSelectionListener, Action DefaultTreeCellRenderer treeRenderer = new DefaultTreeCellRenderer(); ClassLoader cldr = this.getClass().getClassLoader(); - java.net.URL imageURL = cldr.getResource("com/jpexs/asdec/action/gui/graphics/class.png"); + java.net.URL imageURL = cldr.getResource("com/jpexs/asdec/gui/graphics/as16.png"); ImageIcon leafIcon = new ImageIcon(imageURL); treeRenderer.setLeafIcon(leafIcon); tagTree.setCellRenderer(treeRenderer); diff --git a/trunk/src/com/jpexs/asdec/action/gui/graphics/class.png b/trunk/src/com/jpexs/asdec/action/gui/graphics/class.png deleted file mode 100644 index 1d30295f9..000000000 Binary files a/trunk/src/com/jpexs/asdec/action/gui/graphics/class.png and /dev/null differ diff --git a/trunk/src/com/jpexs/asdec/gui/MainFrame.java b/trunk/src/com/jpexs/asdec/gui/MainFrame.java index aac71158f..9633d6747 100644 --- a/trunk/src/com/jpexs/asdec/gui/MainFrame.java +++ b/trunk/src/com/jpexs/asdec/gui/MainFrame.java @@ -14,8 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - - package com.jpexs.asdec.gui; import com.jpexs.asdec.Configuration; @@ -55,6 +53,7 @@ import com.jpexs.asdec.tags.Tag; import com.jpexs.asdec.tags.base.ASMSource; import com.jpexs.asdec.tags.base.Container; import java.awt.BorderLayout; +import java.awt.Component; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -65,6 +64,7 @@ import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; +import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JCheckBoxMenuItem; import javax.swing.JFileChooser; @@ -77,6 +77,7 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.JTabbedPane; +import javax.swing.SwingConstants; import javax.swing.SwingWorker; import javax.swing.border.BevelBorder; @@ -95,17 +96,28 @@ public class MainFrame extends JFrame implements ActionListener { public JPanel statusPanel = new JPanel(); public JProgressBar progressBar = new JProgressBar(0, 100); - public void setPercent(int percent){ + public void setPercent(int percent) { progressBar.setValue(percent); progressBar.setVisible(true); } - - public void hidePercent(){ - if(progressBar.isVisible()){ + + public void hidePercent() { + if (progressBar.isVisible()) { progressBar.setVisible(false); } } - + + private static void addTab(JTabbedPane tabbedPane, Component tab, String title, Icon icon) { + tabbedPane.add(tab); + + JLabel lbl = new JLabel(title); + lbl.setIcon(icon); + lbl.setIconTextGap(5); + lbl.setHorizontalTextPosition(SwingConstants.RIGHT); + + tabbedPane.setTabComponentAt(tabbedPane.getTabCount() - 1, lbl); + } + public void setStatus(String s) { if (s.equals("")) { loadingPanel.setVisible(false); @@ -155,16 +167,17 @@ public class MainFrame extends JFrame implements ActionListener { miSaveAs.addActionListener(this); JMenu menuExportAll = new JMenu("Export all"); JMenuItem miExportAllAS = new JMenuItem("ActionScript..."); - miExportAllAS.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/exportas16.png"))); + miExportAllAS.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/as16.png"))); miExportAllAS.setActionCommand("EXPORT"); miExportAllAS.addActionListener(this); JMenuItem miExportAllPCode = new JMenuItem("PCode..."); - miExportAllPCode.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/exportpc16.png"))); + miExportAllPCode.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/pcode16.png"))); miExportAllPCode.setActionCommand("EXPORTPCODE"); miExportAllPCode.addActionListener(this); JMenuItem miExportImages = new JMenuItem("Images..."); + miExportImages.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/image16.png"))); miExportImages.setActionCommand("EXPORTIMAGES"); miExportImages.addActionListener(this); @@ -175,16 +188,17 @@ public class MainFrame extends JFrame implements ActionListener { JMenu menuExportSel = new JMenu("Export selection"); JMenuItem miExportSelAS = new JMenuItem("ActionScript..."); - miExportSelAS.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/exportas16.png"))); + miExportSelAS.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/as16.png"))); miExportSelAS.setActionCommand("EXPORTSEL"); miExportSelAS.addActionListener(this); JMenuItem miExportSelPCode = new JMenuItem("PCode..."); - miExportSelPCode.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/exportpc16.png"))); + miExportSelPCode.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/pcode16.png"))); miExportSelPCode.setActionCommand("EXPORTPCODESEL"); miExportSelPCode.addActionListener(this); JMenuItem miExportSelImages = new JMenuItem("Images..."); + miExportSelImages.setIcon(new ImageIcon(View.loadImage("com/jpexs/asdec/gui/graphics/image16.png"))); miExportSelImages.setActionCommand("EXPORTIMAGESSEL"); miExportSelImages.addActionListener(this); @@ -267,39 +281,36 @@ public class MainFrame extends JFrame implements ActionListener { getContentPane().add(tabPane, BorderLayout.CENTER); if (!abcList.isEmpty()) { - tabPane.addTab("ActionScript3", abcPanel = new ABCPanel(abcList)); + addTab(tabPane,abcPanel = new ABCPanel(abcList),"ActionScript3",new ImageIcon(this.getClass().getClassLoader().getResource("com/jpexs/asdec/gui/graphics/as16.png"))); } else { actionPanel = new ActionPanel(swf.tags); if (actionPanel.tagTree.getRowCount() > 1) { - tabPane.addTab("ActionScript", actionPanel); + addTab(tabPane,actionPanel,"ActionScript",new ImageIcon(this.getClass().getClassLoader().getResource("com/jpexs/asdec/gui/graphics/as16.png"))); } menuDeobfuscation.setEnabled(false); } if (!shapes.isEmpty()) { - tabPane.addTab("Shapes", shapesTagPanel = new TagPanel(shapes, swf)); + addTab(tabPane,shapesTagPanel = new TagPanel(shapes, swf),"Shapes",new ImageIcon(this.getClass().getClassLoader().getResource("com/jpexs/asdec/gui/graphics/shape16.png"))); } if (!morphShapes.isEmpty()) { - tabPane.addTab("MorphShapes", morphshapesTagPanel = new TagPanel(morphShapes, swf)); + addTab(tabPane, morphshapesTagPanel = new TagPanel(morphShapes, swf),"MorphShapes",new ImageIcon(this.getClass().getClassLoader().getResource("com/jpexs/asdec/gui/graphics/morphshape16.png"))); } if (!images.isEmpty()) { - tabPane.addTab("Images", imagesTagPanel = new TagPanel(images, swf)); + addTab(tabPane,imagesTagPanel = new TagPanel(images, swf),"Images",new ImageIcon(this.getClass().getClassLoader().getResource("com/jpexs/asdec/gui/graphics/image16.png"))); } if (!sprites.isEmpty()) { - tabPane.addTab("Sprites", spritesTagPanel = new TagPanel(sprites, swf)); + addTab(tabPane, spritesTagPanel = new TagPanel(sprites, swf),"Sprites",new ImageIcon(this.getClass().getClassLoader().getResource("com/jpexs/asdec/gui/graphics/sprite16.png"))); } if (!fonts.isEmpty()) { - tabPane.addTab("Fonts", fontsTagPanel = new TagPanel(fonts, swf)); + addTab(tabPane,fontsTagPanel = new TagPanel(fonts, swf),"Fonts",new ImageIcon(this.getClass().getClassLoader().getResource("com/jpexs/asdec/gui/graphics/font16.png"))); } if (!texts.isEmpty()) { - tabPane.addTab("Texts", textsTagPanel = new TagPanel(texts, swf)); + addTab(tabPane,textsTagPanel = new TagPanel(texts, swf),"Texts",new ImageIcon(this.getClass().getClassLoader().getResource("com/jpexs/asdec/gui/graphics/text16.png"))); } if (!buttons.isEmpty()) { - tabPane.addTab("Buttons", buttonsTagPanel = new TagPanel(buttons, swf)); + addTab(tabPane, buttonsTagPanel = new TagPanel(buttons, swf),"Buttons",new ImageIcon(this.getClass().getClassLoader().getResource("com/jpexs/asdec/gui/graphics/button16.png"))); } - /*tabPane.addTab("Tags", new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(tagTree), new JScrollPane(fPanel)));*/ - - //tabPane.setTabPlacement(JTabbedPane.TOP); @@ -309,7 +320,7 @@ public class MainFrame extends JFrame implements ActionListener { statusPanel.setBorder(new BevelBorder(BevelBorder.LOWERED)); statusPanel.setLayout(new BorderLayout()); statusPanel.add(loadingPanel, BorderLayout.WEST); - statusPanel.add(statusLabel, BorderLayout.CENTER); + statusPanel.add(statusLabel, BorderLayout.CENTER); loadingPanel.setVisible(false); add(statusPanel, BorderLayout.SOUTH); View.centerScreen(this); @@ -706,10 +717,9 @@ public class MainFrame extends JFrame implements ActionListener { } if (e.getActionCommand().equals("RENAMEIDENTIFIERS")) { if (JOptionPane.showConfirmDialog(null, "Following procedure can damage SWF file which can be then unplayable.\r\nUSE IT ON YOUR OWN RISK. Do you want to continue?", "Warning", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.OK_OPTION) { - - Main.startWork("Renaming identifiers..."); - new SwingWorker(){ + Main.startWork("Renaming identifiers..."); + new SwingWorker() { @Override protected Object doInBackground() throws Exception { int cnt = 0; @@ -718,14 +728,12 @@ public class MainFrame extends JFrame implements ActionListener { } Main.stopWork(); JOptionPane.showMessageDialog(null, "Identifiers renamed: " + cnt); - abcPanel.reload(); + abcPanel.reload(); return true; } - - }.execute(); - - + + } } diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/as16.png b/trunk/src/com/jpexs/asdec/gui/graphics/as16.png new file mode 100644 index 000000000..fd5fa2834 Binary files /dev/null and b/trunk/src/com/jpexs/asdec/gui/graphics/as16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/button16.png b/trunk/src/com/jpexs/asdec/gui/graphics/button16.png new file mode 100644 index 000000000..e10f88049 Binary files /dev/null and b/trunk/src/com/jpexs/asdec/gui/graphics/button16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/exit16.png b/trunk/src/com/jpexs/asdec/gui/graphics/exit16.png index 2e430b2c7..dfd42e6f3 100644 Binary files a/trunk/src/com/jpexs/asdec/gui/graphics/exit16.png and b/trunk/src/com/jpexs/asdec/gui/graphics/exit16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/exit24.png b/trunk/src/com/jpexs/asdec/gui/graphics/exit24.png index 1cb6c08f2..58fdb2c1d 100644 Binary files a/trunk/src/com/jpexs/asdec/gui/graphics/exit24.png and b/trunk/src/com/jpexs/asdec/gui/graphics/exit24.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/exportas16.png b/trunk/src/com/jpexs/asdec/gui/graphics/exportas16.png deleted file mode 100644 index 25b2686db..000000000 Binary files a/trunk/src/com/jpexs/asdec/gui/graphics/exportas16.png and /dev/null differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/exportpc16.png b/trunk/src/com/jpexs/asdec/gui/graphics/exportpc16.png deleted file mode 100644 index 26a5d9d50..000000000 Binary files a/trunk/src/com/jpexs/asdec/gui/graphics/exportpc16.png and /dev/null differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/font16.png b/trunk/src/com/jpexs/asdec/gui/graphics/font16.png new file mode 100644 index 000000000..17774c02f Binary files /dev/null and b/trunk/src/com/jpexs/asdec/gui/graphics/font16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/image16.png b/trunk/src/com/jpexs/asdec/gui/graphics/image16.png new file mode 100644 index 000000000..81c0d8101 Binary files /dev/null and b/trunk/src/com/jpexs/asdec/gui/graphics/image16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/morphshape16.png b/trunk/src/com/jpexs/asdec/gui/graphics/morphshape16.png new file mode 100644 index 000000000..af2435ea0 Binary files /dev/null and b/trunk/src/com/jpexs/asdec/gui/graphics/morphshape16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/open16.png b/trunk/src/com/jpexs/asdec/gui/graphics/open16.png index 009f959db..aa2c99b1d 100644 Binary files a/trunk/src/com/jpexs/asdec/gui/graphics/open16.png and b/trunk/src/com/jpexs/asdec/gui/graphics/open16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/open24.png b/trunk/src/com/jpexs/asdec/gui/graphics/open24.png index be1b10b6d..15b696629 100644 Binary files a/trunk/src/com/jpexs/asdec/gui/graphics/open24.png and b/trunk/src/com/jpexs/asdec/gui/graphics/open24.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/pcode16.png b/trunk/src/com/jpexs/asdec/gui/graphics/pcode16.png new file mode 100644 index 000000000..38e9fc5bf Binary files /dev/null and b/trunk/src/com/jpexs/asdec/gui/graphics/pcode16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/proxy16.png b/trunk/src/com/jpexs/asdec/gui/graphics/proxy16.png index cc26966e0..4d1b247d0 100644 Binary files a/trunk/src/com/jpexs/asdec/gui/graphics/proxy16.png and b/trunk/src/com/jpexs/asdec/gui/graphics/proxy16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/proxy24.png b/trunk/src/com/jpexs/asdec/gui/graphics/proxy24.png index 00e7d8d5b..105db48f3 100644 Binary files a/trunk/src/com/jpexs/asdec/gui/graphics/proxy24.png and b/trunk/src/com/jpexs/asdec/gui/graphics/proxy24.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/proxy32.png b/trunk/src/com/jpexs/asdec/gui/graphics/proxy32.png index 7ccb71fea..2e3e55fce 100644 Binary files a/trunk/src/com/jpexs/asdec/gui/graphics/proxy32.png and b/trunk/src/com/jpexs/asdec/gui/graphics/proxy32.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/shape16.png b/trunk/src/com/jpexs/asdec/gui/graphics/shape16.png new file mode 100644 index 000000000..c1d9b7a60 Binary files /dev/null and b/trunk/src/com/jpexs/asdec/gui/graphics/shape16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/sprite16.png b/trunk/src/com/jpexs/asdec/gui/graphics/sprite16.png new file mode 100644 index 000000000..bbcaa5fb0 Binary files /dev/null and b/trunk/src/com/jpexs/asdec/gui/graphics/sprite16.png differ diff --git a/trunk/src/com/jpexs/asdec/gui/graphics/text16.png b/trunk/src/com/jpexs/asdec/gui/graphics/text16.png new file mode 100644 index 000000000..5080b323e Binary files /dev/null and b/trunk/src/com/jpexs/asdec/gui/graphics/text16.png differ