|
|
|
@ -627,46 +627,11 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
return l; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 显示窗口 |
|
|
|
|
* |
|
|
|
|
* @param window 窗口 |
|
|
|
|
* @param l 对话框监听器 |
|
|
|
|
* @return 对话框 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public BasicDialog showWindow(Window window, DialogActionListener l) { |
|
|
|
|
BasicDialog dg; |
|
|
|
|
if (window instanceof Frame) { |
|
|
|
|
dg = new DIALOG((Frame) window); |
|
|
|
|
} else { |
|
|
|
|
dg = new DIALOG((Dialog) window); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (l != null) { |
|
|
|
|
dg.addDialogActionListener(l); |
|
|
|
|
} |
|
|
|
|
return showWindow(dg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class DIALOG extends BasicDialog { |
|
|
|
|
public DIALOG(Frame parent) { |
|
|
|
|
super(parent, PreferencePane.this); |
|
|
|
|
this.setTitle(PreferencePane.this.title4PopupWindow()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public DIALOG(Dialog parent) { |
|
|
|
|
super(parent, PreferencePane.this); |
|
|
|
|
this.setTitle(PreferencePane.this.title4PopupWindow()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 确定操作 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public BasicDialog showWindow(Window window) { |
|
|
|
|
return showWindow(window, new DialogActionAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void doOK() { |
|
|
|
|
super.doOK(); |
|
|
|
|
public void doOk() { |
|
|
|
|
if (languageComboBox.getSelectedIndex() != designerEnvLanguageIndex) { |
|
|
|
|
int rv = JOptionPane.showOptionDialog( |
|
|
|
|
null, |
|
|
|
@ -683,13 +648,6 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Check valid. |
|
|
|
|
*/ |
|
|
|
|
public void checkValid() throws Exception { |
|
|
|
|
PreferencePane.this.checkValid(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |