forked from fanruan/finekit
richie
5 years ago
10 changed files with 179 additions and 24 deletions
@ -1,4 +1,4 @@
|
||||
package com.fanruan.api.design.ui.container; |
||||
|
||||
public abstract class BasicBeanPane extends com.fr.design.beans.BasicBeanPane{ |
||||
public abstract class BasicBeanPane<T> extends com.fr.design.beans.BasicBeanPane<T> { |
||||
} |
||||
|
@ -1,5 +1,98 @@
|
||||
package com.fanruan.api.design.ui.container; |
||||
|
||||
|
||||
import com.fanruan.api.design.util.GUICoreKit; |
||||
import com.fr.design.dialog.DialogActionListener; |
||||
import com.fr.design.dialog.UIDialog; |
||||
|
||||
import java.awt.*; |
||||
|
||||
public abstract class BasicPane extends com.fr.design.dialog.BasicPane { |
||||
|
||||
/** |
||||
* 显示窗口 |
||||
* |
||||
* @param window 窗口 |
||||
* @return 对话框 |
||||
*/ |
||||
public BasicDialog showWindow(Window window) { |
||||
return this.showWindow(window, null); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 显示窗口 |
||||
* |
||||
* @param window 窗口 |
||||
* @param l 对话框监听器 |
||||
* @return 对话框 |
||||
*/ |
||||
public BasicDialog showWindow(Window window, DialogActionListener l) { |
||||
return showWindowWithCustomSize(window, l, BasicDialog.DEFAULT); |
||||
} |
||||
|
||||
public BasicDialog showWindowWithCustomSize(Window window, DialogActionListener l, Dimension dimension) { |
||||
BasicDialog dg; |
||||
if (window instanceof Frame) { |
||||
dg = new DIALOG((Frame) window); |
||||
} else { |
||||
dg = new DIALOG((Dialog) window); |
||||
} |
||||
|
||||
if (l != null) { |
||||
dg.addDialogActionListener(l); |
||||
} |
||||
dg.setBasicDialogSize(dimension); |
||||
GUICoreKit.centerWindow(dg); |
||||
dg.setResizable(false); |
||||
return dg; |
||||
} |
||||
|
||||
private class DIALOG extends BasicDialog { |
||||
public DIALOG(Frame parent) { |
||||
super(parent, BasicPane.this); |
||||
this.setTitle(BasicPane.this.title4PopupWindow()); |
||||
} |
||||
|
||||
public DIALOG(Dialog parent) { |
||||
super(parent, BasicPane.this); |
||||
this.setTitle(BasicPane.this.title4PopupWindow()); |
||||
} |
||||
|
||||
|
||||
public DIALOG(Frame parent, boolean isNeedButtonPane) { |
||||
super(parent, BasicPane.this, isNeedButtonPane); |
||||
this.setTitle(BasicPane.this.title4PopupWindow()); |
||||
} |
||||
|
||||
|
||||
public DIALOG(Dialog parent, boolean isNeedButtonPane) { |
||||
super(parent, BasicPane.this, isNeedButtonPane); |
||||
this.setTitle(BasicPane.this.title4PopupWindow()); |
||||
} |
||||
|
||||
|
||||
public void checkValid() throws Exception { |
||||
BasicPane.this.checkValid(); |
||||
} |
||||
|
||||
} |
||||
|
||||
private class UnsizedDialog extends UIDialog { |
||||
|
||||
public UnsizedDialog(Frame parent) { |
||||
super(parent, BasicPane.this); |
||||
this.setTitle(BasicPane.this.title4PopupWindow()); |
||||
} |
||||
|
||||
public UnsizedDialog(Dialog parent) { |
||||
super(parent, BasicPane.this); |
||||
this.setTitle(BasicPane.this.title4PopupWindow()); |
||||
} |
||||
|
||||
|
||||
public void checkValid() throws Exception { |
||||
BasicPane.this.checkValid(); |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,4 +1,15 @@
|
||||
package com.fanruan.api.err; |
||||
|
||||
/** |
||||
* 公式计算异常 |
||||
*/ |
||||
public class UtilEvalError extends com.fr.stable.UtilEvalError { |
||||
|
||||
public UtilEvalError() { |
||||
|
||||
} |
||||
|
||||
public UtilEvalError(String message) { |
||||
super(message); |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue