Browse Source
Merge in DESIGN/design from ~HARRISON/design:release/11.0 to release/11.0 * commit '9d9551b7666b2509a5683f740dfba18210fc2700': REPORT-85210 && REPORT-85293 1-加载条样式优化 2-启动异常报错优化 3-给异步加载 envmanager 提供配置release/11.0
Harrison-刘珂
2 years ago
5 changed files with 113 additions and 18 deletions
@ -0,0 +1,55 @@
|
||||
package com.fr.design.gui.iprogressbar; |
||||
|
||||
import com.fr.design.utils.DevUtils; |
||||
|
||||
import java.awt.Dimension; |
||||
import java.awt.Frame; |
||||
import java.util.function.Consumer; |
||||
|
||||
/** |
||||
* @author Harrison |
||||
* @version 11.0 |
||||
* Created by Harrison on 2022/11/23 |
||||
*/ |
||||
public class ProgressDialogTest { |
||||
|
||||
public static void main(String[] args) { |
||||
|
||||
mockInitSize(); |
||||
} |
||||
|
||||
/** |
||||
* 模拟 frame 的大小未初始化好的情况 |
||||
*/ |
||||
private static void mockNotInitSize() { |
||||
|
||||
DevUtils.show(new Consumer<Frame>() { |
||||
@Override |
||||
public void accept(Frame frame) { |
||||
|
||||
Dimension origin = frame.getSize(); |
||||
frame.setSize(0, 0); |
||||
ProgressDialog progressDialog = new ProgressDialog(frame); |
||||
progressDialog.setVisible(true); |
||||
progressDialog.updateLoadingText("test"); |
||||
frame.setSize(origin); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 模拟 frame 的大小初始化好的情况 |
||||
*/ |
||||
private static void mockInitSize() { |
||||
|
||||
DevUtils.show(new Consumer<Frame>() { |
||||
@Override |
||||
public void accept(Frame frame) { |
||||
|
||||
ProgressDialog progressDialog = new ProgressDialog(frame); |
||||
progressDialog.setVisible(true); |
||||
progressDialog.updateLoadingText("test"); |
||||
} |
||||
}); |
||||
} |
||||
} |
Loading…
Reference in new issue