Browse Source

Merge pull request #14917 in DESIGN/design from fbp/release to fbp/feature

* commit '8e9e9d4a0605fe26c1067271edb72ca0105ac83e':
  REPORT-135341 【fr-fbp回归】树数据集构造失败 & REPORT-135830 【fr-fbp回归】新建关联数据集,直接预览空白,保存再编辑可正常预览
  REPORT-135341 【fr-fbp回归】树数据集构造失败 & REPORT-135830 【fr-fbp回归】新建关联数据集,直接预览空白,保存再编辑可正常预览
  无jira任务 代码质量
  REPORT-135687 修复框体大小&添加清理
  REPORT-134055 fix:服务器数据集上下移按钮屏蔽
  REPORT-135492 & REPORT-135490 条件属性布局调整, 增加字体监听事件
  REPORT-135680 & REPORT-135417 fix:NewUI 自定义分组面板尺寸调整、linux按钮显示不全问题调整
  定义常量
  调整控件事件提交入库布局&控件管理下拉控件布局
fbp/feature
superman 2 months ago
parent
commit
673aebadcb
  1. 26
      designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java
  2. 17
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  3. 17
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
  4. 2
      designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java
  5. 12
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java
  6. 23
      designer-base/src/main/java/com/fr/design/remote/ui/debug/RemoteDesignNetWorkAction.java
  7. 80
      designer-base/src/main/java/com/fr/design/remote/ui/debug/RemoteDesignNetWorkTablePane.java
  8. 44
      designer-base/src/main/java/com/fr/design/style/FRFontPane.java
  9. 3
      designer-base/src/main/java/com/fr/design/web/CustomIconPane.java
  10. 8
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  11. 2
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  12. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  13. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  14. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  15. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  16. 2
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  17. 12
      designer-realize/src/main/java/com/fr/design/condition/BackPane.java
  18. 7
      designer-realize/src/main/java/com/fr/design/condition/BorderHighlightPane.java
  19. 10
      designer-realize/src/main/java/com/fr/design/condition/FontPane.java
  20. 9
      designer-realize/src/main/java/com/fr/design/condition/ForeGroundPane.java
  21. 9
      designer-realize/src/main/java/com/fr/design/condition/HyperlinkPane.java
  22. 9
      designer-realize/src/main/java/com/fr/design/condition/NewRealValuePane.java
  23. 11
      designer-realize/src/main/java/com/fr/design/condition/PaddingPane.java
  24. 9
      designer-realize/src/main/java/com/fr/design/condition/PagePane.java
  25. 9
      designer-realize/src/main/java/com/fr/design/condition/PresentHighlightPane.java
  26. 9
      designer-realize/src/main/java/com/fr/design/condition/WHPane.java
  27. 9
      designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java
  28. 30
      designer-realize/src/main/java/com/fr/design/dscolumn/SpecifiedGroupAttrPane.java
  29. 13
      designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java
  30. 2
      designer-realize/src/main/java/com/fr/design/widget/ui/WritableRepeatEditorPane.java
  31. 13
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java

26
designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java

@ -6,31 +6,37 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
public abstract class SingleConditionPane<T> extends BasicPane {
private static final long serialVersionUID = -4274960170813368817L;
protected UIButton cancel;
public SingleConditionPane(){
this(true);
}
public SingleConditionPane(boolean isRemove) {
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(10, 0));
this.setBorder(new ScaledEmptyBorder(4, 8, 4, 8));
if (isRemove) {
if(cancel == null) {
cancel = new UIButton(new LazyIcon("remove"));
cancel.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Remove"));
cancel.addActionListener(cancleListener);
cancel.setBackground(FlatUIUtils.getUIColor("default.background", new Color(246, 248, 250, 255)));
cancel.setBorder(null);
FineUIStyle.setStyle(cancel, FineUIStyle.ORIGINAL_BUTTON);
}
addCancel();
}
@ -40,9 +46,9 @@ public abstract class SingleConditionPane<T> extends BasicPane {
* 添加删除按钮
*/
public void addCancel() {
this.add(cancel, BorderLayout.EAST);
this.add(column(flex(), cell(cancel), flex()).getComponent(), BorderLayout.EAST);
}
ActionListener cancleListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
doCancel();
@ -55,8 +61,8 @@ public abstract class SingleConditionPane<T> extends BasicPane {
public abstract void doCancel();
public abstract void setDefault();
public abstract void populate(T condition);
public abstract T update();
}

17
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -9,8 +9,10 @@ import com.fr.data.MultiResultTableData;
import com.fr.data.TableDataSource;
import com.fr.data.TableDataSourceTailor;
import com.fr.data.core.DataCoreXmlUtils;
import com.fr.data.impl.ConditionTableData;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.data.impl.NameDataModel;
import com.fr.data.impl.RecursionTableData;
import com.fr.data.impl.storeproc.ProcedureDataModel;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.data.impl.storeproc.StoreProcedureConstants;
@ -589,7 +591,7 @@ public abstract class DesignTableDataManager {
bean.setStart(rowCount);
bean.setEnd(-1);
bean.updateConvertMap(parameterMap);
if (checkBean(bean)) {
if (checkBean(bean, tabledata)) {
return (EmbeddedTableData) TableDataRepository.getInstance().previewTableData(bean).getTableData();
} else {
PreviewDataBean dataBean = new PreviewDataBean();
@ -624,9 +626,16 @@ public abstract class DesignTableDataManager {
}
}
private static boolean checkBean(PreviewSourceBean bean) {
// dataName为空说明是新建的,得用tabledata传
return !bean.getDataName().isEmpty();
private static boolean checkBean(PreviewSourceBean bean, TableData tableData) {
if (bean.getDataName().isEmpty()) {
if (tableData instanceof ConditionTableData || tableData instanceof RecursionTableData) {
bean.getDataSource().putTableData(StringUtils.EMPTY, tableData);
return true;
}
// dataName为空并且不为特殊的数据集说明是新建的,得用tabledata传
return false;
}
return true;
}
private static boolean needInputParams(boolean mustInputParameters, ParameterProvider[] parameters) {

17
designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.TableData;
import com.fr.base.TableDataBean;
import com.fr.data.MultiResultTableData;
@ -14,6 +15,7 @@ import com.fr.design.data.datapane.preview.TableDataBeanHelper;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.i18n.Toolkit;
import com.fr.file.ProcedureConfig;
@ -94,6 +96,21 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
return Toolkit.i18nText("Fine-Design_Basic_Table_Data_Duplicate_Name_Tips", getEditingName());
}
@Override
protected ShortCut4JControlPane[] createShortcuts() {
return new ShortCut4JControlPane[]{
shortCutFactory.addItemShortCut(),
shortCutFactory.removeItemShortCut(),
shortCutFactory.copyItemShortCut(),
shortCutFactory.sortItemShortCut(),
};
}
@Override
protected int getLeftPreferredSize() {
return FineUIScale.scale(180);
}
@Override
public Collection getExtraItemsToCheckNameRepeat() {
return DesignTableDataManager.getGlobalDataSet().keySet();

2
designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java

@ -59,7 +59,7 @@ public class Commit2DBJavaScriptPane extends FurtherBasicBeanPane<Commit2DBJavaS
btPane.setPreferredSize(createCallbackBtnPanePreferredSize());
addCallbackButton = javaScriptActionPane.createCallButton();
btPane.add(addCallbackButton);
this.add(column(4, cell(cardPane), row(cell(btPane), cell(new UILabel()))).getComponent());
this.add(column(javaScriptActionPane.getVerticalGap(), cell(cardPane), row(cell(btPane), cell(new UILabel()))).getComponent());
}
protected Dimension createCallbackBtnPanePreferredSize(){

12
designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java

@ -30,6 +30,8 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
private static final long serialVersionUID = 1L;
private static final int DEFAULT_GAP = 4;
private List contentDBManiPane;
private JavaScriptResourceInfo resourceInfo;
@ -130,6 +132,10 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
return new String[]{WebContentUtils.FR_SUBMITINFO};
}
@Override
public int getVerticalGap() {
return JavaScriptActionPane.this.getVerticalGap();
}
};
callPane.populateBean(getCall());
@ -227,4 +233,10 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
}
};
}
public int getVerticalGap() {
return DEFAULT_GAP;
}
}

23
designer-base/src/main/java/com/fr/design/remote/ui/debug/RemoteDesignNetWorkAction.java

@ -1,7 +1,7 @@
package com.fr.design.remote.ui.debug;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.utils.gui.GUICoreUtils;
@ -10,6 +10,11 @@ import com.fr.workspace.WorkContext;
import javax.swing.JDialog;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import static com.fine.theme.utils.FineUIScale.createScaleDimension;
import static com.fine.theme.utils.FineUIScale.unscale;
/**
* 远程设计网络调试
@ -28,19 +33,29 @@ public class RemoteDesignNetWorkAction extends UpdateAction {
@Override
public void actionPerformed(ActionEvent e) {
if (WorkContext.getCurrent().isLocal()) {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
"Remote Design NetWork can't show on local environment.");
return;
}
JDialog jDialog = new JDialog(DesignerContext.getDesignerFrame(), TITLE);
jDialog.setSize(calculatePaneDimension());
jDialog.add(new RemoteDesignNetWorkTablePane());
RemoteDesignNetWorkTablePane netWorkPane = new RemoteDesignNetWorkTablePane();
jDialog.add(netWorkPane);
jDialog.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
netWorkPane.clear();
super.windowClosing(e);
}
});
GUICoreUtils.centerWindow(jDialog);
jDialog.setVisible(true);
}
private static Dimension calculatePaneDimension() {
DesignerFrame parent = DesignerContext.getDesignerFrame();
return new Dimension((int) (FineUIScale.unscale(parent.getWidth()) * 0.8),
(int) (FineUIScale.unscale(parent.getHeight()) * 0.6));
return createScaleDimension((int) (unscale(parent.getWidth()) * 0.8),
(int) (unscale(parent.getHeight()) * 0.6));
}
}

80
designer-base/src/main/java/com/fr/design/remote/ui/debug/RemoteDesignNetWorkTablePane.java

@ -1,7 +1,9 @@
package com.fr.design.remote.ui.debug;
import com.fanruan.workplace.http.debug.RequestInfo;
import com.fine.theme.icon.LazyIcon;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
@ -10,6 +12,8 @@ import com.fr.workspace.WorkContext;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JToolBar;
import javax.swing.border.EmptyBorder;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
@ -34,14 +38,36 @@ public class RemoteDesignNetWorkTablePane extends JPanel {
private JTable uiTable;
private DefaultTableModel model;
private final Listener<RequestInfo> remoteDesignDebugListener = new Listener<RequestInfo>() {
@Override
public void on(Event event, RequestInfo requestInfo) {
model.addRow(new Object[]{
requestInfo.getStatus(),
dateFormat(requestInfo.getDate()),
requestInfo.getPath().substring(WorkContext.getCurrent().getPath().length() - 1),
requestInfo.getConsume() + "ms",
simpleSize(requestInfo.getRequestSize()),
simpleSize(requestInfo.getResponseSize()),
requestInfo.getSendBody(),
requestInfo.getReturnBody(),
});
adjustColumnWidths(uiTable);
}
};
public RemoteDesignNetWorkTablePane() {
setLayout(new BorderLayout());
setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
initComponent();
initListener();
addListener();
}
private void initComponent() {
initTable();
initToolBar();
}
private void initTable() {
model = new DefaultTableModel();
model.addColumn("status");
model.addColumn("time");
@ -55,23 +81,43 @@ public class RemoteDesignNetWorkTablePane extends JPanel {
add(new JScrollPane(uiTable), BorderLayout.CENTER);
}
private void initListener() {
EventDispatcher.listen(REMOTE_HTTP_REQUEST, new Listener<RequestInfo>() {
@Override
public void on(Event event, RequestInfo requestInfo) {
model.addRow(new Object[]{
requestInfo.getStatus(),
dateFormat(requestInfo.getDate()),
requestInfo.getPath().substring(WorkContext.getCurrent().getPath().length() - 1),
requestInfo.getConsume() + "ms",
simpleSize(requestInfo.getRequestSize()),
simpleSize(requestInfo.getResponseSize()),
requestInfo.getSendBody(),
requestInfo.getReturnBody(),
});
adjustColumnWidths(uiTable);
}
private void initToolBar() {
JToolBar jToolBar = new JToolBar();
jToolBar.setBorder(new EmptyBorder(5, 0, 10, 0));
UIButton run = new UIButton(new LazyIcon("run"));
UIButton forbid = new UIButton(new LazyIcon("forbid"));
UIButton refresh = new UIButton(new LazyIcon("remove"));
run.setEnabled(false);
run.setToolTipText("Start Record");
run.addActionListener(e -> {
addListener();
run.setEnabled(false);
forbid.setEnabled(true);
});
forbid.setToolTipText("Stop Record");
forbid.addActionListener(e -> {
EventDispatcher.stopListen(remoteDesignDebugListener);
run.setEnabled(true);
forbid.setEnabled(false);
});
refresh.setToolTipText("Clear Records");
refresh.addActionListener(e -> model.setRowCount(0));
jToolBar.add(run);
jToolBar.add(forbid);
jToolBar.add(refresh);
add(jToolBar, BorderLayout.NORTH);
}
/**
* 清理监听
*/
public void clear() {
EventDispatcher.stopListen(remoteDesignDebugListener);
}
private void addListener() {
EventDispatcher.listen(REMOTE_HTTP_REQUEST, remoteDesignDebugListener);
}
private static void adjustColumnWidths(JTable table) {

44
designer-base/src/main/java/com/fr/design/style/FRFontPane.java

@ -61,20 +61,20 @@ public class FRFontPane extends BasicPane {
private UICheckBox isSubscriptCheckBox;
private FRFontPreviewArea preview;
private EventListenerList eventChangeList = new EventListenerList();
public static Integer[] Font_Sizes = {new Integer(6), new Integer(8), new Integer(9),
new Integer(10), new Integer(11), new Integer(12),
new Integer(14), new Integer(16), new Integer(18),
new Integer(20), new Integer(22), new Integer(24),
new Integer(26), new Integer(28), new Integer(36),
new Integer(48), new Integer(72)};
public FRFontPane() {
this.initComponents();
}
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
@ -82,18 +82,18 @@ public class FRFontPane extends BasicPane {
// 名字
fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
this.fontNameComboBox.addActionListener(actionListener);
// 字形和大小
fontSizeStylePane = new FontSizeStylePane();
// 下划线 和 颜色
this.underlineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY);
this.underlineCombo.addActionListener(actionListener);
foregroundColorPane = new ColorSelectBox(140);
foregroundColorPane.addSelectChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
fireStateChanged();
}
fireStateChanged();
}
});
initCheckbox();
@ -166,11 +166,11 @@ public class FRFontPane extends BasicPane {
column(5, cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"))), cell(preview).weight(1)).weight(1)
).getComponent());
}
public void addChangeListener(ChangeListener changeListener) {
eventChangeList.add(ChangeListener.class, changeListener);
}
/**
*/
public void fireStateChanged() {
@ -186,19 +186,19 @@ public class FRFontPane extends BasicPane {
}
}
}
ActionListener actionListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
fireStateChanged();
}
fireStateChanged();
}
};
ChangeListener changeListener = new ChangeListener() {
public void stateChanged(ChangeEvent e) {
fireStateChanged();
}
fireStateChanged();
}
};
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sytle_FRFont");
@ -217,6 +217,16 @@ public class FRFontPane extends BasicPane {
updatePreviewLabel();
}
};
ItemListener updatePreviewItemListener = new ItemListener() {
public void itemStateChanged(ItemEvent e) {
updatePreviewLabel();
}
};
this.fontNameComboBox.addItemListener(updatePreviewItemListener);
this.fontSizeStylePane.fontComboBox.addItemListener(updatePreviewItemListener);
this.fontSizeStylePane.fontSizeComboBox.addItemListener(updatePreviewItemListener);
this.isStrikethroughCheckBox.addActionListener(updatePreviewActionListener);
this.isShadowCheckBox.addActionListener(updatePreviewActionListener);
this.isSuperscriptCheckBox.addActionListener(updatePreviewActionListener);

3
designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

@ -420,6 +420,7 @@ public class CustomIconPane extends BasicPane {
UIButton browseButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_SelectIcon"));
browseButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Click_this_button"));
nameTextField = new UITextField(20);
nameTextField.setPreferredSize(FineUIScale.createScaleDimension(172, 24));
browseButton.addActionListener(e -> onBrowseButtonClicked(SwingUtilities.getWindowAncestor(EditIconDialog.this)));
@ -443,7 +444,7 @@ public class CustomIconPane extends BasicPane {
});
showImageLabel = new UILabel();
showImageLabel.setPreferredSize(FineUIScale.scale(new Dimension(50, 50)));
showImageLabel.setPreferredSize(FineUIScale.createScaleDimension(50, 50));
JPanel centerPane = column(10,
row(

8
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -277,11 +277,15 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
JPanel conditionPane = this.createConditionPane();
JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
btPane.add(column(4,
addBottomComponent(btPane, conditionPane, eventPane);
return btPane;
}
protected void addBottomComponent(JPanel bottomPane, JPanel conditionPane, JPanel eventPane) {
bottomPane.add(column(4,
cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))),
row(cell(eventPane), cell(new UILabel()))
).getComponent());
return btPane;
}
private UIButton addEventButton() {

2
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -1410,7 +1410,7 @@ chart.selectedBorderColor = #2576EF
[style]Button.originalButton = \
borderColor: null; \
background: $fill.normal; \
background: null; \
hoverBorderColor: null;
[style]Button.grayButton = \

2
designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties

@ -38,6 +38,6 @@ com.fr.design.actions.reportWebAttr.dialog=800*630
com.fr.design.actions.printingSetting.dialog=700*600
com.fr.design.data.datapane.preview.dialog=700*600
com.fr.design.data.tabledata.dialog=1200*600
com.fr.design.dscolumn.SpecifiedGroupAttrPane=900*600

2
designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties

@ -37,6 +37,6 @@ com.fr.design.actions.reportWebAttr.dialog=700*630
com.fr.design.actions.printingSetting.dialog=700*600
com.fr.design.data.datapane.preview.dialog=700*600
com.fr.design.data.tabledata.dialog=900*600
com.fr.design.dscolumn.SpecifiedGroupAttrPane=800*600

2
designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties

@ -37,6 +37,6 @@ com.fr.design.actions.reportWebAttr.dialog=700*630
com.fr.design.actions.printingSetting.dialog=700*600
com.fr.design.data.datapane.preview.dialog=700*600
com.fr.design.data.tabledata.dialog=900*600
com.fr.design.dscolumn.SpecifiedGroupAttrPane=760*600

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -37,6 +37,7 @@ com.fr.design.actions.reportWebAttr.dialog=660*600
com.fr.design.actions.printingSetting.dialog=660*600
com.fr.design.data.datapane.preview.dialog=660*600
com.fr.design.data.tabledata.dialog=900*600
com.fr.design.dscolumn.SpecifiedGroupAttrPane=760*600

2
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

@ -36,6 +36,6 @@ com.fr.design.actions.reportWebAttr.dialog=700*630
com.fr.design.actions.printingSetting.dialog=700*600
com.fr.design.data.datapane.preview.dialog=700*600
com.fr.design.data.tabledata.dialog=900*600
com.fr.design.dscolumn.SpecifiedGroupAttrPane=760*600

12
designer-realize/src/main/java/com/fr/design/condition/BackPane.java

@ -23,6 +23,7 @@ import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* @author richie
@ -36,9 +37,9 @@ public class BackPane extends ConditionAttrSingleConditionPane<HighlightAction>
public BackPane(final ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
backgroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background") + ":");
backgroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background"));
this.backgroundPreviewPane = new BackgroundPreviewLabel();
this.backgroundPreviewPane.setPreferredSize(FineUIScale.scale(new Dimension(80, 20)));
this.backgroundPreviewPane.setPreferredSize(new Dimension(scale(100), backgroundPreviewPane.getPreferredSize().height));
UIButton editBackgroundButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editBackgroundButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@ -62,12 +63,11 @@ public class BackPane extends ConditionAttrSingleConditionPane<HighlightAction>
this.backScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.backgroundPreviewPane.setBackgroundObject(ColorBackground.getInstance(Color.WHITE));
this.add(row(10, cell(backgroundLabel).weight(0.2), row(
10,
this.add(row(4, cell(backgroundLabel),
cell(backgroundPreviewPane),
cell(editBackgroundButton),
cell(backScopeComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
cell(backScopeComboBox)
).getComponent(), BorderLayout.CENTER);
}
@Override

7
designer-realize/src/main/java/com/fr/design/condition/BorderHighlightPane.java

@ -79,10 +79,9 @@ public class BorderHighlightPane extends ConditionAttrSingleConditionPane<Highli
UILabel borderLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border"));
this.add(row(10, cell(borderLabel).weight(0.2), row(
10,
cell(borderButton)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(row(4, cell(borderLabel),
cell(borderButton)
).getComponent(), BorderLayout.CENTER);
}
@Override

10
designer-realize/src/main/java/com/fr/design/condition/FontPane.java

@ -37,10 +37,9 @@ public class FontPane extends ConditionAttrSingleConditionPane<HighlightAction>
public FontPane(final ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
fontLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sytle_FRFont") + ":");
fontLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sytle_FRFont"));
frFontPreviewPane = new FRFontPreviewArea();
frFontPreviewPane.setBorder(BorderFactory.createTitledBorder(""));
frFontPreviewPane.setPreferredSize(FineUIScale.scale(new Dimension(80, 20)));
UIButton editFRFontButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editFRFontButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@ -66,12 +65,11 @@ public class FontPane extends ConditionAttrSingleConditionPane<HighlightAction>
this.fontScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.frFontPreviewPane.setFontObject(DesignUtils.getDefaultGUIFont());
this.add(row(10, cell(fontLabel).weight(0.2), row(
10,
this.add(row(4, cell(fontLabel),
cell(frFontPreviewPane),
cell(editFRFontButton),
cell(fontScopeComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
cell(fontScopeComboBox)
).getComponent(), BorderLayout.CENTER);
}
@Override

9
designer-realize/src/main/java/com/fr/design/condition/ForeGroundPane.java

@ -29,7 +29,7 @@ public class ForeGroundPane extends ConditionAttrSingleConditionPane<HighlightAc
public ForeGroundPane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
foregroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Foreground") + ":");
foregroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Foreground"));
this.foregroundColorPane = new ColorSelectBox(80);
foregroundColorPane.setPreferredSize(new Dimension(FineUIScale.scale(100), foregroundColorPane.getHeight()));
this.foreScopeComboBox = new UIComboBox(new String[] {
@ -39,11 +39,10 @@ public class ForeGroundPane extends ConditionAttrSingleConditionPane<HighlightAc
this.foreScopeComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.foregroundColorPane.setSelectObject(Color.black);
this.add(row(10, cell(foregroundLabel).weight(0.2), row(
10,
this.add(row(4, cell(foregroundLabel),
cell(foregroundColorPane),
cell(foreScopeComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
cell(foreScopeComboBox)
).getComponent(), BorderLayout.CENTER);
}
@Override

9
designer-realize/src/main/java/com/fr/design/condition/HyperlinkPane.java

@ -61,19 +61,18 @@ public class HyperlinkPane extends ConditionAttrSingleConditionPane<HighlightAct
}
});
hyperlinkButton.setEnabled(false);
UILabel hyperlinkLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Hyperlink_Type") + ":");
UILabel hyperlinkLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Hyperlink_Type"));
typeField = new UITextField(12);
typeField.setEditable(false);
useHyperlink = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_Links"));
useHyperlink.addActionListener(l);
this.add(row(10, cell(hyperlinkLabel).weight(0.2), row(
10,
this.add(row(4, cell(hyperlinkLabel),
cell(typeField),
cell(hyperlinkButton),
cell(useHyperlink)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
cell(useHyperlink)
).getComponent(), BorderLayout.CENTER);
}
@Override

9
designer-realize/src/main/java/com/fr/design/condition/NewRealValuePane.java

@ -23,13 +23,12 @@ public class NewRealValuePane extends ConditionAttrSingleConditionPane<Highlight
public NewRealValuePane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Value") + ":");
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Value"));
valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane();
this.add(row(10, cell(label).weight(0.2), row(
10,
cell(valueEditor)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(row(10, cell(label),
cell(valueEditor)
).getComponent(), BorderLayout.CENTER);
}
@Override

11
designer-realize/src/main/java/com/fr/design/condition/PaddingPane.java

@ -42,10 +42,10 @@ public class PaddingPane extends ConditionAttrSingleConditionPane<HighlightActio
public PaddingPane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
paddingLeft = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Style_Left_Indent") + ":");
paddingLeft = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Style_Left_Indent"));
paddingLeftSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 0, Integer.MAX_VALUE, 1));
GUICoreUtils.setColumnForSpinner(paddingLeftSpinner, 5);
paddingRight = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Style_Right_Indent") + ":");
paddingRight = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Style_Right_Indent"));
paddingRightSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 0, Integer.MAX_VALUE, 1));
GUICoreUtils.setColumnForSpinner(paddingRightSpinner, 5);
this.paddingScopeComboBox = new UIComboBox(new String[] {
@ -71,13 +71,10 @@ public class PaddingPane extends ConditionAttrSingleConditionPane<HighlightActio
refreshIndentationUnit();
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sytle_Indentation"));
this.add(row(10, column(5, cell(label).weight(0.5), flex(0.5)).weight(0.2)
.with(it -> it.setPreferredSize(new Dimension(-1, FineUIScale.scale(53)))), row(
10,
this.add(row(4, column(4, cell(label).weight(0.5), flex(0.5)),
column(5, cell(paddingLeftSpinner).weight(0.5),cell(paddingLeft).weight(0.5)),
column(5, cell(paddingRightSpinner).weight(0.5),cell(paddingRight).weight(0.5)),
column(5, cell(paddingScopeComboBox).weight(0.5), flex(0.5))).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent());
column(5, cell(paddingScopeComboBox).weight(0.5), flex(0.5))).getComponent());
}
/**

9
designer-realize/src/main/java/com/fr/design/condition/PagePane.java

@ -25,7 +25,7 @@ public class PagePane extends ConditionAttrSingleConditionPane<HighlightAction>
public PagePane(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
pageLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Pagination") + ":");
pageLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Pagination"));
this.pageComboBox = new UIComboBox(new String[] {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_No_Pagination"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cell_Write_Page_After_Row"),
@ -35,10 +35,9 @@ public class PagePane extends ConditionAttrSingleConditionPane<HighlightAction>
this.pageComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.pageComboBox.setSelectedIndex(0);
this.add(row(10, cell(pageLabel).weight(0.2), row(
10,
cell(pageComboBox)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
this.add(row(4, cell(pageLabel),
cell(pageComboBox)
).getComponent(), BorderLayout.CENTER);
}
@Override

9
designer-realize/src/main/java/com/fr/design/condition/PresentHighlightPane.java

@ -40,7 +40,7 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl
public PresentHighlightPane(final ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Present") + ":");
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Present"));
String[] typeArray = {PresentConstants.NORMAL, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Other_Present")};
presentComboBox = new UIComboBox(typeArray);
@ -92,11 +92,10 @@ public class PresentHighlightPane extends ConditionAttrSingleConditionPane<Highl
});
presentComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
this.add(row(10, cell(label).weight(0.2), row(
10,
this.add(row(4, cell(label),
cell(presentComboBox),
cell(type)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
cell(type)
).getComponent(), BorderLayout.CENTER);
}
@Override

9
designer-realize/src/main/java/com/fr/design/condition/WHPane.java

@ -31,18 +31,17 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane<HighlightA
protected WHPane(ConditionAttributesPane conditionAttributesPane, String locString) {
super(conditionAttributesPane);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText(locString) + ":");
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText(locString));
spinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0,Integer.MAX_VALUE, 1));
this.unitLabel = new UILabel(getUnitString());
GUICoreUtils.setColumnForSpinner(spinner, 5);
this.spinner.setValue(new Integer(0));
this.locString = locString;
this.add(row(10, cell(label).weight(0.2), row(
10,
this.add(row(4, cell(label),
cell(spinner),
cell(unitLabel)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
cell(unitLabel)
).getComponent(), BorderLayout.CENTER);
}
@Override

9
designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java

@ -63,7 +63,7 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<Highli
}
});
UILabel widgetLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget") + ":");
UILabel widgetLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget"));
String[] editorTypes = new String[] {
"",
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"),
@ -100,12 +100,11 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<Highli
});
this.add(row(10, cell(widgetLabel).weight(0.2), row(
10,
this.add(row(4, cell(widgetLabel),
cell(box),
cell(widgetButton),
cell(useWidget)).weight(0.8)
).with(it -> it.setBorder(new ScaledEmptyBorder(5, 5, 5, 0))).getComponent(), BorderLayout.CENTER);
cell(useWidget)
).getComponent(), BorderLayout.CENTER);
}
@Override

30
designer-realize/src/main/java/com/fr/design/dscolumn/SpecifiedGroupAttrPane.java

@ -1,5 +1,6 @@
package com.fr.design.dscolumn;
import com.fine.swing.ui.layout.Row;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula;
@ -20,7 +21,6 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.ModNameActionListener;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.NameObject;
import com.fr.report.cell.CellElement;
@ -30,8 +30,12 @@ import com.fr.report.cell.cellattr.core.group.FunctionGrouper;
import com.fr.report.cell.cellattr.core.group.RecordGrouper;
import com.fr.stable.Nameable;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
@ -121,20 +125,18 @@ public class SpecifiedGroupAttrPane extends BasicPane {
conditionsGroupPane.add(specifiedControlPane, BorderLayout.CENTER);
JPanel southPane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane();
conditionsGroupPane.add(southPane, BorderLayout.SOUTH);
forceCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_SpecifiedG-Force_Group"));
moreCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_One_Record_Exists_In_Many_Groups"));
southPane.add(forceCheckBox); southPane.add(moreCheckBox);
otherComboBox = new UIComboBox(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_SpecifiedG-Discard_All_Others"),
moreCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_One_Record_Exists_In_Many_Groups"));
otherComboBox = new UIComboBox(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_SpecifiedG-Discard_All_Others"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_SpecifiedG_Leave_In_Their_Own_Groups"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_SpecifiedG_Put_All_Others_Together")});
otherComboBox.addItemListener(otherItemListener);
otherComboBox.addItemListener(otherItemListener);
otherComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OtherGroup_Name") + ":");
otherTextField = new UITextField(8);
Row southPane = FineLayoutBuilder.createHorizontalLayout(10, forceCheckBox, moreCheckBox, otherComboBox, label, otherTextField);
conditionsGroupPane.add(southPane, BorderLayout.SOUTH);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OtherGroup_Name") + ":");
otherTextField = new UITextField(8);
southPane.add(otherComboBox);
southPane.add(GUICoreUtils.createFlowPane(new Component[]{label, otherTextField}, FlowLayout.LEFT));
// 公式分组
formulaGroupPane = new FormulaGroupPane();

13
designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java

@ -31,6 +31,10 @@ import java.lang.reflect.Constructor;
public class WidgetEventPane extends UIListGroupControlPane {
private static final Selection NO_SELECTION = new CellSelection(-1, -1, -1, -1);
private static final int WIDGET_BTN_GAP = 10;
private static final int WIDGET_PANE_BTN_GAP = 4;
private Selection selection = NO_SELECTION;
private ElementCasePane object;
@ -105,6 +109,15 @@ public class WidgetEventPane extends UIListGroupControlPane {
return new SmartInsertDBManipulationInWidgetEventPane(epane);
}
@Override
public int getVerticalGap() {
if (getContentDBManiPane().get(0) instanceof SmartInsertDBManipulationInWidgetEventPane) {
return WIDGET_BTN_GAP;
} else {
return WIDGET_PANE_BTN_GAP;
}
}
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Callback_Function");

2
designer-realize/src/main/java/com/fr/design/widget/ui/WritableRepeatEditorPane.java

@ -21,7 +21,7 @@ public abstract class WritableRepeatEditorPane<E extends WriteAbleRepeatEditor>
JPanel contentPane = column(LayoutConstants.VERTICAL_GAP).getComponent();
JPanel otherContentPane = this.setThirdContentPane();
if (otherContentPane != null) {
contentPane.add(row(cell(otherContentPane)).getComponent());
contentPane.add(row(cell(otherContentPane).weight(1.0)).getComponent());
}
return contentPane;
}

13
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java

@ -1,12 +1,18 @@
package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
import javax.swing.*;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created with IntelliJ IDEA.
* User: zheng
@ -22,6 +28,13 @@ public class SmartInsertDBManipulationInWidgetEventPane extends SmartInsertDBMan
protected void addComponent(JPanel mainPane,JScrollPane addPane){
}
protected void addBottomComponent(JPanel bottomPane, JPanel conditionPane, JPanel eventPane) {
bottomPane.add(column(10,
cell(conditionPane),
row(cell(eventPane), cell(new UILabel()))
).getComponent());
}
protected Dimension createConditionPanePreferredSize(){
return FineUIScale.scale(new Dimension(454, 20));
}

Loading…
Cancel
Save