Browse Source
* commit 'ed5c8d9567acc2a45437133aabe1ff8faac27757': MOBILE-6262 FR9.0设计器提供手机端设计画布参考尺寸 REPORT-5945 表单切换到绝对布局时,组件缩放重置为双向自适应 REPORT-5832 表单自适应切到绝对布局后, 需要清理掉一些绝对布局里没有的属性 无JIRA任务,修复打开表单,控件树消失问题 REPORT-4634 组件叠加体验优化=>埋点 REPORT-5955 [Report]删除悬浮元素后,设计器卡死 REPORT-6270 & REPORT-6443 参数面板里的相关bug(问题2、3);控件树消失问题 REPORT-6270 参数面板里的相关bug=>删控件的时候,对应的“以下参数未生成”没有实时显示,要再点一下para才显示 REPORT-6270 & REPORT-6258 参数面板里的相关bug;tab标签右击时原本的移动功能被覆盖了 REPORT-6277 & REPORT-6276 绝对布局下设计器界面调整了组件上下位置后,web端预览没有相应的变化;cpt里悬浮元素的位置用快捷键无法使用(暂时隐去快捷键)master
superman
7 years ago
47 changed files with 653 additions and 237 deletions
@ -1,17 +0,0 @@
|
||||
package com.fr.design.designer.beans.actions; |
||||
|
||||
import com.fr.design.actions.TemplateComponentAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
|
||||
public abstract class FormEditAction extends TemplateComponentAction<FormDesigner> { |
||||
|
||||
protected FormEditAction(FormDesigner t) { |
||||
super(t); |
||||
} |
||||
|
||||
@Override |
||||
public void update() { |
||||
this.setEnabled(true); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,39 @@
|
||||
package com.fr.design.designer.beans.actions; |
||||
|
||||
import com.fr.design.actions.TemplateComponentAction; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
import com.fr.plugin.ExtraClassManager; |
||||
import com.fr.stable.ReportFunctionProcessor; |
||||
import com.fr.stable.fun.FunctionProcessor; |
||||
|
||||
import javax.swing.JButton; |
||||
import java.awt.event.ActionEvent; |
||||
|
||||
public abstract class FormWidgetEditAction extends TemplateComponentAction<FormDesigner> { |
||||
|
||||
protected FormWidgetEditAction(FormDesigner t) { |
||||
super(t); |
||||
} |
||||
|
||||
@Override |
||||
public void update() { |
||||
this.setEnabled(true); |
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent evt) { |
||||
super.actionPerformed(evt); |
||||
// 记录功能点
|
||||
FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor(); |
||||
if (processor != null) { |
||||
FunctionProcessor functionProcessor; |
||||
if (evt.getSource() instanceof JButton) { |
||||
functionProcessor = ReportFunctionProcessor.FORM_WIDGET_EDIT_TOOLBAR; |
||||
} else { |
||||
functionProcessor = ReportFunctionProcessor.FORM_WIDGET_EDIT_POPUPMENU; |
||||
} |
||||
processor.recordFunction(functionProcessor); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,160 @@
|
||||
package com.fr.design.form.mobile; |
||||
|
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.designer.IntervalConstants; |
||||
import com.fr.design.dialog.mobile.MobileRadioCheckPane; |
||||
import com.fr.design.event.UIObserverListener; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.form.main.mobile.FormMobileAttr; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import javax.swing.border.Border; |
||||
import java.awt.*; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
/** |
||||
* Created by plough on 2018/1/4. |
||||
*/ |
||||
public class FormMobileTemplateSettingsPane extends BasicBeanPane<FormMobileAttr> { |
||||
|
||||
private UICheckBox mobileOnlyCheck; // 设置为手机端专属模版
|
||||
private UICheckBox mobileCanvasSizeCheck; // 设置为手机模版画布大小
|
||||
private UICheckBox adaptivePropertyAutoMatchCheck; // 自适应属性自动匹配
|
||||
|
||||
public FormMobileTemplateSettingsPane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
private void initComponents() { |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
JPanel borderPane = FRGUIPaneFactory.createTitledBorderPane(this.title4PopupWindow()); |
||||
|
||||
JPanel contentPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
||||
contentPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L5, IntervalConstants.INTERVAL_L2, 0)); |
||||
|
||||
JPanel mobileSettingsPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
||||
mobileSettingsPane.setVisible(false); |
||||
mobileSettingsPane.add(getMobileCanvasSizeCheckPane(), BorderLayout.NORTH); |
||||
mobileSettingsPane.add(getAdaptivePropertyAutoMatchCheckPane(), BorderLayout.CENTER); |
||||
|
||||
|
||||
mobileOnlyCheck = new UICheckBox(Inter.getLocText("FR-Designer_Set_Mobile_Only_Template")); |
||||
mobileOnlyCheck.registerChangeListener(new UIObserverListener() { |
||||
@Override |
||||
public void doChange() { |
||||
boolean mobileOnlyCheckSelected = mobileOnlyCheck.isSelected(); |
||||
mobileSettingsPane.setVisible(mobileOnlyCheckSelected); |
||||
if (mobileOnlyCheckSelected) { |
||||
adaptivePropertyAutoMatchCheck.setSelected(true); |
||||
} |
||||
} |
||||
}); |
||||
|
||||
contentPane.add(mobileOnlyCheck, BorderLayout.NORTH); |
||||
contentPane.add(mobileSettingsPane, BorderLayout.CENTER); |
||||
|
||||
borderPane.add(contentPane); |
||||
this.add(borderPane); |
||||
} |
||||
|
||||
private JPanel getMobileCanvasSizeCheckPane() { |
||||
JPanel panel = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
||||
mobileCanvasSizeCheck = new UICheckBox(Inter.getLocText("FR-Designer_Set_Mobile_Canvas_Size")); |
||||
// 默认勾选,不可取消
|
||||
mobileCanvasSizeCheck.setSelected(true); |
||||
mobileCanvasSizeCheck.setEnabled(false); |
||||
panel.add(mobileCanvasSizeCheck, BorderLayout.NORTH); |
||||
panel.add(getCanvasDescPane(), BorderLayout.CENTER); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, IntervalConstants.INTERVAL_L6, 0)); |
||||
return panel; |
||||
} |
||||
|
||||
private JPanel getAdaptivePropertyAutoMatchCheckPane() { |
||||
JPanel panel = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
||||
adaptivePropertyAutoMatchCheck = new UICheckBox(); |
||||
adaptivePropertyAutoMatchCheck.registerChangeListener(new UIObserverListener() { |
||||
@Override |
||||
public void doChange() { |
||||
adaptivePropertyAutoMatchCheck.setText(Inter.getLocText("FR-Designer_Adaptive_Property_Auto_Match")); |
||||
} |
||||
}); |
||||
adaptivePropertyAutoMatchCheck.setSelected(true); |
||||
panel.add(adaptivePropertyAutoMatchCheck, BorderLayout.NORTH); |
||||
panel.add(getAdaptivePropertyAutoMatchDescPane(), BorderLayout.CENTER); |
||||
return panel; |
||||
} |
||||
|
||||
private JPanel getCanvasDescPane() { |
||||
|
||||
UILabel desc1 = createDescLabel(Inter.getLocText("FR-Designer_Canvas_Size_Lock_Desc")); |
||||
UILabel desc2 = createDescLabel(Inter.getLocText("FR-Designer_Mobile_Screen_Match_Desc")); |
||||
UILabel desc3 = createDescLabel(Inter.getLocText("FR-Designer_Mobile_Screen_Zoom_In_Desc")); |
||||
UILabel desc4 = createDescLabel(Inter.getLocText("FR-Designer_Mobile_Screen_Zoom_Out_Desc")); |
||||
|
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
double[] rowSize = {p, p, p, p}; |
||||
double[] columnSize = {p, f}; |
||||
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; |
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{desc1, null}, |
||||
new Component[]{desc2, null}, |
||||
new Component[]{desc3, null}, |
||||
new Component[]{desc4, null} |
||||
}; |
||||
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_W4, IntervalConstants.INTERVAL_L1, 0)); |
||||
return panel; |
||||
} |
||||
|
||||
private JPanel getAdaptivePropertyAutoMatchDescPane() { |
||||
|
||||
UILabel desc1 = createDescLabel(Inter.getLocText("FR-Designer_Adaptive_Property_Auto_Match_Desc")); |
||||
|
||||
JPanel panel = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
||||
panel.add(desc1, BorderLayout.CENTER); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_W4, IntervalConstants.INTERVAL_L1, 0)); |
||||
return panel; |
||||
} |
||||
|
||||
private UILabel createDescLabel(String desc) { |
||||
UILabel label = new UILabel(desc); |
||||
label.setForeground(Color.gray); |
||||
return label; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(FormMobileAttr ob) { |
||||
if (ob == null) { |
||||
ob = new FormMobileAttr(); |
||||
} |
||||
// this.mobileOnlyCheckPane.populateBean(ob.isRefresh());
|
||||
mobileOnlyCheck.setSelected(ob.isMobileOnly()); |
||||
adaptivePropertyAutoMatchCheck.setSelected(ob.isAdaptivePropertyAutoMatch()); |
||||
} |
||||
|
||||
@Override |
||||
public FormMobileAttr updateBean() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public void updateBean(FormMobileAttr mobileAttr) { |
||||
if(mobileAttr != null) { |
||||
mobileAttr.setMobileOnly(mobileOnlyCheck.isSelected()); |
||||
mobileAttr.setAdaptivePropertyAutoMatch(adaptivePropertyAutoMatchCheck.isSelected()); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return Inter.getLocText("FR-Designer_Template_Settings"); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,102 @@
|
||||
package com.fr.design.report.mobile; |
||||
|
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.designer.IntervalConstants; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.general.Inter; |
||||
import com.fr.report.mobile.ElementCaseMobileAttr; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by plough on 2018/1/8. |
||||
*/ |
||||
public class ReportMobileTemplateSettingsPane extends BasicBeanPane<ElementCaseMobileAttr> { |
||||
|
||||
private UICheckBox mobileCanvasSizeCheck; // 设置为手机模版画布大小
|
||||
|
||||
public ReportMobileTemplateSettingsPane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
private void initComponents() { |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
JPanel borderPane = FRGUIPaneFactory.createTitledBorderPane(this.title4PopupWindow()); |
||||
|
||||
JPanel contentPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
||||
contentPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, 0, 0)); |
||||
|
||||
contentPane.add(getMobileCanvasSizeCheckPane(), BorderLayout.CENTER); |
||||
|
||||
borderPane.add(contentPane); |
||||
this.add(borderPane); |
||||
} |
||||
|
||||
private JPanel getMobileCanvasSizeCheckPane() { |
||||
JPanel panel = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
||||
mobileCanvasSizeCheck = new UICheckBox(Inter.getLocText("FR-Designer_Set_Mobile_Canvas_Size")); |
||||
panel.add(mobileCanvasSizeCheck, BorderLayout.NORTH); |
||||
panel.add(getCanvasDescPane(), BorderLayout.CENTER); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, IntervalConstants.INTERVAL_L6, 0)); |
||||
return panel; |
||||
} |
||||
|
||||
private JPanel getCanvasDescPane() { |
||||
|
||||
UILabel desc1 = createDescLabel(Inter.getLocText("FR-Designer_Mobile_Screen_Match_Desc")); |
||||
UILabel desc2 = createDescLabel(Inter.getLocText("FR-Designer_Mobile_Screen_Zoom_In_Desc")); |
||||
UILabel desc3 = createDescLabel(Inter.getLocText("FR-Designer_Mobile_Screen_Zoom_Out_Desc")); |
||||
|
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
double[] rowSize = {p, p, p, p}; |
||||
double[] columnSize = {p, f}; |
||||
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; |
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{desc1, null}, |
||||
new Component[]{desc2, null}, |
||||
new Component[]{desc3, null} |
||||
}; |
||||
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L7, IntervalConstants.INTERVAL_W4, IntervalConstants.INTERVAL_L1, 0)); |
||||
return panel; |
||||
} |
||||
|
||||
private UILabel createDescLabel(String desc) { |
||||
UILabel label = new UILabel(desc); |
||||
label.setForeground(Color.gray); |
||||
return label; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(ElementCaseMobileAttr ob) { |
||||
if (ob == null) { |
||||
ob = new ElementCaseMobileAttr(); |
||||
} |
||||
mobileCanvasSizeCheck.setSelected(ob.isMobileCanvasSize()); |
||||
} |
||||
|
||||
@Override |
||||
public ElementCaseMobileAttr updateBean() { |
||||
ElementCaseMobileAttr mobileAttr = new ElementCaseMobileAttr(); |
||||
mobileAttr.setMobileCanvasSize(mobileCanvasSizeCheck.isSelected()); |
||||
return mobileAttr; |
||||
} |
||||
|
||||
@Override |
||||
public void updateBean(ElementCaseMobileAttr mobileAttr) { |
||||
if(mobileAttr != null) { |
||||
mobileAttr.setMobileCanvasSize(mobileCanvasSizeCheck.isSelected()); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return Inter.getLocText("FR-Designer_Template_Settings"); |
||||
} |
||||
} |
Loading…
Reference in new issue