mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-21 23:31:11 +00:00
force closing dialog correctly
This commit is contained in:
parent
104bb5b222
commit
0f1e55191a
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: CreateSimDialog.java,v 1.4 2007/03/22 22:35:06 fros4943 Exp $
|
||||
* $Id: CreateSimDialog.java,v 1.5 2007/03/22 23:06:26 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.dialogs;
|
||||
@ -79,6 +79,31 @@ public class CreateSimDialog extends JDialog {
|
||||
public static boolean showDialog(Frame parentFrame, Simulation simulationToConfigure) {
|
||||
final CreateSimDialog myDialog = new CreateSimDialog(parentFrame, simulationToConfigure.getGUI());
|
||||
|
||||
myDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
|
||||
myDialog.addWindowListener(new WindowListener() {
|
||||
public void windowDeactivated(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowIconified(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowDeiconified(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowOpened(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowClosed(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowActivated(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowClosing(WindowEvent e) {
|
||||
myDialog.cancelButton.doClick();
|
||||
}
|
||||
});
|
||||
|
||||
myDialog.mySimulation = simulationToConfigure;
|
||||
|
||||
// Set title
|
||||
|
Loading…
x
Reference in New Issue
Block a user