mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
formatting fixes
This commit is contained in:
@@ -2029,21 +2029,16 @@ public class JavaEditor extends Editor {
|
||||
try {
|
||||
if (sketch.isModified() && !sketch.isUntitled()) {
|
||||
if (JavaMode.autoSavePromptEnabled) {
|
||||
final JDialog autoSaveDialog = new JDialog(
|
||||
base.getActiveEditor(), this.getSketch().getName(),
|
||||
true);
|
||||
final JDialog autoSaveDialog =
|
||||
new JDialog(base.getActiveEditor(), getSketch().getName(), true);
|
||||
Container container = autoSaveDialog.getContentPane();
|
||||
|
||||
JPanel panelMain = new JPanel();
|
||||
panelMain.setBorder(BorderFactory.createEmptyBorder(4, 0,
|
||||
2, 2));
|
||||
panelMain.setLayout(new BoxLayout(panelMain,
|
||||
BoxLayout.PAGE_AXIS));
|
||||
panelMain.setBorder(BorderFactory.createEmptyBorder(4, 0, 2, 2));
|
||||
panelMain.setLayout(new BoxLayout(panelMain, BoxLayout.PAGE_AXIS));
|
||||
|
||||
JPanel panelLabel = new JPanel(new FlowLayout(
|
||||
FlowLayout.LEFT));
|
||||
JLabel label = new JLabel(
|
||||
"<html><body> There are unsaved"
|
||||
JPanel panelLabel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||
JLabel label = new JLabel("<html><body> There are unsaved"
|
||||
+ " changes in your sketch.<br />"
|
||||
+ " Do you want to save it before"
|
||||
+ " running? </body></html>");
|
||||
@@ -2051,14 +2046,11 @@ public class JavaEditor extends Editor {
|
||||
Font.PLAIN, label.getFont().getSize() + 1));
|
||||
panelLabel.add(label);
|
||||
panelMain.add(panelLabel);
|
||||
final JCheckBox dontRedisplay = new JCheckBox(
|
||||
"Remember this decision");
|
||||
final JCheckBox dontRedisplay = new JCheckBox("Remember this decision");
|
||||
JPanel panelButtons = new JPanel(new FlowLayout(FlowLayout.CENTER, 8, 2));
|
||||
|
||||
JPanel panelButtons = new JPanel(new FlowLayout(
|
||||
FlowLayout.CENTER, 8, 2));
|
||||
JButton btnRunSave = new JButton("Save and Run");
|
||||
btnRunSave.addActionListener(new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleSave(true);
|
||||
@@ -2071,9 +2063,9 @@ public class JavaEditor extends Editor {
|
||||
}
|
||||
});
|
||||
panelButtons.add(btnRunSave);
|
||||
|
||||
JButton btnRunNoSave = new JButton("Run, Don't Save");
|
||||
btnRunNoSave.addActionListener(new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (dontRedisplay.isSelected()) {
|
||||
@@ -2088,8 +2080,7 @@ public class JavaEditor extends Editor {
|
||||
panelMain.add(panelButtons);
|
||||
|
||||
JPanel panelCheck = new JPanel();
|
||||
panelCheck
|
||||
.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
|
||||
panelCheck.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
|
||||
panelCheck.add(dontRedisplay);
|
||||
panelMain.add(panelCheck);
|
||||
|
||||
@@ -2107,7 +2098,6 @@ public class JavaEditor extends Editor {
|
||||
} catch (Exception e) {
|
||||
statusError(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user