stupid windows is stupid
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@566 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
72a7ef85fa
commit
61a5d322ba
1 changed files with 8 additions and 5 deletions
|
@ -6,6 +6,7 @@ import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.ComponentAdapter;
|
import java.awt.event.ComponentAdapter;
|
||||||
import java.awt.event.ComponentEvent;
|
import java.awt.event.ComponentEvent;
|
||||||
|
import java.awt.event.ComponentListener;
|
||||||
import java.awt.event.WindowAdapter;
|
import java.awt.event.WindowAdapter;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -539,13 +540,15 @@ public class View extends JFrame implements IView {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showQuitWarningPanel(boolean show) {
|
public void showQuitWarningPanel(boolean show) {
|
||||||
if (show) {
|
|
||||||
setEnabled(true);
|
|
||||||
}
|
|
||||||
quitWarningFrame.setLocationRelativeTo(this);
|
quitWarningFrame.setLocationRelativeTo(this);
|
||||||
quitWarningFrame.setVisible(show);
|
quitWarningFrame.setVisible(show);
|
||||||
if (!show) {
|
|
||||||
setEnabled(false);
|
if (System.getProperty("os.name").startsWith("Windows")) {
|
||||||
|
// disabling is broken under windows
|
||||||
|
layeredPane.setVisible(!show);
|
||||||
|
menuBar.setVisible(!show);
|
||||||
|
} else {
|
||||||
|
setEnabled(!show);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue