Skip to content
Snippets Groups Projects
Commit eb0a803e authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

prefer using WindowSwingUtils to WindowUtils

parent 4a909480
Branches
Tags
No related merge requests found
......@@ -17,7 +17,7 @@ import fr.esrf.TangoApi.DeviceAttribute;
import fr.soleil.bean.diffractometer.gui.util.TangoConstants;
import fr.soleil.lib.project.ICancelable;
import fr.soleil.lib.project.ObjectUtils;
import fr.soleil.lib.project.awt.WindowUtils;
import fr.soleil.lib.project.swing.WindowSwingUtils;
import fr.soleil.lib.project.swing.dialog.ProgressDialog;
public abstract class ADoubleMatrixAttributeTableModel extends AbstractTableModel implements TangoConstants {
......@@ -86,7 +86,7 @@ public abstract class ADoubleMatrixAttributeTableModel extends AbstractTableMode
protected ProgressDialog getProgressDialog() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(
WindowUtils.getWindowForComponent(ObjectUtils.recoverObject(parentRef)));
WindowSwingUtils.getWindowForComponent(ObjectUtils.recoverObject(parentRef)));
progressDialog.setTitle(writingAttribute);
progressDialog.setMainMessage(writingAttribute);
progressDialog.setProgressIndeterminate(true);
......
......@@ -14,6 +14,7 @@ package fr.soleil.bean.diffractometer.gui.crystal;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.text.NumberFormat;
......@@ -269,26 +270,6 @@ public class LatticeDialog extends javax.swing.JDialog {
dispose();
}
/**
* @param args
* the command line arguments
*/
public static void main(final String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
final LatticeDialog dialog = new LatticeDialog(new javax.swing.JFrame(), true);
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosing(final java.awt.event.WindowEvent e) {
System.exit(0);
}
});
dialog.setVisible(true);
}
});
}
/**
* @return Returns the aValue.
*/
......@@ -346,4 +327,19 @@ public class LatticeDialog extends javax.swing.JDialog {
}
}
public static void main(final String args[]) {
java.awt.EventQueue.invokeLater(() -> {
final LatticeDialog dialog = new LatticeDialog(null, true);
// XXX dialog.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE) is not supported, at least in Java 8
dialog.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(final WindowEvent e) {
System.exit(0);
}
});
dialog.setVisible(true);
});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment