mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 23:10:45 +00:00
@@ -16,91 +16,91 @@ import javax.swing.JLabel;
|
||||
*/
|
||||
public class ExportDialog extends JDialog {
|
||||
|
||||
boolean cancelled = false;
|
||||
String options[][] = {
|
||||
{"SVG"},
|
||||
{"PNG/JPEG"},
|
||||
{"FLV (No audio)"},
|
||||
{"MP3/FLV", "FLV (Audio only)"},
|
||||
{"AS", "PCODE"}
|
||||
};
|
||||
String optionNames[] = {
|
||||
"Shapes",
|
||||
"Images",
|
||||
"Movies",
|
||||
"Sounds",
|
||||
"ActionScript"
|
||||
};
|
||||
public static final int OPTION_SHAPES = 0;
|
||||
public static final int OPTION_IMAGES = 1;
|
||||
public static final int OPTION_MOVIES = 2;
|
||||
public static final int OPTION_SOUNDS = 3;
|
||||
public static final int OPTION_ACTIONSCRIPT = 4;
|
||||
private JComboBox combos[];
|
||||
boolean cancelled = false;
|
||||
String options[][] = {
|
||||
{"SVG"},
|
||||
{"PNG/JPEG"},
|
||||
{"FLV (No audio)"},
|
||||
{"MP3/FLV", "FLV (Audio only)"},
|
||||
{"AS", "PCODE"}
|
||||
};
|
||||
String optionNames[] = {
|
||||
"Shapes",
|
||||
"Images",
|
||||
"Movies",
|
||||
"Sounds",
|
||||
"ActionScript"
|
||||
};
|
||||
public static final int OPTION_SHAPES = 0;
|
||||
public static final int OPTION_IMAGES = 1;
|
||||
public static final int OPTION_MOVIES = 2;
|
||||
public static final int OPTION_SOUNDS = 3;
|
||||
public static final int OPTION_ACTIONSCRIPT = 4;
|
||||
private JComboBox combos[];
|
||||
|
||||
public int getOption(int index) {
|
||||
return combos[index].getSelectedIndex();
|
||||
}
|
||||
public int getOption(int index) {
|
||||
return combos[index].getSelectedIndex();
|
||||
}
|
||||
|
||||
public ExportDialog() {
|
||||
setTitle("Export...");
|
||||
addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
cancelled = true;
|
||||
}
|
||||
});
|
||||
public ExportDialog() {
|
||||
setTitle("Export...");
|
||||
addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
cancelled = true;
|
||||
}
|
||||
});
|
||||
|
||||
setLayout(null);
|
||||
setLayout(null);
|
||||
|
||||
Container cnt = getContentPane();
|
||||
combos = new JComboBox[optionNames.length];
|
||||
int top = 10;
|
||||
for (int i = 0; i < optionNames.length; i++) {
|
||||
JLabel lab = new JLabel(optionNames[i]);
|
||||
lab.setBounds(10, top, 60, 25);
|
||||
cnt.add(lab);
|
||||
combos[i] = new JComboBox(options[i]);
|
||||
combos[i].setBounds(75, top, 105, 25);
|
||||
cnt.add(combos[i]);
|
||||
top += 25;
|
||||
}
|
||||
top += 10;
|
||||
Container cnt = getContentPane();
|
||||
combos = new JComboBox[optionNames.length];
|
||||
int top = 10;
|
||||
for (int i = 0; i < optionNames.length; i++) {
|
||||
JLabel lab = new JLabel(optionNames[i]);
|
||||
lab.setBounds(10, top, 60, 25);
|
||||
cnt.add(lab);
|
||||
combos[i] = new JComboBox(options[i]);
|
||||
combos[i].setBounds(75, top, 105, 25);
|
||||
cnt.add(combos[i]);
|
||||
top += 25;
|
||||
}
|
||||
top += 10;
|
||||
|
||||
|
||||
JButton okButton = new JButton("OK");
|
||||
okButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
setVisible(false);
|
||||
}
|
||||
});
|
||||
okButton.setBounds(25, top, 75, 25);
|
||||
JButton okButton = new JButton("OK");
|
||||
okButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
setVisible(false);
|
||||
}
|
||||
});
|
||||
okButton.setBounds(25, top, 75, 25);
|
||||
|
||||
JButton cancelButton = new JButton("Cancel");
|
||||
cancelButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
cancelled = true;
|
||||
setVisible(false);
|
||||
}
|
||||
});
|
||||
cancelButton.setBounds(100, top, 75, 25);
|
||||
JButton cancelButton = new JButton("Cancel");
|
||||
cancelButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
cancelled = true;
|
||||
setVisible(false);
|
||||
}
|
||||
});
|
||||
cancelButton.setBounds(100, top, 75, 25);
|
||||
|
||||
cnt.add(okButton);
|
||||
cnt.add(cancelButton);
|
||||
setSize(210, top + 70);
|
||||
View.centerScreen(this);
|
||||
View.setWindowIcon(this);
|
||||
getRootPane().setDefaultButton(okButton);
|
||||
setModal(true);
|
||||
}
|
||||
cnt.add(okButton);
|
||||
cnt.add(cancelButton);
|
||||
setSize(210, top + 70);
|
||||
View.centerScreen(this);
|
||||
View.setWindowIcon(this);
|
||||
getRootPane().setDefaultButton(okButton);
|
||||
setModal(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisible(boolean b) {
|
||||
if (b) {
|
||||
cancelled = false;
|
||||
}
|
||||
super.setVisible(b);
|
||||
}
|
||||
@Override
|
||||
public void setVisible(boolean b) {
|
||||
if (b) {
|
||||
cancelled = false;
|
||||
}
|
||||
super.setVisible(b);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user