Browse Source
* commit 'c7e298ca9dfb14768913f557949774de25801326': REPORT-134376 【fr-fbp回归】偶现保存模板,提示模板锁定信息不一致 REPORT-134268 【FBP】连接本地数据库测试连接成功 使用时连接错误 无jira任务 设计器单测编译问题 无jira 图表面板遗留问题解决 REPORT-134161 & REPORT-134062 REPORT-133943 fix:NewUI 版本管理注释面板、远程设计权限面板问题 REPORT-134249 【fr-fbp回归】模板数据集会触发权限校验 REPORT-133424 【fr-fbp回归】打开模板A,切换环境,模板A的锁定状态不会解除 REPORT-134200 【fr-fbp回归】建立hsql数据驱动的数据连接失败 REPORT-133990 & REPORT-133567 & REPORT-133398 & REPORT-133389 & REPORT-132370 & REPORT-133696 & REPORT-131838【newUI】fix:国际化布局调整及fbp回归问题修复 REPORT-133990 & REPORT-133567 & REPORT-133398 & REPORT-133389 & REPORT-132370 & REPORT-133696 & REPORT-131838【newUI】fix:国际化布局调整及fbp回归问题修复fbp/feature
superman
3 months ago
58 changed files with 241 additions and 325 deletions
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.5 KiB |
@ -0,0 +1,34 @@ |
|||||||
|
package com.fr.design.ui; |
||||||
|
|
||||||
|
/** |
||||||
|
* 测试用 |
||||||
|
* |
||||||
|
* @author vito |
||||||
|
* @since 11.0 |
||||||
|
* Created on 2024/9/11 |
||||||
|
*/ |
||||||
|
public class Model { |
||||||
|
private String name; |
||||||
|
private int age; |
||||||
|
|
||||||
|
public String getName() { |
||||||
|
return name; |
||||||
|
} |
||||||
|
|
||||||
|
public void setName(String name) { |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
|
||||||
|
public int getAge() { |
||||||
|
return age; |
||||||
|
} |
||||||
|
|
||||||
|
public void setAge(int age) { |
||||||
|
this.age = age; |
||||||
|
} |
||||||
|
|
||||||
|
public void print(String message) { |
||||||
|
System.out.println(message); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -1,75 +0,0 @@ |
|||||||
package com.fr.design.ui; |
|
||||||
|
|
||||||
import com.fr.design.DesignerEnvManager; |
|
||||||
|
|
||||||
import javax.swing.*; |
|
||||||
import java.awt.*; |
|
||||||
import java.awt.event.ActionEvent; |
|
||||||
import java.awt.event.ActionListener; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author richie |
|
||||||
* @version 10.0 |
|
||||||
* Created by richie on 2019-03-05 |
|
||||||
*/ |
|
||||||
public class ModernUIPaneTest { |
|
||||||
|
|
||||||
public static void main(String... args) { |
|
||||||
final JFrame frame = new JFrame(); |
|
||||||
frame.setSize(1200, 800); |
|
||||||
JPanel contentPane = (JPanel) frame.getContentPane(); |
|
||||||
// 是否需要开启调试窗口
|
|
||||||
DesignerEnvManager.getEnvManager().setOpenDebug(true); |
|
||||||
final ModernUIPane<Model> pane = new ModernUIPane.Builder<Model>() |
|
||||||
.withEMB("/com/fr/design/ui/demo.html").namespace("Pool").build(); |
|
||||||
contentPane.add(pane, BorderLayout.CENTER); |
|
||||||
|
|
||||||
Model model = new Model(); |
|
||||||
model.setAge(20); |
|
||||||
model.setName("Pick"); |
|
||||||
pane.populate(model); |
|
||||||
|
|
||||||
JPanel panel = new JPanel(new FlowLayout()); |
|
||||||
contentPane.add(panel, BorderLayout.SOUTH); |
|
||||||
JButton button = new JButton("点击我可以看到Swing的弹框,输出填写的信息"); |
|
||||||
panel.add(button); |
|
||||||
button.addActionListener(new ActionListener() { |
|
||||||
@Override |
|
||||||
public void actionPerformed(ActionEvent e) { |
|
||||||
Model returnValue = pane.update(); |
|
||||||
if (returnValue != null) { |
|
||||||
JOptionPane.showMessageDialog(frame, String.format("姓名为:%s,年龄为:%d", returnValue.getName(), returnValue.getAge())); |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
frame.setVisible(true); |
|
||||||
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
|
||||||
} |
|
||||||
|
|
||||||
public static class Model { |
|
||||||
private String name; |
|
||||||
private int age; |
|
||||||
|
|
||||||
public String getName() { |
|
||||||
return name; |
|
||||||
} |
|
||||||
|
|
||||||
public void setName(String name) { |
|
||||||
this.name = name; |
|
||||||
} |
|
||||||
|
|
||||||
public int getAge() { |
|
||||||
return age; |
|
||||||
} |
|
||||||
|
|
||||||
public void setAge(int age) { |
|
||||||
this.age = age; |
|
||||||
} |
|
||||||
|
|
||||||
public void print(String message) { |
|
||||||
System.out.println(message); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
Loading…
Reference in new issue