mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-07 22:35:06 +00:00
asX.swfs added to recompile test, actionpanel initalization shoud be called from UI thread, other small fixes
This commit is contained in:
@@ -54,15 +54,13 @@ public class AboutDialog extends AppDialog {
|
||||
//setSize(new Dimension(300, 320));
|
||||
setTitle(translate("dialog.title"));
|
||||
|
||||
JPanel twoPanes=new JPanel();
|
||||
JPanel twoPanes = new JPanel();
|
||||
twoPanes.setLayout(new BoxLayout(twoPanes, BoxLayout.X_AXIS));
|
||||
|
||||
|
||||
Container cnt = getContentPane();
|
||||
JPanel cp = new JPanel();
|
||||
cp.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
|
||||
cnt.setLayout(new BorderLayout());
|
||||
|
||||
|
||||
|
||||
JPanel appNamePanel = new JPanel(new FlowLayout());
|
||||
JLabel jpLabel = new JLabel("JPEXS");
|
||||
@@ -85,27 +83,24 @@ public class AboutDialog extends AppDialog {
|
||||
decLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
appNamePanel.add(decLabel);
|
||||
appNamePanel.setAlignmentX(0.5f);
|
||||
|
||||
|
||||
|
||||
cp = new JPanel();
|
||||
cp.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
|
||||
cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS));
|
||||
cp.add(appNamePanel);
|
||||
JLabel verLabel = new JLabel(translate("version") + " " + ApplicationInfo.version);
|
||||
verLabel.setAlignmentX(0.5f);
|
||||
JLabel verLabel = new JLabel(translate("version") + " " + ApplicationInfo.version);
|
||||
verLabel.setAlignmentX(0.5f);
|
||||
//verLabel.setPreferredSize(new Dimension(300, 15));
|
||||
verLabel.setFont(new Font("Tahoma", Font.BOLD, 15));
|
||||
verLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
cp.add(verLabel);
|
||||
|
||||
|
||||
cnt.add(cp,BorderLayout.NORTH);
|
||||
cnt.add(cp, BorderLayout.NORTH);
|
||||
|
||||
cp = new JPanel();
|
||||
cp.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
|
||||
cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS));
|
||||
|
||||
|
||||
|
||||
JLabel byLabel = new JLabel(translate("by"));
|
||||
byLabel.setAlignmentX(0.5f);
|
||||
byLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
@@ -124,7 +119,7 @@ public class AboutDialog extends AppDialog {
|
||||
//dateLabel.setPreferredSize(new Dimension(300, 10));
|
||||
dateLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
cp.add(dateLabel);
|
||||
|
||||
|
||||
LinkLabel wwwLabel = new LinkLabel(ApplicationInfo.PROJECT_PAGE);
|
||||
wwwLabel.setAlignmentX(0.5f);
|
||||
wwwLabel.setForeground(Color.blue);
|
||||
@@ -148,36 +143,31 @@ public class AboutDialog extends AppDialog {
|
||||
developersLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
developersLabel.setFont(developersLabel.getFont().deriveFont(Font.BOLD));
|
||||
cp.add(developersLabel);
|
||||
|
||||
|
||||
|
||||
for (String c : DEVELOPERS) {
|
||||
JLabel developerNameLabel = new JLabel(c);
|
||||
developerNameLabel.setAlignmentX(0.5f);
|
||||
developerNameLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
cp.add(developerNameLabel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cp.setAlignmentY(0);
|
||||
twoPanes.add(cp);
|
||||
cp = new JPanel();
|
||||
cp.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
|
||||
cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS));
|
||||
|
||||
cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS));
|
||||
|
||||
JLabel translatorsLabel = new JLabel(translate("translators"));
|
||||
translatorsLabel.setAlignmentX(0.5f);
|
||||
translatorsLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
translatorsLabel.setFont(translatorsLabel.getFont().deriveFont(Font.BOLD));
|
||||
cp.add(translatorsLabel);
|
||||
|
||||
List<String> translators=new ArrayList<>();
|
||||
for(String code:SelectLanguageDialog.languages){
|
||||
|
||||
List<String> translators = new ArrayList<>();
|
||||
for (String code : SelectLanguageDialog.languages) {
|
||||
Locale l = Locale.forLanguageTag(code.equals("en") ? "" : code);
|
||||
ResourceBundle b = ResourceBundle.getBundle(AppStrings.getResourcePath(AboutDialog.class),l);
|
||||
translators.add(Locale.forLanguageTag(code).getDisplayName()+" - "+b.getString("translation.author"));
|
||||
ResourceBundle b = ResourceBundle.getBundle(AppStrings.getResourcePath(AboutDialog.class), l);
|
||||
translators.add(Locale.forLanguageTag(code).getDisplayName() + " - " + b.getString("translation.author"));
|
||||
}
|
||||
for (String c : translators) {
|
||||
JLabel translatorName = new JLabel(c);
|
||||
@@ -189,10 +179,10 @@ public class AboutDialog extends AppDialog {
|
||||
cp.add(Box.createVerticalStrut(10));
|
||||
cp.setAlignmentY(0);
|
||||
twoPanes.add(cp);
|
||||
|
||||
|
||||
cnt.add(twoPanes, BorderLayout.CENTER);
|
||||
cp = new JPanel(new FlowLayout());
|
||||
cnt.add(cp,BorderLayout.SOUTH);
|
||||
cnt.add(cp, BorderLayout.SOUTH);
|
||||
JButton okButton = new JButton(translate("button.ok"));
|
||||
okButton.setAlignmentX(0.5f);
|
||||
cp.add(okButton);
|
||||
@@ -207,6 +197,6 @@ public class AboutDialog extends AppDialog {
|
||||
View.setWindowIcon(this);
|
||||
setResizable(false);
|
||||
pack();
|
||||
View.centerScreen(this);
|
||||
View.centerScreen(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,11 +136,9 @@ import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FilenameFilter;
|
||||
@@ -158,7 +156,6 @@ import java.util.concurrent.CancellationException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.sound.sampled.LineUnavailableException;
|
||||
import javax.sound.sampled.UnsupportedAudioFileException;
|
||||
import javax.swing.Box;
|
||||
@@ -185,7 +182,6 @@ import javax.swing.event.TreeSelectionListener;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
import javax.swing.plaf.basic.BasicTreeUI;
|
||||
import javax.swing.tree.TreePath;
|
||||
import org.monte.media.io.ByteArrayImageInputStream;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -611,8 +607,14 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
|
||||
private void ensureActionPanel() {
|
||||
if (actionPanel == null) {
|
||||
actionPanel = new ActionPanel(this);
|
||||
displayPanel.add(actionPanel, CARDACTIONSCRIPTPANEL);
|
||||
final MainPanel diz = this;
|
||||
View.execInEventDispatch(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
actionPanel = new ActionPanel(diz);
|
||||
displayPanel.add(actionPanel, CARDACTIONSCRIPTPANEL);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1098,7 +1100,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void searchAs() {
|
||||
if (searchDialog == null) {
|
||||
searchDialog = new SearchDialog(getMainFrame().getWindow());
|
||||
@@ -1900,8 +1902,8 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
if (selectedFile != null) {
|
||||
Configuration.lastOpenDir.set(Helper.fixDialogFile(selectedFile).getParentFile().getAbsolutePath());
|
||||
File selfile = Helper.fixDialogFile(selectedFile);
|
||||
byte[] data = Helper.readFile(selfile.getAbsolutePath());
|
||||
try {
|
||||
byte[] data = Helper.readFile(selfile.getAbsolutePath());
|
||||
try {
|
||||
Tag newTag = new ShapeImporter().importImage(st, data);
|
||||
if (newTag != null) {
|
||||
refreshTree();
|
||||
|
||||
@@ -44,8 +44,7 @@ public class SelectLanguageDialog extends AppDialog implements ActionListener {
|
||||
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() {
|
||||
setSize(350, 130);
|
||||
Container cnt1 = getContentPane();
|
||||
|
||||
@@ -491,7 +491,7 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe
|
||||
Logger.getLogger(ProxyFrame.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
tableModel.setRowCount(0);
|
||||
tableModel.setRowCount(0);
|
||||
reps.clear();
|
||||
break;
|
||||
case ACTION_REMOVE:
|
||||
|
||||
Reference in New Issue
Block a user