Browse Source

REPORT-875。将setBasicDialogSize方法的访问权限改回protected

master
plough 8 years ago
parent
commit
c0892fd1f7
  1. 6
      designer_base/src/com/fr/design/actions/file/PreferencePane.java
  2. 4
      designer_base/src/com/fr/design/dialog/BasicDialog.java
  3. 13
      designer_base/src/com/fr/design/dialog/BasicPane.java

6
designer_base/src/com/fr/design/actions/file/PreferencePane.java

@ -646,11 +646,7 @@ public class PreferencePane extends BasicPane {
if (l != null) { if (l != null) {
dg.addDialogActionListener(l); dg.addDialogActionListener(l);
} }
return showWindow(dg);
dg.setBasicDialogSize(BasicDialog.DEFAULT);
GUICoreUtils.centerWindow(dg);
dg.setResizable(false);
return dg;
} }
private class DIALOG extends BasicDialog { private class DIALOG extends BasicDialog {

4
designer_base/src/com/fr/design/dialog/BasicDialog.java

@ -39,11 +39,11 @@ public abstract class BasicDialog extends UIDialog {
super(parent, pane, isNeedButtonPane); super(parent, pane, isNeedButtonPane);
} }
public void setBasicDialogSize(Dimension d) { protected void setBasicDialogSize(Dimension d) {
super.setSize(d.width, d.height); super.setSize(d.width, d.height);
} }
public void setBasicDialogSize(int w, int h) { protected void setBasicDialogSize(int w, int h) {
super.setSize(w, h); super.setSize(w, h);
} }

13
designer_base/src/com/fr/design/dialog/BasicPane.java

@ -52,6 +52,19 @@ public abstract class BasicPane extends JPanel {
return dg; return dg;
} }
/**
* 显示窗口
*
* @param dg 已添加监听器的对话框实例
* @return 对话框
*/
public BasicDialog showWindow(BasicDialog dg) {
dg.setBasicDialogSize(BasicDialog.DEFAULT);
GUICoreUtils.centerWindow(dg);
dg.setResizable(false);
return dg;
}
/** /**
* 显示窗口 * 显示窗口
* *

Loading…
Cancel
Save