|
|
@ -1,8 +1,11 @@ |
|
|
|
package com.fr.design.dialog; |
|
|
|
package com.fr.design.dialog; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fine.theme.utils.FineUIScale; |
|
|
|
import com.fr.common.annotations.Open; |
|
|
|
import com.fr.common.annotations.Open; |
|
|
|
|
|
|
|
|
|
|
|
import java.awt.*; |
|
|
|
import java.awt.Dialog; |
|
|
|
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
|
|
|
import java.awt.Frame; |
|
|
|
|
|
|
|
|
|
|
|
@Open |
|
|
|
@Open |
|
|
|
public abstract class BasicDialog extends UIDialog { |
|
|
|
public abstract class BasicDialog extends UIDialog { |
|
|
@ -12,7 +15,7 @@ public abstract class BasicDialog extends UIDialog { |
|
|
|
public static final Dimension LARGE = new Dimension(900, 600); |
|
|
|
public static final Dimension LARGE = new Dimension(900, 600); |
|
|
|
public static final Dimension CHART = new Dimension(760, 560); |
|
|
|
public static final Dimension CHART = new Dimension(760, 560); |
|
|
|
public static final Dimension MAP_SIZE = new Dimension(760, 450); |
|
|
|
public static final Dimension MAP_SIZE = new Dimension(760, 450); |
|
|
|
public static final Dimension UPDATE_ONLINE_SIZE = new Dimension(600,300); |
|
|
|
public static final Dimension UPDATE_ONLINE_SIZE = new Dimension(600, 300); |
|
|
|
public static final Dimension TOOLBAR_SIZE = new Dimension(660, 327); |
|
|
|
public static final Dimension TOOLBAR_SIZE = new Dimension(660, 327); |
|
|
|
|
|
|
|
|
|
|
|
public BasicDialog(Frame parent) { |
|
|
|
public BasicDialog(Frame parent) { |
|
|
@ -40,12 +43,23 @@ public abstract class BasicDialog extends UIDialog { |
|
|
|
super(parent, pane, isNeedButtonPane); |
|
|
|
super(parent, pane, isNeedButtonPane); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 设置对话框大小,方法内已进行dpi适配,传参无需考虑dpi适配 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param d 对话框尺寸 |
|
|
|
|
|
|
|
*/ |
|
|
|
protected void setBasicDialogSize(Dimension d) { |
|
|
|
protected void setBasicDialogSize(Dimension d) { |
|
|
|
super.setSize(d.width, d.height); |
|
|
|
super.setSize(FineUIScale.scale(d.width), FineUIScale.scale(d.height)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 设置对话框大小,方法内已进行dpi适配,传参无需考虑dpi适配 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param w 宽度 |
|
|
|
|
|
|
|
* @param h 高度 |
|
|
|
|
|
|
|
*/ |
|
|
|
protected void setBasicDialogSize(int w, int h) { |
|
|
|
protected void setBasicDialogSize(int w, int h) { |
|
|
|
super.setSize(w, h); |
|
|
|
setBasicDialogSize(new Dimension(w, h)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|