Browse Source

REPORT-59952&无JIRA任务 还原代码&click事件感觉用起来不舒服,鼠标点下释放位置偏离一点点就失灵了,改成press事件

research/11.0
方磊 3 years ago
parent
commit
9b73a2fab6
  1. 10
      designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java

10
designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java

@ -151,9 +151,9 @@ public class NewFormPane extends BasicPane {
private JPanel createNewTemplatePane() { private JPanel createNewTemplatePane() {
EmptyLayoutPane jPanel = new EmptyLayoutPane(); EmptyLayoutPane jPanel = new EmptyLayoutPane();
jPanel.addClickListener(new MouseAdapter() { jPanel.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mousePressed(MouseEvent e) {
setSelectedLayoutPane(jPanel); setSelectedLayoutPane(jPanel);
dialog.setButtonEnabled(true); dialog.setButtonEnabled(true);
} }
@ -238,9 +238,9 @@ public class NewFormPane extends BasicPane {
layoutPaneMap.put(moduleName, module); layoutPaneMap.put(moduleName, module);
for (PredefinedLayout layout : layouts) { for (PredefinedLayout layout : layouts) {
PredefinedLayoutPane predefinedLayoutPane = new PredefinedLayoutPane(layout); PredefinedLayoutPane predefinedLayoutPane = new PredefinedLayoutPane(layout);
predefinedLayoutPane.addClickListener(new MouseAdapter() { predefinedLayoutPane.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mousePressed(MouseEvent e) {
setSelectedLayoutPane(predefinedLayoutPane); setSelectedLayoutPane(predefinedLayoutPane);
dialog.setButtonEnabled(true); dialog.setButtonEnabled(true);
} }
@ -266,7 +266,7 @@ public class NewFormPane extends BasicPane {
try { try {
if (StringUtils.isNotEmpty(path)) { if (StringUtils.isNotEmpty(path)) {
Form form = new Form(); Form form = new Form();
form.readStream(NewFormPane.class.getResourceAsStream(path), true); form.readStream(NewFormPane.class.getResourceAsStream(path));
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, new Object[]{form}, BaseJForm.class); jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, new Object[]{form}, BaseJForm.class);
} else { } else {
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, BaseJForm.class); jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, BaseJForm.class);

Loading…
Cancel
Save