Reformating to fix checkstyle.

This commit is contained in:
Jindra Petřík
2024-08-07 18:33:17 +02:00
parent a5d3ce4f9b
commit f3da12e032
2432 changed files with 39110 additions and 44808 deletions

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 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,17 +32,17 @@ import javax.swing.JPanel;
import javax.swing.JScrollPane;
/**
*
* @author JPEXS
*/
public class PathResolvingDialog extends AppDialog {
private final JEditorPane editor;
private final JButton okButton = new JButton(translate("button.ok"));
private final JButton cancelButton = new JButton(translate("button.cancel"));
private int result = ERROR_OPTION;
private int result = ERROR_OPTION;
private final SWF swf;
public PathResolvingDialog(SWF swf, Window owner) {
super(owner);
setTitle(translate("dialog.title"));
@@ -50,25 +50,25 @@ public class PathResolvingDialog extends AppDialog {
Container cnt = getContentPane();
cnt.setLayout(new BorderLayout());
cnt.add(new JLabel("<html>" + translate("info") + "</html>"), BorderLayout.NORTH);
editor = new JEditorPane();
editor = new JEditorPane();
cnt.add(new JScrollPane(editor), BorderLayout.CENTER);
editor.setContentType("text/plain");
okButton.addActionListener(this::okButtonActionPerformed);
cancelButton.addActionListener(this::cancelButtonActionPerformed);
JPanel buttonsPanel = new JPanel(new FlowLayout());
buttonsPanel.add(okButton);
buttonsPanel.add(cancelButton);
cnt.add(buttonsPanel, BorderLayout.SOUTH);
SwfSpecificCustomConfiguration cc = Configuration.getSwfSpecificCustomConfiguration(swf.getShortPathTitle());
String pathResolving = "";
if (cc != null) {
pathResolving = cc.getCustomData(CustomConfigurationKeys.KEY_PATH_RESOLVING, "");
}
editor.setText(pathResolving);
setSize(800, 600);
View.centerScreen(this);
View.setWindowIcon(this);
@@ -76,7 +76,7 @@ public class PathResolvingDialog extends AppDialog {
setModal(true);
this.swf = swf;
}
private void okButtonActionPerformed(ActionEvent evt) {
result = OK_OPTION;
SwfSpecificCustomConfiguration cc = Configuration.getOrCreateSwfSpecificCustomConfiguration(swf.getShortPathTitle());
@@ -86,12 +86,12 @@ public class PathResolvingDialog extends AppDialog {
cc.setCustomData(CustomConfigurationKeys.KEY_PATH_RESOLVING, txt);
setVisible(false);
}
private void cancelButtonActionPerformed(ActionEvent evt) {
result = CANCEL_OPTION;
setVisible(false);
setVisible(false);
}
public int showDialog() {
setVisible(true);
return result;