Browse Source

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

* commit '1db4d03e1a2cfe27fe94089c72705c0743938572': (37 commits)
  REPORT-138421 fix:连续配置表头导致上一个表头配置丢失问题修复
  REPORT-138421 fix:连续配置表头导致上一个表头配置丢失问题修复
  REPORT-138445 wms图层连接问题 修复一个逻辑问题
  REPORT-138420 & REPORT-138440 fix: 翻新面板,engine-x 国际文案修复
  REPORT-138297 & REPORT-138273 fix: 懒加载面板保存事件问题统一修复
  REPORT-138379 fix:模板web属性无法添加插件按钮
  REPORT-138445 wms图层连接问题 获取图层逻辑被注释掉了,重新加回来
  REPORT-138355【fr-fbp冒烟】标签富文本更多颜色显示不全
  REPORT-138407 fix: 内置服务器增加抽数缓存模块
  REPORT-137667 【fr-fbp冒烟】【数据源】服务器数据集设置分页查询sql不生效
  REPORT-138360 fix: 本地获取规则需要单独补充
  增加注释
  模板填报属性不能选中修复
  改为常量
  REPORT-135996 fix:属性面板视觉验收问题
  标题选中图标大小&文本与第一行对齐
  REPORT-138178 fix: 权限编辑阴影大小问题
  REPORT-138177 fix:国际化显示不全增加tooltip
  REPORT-137840 fix:事件-js参数区域无滚动条修复
  REPORT-137614 fix:存储过程报错提示调整为折叠弹窗
  ...
fbp/feature
superman 1 month ago
parent
commit
da5b8f090b
  1. 1
      build.gradle
  2. 2
      designer-base/src/main/java/com/fine/theme/light/ui/FineComboBoxUI.java
  3. 12
      designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java
  4. 77
      designer-base/src/main/java/com/fr/design/data/datapane/connect/SshPane.java
  5. 74
      designer-base/src/main/java/com/fr/design/data/datapane/connect/SslPane.java
  6. 14
      designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java
  7. 10
      designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java
  8. 5
      designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java
  9. 11
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java
  10. 145
      designer-base/src/main/java/com/fr/design/dialog/CollapsibleDetailDialog.java
  11. 1
      designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java
  12. 2
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  13. 4
      designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java
  14. 8
      designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java
  15. 4
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  16. 2
      designer-base/src/main/java/com/fr/design/gui/core/ReactiveCardPane.java
  17. 44
      designer-base/src/main/java/com/fr/design/gui/core/SimpleCardPane.java
  18. 38
      designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java
  19. 8
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java
  20. 47
      designer-base/src/main/java/com/fr/design/gui/style/AlignmentPane.java
  21. 4
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java
  22. 14
      designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java
  23. 2
      designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java
  24. 1
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  25. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/ThemedCellStyleListPane.java
  26. 2
      designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java
  27. 40
      designer-base/src/main/java/com/fr/design/style/background/impl/NullBackgroundPane.java
  28. 23
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  29. 6
      designer-base/src/main/resources/com/fine/theme/icon/formExport.svg
  30. 2
      designer-base/src/main/resources/com/fine/theme/icon/saveFile.svg
  31. 2
      designer-base/src/main/resources/com/fine/theme/icon/saveFile_disable.svg
  32. 1
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  33. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  34. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java
  35. 33
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  36. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextPane.java
  37. 5
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java
  38. BIN
      designer-chart/src/main/resources/com/fr/design/images/background/null_background.png
  39. 60
      designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java
  40. 13
      designer-realize/src/main/java/com/fanruan/boot/env/function/DesignReportBaseComponent.java
  41. 5
      designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java
  42. 3
      designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewPolyReportAction.java
  43. 34
      designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupDockingPane.java
  44. 1
      designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java
  45. 175
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  46. 8
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/UpdateDataWorker.java
  47. 4
      designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java
  48. 46
      designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java
  49. 1
      designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java
  50. 4
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java
  51. 28
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java
  52. 99
      designer-realize/src/main/java/com/fr/nx/app/designer/menu/CalculateAttrPane.java
  53. 7
      designer-realize/src/main/java/com/fr/nx/app/designer/menu/FeatureFlagsPanel.java
  54. 43
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

1
build.gradle

@ -110,6 +110,7 @@ allprojects {
implementation 'com.fr.datasource:fine-datasource-core:' + fdlVersion
implementation 'com.fr.datasource:fine-datasource-web:' + fdlVersion
implementation 'com.fr.decision:decision-i18n:' + frVersion
implementation 'com.fr.decision:decision-report:' + frVersion
implementation 'com.fr.report:engine-report:' + frDevVersion
implementation 'com.fr.report:engine-x:' + frDevVersion
implementation 'com.fr.report:engine-chart:' + frDevVersion

2
designer-base/src/main/java/com/fine/theme/light/ui/FineComboBoxUI.java

@ -88,7 +88,7 @@ public class FineComboBoxUI extends FlatComboBoxUI {
// 限制最大宽度,如超出则高度预留展示横向滚动条所需宽度
int comboWidth = comboBox.getWidth();
if (fitRectangle.width > comboWidth) {
return new Rectangle(px, py, comboWidth, fitRectangle.height + FlatUIUtils.getUIInt("ScrollBar.width", 10));
return new Rectangle(px, py, comboWidth, fitRectangle.height + FineUIUtils.getAndScaleInt("ScrollBar.width", 10));
}
return fitRectangle;
}

12
designer-base/src/main/java/com/fine/theme/light/ui/FineTableHeaderUI.java

@ -84,6 +84,16 @@ public class FineTableHeaderUI extends FlatTableHeaderUI {
setHorizontalAlignment(SwingConstants.LEFT);
}
/**
* 是否选中修改背景
* @param isSelected 被选中
* @param columnClass 列类型
* @return 是否修改
*/
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected && columnClass != Boolean.class;
}
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
Class<?> columnClass = table.getColumnClass(0);
@ -95,7 +105,7 @@ public class FineTableHeaderUI extends FlatTableHeaderUI {
border = BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, UIManager.getColor("defaultBorderColor")),
UIManager.getBorder("Table.cellNoFocusBorder"));
}
if (isSelected && columnClass != Boolean.class) {
if (checkSelected(isSelected, columnClass)) {
selectionBackground = UIManager.getColor( "Table.selectionBackground");
} else {
selectionBackground = UIManager.getColor("Table.background");

77
designer-base/src/main/java/com/fr/design/data/datapane/connect/SshPane.java

@ -1,6 +1,5 @@
package com.fr.design.data.datapane.connect;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIUtils;
import com.fr.data.impl.JDBCDatabaseConnection;
@ -14,7 +13,7 @@ import com.fr.data.security.ssl.SslUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.editor.editor.NotNegativeIntegerEditor;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.core.SimpleCardPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
@ -28,6 +27,7 @@ import com.fr.file.filter.ChooseFileFilter;
import com.fr.stable.StringUtils;
import com.fr.third.guava.collect.HashBiMap;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import java.awt.BorderLayout;
import java.awt.event.KeyAdapter;
@ -35,9 +35,10 @@ import java.awt.event.KeyEvent;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
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;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fr.design.i18n.Toolkit.i18nText;
/**
@ -62,12 +63,10 @@ public class SshPane extends BasicPane {
private final JPasswordField password = new UIPasswordFieldWithFixedLength(20);
private final JPasswordField secret = new UIPasswordFieldWithFixedLength(20);
private final KeyFileUITextField keyPath = new KeyFileUITextField(18);
private ReactiveCardPane coreCardPane;
private ReactiveCardPane verifyCardPane;
private JPanel sshSettingPane;
private SimpleCardPane verifyCardPane;
private final UIButton fileChooserButton = new UIButton();
private static final String USE_SSH = "useSSH";
private static final String NOT_USE_SSH = "notUseSSH";
private static final String USE_PASSWORD = "usePassword";
private static final String USE_KEY = "useKey";
@ -82,13 +81,14 @@ public class SshPane extends BasicPane {
type.setSelectedItem(Toolkit.i18nText("Fine-Design_Basic_Ssh_Private_Key"));
initVerifyCardPane();
initCoreCardPane();
initSshSettingPane();
initListeners();
this.add(Layouts.column(LayoutConstants.VERTICAL_GAP,
this.add(column(LayoutConstants.VERTICAL_GAP,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssh_Settings"))).with(FineUIUtils::wrapBoldLabelWithUnderline),
cell(coreCardPane)
row(cell(usingSsh)),
cell(sshSettingPane)
).getComponent());
}
@ -112,10 +112,8 @@ public class SshPane extends BasicPane {
});
}
private void initCoreCardPane() {
coreCardPane = ReactiveCardPane.create()
.addSupplier(NOT_USE_SSH, () -> cell(usingSsh).getComponent())
.addSupplier(USE_SSH, () -> Layouts.column(LayoutConstants.VERTICAL_GAP,
private void initSshSettingPane() {
sshSettingPane = column(LayoutConstants.VERTICAL_GAP,
row(cell(usingSsh)),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Host"))).weight(1),
@ -138,47 +136,46 @@ public class SshPane extends BasicPane {
flex(6)
),
cell(verifyCardPane)
).getComponent());
coreCardPane.select(USE_SSH).populate();
).getComponent();
}
private void initVerifyCardPane() {
verifyCardPane = ReactiveCardPane.create()
.addSupplier(USE_PASSWORD, () -> Layouts.row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Password"))).weight(1),
cell(password).weight(5),
verifyCardPane = new SimpleCardPane();
verifyCardPane.add(USE_PASSWORD, row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Password"))).weight(1),
cell(password).weight(5),
flex(6)
).getComponent());
verifyCardPane.add(USE_KEY, column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssh_Private_Key"))).weight(1),
cell(keyPath).weight(4.5),
flex(0.1),
cell(fileChooserButton).weight(0.4),
flex(6)
).getComponent())
.addSupplier(USE_KEY, () -> Layouts.column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssh_Private_Key"))).weight(1),
cell(keyPath).weight(4.5),
flex(0.1),
cell(fileChooserButton).weight(0.4),
flex(6)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssh_Secret"))).weight(1),
cell(secret).weight(5),
flex(6)
)
).getComponent());
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssh_Secret"))).weight(1),
cell(secret).weight(5),
flex(6)
)
).getComponent());
verifyCardPane.select(USE_KEY).populate();
verifyCardPane.show(USE_KEY);
}
private void changePane() {
coreCardPane.select(usingSsh.isSelected() ? USE_SSH: NOT_USE_SSH).populate();
sshSettingPane.setVisible(usingSsh.isSelected());
}
private void changePaneForType() {
switch (typeMap.get(type.getSelectedItem())) {
case NORMAL:
verifyCardPane.select(USE_PASSWORD).populate();
verifyCardPane.show(USE_PASSWORD);
break;
case KEY:
verifyCardPane.select(USE_KEY).populate();
verifyCardPane.show(USE_KEY);
break;
default:
throw new SshException("un support ssh type");

74
designer-base/src/main/java/com/fr/design/data/datapane/connect/SslPane.java

@ -1,18 +1,15 @@
package com.fr.design.data.datapane.connect;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIUtils;
import com.fr.data.impl.JDBCDatabaseConnection;
import com.fr.data.security.ssl.Ssl;
import com.fr.data.security.ssl.SslException;
import com.fr.data.security.ssl.SslType;
import com.fr.data.security.ssl.SslUtils;
import com.fr.data.security.ssl.impl.NormalSsl;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.data.datapane.connect.SshPane.KeyFileUITextField;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
@ -23,14 +20,16 @@ import com.fr.file.FILEChooserPane;
import com.fr.file.filter.ChooseFileFilter;
import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
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;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fr.design.i18n.Toolkit.i18nText;
/**
@ -47,45 +46,44 @@ public class SslPane extends BasicPane {
private final KeyFileUITextField keyPathClientKey = new KeyFileUITextField(18);
private final UIButton fileChooserButtonClientKey = new UIButton();
private final UICheckBox verifyCa = new UICheckBox(i18nText("Fine-Design_Basic_Ssl_Verify_Ca"));
private final ReactiveCardPane cardPane;
private final JPanel sslSettingPane;
public SslPane() {
initDotButtons();
this.setLayout(new BorderLayout());
usingSsl.setSelected(true);
cardPane = ReactiveCardPane.create()
.addSupplier("notUseSSL", () -> cell(usingSsl).getComponent())
.addSupplier("useSSL", () -> Layouts.column(LayoutConstants.VERTICAL_GAP,
cell(usingSsl),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Ca"), SwingConstants.LEFT)).weight(1),
cell(keyPathCa).weight(1.3),
flex(0.05),
cell(fileChooserButtonCa).weight(0.15),
flex(2)
),
cell(verifyCa),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Client_Key"), SwingConstants.LEFT)).weight(1),
cell(keyPathClientKey).weight(1.3),
flex(0.05),
cell(fileChooserButtonClientKey).weight(0.15),
flex(2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Client_Cert"), SwingConstants.LEFT)).weight(1),
cell(keyPathClientCert).weight(1.3),
flex(0.05),
cell(fileChooserButtonClientCert).weight(0.15),
flex(2)
)
).getComponent()
);
cardPane.select("useSSL").populate();
this.add(Layouts.column(LayoutConstants.VERTICAL_GAP,
sslSettingPane = column(10,
cell(usingSsl),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Ca"), SwingConstants.LEFT)).weight(1),
cell(keyPathCa).weight(1.3),
flex(0.05),
cell(fileChooserButtonCa).weight(0.15),
flex(2)
),
cell(verifyCa),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Client_Key"), SwingConstants.LEFT)).weight(1),
cell(keyPathClientKey).weight(1.3),
flex(0.05),
cell(fileChooserButtonClientKey).weight(0.15),
flex(2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Client_Cert"), SwingConstants.LEFT)).weight(1),
cell(keyPathClientCert).weight(1.3),
flex(0.05),
cell(fileChooserButtonClientCert).weight(0.15),
flex(2)
)
).getComponent();
this.add(column(LayoutConstants.VERTICAL_GAP,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Settings"))).with(FineUIUtils::wrapBoldLabelWithUnderline),
cell(cardPane)
cell(usingSsl),
cell(sslSettingPane)
).getComponent());
usingSsl.addActionListener(e -> changePane());
}
@ -99,7 +97,7 @@ public class SslPane extends BasicPane {
}
private void changePane() {
cardPane.select(usingSsl.isSelected() ? "useSSL" : "notUseSSL").populate();
sslSettingPane.setVisible(usingSsl.isSelected());
}

14
designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java

@ -156,7 +156,12 @@ public class TableDataBeanHelper {
if (dataSet.getDatabase() instanceof NameDatabaseConnection) {
bean.setDatabase(((NameDatabaseConnection) dataSet.getDatabase()).getName());
}
bean.setQuery(DataEncryptionHelper.encrypt(dataSet.getQuery()));
if (dataSet.getQuery() != null) {
bean.setQuery(DataEncryptionHelper.encrypt(dataSet.getQuery()));
}
if (dataSet.getPageQuerySql() != null) {
bean.setPageQuery(DataEncryptionHelper.encrypt(dataSet.getPageQuerySql()));
}
List<ParameterBean> parameterBeans = new ArrayList<>();
ParameterProvider[] parameters = dataSet.getParameters(Calculator.createCalculator());
for (ParameterProvider parameter : parameters) {
@ -186,7 +191,12 @@ public class TableDataBeanHelper {
private static TableData deserialize4SQL(Map<String, Connection> connectionMap, DBTableData oldDataSet, JSONObject object) {
DBTableData tableData = new DBTableData();
SQLDataSetBean bean = object.mapTo(SQLDataSetBean.class);
tableData.setQuery(DataEncryptionHelper.decrypt(bean.getQuery()));
if (bean.getQuery() != null) {
tableData.setQuery(DataEncryptionHelper.decrypt(bean.getQuery()));
}
if (bean.getPageQuery() != null) {
tableData.setPageQuerySql(DataEncryptionHelper.decrypt(bean.getPageQuery()));
}
Connection connection = connectionMap.get(bean.getDatabase());
if (connection != null) {
tableData.setDatabase(new NameDatabaseConnection(bean.getDatabase()));

10
designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTablePane.java

@ -12,8 +12,11 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository;
import javax.swing.*;
import java.awt.*;
import javax.swing.JPanel;
import javax.swing.SwingWorker;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
@ -89,7 +92,8 @@ public class TableDataDesensitizationTablePane extends JPanel {
// 获取当前所有用户组
roleMap.putAll(RemoteAuthorityRepository.getInstance().getAllRoles4Desensitization());
// 获取当前最新的所有规则
latestRules.putAll(DesensitizationRuleManager.getInstance().getAllRules());
latestRules.put(DesensitizationRuleSource.SERVER, RemoteAuthorityRepository.getInstance().getAllRoles().getSourceRuleMap().get(DesensitizationRuleSource.SERVER));
latestRules.put(DesensitizationRuleSource.CUSTOM, DesensitizationRuleManager.getInstance().getRulesBySource(DesensitizationRuleSource.CUSTOM));
return null;
}

5
designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane.sqlpane;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.core.db.TableProcedure;
import com.fr.design.actions.UpdateAction;
@ -10,7 +11,6 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import javax.swing.Icon;
import javax.swing.JPopupMenu;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
@ -57,8 +57,7 @@ public class SQLEditPane extends RSyntaxTextArea {
if (requestDroptarget) {
new SQLPaneDropTarget(this);
}
setBorder(null);
setBorder(new ScaledEmptyBorder(2, 2, 2, 2));
}

11
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java

@ -4,18 +4,18 @@ import com.fr.base.TableData;
import com.fr.data.MultiResultTableData;
import com.fr.data.impl.NameDataModel;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.data.operator.DataOperator;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.preview.ConnectionInfoBeanHelper;
import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.dialog.CollapsibleDetailDialog;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.iprogressbar.AutoProgressBar;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.workspace.server.entity.connection.ConnectionBean;
import com.fr.workspace.server.repository.connection.ConnectionRepository;
import javax.swing.Icon;
@ -230,7 +230,12 @@ public final class MultiResultTableDataWrapper implements TableDataWrapper {
loadingBar.close();
if (!(e instanceof CancellationException)) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
FineJOptionPane.showMessageDialog(parent, e.getMessage());
if (tableData instanceof StoreProcedure) {
CollapsibleDetailDialog dialog = new CollapsibleDetailDialog(DesignerContext.getDesignerFrame(), new UILabel(Toolkit.i18nText("Fine-Design_Stored_Procedure_Query_Failed")), e.getMessage());
dialog.setVisible(true);
} else {
FineJOptionPane.showMessageDialog(parent, e.getMessage());
}
}
}
}

145
designer-base/src/main/java/com/fr/design/dialog/CollapsibleDetailDialog.java

@ -0,0 +1,145 @@
package com.fr.design.dialog;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JPanel;
import javax.swing.JDialog;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.fix;
/**
* 折叠弹窗
*
* @author Richard
* @since 11.0
* Created on 2024/10/22
*/
public class CollapsibleDetailDialog extends JDialog implements ActionListener {
public JPanel upInTopPanel;
private JPanel downInTopPanel;
private JPanel topPanel;
public JPanel hiddenPanel;
private JPanel bottomPanel;
private UILabel directUILabel;
private UILabel detailLabel;
// 内容标题
private final UILabel messageLabel;
// 详情
private final String detailText;
private final Dimension collapseDimension = FineUIScale.createScaleDimension(450, 185);
private final Dimension unfoldDimension = FineUIScale.createScaleDimension(450, 280);
public CollapsibleDetailDialog(Frame parent, UILabel label, String detailText) {
super(parent, true);
this.detailText = detailText;
this.messageLabel = label;
initComponent();
}
private void initComponent() {
initTopPanel();
initHiddenPanel();
initBottomPanel();
addListeners();
this.setResizable(false);
this.add(topPanel, BorderLayout.NORTH);
this.add(hiddenPanel, BorderLayout.CENTER);
this.add(bottomPanel, BorderLayout.SOUTH);
this.setSize(this.collapseDimension);
GUICoreUtils.centerWindow(this);
this.setAlwaysOnTop(true);
}
private void initTopPanel() {
initUpInTopPanel();
// 查看详情按钮
directUILabel = new UILabel();
directUILabel.setIcon(new LazyIcon("plus"));
detailLabel = new UILabel();
detailLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine_Designer_Look_Detail"));
downInTopPanel = row(fix(30), row(cell(directUILabel), cell(detailLabel), flex())).getComponent();
topPanel = column(cell(upInTopPanel), cell(downInTopPanel)).getComponent();
}
private void initUpInTopPanel() {
upInTopPanel = row(LayoutConstants.HORIZONTAL_GAP,
column(cell(new UILabel(new LazyIcon("error", 20))), flex()),
column(cell(messageLabel))).getComponent();
upInTopPanel.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
}
private void initHiddenPanel() {
hiddenPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
JScrollPane scrollPane = new JScrollPane();
JTextArea textArea = new JTextArea(detailText);
scrollPane.setViewportView(textArea);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
scrollPane.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
scrollPane.getViewport().setOpaque(false);
textArea.setOpaque(false);
textArea.setEditable(false);
hiddenPanel = row(fix(30), cell(scrollPane).weight(1)).getComponent();
hiddenPanel.setVisible(false);
hiddenPanel.setBorder(new ScaledEmptyBorder(0, 0, 0, 10));
}
private void initBottomPanel() {
//底部的按钮面板
UIButton okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OK"));
FineUIStyle.setStyle(okButton, FineUIStyle.STYLE_PRIMARY);
okButton.addActionListener(this);
bottomPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
bottomPanel.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
bottomPanel.add(okButton, BorderLayout.EAST);
}
private void addListeners() {
downInTopPanel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
toggleHiddenPanel();
}
});
}
private void toggleHiddenPanel() {
if (hiddenPanel.isVisible()) {
hiddenPanel.setVisible(false);
setSize(collapseDimension);
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail"));
directUILabel.setIcon(new LazyIcon("plus"));
} else {
setSize(unfoldDimension);
hiddenPanel.setVisible(true);
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Hide_Detail"));
directUILabel.setIcon(new LazyIcon("minus"));
}
}
@Override
public void actionPerformed(ActionEvent e) {
this.dispose();
}
}

1
designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java

@ -76,6 +76,7 @@ public class UIDetailErrorLinkDialog extends UIDialog {
// 顶部 图标和提示
UILabel errorIcon = new UILabel(new LazyIcon("error", 20));
UILabel errorInfo= new UILabel(builder.reason);
errorInfo.setToolTipText(builder.reason);
FineUIStyle.setStyle(errorInfo, FineUIStyle.LABEL_TIP_WINDOW_TITLE);
// 中部 详细内容

2
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -315,7 +315,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
// text
initFormulaTextArea();
UIScrollPane formulaTextAreaScrollPane = new UIScrollPane(formulaTextArea);
formulaTextArea.setBorder(null);
formulaTextArea.setBorder(new ScaledEmptyBorder(2, 2, 2, 2));
formulaTextAreaScrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
// buttonPane

4
designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java

@ -35,8 +35,8 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
initRowSpinner();
pane.add(column(10,
row(cell(rowLabel).weight(0.15), cell(rowSpinner).weight(0.85)),
row(cell(colLabel).weight(0.15), cell(columnSpinner).weight(0.85))
row(cell(colLabel).weight(0.15), cell(columnSpinner).weight(0.85)),
row(cell(rowLabel).weight(0.15), cell(rowSpinner).weight(0.85))
).getComponent());
this.addDocumentListener(d);

8
designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java

@ -212,10 +212,10 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S
}
/**
* 刷新 NameableCreator
*
* @param creators 生成器
*/
* 刷新 NameableCreator
*
* @param creators 生成器
*/
public void refreshNameableCreator(NameableCreator[] creators) {
this.creators = creators;
shorts = this.createShortcuts();

4
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -243,8 +243,8 @@ public abstract class UIControlPane extends JControlPane {
}
/**
* 是否需要隐藏popupEditDialog
*/
* 是否需要隐藏popupEditDialog
*/
protected boolean needToHidePopupEditDialog() {
// 检查是否有子弹窗,如果有,则不隐藏
for (Window window : popupEditDialog.getOwnedWindows()) {

2
designer-base/src/main/java/com/fr/design/gui/core/ReactiveCardPane.java

@ -9,11 +9,13 @@ import java.util.function.Supplier;
/**
* 简单的响应式面板容器提供切换布局的功能
* <p> 懒加载无法兼容事件初始化如需实现类似功能可考虑 {@link SimpleCardPane} </>
*
* @author Levy.Xie
* @since 11.0
* Created on 2023/12/25
*/
@Deprecated
public class ReactiveCardPane extends JPanel {
String selectKey;

44
designer-base/src/main/java/com/fr/design/gui/core/SimpleCardPane.java

@ -0,0 +1,44 @@
package com.fr.design.gui.core;
import javax.swing.JPanel;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
/**
* 自适应尺寸大小变更的Card面板
*
* @author Levy.Xie
* @since 11.0
* Created on 2024/10/22
*/
public class SimpleCardPane extends JPanel {
private final CardLayout cardLayout;
public SimpleCardPane() {
cardLayout = new CardLayout();
setLayout(cardLayout);
}
/**
* 显示卡片
* @param key 卡片名
*/
public void show(String key) {
setVisible(true);
cardLayout.show(this, key);
}
@Override
public Dimension getPreferredSize() {
for (Component comp : getComponents()) {
if (comp.isVisible()) {
return comp.getPreferredSize();
}
}
setVisible(false);
return new Dimension(0, 0);
}
}

38
designer-base/src/main/java/com/fr/design/gui/frpane/RegPane.java

@ -2,20 +2,34 @@ package com.fr.design.gui.frpane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.core.SimpleCardPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.reg.*;
import com.fr.form.ui.reg.CustomReg;
import com.fr.form.ui.reg.IDCardReg;
import com.fr.form.ui.reg.LengthReg;
import com.fr.form.ui.reg.MailReg;
import com.fr.form.ui.reg.MobileReg;
import com.fr.form.ui.reg.NoneReg;
import com.fr.form.ui.reg.PhoneReg;
import com.fr.form.ui.reg.PostCardReg;
import com.fr.form.ui.reg.RegExp;
import com.fr.general.ComparatorUtils;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.ListCellRenderer;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.util.EventListener;
import java.util.EventObject;
@ -86,10 +100,10 @@ public class RegPane extends BasicPane {
regPhonePane = new RegPhonePane();
customRegRexPane = new CustomRegRexPane();
final ReactiveCardPane cardPane = ReactiveCardPane.create()
.addSupplier("Length", () -> regLengthPane)
.addSupplier("Phone", () -> regPhonePane)
.addSupplier("Custom", () -> customRegRexPane);
final SimpleCardPane cardPane = new SimpleCardPane();
cardPane.add(regLengthPane, "Length");
cardPane.add(regPhonePane, "Phone");
cardPane.add(customRegRexPane, "Custom");
cardPane.setVisible(false);
corePane.add(comboPane);
@ -97,19 +111,19 @@ public class RegPane extends BasicPane {
initComboListener(cardPane);
}
private void initComboListener(ReactiveCardPane cardPane) {
private void initComboListener(SimpleCardPane cardPane) {
regComboBox.addActionListener(e -> {
RegExp regExp = (RegExp)regComboBox.getSelectedItem();
if(regExp instanceof PhoneReg) {
Object selectItem = regPhonePane.dataTypeComboBox.getSelectedItem();
String regString = selectItem == null ? StringUtils.EMPTY : selectItem.toString();
firePhoneRegAction(regString);
cardPane.select("Phone").populate();
cardPane.show("Phone");
} else {
if (regExp instanceof LengthReg){
cardPane.select("Length").populate();
cardPane.show("Length");
} else if (regExp instanceof CustomReg){
cardPane.select("Custom").populate();
cardPane.show("Custom");
} else {
cardPane.setVisible(false);
}

8
designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java

@ -44,6 +44,7 @@ public class UIModeControlContainer extends JLayeredPane {
private static final int NUM5 = 5;
private JComponent upPane;
private JComponent downPane;
private JComponent sheetNameTabPane;
private JPanel horizontToolPane;
private CoverPane coverPane;
@ -115,6 +116,10 @@ public class UIModeControlContainer extends JLayeredPane {
this.downPane = downPane;
}
public void setSheetNameTabPane(JComponent sheetNameTabPane) {
this.sheetNameTabPane = sheetNameTabPane;
}
protected void onResize(int distance) {
}
@ -215,7 +220,8 @@ public class UIModeControlContainer extends JLayeredPane {
}
if (DesignerMode.isAuthorityEditing() && isSheeetCovered) {
sheetInvisibleCoverPane.setBounds(0, toolPaneY + toolPaneHeight + UIConstants.SIZE, getWidth(), getHeight() - toolPaneY - toolPaneHeight - sheetCorverGap);
sheetInvisibleCoverPane.setBounds(0, toolPaneY + toolPaneHeight + UIConstants.SIZE,
getWidth(), downPane.getHeight() - sheetNameTabPane.getHeight());
UIModeControlContainer.this.add(sheetInvisibleCoverPane);
UIModeControlContainer.this.setLayer(sheetInvisibleCoverPane, 2);
sheetInvisibleCoverPane.setVisible(true);

47
designer-base/src/main/java/com/fr/design/gui/style/AlignmentPane.java

@ -4,7 +4,7 @@ package com.fr.design.gui.style;
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/
import com.fine.swing.ui.layout.Layouts;
import com.fine.swing.ui.layout.Row;
import com.fine.theme.icon.LazyIcon;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils;
@ -15,7 +15,6 @@ import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.fun.IndentationUnitProcessor;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox;
@ -25,7 +24,6 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.event.EventDispatcher;
import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.plugin.ExtraClassManager;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.manage.PluginFilter;
@ -46,9 +44,10 @@ import java.util.ArrayList;
import java.util.Arrays;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Pane to edit cell alignment.
@ -61,7 +60,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
private static final String[] LAYOUT = {Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Layout_Default"), Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Layout_Image_Titled"),
Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Layout_Image_Extend"), Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Layout_Image_Adjust")};
private ReactiveCardPane rotationBarPane;
private JPanel rotationBarPane;
private UIComboBox textComboBox;
private UIComboBox textRotationComboBox;
@ -91,7 +90,6 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
imageLayoutComboBox = new UIComboBox(LAYOUT);
initTextRotationComboBox();
// todo: 换新图标及反白问题
Icon[][] hAlignmentIconArray = {{new LazyIcon("h_left"), new LazyIcon("h_left").white()},
{new LazyIcon("h_center"), new LazyIcon("h_center").white()},
{new LazyIcon("h_right"), new LazyIcon("h_right").white()},
@ -177,7 +175,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
private JPanel createPane() {
JPanel basicPane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Basic"), 290, 24, basicPane());
JPanel seniorPane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Basic_Advanced"), 290, 24, seniorPane());
return Layouts.column(
return column(
cell(basicPane),
fix(1).with(it -> it.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIManager.getColor("defaultBorderColor")))),
cell(seniorPane)
@ -189,7 +187,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
UILabel verticalLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Pane_Vertical") + " ", SwingConstants.LEFT);
UIComponentUtils.setLineWrap(horizontalLabel);
UIComponentUtils.setLineWrap(verticalLabel);
return Layouts.column(LayoutConstants.VERTICAL_GAP,
return column(LayoutConstants.VERTICAL_GAP,
row(
cell(horizontalLabel).weight(1.2),
cell(hAlignmentPane).weight(3)),
@ -201,7 +199,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
}
private JPanel seniorPane() {
return Layouts.column(LayoutConstants.VERTICAL_GAP,
return column(LayoutConstants.VERTICAL_GAP,
cell(seniorUpPane()),
cell(seniorMiddlePane()),
cell(seniorDownPane())
@ -210,7 +208,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
}
private JPanel seniorUpPane() {
return Layouts.column(LayoutConstants.VERTICAL_GAP,
return column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Image_Layout"), SwingConstants.LEFT))
.with(it -> it.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Image_Layout"))).weight(1.2),
@ -224,28 +222,19 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
}
private JPanel seniorMiddlePane() {
rotationBarPane = ReactiveCardPane.create()
.addSupplier("hide", () -> Layouts.row(
Row rotationRow = row(flex(1.2),cell(rotationPane).weight(3)).getComponent();
rotationBarPane = column(10,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"), SwingConstants.LEFT))
.with(it -> it.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"))).weight(1.2),
cell(textRotationComboBox).weight(3)
).getComponent())
.addSupplier("show", () -> Layouts.column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"), SwingConstants.LEFT))
.with(it -> it.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"))).weight(1.2),
cell(textRotationComboBox).weight(3)
),
row(
flex(1.2),
cell(rotationPane).weight(3)
)
).getComponent());
rotationBarPane.select("show").populate();
),
cell(rotationRow)
).getComponent();
textRotationComboBox.addItemListener(e -> {
String key = (textRotationComboBox.getSelectedIndex() == 0) ? "show" : "hide";
rotationBarPane.select(key).populate();
rotationRow.setVisible(textRotationComboBox.getSelectedIndex() == 0);
});
return rotationBarPane;
}
@ -257,7 +246,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
partSpacingLabel.setToolTipText(partSpacingLabel.getText());
UILabel spacingLabel = new UILabel((Toolkit.i18nText("Fine-Design_Basic_Style_Line_Spacing")), SwingConstants.LEFT);
spacingLabel.setToolTipText(spacingLabel.getText());
return Layouts.column(
return column(
row(
cell(indentationLabel).weight(1.2),
cell(leftIndentSpinner).weight(1.4),

4
designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java

@ -45,7 +45,7 @@ public class MobilePopupRegularPane extends BasicPane {
spinnerGroupPane = this.createSpinnerPane();
this.add(column(LayoutConstants.VERTICAL_GAP,
cell(this.createRadioButtonGroupPane()),
row(flex(1), cell(spinnerGroupPane).weight(3))
row(flex(1.5), cell(spinnerGroupPane).weight(3))
).getComponent());
}
@ -62,7 +62,7 @@ public class MobilePopupRegularPane extends BasicPane {
radioButtons.add(autoRadio);
radiosPane.add(row(30, cell(customRadio), cell(autoRadio), flex()).getComponent());
return row(cell(new UILabel(this.label, FineUIStyle.LABEL_SECONDARY)).weight(1), cell(radiosPane).weight(3)).getComponent();
return row(cell(new UILabel(this.label, FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(radiosPane).weight(3)).getComponent();
}
private ActionListener radioActionListener = new ActionListener() {

14
designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java

@ -83,9 +83,9 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
UILabel borderLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border"));
borderPane.add(column(LayoutConstants.VERTICAL_GAP,
row(cell(borderLabel).weight(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(borderType).weight(2), flex(3)),
row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(borderColor).weight(2), flex(3)),
row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(borderRadiusSpinner).weight(2), flex(3))
row(cell(borderLabel).weight(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(borderType).weight(2), flex(2.5)),
row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(borderColor).weight(2), flex(2.5)),
row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(borderRadiusSpinner).weight(2), flex(2.5))
).getComponent());
return borderPane;
}
@ -102,8 +102,8 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
JLabel bgLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background"));
bgPane.add(column(LayoutConstants.VERTICAL_GAP,
row(cell(bgLabel).weight(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(bgColor).weight(2), flex(3)),
row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), FineUIStyle.LABEL_SECONDARY)).weight(1), cell(transparencyPane).weight(3), flex(2))
row(cell(bgLabel).weight(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(bgColor).weight(2), flex(2.5)),
row(flex(1), cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), FineUIStyle.LABEL_SECONDARY)).weight(1.5), cell(transparencyPane).weight(3), flex(1.5))
).getComponent());
return bgPane;
}
@ -117,9 +117,9 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
sizePane.add(column(LayoutConstants.VERTICAL_GAP,
row(
column(LayoutConstants.VERTICAL_GAP, cell(sizeLabel), flex()).weight(1),
cell(mobileRegularPane).weight(4), flex(2)
cell(mobileRegularPane).weight(4.5), flex(1.5)
),
row(flex(1), cell(padRegularPane).weight(4), flex(2))
row(flex(1), cell(padRegularPane).weight(4.5), flex(1.5))
).getComponent());
return sizePane;
}

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

@ -1,6 +1,7 @@
package com.fr.design.javascript;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.DesignerEnvManager;
@ -187,6 +188,7 @@ public class JSContentPane extends BasicPane {
JPanel jsParaPane = new JPanel(new BorderLayout());
funNameLabel.setBackground(FineUIUtils.getUIColor("background.normal", "background.normal"));
UIScrollPane scrollPane = new UIScrollPane(funNameLabel);
scrollPane.setPreferredSize(new Dimension(super.getPreferredSize().width, FineUIScale.scale(80)));
scrollPane.setOpaque(true);
jsParaPane.add(row(4,
cell(scrollPane).weight(1),

1
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -342,6 +342,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
renameAction.setEnabled(false);
delFileAction.setEnabled(false);
vcsAction.setEnabled(false);
this.revalidate();
this.repaint();
}

2
designer-base/src/main/java/com/fr/design/mainframe/theme/ThemedCellStyleListPane.java

@ -115,7 +115,7 @@ public class ThemedCellStyleListPane extends FurtherBasicBeanPane<ThemedCellStyl
private static class RadioButtonListCellRangeRenderer extends JPanel implements ListCellRenderer<ThemedCellStyle>, Serializable {
private static final Icon SELECTEDMARK_ICON = new LazyIcon("selectedMark");
private static final Icon SELECTEDMARK_ICON = new LazyIcon("selectedMark", 32);
private final CellRectangleStylePreviewPane previewArea;
private boolean selected = false;

2
designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java

@ -109,7 +109,7 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
cell(scrollPane).weight(1)
).getComponent());
this.add(jPanel, BorderLayout.CENTER);
jPanel.setBorder(new ScaledEmptyBorder(0, 4, 4, 4));
jPanel.setBorder(new ScaledEmptyBorder(0, 12, 4, 4));
registerDSChangeListener();
}

40
designer-base/src/main/java/com/fr/design/style/background/impl/NullBackgroundPane.java

@ -1,20 +1,15 @@
package com.fr.design.style.background.impl;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.style.background.BackgroundDetailPane;
import com.fr.general.Background;
import com.fr.general.locale.image.I18nImage;
import javax.swing.*;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
@ -25,23 +20,14 @@ import static com.fine.swing.ui.layout.Layouts.flex;
*/
public class NullBackgroundPane extends BackgroundDetailPane {
private static final String NULL_BACKGROUND = "/com/fr/design/images/background/null_background.png";
private static final Image DEFAULT_NULL_BACKGROUND_IMAGE;
static {
DEFAULT_NULL_BACKGROUND_IMAGE = I18nImage.getImage(NULL_BACKGROUND);
}
public NullBackgroundPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel centerLabel = new UILabel(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background_Background_Is_Null"));
ImagePanel imagePane = new ImagePanel();
JPanel pane = column(
10,
flex(),
cell(imagePane),
cell(centerLabel),
flex()
).getComponent();
@ -60,30 +46,4 @@ public class NullBackgroundPane extends BackgroundDetailPane {
public void addChangeListener(ChangeListener changeListener) {
// do nothing.
}
/**
* 水平居中绘制 Image
*/
public class ImagePanel extends JPanel {
public ImagePanel() {
}
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
if (DEFAULT_NULL_BACKGROUND_IMAGE != null) {
int x = (this.getWidth() - DEFAULT_NULL_BACKGROUND_IMAGE.getWidth(null)) / 2;
g.drawImage(DEFAULT_NULL_BACKGROUND_IMAGE, x, 0, this);
}
}
@Override
public Dimension getPreferredSize() {
if (DEFAULT_NULL_BACKGROUND_IMAGE == null) {
return super.getPreferredSize();
}
return FineUIScale.scale(new Dimension(DEFAULT_NULL_BACKGROUND_IMAGE.getWidth(null), DEFAULT_NULL_BACKGROUND_IMAGE.getHeight(null)));
}
}
}

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

@ -733,7 +733,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
// 设置column1的editor
columnsComboBox = new UIComboBox(new DefaultComboBoxModel());
columnsComboBox.setRenderer(new UIComboBoxRenderer() {
@Override
@ -754,7 +753,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
return super.stopCellEditing();
}
});
((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(1);
((DefaultCellEditor) column1.getCellEditor()).setClickCountToStart(2);
//设置Column 2的Editor
column2.setCellEditor(new ColumnValueEditor());
@ -963,12 +962,12 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
/*
* 击以编辑
* 击以编辑
*/
@Override
public boolean isCellEditable(EventObject anEvent) {
if (anEvent instanceof MouseEvent) {
return ((MouseEvent) anEvent).getClickCount() >= 1;
return ((MouseEvent) anEvent).getClickCount() >= 2;
}
return true;
}
@ -1221,6 +1220,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
return this;
}
@Override
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected;
}
}
/*
@ -1246,6 +1250,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
return this;
}
@Override
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected;
}
}
/**
@ -1264,7 +1273,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
setSelected((value != null && ((Boolean) value).booleanValue()));
setUI(getUICheckBoxUI());
setBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, UIManager.getColor("defaultBorderColor")));
setBackground(Color.WHITE);
if (isSelected) {
setBackground(UIManager.getColor( "Table.selectionBackground"));
} else {
setBackground(UIManager.getColor("Table.background"));
}
return this;
}
}

6
designer-base/src/main/resources/com/fine/theme/icon/formExport.svg

@ -0,0 +1,6 @@
<svg width="31" height="29" viewBox="0 0 31 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 2C0 0.895431 0.895431 0 2 0H25C26.1046 0 27 0.895431 27 2V11.8321C26.365 11.5546 25.6956 11.3412 25 11.2V2H2V26H14.3378C14.7601 26.73 15.272 27.4017 15.8586 28H2C0.895431 28 0 27.1046 0 26V2Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5968 20.25C15.5968 16.5755 18.5755 13.5968 22.25 13.5968C25.9245 13.5968 28.9032 16.5755 28.9032 20.25C28.9032 23.9245 25.9245 26.9032 22.25 26.9032C18.5755 26.9032 15.5968 23.9245 15.5968 20.25ZM22.25 12C17.6937 12 14 15.6937 14 20.25C14 24.8063 17.6937 28.5 22.25 28.5C26.8063 28.5 30.5 24.8063 30.5 20.25C30.5 15.6937 26.8063 12 22.25 12ZM22.25 14.9274C22.8379 14.9274 23.3145 15.404 23.3145 15.9919V19.1855H26.5081C27.096 19.1855 27.5726 19.6621 27.5726 20.25C27.5726 20.8379 27.096 21.3145 26.5081 21.3145H23.3145V24.5081C23.3145 25.096 22.8379 25.5726 22.25 25.5726C21.6621 25.5726 21.1855 25.096 21.1855 24.5081V21.3145H17.9919C17.404 21.3145 16.9274 20.8379 16.9274 20.25C16.9274 19.6621 17.404 19.1855 17.9919 19.1855H21.1855V15.9919C21.1855 15.404 21.6621 14.9274 22.25 14.9274Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.1429 8H11.4286V14.4286H14.2139C15.9469 11.9759 18.8361 10.3184 22.1429 10.156V8ZM13.5579 15.5C12.8807 16.791 12.4999 18.2462 12.4999 19.7857C12.4999 20.9128 12.704 21.9946 13.079 23H5V15.5H13.5579Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M5 8H10.5V14.5H5V8Z" fill="#0A1C38" fill-opacity="0.78"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

2
designer-base/src/main/resources/com/fine/theme/icon/saveFile.svg

@ -1,3 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M28.5 28V9.46837C28.5 9.34773 28.4564 9.23115 28.3772 9.14014L23.6185 3.67177C23.5236 3.56265 23.386 3.5 23.2414 3.5H20V10.6C20 11.3732 19.3732 12 18.6 12H9.4C8.6268 12 8 11.3732 8 10.6V3.5H4C3.72386 3.5 3.5 3.72386 3.5 4V28C3.5 28.2761 3.72386 28.5 4 28.5H8V19.4C8 18.6268 8.6268 18 9.4 18H22.6C23.3732 18 24 18.6268 24 19.4V28.5H28C28.2761 28.5 28.5 28.2761 28.5 28ZM24 30H8H4C2.89543 30 2 29.1046 2 28V4C2 2.89543 2.89543 2 4 2H8H20H23.2414C23.82 2 24.3702 2.2506 24.7501 2.68709L29.5087 8.15546C29.8255 8.51949 30 8.9858 30 9.46837V28C30 29.1046 29.1046 30 28 30H24ZM22.5 28.5V19.5H9.5V28.5H22.5ZM9.5 3.5H18.5V10.5H9.5V3.5Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 4V28H8V20C8 18.8954 8.89543 18 10 18H22C23.1046 18 24 18.8954 24 20V28H28V9.73985L23.0801 4H20V10C20 11.1046 19.1046 12 18 12H10C8.89543 12 8 11.1046 8 10V4H4ZM24 30H28C29.1046 30 30 29.1046 30 28V9.73985C30 9.26243 29.8292 8.80075 29.5185 8.43827L24.5986 2.69842C24.2187 2.25513 23.664 2 23.0801 2H20H8H4C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H8H24ZM22 28V20H10V28H22ZM10 4H18V10H10V4Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 593 B

2
designer-base/src/main/resources/com/fine/theme/icon/saveFile_disable.svg

@ -1,3 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M28.5 28V9.46837C28.5 9.34773 28.4564 9.23115 28.3772 9.14014L23.6185 3.67177C23.5236 3.56265 23.386 3.5 23.2414 3.5H20V10.6C20 11.3732 19.3732 12 18.6 12H9.4C8.6268 12 8 11.3732 8 10.6V3.5H4C3.72386 3.5 3.5 3.72386 3.5 4V28C3.5 28.2761 3.72386 28.5 4 28.5H8V19.4C8 18.6268 8.6268 18 9.4 18H22.6C23.3732 18 24 18.6268 24 19.4V28.5H28C28.2761 28.5 28.5 28.2761 28.5 28ZM24 30H8H4C2.89543 30 2 29.1046 2 28V4C2 2.89543 2.89543 2 4 2H8H20H23.2414C23.82 2 24.3702 2.2506 24.7501 2.68709L29.5087 8.15546C29.8255 8.51949 30 8.9858 30 9.46837V28C30 29.1046 29.1046 30 28 30H24ZM22.5 28.5V19.5H9.5V28.5H22.5ZM9.5 3.5H18.5V10.5H9.5V3.5Z" fill="#0A1C38" fill-opacity="0.29"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 4V28H8V20C8 18.8954 8.89543 18 10 18H22C23.1046 18 24 18.8954 24 20V28H28V9.73985L23.0801 4H20V10C20 11.1046 19.1046 12 18 12H10C8.89543 12 8 11.1046 8 10V4H4ZM24 30H28C29.1046 30 30 29.1046 30 28V9.73985C30 9.26243 29.8292 8.80075 29.5185 8.43827L24.5986 2.69842C24.2187 2.25513 23.664 2 23.0801 2H20H8H4C2.89543 2 2 2.89543 2 4V28C2 29.1046 2.89543 30 4 30H8H24ZM22 28V20H10V28H22ZM10 4H18V10H10V4Z" fill="#0A1C38" fill-opacity="0.29"/>
</svg>

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 594 B

1
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -7,6 +7,7 @@
"cut": "cut.svg",
"save": "save.svg",
"saveFile": "saveFile.svg",
"formExport": "formExport.svg",
"copy": "copy.svg",
"formatBrush": "formatBrush.svg",
"paste": "paste.svg",

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -457,9 +457,9 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
private class ChartChangeButton extends UIToggleButton {
private final double DEL_WIDTH = scale(9);
private final double DEL_WIDTH = scale(13);
private final double DOWN_HEIGHT = scale(1);
private final Icon closeIcon = new LazyIcon("closeTag", 8);
private final Icon closeIcon = new LazyIcon("closeTag", 12);
private boolean isMoveOn = false;
private String buttonName = "";

3
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java

@ -48,7 +48,8 @@ public class ChartImagePane extends ChartSelectDemoPane {
super.paint(g);
BufferedImage image1 = IOUtils.readImageWithCache(fullIconPath);
g.drawImage(image1, 0, 0, scale(IMAGE_WIDTH), scale(IMAGE_HIGTH), null);
int x = (this.getWidth() - scale(IMAGE_WIDTH)) / 2;
g.drawImage(image1, x, 0, scale(IMAGE_WIDTH), scale(IMAGE_HIGTH), null);
}
};

33
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -5,6 +5,7 @@ import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.foldablepane.UIExpandablePane;
@ -54,6 +55,9 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 数据点提示内容界面含有通用设置富文本编辑器自定义JS界面
*/
@ -291,14 +295,21 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
}
protected JPanel createCommonFormatPanel() {
JPanel formatContent = FineLayoutBuilder.compatibleTableLayout(10, getPaneComponents(), new double[]{1.2, 3});
Component[][] paneComponents = getPaneComponents();
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(getLabelContentTitle()), formatContent}
};
Component[][] components = new Component[paneComponents.length+1][2];
components[0] = new Component[]{null, null};
for (int i = 0; i < paneComponents.length; i++) {
if (i == 0) {
components[i+1][0] = new UILabel(getLabelContentTitle());
} else {
components[i+1][0] = null;
}
components[i+1][1] = row(10, cell(paneComponents[i][0]).weight(LayoutConstants.LEFT_WEIGHT), cell(paneComponents[i][1]).weight(LayoutConstants.RIGHT_WEIGHT)).getComponent();
}
return Layouts.cell(FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3}))
return cell(FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{LayoutConstants.LEFT_WEIGHT, LayoutConstants.RIGHT_WEIGHT}))
.with(it ->it.setBorder(new ScaledEmptyBorder(0, 0, 10, 0))).getComponent();
}
@ -310,10 +321,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
textAttrPane = createChartTextAttrPane();
stylePanel = Layouts.column(10,
Layouts.row(
Layouts.cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"))).weight(1.2), Layouts.cell(styleButton).weight(3)
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"))).weight(LayoutConstants.LEFT_WEIGHT), cell(styleButton).weight(LayoutConstants.RIGHT_WEIGHT)
),
Layouts.cell(textAttrPane)
cell(textAttrPane)
).getComponent();
initStyleButtonListener();
@ -357,7 +368,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Content_Style")), createRichEditorButton()}
};
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{LayoutConstants.LEFT_WEIGHT, LayoutConstants.RIGHT_WEIGHT});
}
private JComponent createRichEditorButton() {
@ -478,7 +489,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
new Component[]{htmlLabelPane, null}
};
return FineLayoutBuilder.compatibleTableLayout(10, htmlComponents, new double[]{1.2, 3});
return FineLayoutBuilder.compatibleTableLayout(10, htmlComponents, new double[]{LayoutConstants.LEFT_WEIGHT, LayoutConstants.RIGHT_WEIGHT});
}
protected VanChartHtmlLabelPane createHtmlLabelPane() {

8
designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextPane.java

@ -13,6 +13,8 @@ import javax.swing.JScrollPane;
import java.awt.BorderLayout;
import java.awt.Dimension;
import static com.fine.theme.utils.FineUIScale.scale;
// 标签提示中的富文本面板,包含字段设置和富文本编辑器
public class VanChartRichTextPane extends BasicBeanPane<AttrTooltipContent> {
@ -48,13 +50,13 @@ public class VanChartRichTextPane extends BasicBeanPane<AttrTooltipContent> {
fieldListContent.add(fieldListPane, BorderLayout.NORTH);
JScrollPane fieldListScrollPane = new JScrollPane(fieldListContent);
fieldListScrollPane.setPreferredSize(new Dimension(FIELD_PANE_W, FIELD_PANE_H));
fieldListScrollPane.setPreferredSize(scale(new Dimension(FIELD_PANE_W, FIELD_PANE_H)));
fieldListScrollPane.setHorizontalScrollBar(null);
fieldListScrollPane.setBorder(BorderFactory.createTitledBorder(Toolkit.i18nText("Fine-Design_Report_Add_Field")));
// 字段格式和汇总
JScrollPane fieldAttrScrollPane = new JScrollPane(fieldAttrPane);
fieldAttrScrollPane.setPreferredSize(new Dimension(FIELD_PANE_W, FIELD_PANE_H));
fieldAttrScrollPane.setPreferredSize(scale(new Dimension(FIELD_PANE_W, FIELD_PANE_H)));
fieldAttrScrollPane.setBorder(BorderFactory.createTitledBorder(Toolkit.i18nText("Fine-Design_Report_Field_Setting")));
fieldPane.add(fieldListScrollPane);
@ -71,7 +73,7 @@ public class VanChartRichTextPane extends BasicBeanPane<AttrTooltipContent> {
JPanel richEditorPane = new JPanel();
richEditorPane.setLayout(new BorderLayout());
richEditorPane.setPreferredSize(new Dimension(RICH_EDITOR_W, RICH_EDITOR_H));
richEditorPane.setPreferredSize(scale(new Dimension(RICH_EDITOR_W, RICH_EDITOR_H)));
richEditorPane.add(richEditor, BorderLayout.CENTER);
return richEditorPane;

5
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java

@ -2,6 +2,7 @@ package com.fr.van.chart.map.designer.type;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.decision.webservice.v10.map.MapEditService;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -83,9 +84,7 @@ public class WMSLayerPane extends JPanel implements UIObserver {
@Override
protected Void doInBackground() {
/// 待实现
// MapEditService.getInstance().getWMSNames(wmsUrl.getText());
List<String> wmsNames = new ArrayList<>();
List<String> wmsNames = MapEditService.getInstance().getWMSNames(wmsUrl.getText());
list.clear();
for (String layer : wmsNames) {
list.add(new WMSLayer(layer, false));

BIN
designer-chart/src/main/resources/com/fr/design/images/background/null_background.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

60
designer-realize/src/main/java/com/fanruan/boot/adaptation/DesignServerSupportModule.java

@ -1,37 +1,76 @@
package com.fanruan.boot.adaptation;
import com.fanruan.carina.Carina;
import com.fanruan.carina.context.ContextListener;
import com.fanruan.portal.authority.PortalAuthorityItems;
import com.fanruan.portal.module.PortalModule;
import com.fanruan.portal.module.PortalModuleManager;
import com.fr.stable.StringUtils;
import com.fr.third.guava.collect.Sets;
import java.util.Optional;
import java.util.Set;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_ADD_DEPARTMENT_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_ADD_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_ADD_ROLE_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_DELETE_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_DELETE_ROLE_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_EDIT_DEP_ROLE_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_EDIT_EDIT_INFO_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_EDIT_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_EDIT_RESET_PASSWORD_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_FORBIDDEN_ID;
import static com.fanruan.auth.authority.AuthAuthorityItems.USER_ID;
import static com.fanruan.messenger.ums.authority.UMSAuthorityItems.PORTAL_MANAGEMENT_ENTERPRISE_UMS_ID;
import static com.fanruan.portal.authority.PortalAuthorityItems.ENTERPRISE_GENERAL_ID;
import static com.fanruan.portal.authority.PortalAuthorityItems.ENTERPRISE_ID;
import static com.fanruan.portal.authority.PortalAuthorityItems.MAP_ID;
import static com.fanruan.portal.authority.PortalAuthorityItems.PORTAL_MANAGEMENT_ID;
import static com.fanruan.portal.authority.PortalAuthorityItems.SECURITY_ID;
import static com.fr.decision.authority.base.constant.ReportAuthorityItems.ENTERPRISE_REPORT_BASE_SETTINGS_ID;
import static com.fr.decision.authority.base.constant.ReportAuthorityItems.ENTERPRISE_REPORT_ESD_ID;
import static com.fr.decision.authority.base.constant.ReportAuthorityItems.ENTERPRISE_REPORT_ID;
/**
* 内置服务器支持展示的模块预期调用顺序在业务模块之后
*
* @author Anner
* @since 11.0
* Created on 2024/10/15
* Created on 2024/10/15
*/
public class DesignServerSupportModule {
private final static Set<String> SUPPORT_MODULE = Sets.newHashSet(
// 系统管理
PORTAL_MANAGEMENT_ID,
// 用户管理
USER_ID,
USER_ADD_ROLE_ID,
USER_ADD_DEPARTMENT_ID,
USER_ADD_ID,
USER_EDIT_ID,
USER_EDIT_RESET_PASSWORD_ID,
USER_EDIT_EDIT_INFO_ID,
USER_EDIT_DEP_ROLE_ID,
USER_DELETE_ID,
USER_DELETE_ROLE_ID,
USER_FORBIDDEN_ID,
// 企业设置
ENTERPRISE_ID,
// 企业设置 - 通知中心
PORTAL_MANAGEMENT_ENTERPRISE_UMS_ID,
// 企业设置 - 通用设置
ENTERPRISE_GENERAL_ID,
// 报表设置
ENTERPRISE_REPORT_ID,
// 报表设置 - 基础设置
ENTERPRISE_REPORT_BASE_SETTINGS_ID,
// 报表设置 - 抽数缓存
ENTERPRISE_REPORT_ESD_ID,
// 安全管理
SECURITY_ID,
// 地图管理
MAP_ID
);
MAP_ID);
/**
* 注册一下支持展示的模块
@ -55,8 +94,15 @@ public class DesignServerSupportModule {
* 启动入口重建一下展示的module
*/
public static void rebuild() {
PortalModuleManager.allModules().keySet().stream()
.filter(m -> !SUPPORT_MODULE.contains(m))
.forEach(PortalModuleManager::unregister);
Carina.getApplicationContext().addListener(new ContextListener() {
@Override
public void onStart() {
PortalModuleManager.allModules().values().stream()
.filter(m -> !StringUtils.equals(m.getParentID(), PortalAuthorityItems.PORTAL_ROOT_ID))
.map(PortalModule::getId)
.filter(m -> !SUPPORT_MODULE.contains(m))
.forEach(PortalModuleManager::unregister);
}
});
}
}
}

13
designer-realize/src/main/java/com/fanruan/boot/env/function/DesignReportBaseComponent.java vendored

@ -5,6 +5,10 @@ import com.fanruan.carina.annotions.DependsOn;
import com.fanruan.carina.annotions.FineComponent;
import com.fanruan.carina.annotions.Start;
import com.fanruan.carina.annotions.Stop;
import com.fanruan.carina.annotions.Supplemental;
import com.fr.nx.app.web.StreamAndTemplateReportletCreator;
import com.fr.nx.app.web.StreamReportletCreator;
import com.fr.web.factory.WebletFactory;
/**
* DesignReportBaseComponent
@ -17,6 +21,15 @@ import com.fanruan.carina.annotions.Stop;
@DependsOn(dependencies = "design_function_chart_base")
public class DesignReportBaseComponent extends ReportBaseComponent {
/**
* prepare
*/
@Supplemental
public void supplemental() {
WebletFactory.registerWebletCreator(StreamReportletCreator.KEY);
WebletFactory.registerWebletCreator(StreamAndTemplateReportletCreator.KEY);
}
/**
* start
*/

5
designer-realize/src/main/java/com/fanruan/boot/init/DesignPreLoadComponent.java

@ -172,6 +172,11 @@ public class DesignPreLoadComponent {
LocaleMarker.create("com/fr/web/i18n/report", LocaleScope.WEB),
LocaleMarker.create("com/fr/web/i18n/chart", LocaleScope.WEB)
);
Carina.getApplicationContext().group(InterMutableKey.class).addAll(
LocaleMarker.create("com/fr/plugin/locale/locale", LocaleScope.DESIGN),
LocaleMarker.create("com/fr/plugin/locale/locale", LocaleScope.WEB),
LocaleMarker.create("com/fr/plugin/locale/locale", LocaleScope.SERVER)
);
// WebLocaleProvider插件接口适配
LocaleUtils.registerLocaleParser((localeStr, defaulVal) -> {

3
designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewPolyReportAction.java

@ -6,6 +6,7 @@ import java.awt.event.KeyEvent;
import javax.swing.KeyStroke;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.svg.IconUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.DesignerContext;
@ -19,7 +20,7 @@ public class NewPolyReportAction extends UpdateAction {
public NewPolyReportAction() {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_New_Multi_Report"));
this.setMnemonic('F');
this.setSmallIcon("/com/fr/design/images/m_file/formExport");
this.setSmallIcon(new LazyIcon("formExport"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, DEFAULT_MODIFIER));
}

34
designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupDockingPane.java

@ -2,7 +2,7 @@ package com.fr.design.dscolumn;
import com.fine.swing.ui.layout.Layouts;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.core.SimpleCardPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.FunctionComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
@ -44,7 +44,7 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
private UIButton advancedButton;
private JPanel advancedButtonRow;
private FunctionComboBox functionComboBox;
private ReactiveCardPane cardPane;
private SimpleCardPane cardPane;
private UIComboBox goBox;
private ItemListener listener;
@ -68,11 +68,11 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
goBox.addItemListener(ee -> {
int i = goBox.getSelectedIndex();
if (i == BIND_GROUP) {
cardPane.select("groupPane").populate();
cardPane.show("groupPane");
} else if (i == BIND_SELECTED) {
cardPane.setVisible(false);
} else if (i == BIND_SUMMARY) {
cardPane.select("summaryPane").populate();
cardPane.show("summaryPane");
CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr();
cellExpandAttr.setDirection(Constants.NONE);
}
@ -93,14 +93,14 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
advancedButtonRow = row(flex(1.2), cell(advancedButton).weight(3)).getComponent();
functionComboBox = new FunctionComboBox(GUICoreUtils.getFunctionArray());
cardPane = ReactiveCardPane.create()
.addSupplier("groupPane", () -> column(LayoutConstants.VERTICAL_GAP,
row(flex(1.2), cell(groupComboBox).weight(3)),
cell(advancedButtonRow)
).getComponent())
.addSupplier("summaryPane", () -> row(
flex(1.2), cell(functionComboBox).weight(3)
).getComponent());
cardPane = new SimpleCardPane();
cardPane.add("groupPane", column(LayoutConstants.VERTICAL_GAP,
row(flex(1.2), cell(groupComboBox).weight(3)),
cell(advancedButtonRow)
).getComponent());
cardPane.add("summaryPane", row(
flex(1.2), cell(functionComboBox).weight(3)
).getComponent());
}
@Override
@ -116,12 +116,12 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
if (recordGrouper instanceof FunctionGrouper) {
populateFunctionGrouper();
} else if (recordGrouper instanceof SummaryGrouper) {
cardPane.select("summaryPane").populate();
cardPane.show("summaryPane");
this.goBox.setSelectedIndex(BIND_SUMMARY);
this.functionComboBox.setFunction(((SummaryGrouper) recordGrouper).getFunction());
} else if (recordGrouper instanceof CustomGrouper) {
// 自定义分组 or 高级分组
cardPane.select("groupPane").populate();
cardPane.show("groupPane");
this.goBox.setSelectedIndex(BIND_GROUP);
this.groupComboBox.setSelectedIndex(ADVANCED);
}
@ -134,11 +134,11 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
if (!((FunctionGrouper) recordGrouper).isCustom()) {
int mode = recordGrouper.getDivideMode();
if (mode == FunctionGrouper.GROUPING_MODE) {
cardPane.select("groupPane").populate();
cardPane.show("groupPane");
this.goBox.setSelectedIndex(BIND_GROUP);
this.groupComboBox.setSelectedIndex(COMMON);
} else if (mode == FunctionGrouper.CONTINUUM_MODE) {
cardPane.select("groupPane").populate();
cardPane.show("groupPane");
this.goBox.setSelectedIndex(BIND_GROUP);
this.groupComboBox.setSelectedIndex(CONTINUUM);
} else if (mode == FunctionGrouper.LIST_MODE) {
@ -147,7 +147,7 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
}
} else {
// 这种情况也放到自定义分组里面
cardPane.select("groupPane").populate();
cardPane.show("groupPane");
this.goBox.setSelectedIndex(BIND_GROUP);
this.groupComboBox.setSelectedIndex(ADVANCED);
}

1
designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java

@ -123,6 +123,7 @@ public class ReportComponentComposite extends JPanel implements RemoveListener {
centerCardPane.populate(workbook.getTemplateReport(newIndex));
if (parentContainer != null) {
parentContainer.setDownPane(ReportComponentComposite.this);
parentContainer.setSheetNameTabPane(sheetNameTab);
}
if (templateStateList.size() > newIndex) {

175
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fine.swing.ui.layout.Layouts;
import com.fine.swing.ui.layout.Row;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
@ -11,7 +12,6 @@ import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -74,14 +74,14 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private UIComboBox showContent;
//内容提示
private ReactiveCardPane showContentPane;
private JPanel showContentPane;
private UIButtonGroup tooltipButtonGroup;
private ReactiveCardPane tooltipPane;
private JPanel tooltipPane;
private UITextField tooltipTextField;
private UITextField fileNameTextField;
//文本超出时隐藏
private ReactiveCardPane overflowPane;
private JPanel overflowPane;
private UICheckBox textOverflowCheckBox;
private int curSelectedIndex;
private UIComboBox showPartComboBox;
@ -112,7 +112,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
// 插入行策略
private UIButtonGroup insertRowPolicyButtonGroup;
private ValueEditorPane valueEditor;
private ReactiveCardPane insertRowPolicyPane;
private JPanel insertRowPolicyPane;
private UILabel insertRowPolicyLabel;
private UIRadioButton exportButton;
@ -220,6 +220,10 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
initInsertRowPolicyPane();
return Layouts.column(LayoutConstants.VERTICAL_GAP,
cell(seniorUpPane()),
row(
cell(insertRowPolicyLabel).weight(1.2),
cell(insertRowPolicyButtonGroup).weight(3)
),
cell(insertRowPolicyPane)
).with(it -> it.setBorder(new ScaledEmptyBorder(0, 0, LayoutConstants.VERTICAL_GAP, 0))
).getComponent();
@ -236,29 +240,11 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
insertRowPolicyLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_CellWrite_InsertRow_Policy", SwingConstants.LEFT));
UIComponentUtils.setLineWrap(insertRowPolicyLabel);
insertRowPolicyPane = ReactiveCardPane.create()
.addSupplier("empty", () -> Layouts.column(LayoutConstants.VERTICAL_GAP,
row(
cell(insertRowPolicyLabel).weight(1.2),
cell(insertRowPolicyButtonGroup).weight(3)
)
).getComponent())
.addSupplier("default", () -> Layouts.column(LayoutConstants.VERTICAL_GAP,
row(
cell(insertRowPolicyLabel).weight(1.2),
cell(insertRowPolicyButtonGroup).weight(3)
),
row(
flex(1.2),
cell(valueEditor).weight(3)
)
).getComponent()
);
insertRowPolicyPane.select("empty").populate();
insertRowPolicyPane = row( flex(1.2), cell(valueEditor).weight(3)).getComponent();
insertRowPolicyPane.setVisible(false);
insertRowPolicyButtonGroup.addChangeListener(e -> {
String key = insertRowPolicyButtonGroup.getSelectedIndex() == 1 ? "default" : "empty";
insertRowPolicyPane.select(key).populate();
insertRowPolicyPane.setVisible(insertRowPolicyButtonGroup.getSelectedIndex() == 1);
});
}
@ -284,32 +270,24 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
UILabel showContentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Content"), SwingConstants.LEFT);
UIComponentUtils.setLineWrap(showContentLabel);
Row downloadRow = row(
cell(downloadLabel).weight(1.2), cell(fileNameTextField).weight(3.0)
).getComponent();
downloadRow.setVisible(false);
initTooltipPane();
showContentPane = ReactiveCardPane.create()
.addSupplier("default", () -> column(LayoutConstants.VERTICAL_GAP,
row(
cell(showContentLabel).weight(1.2), cell(showContent).weight(3.0)
),
cell(tooltipPane)
).getComponent())
.addSupplier("download", () -> column(LayoutConstants.VERTICAL_GAP,
row(
cell(showContentLabel).weight(1.2), cell(showContent).weight(3.0)
),
row(
cell(downloadLabel).weight(1.2), cell(fileNameTextField).weight(3.0)
),
cell(tooltipPane)
).getComponent());
showContentPane.select("default").populate();
showContentPane = column(10,
row(
cell(showContentLabel).weight(1.2), cell(showContent).weight(3.0)
),
cell(downloadRow),
cell(tooltipPane)
).getComponent();
showContent.addItemListener(e -> {
if (e.getStateChange() == ItemEvent.SELECTED) {
if (showContent.getSelectedIndex() == DOWNLOAD_INDEX) {
showContentPane.select("download").populate();
} else {
showContentPane.select("default").populate();
}
downloadRow.setVisible(showContent.getSelectedIndex() == DOWNLOAD_INDEX);
handleCellShowStyleChange(e);
}
});
@ -320,28 +298,19 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
tooltipButtonGroup = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Report_CellWrite_ToolTip_Custom"),
Toolkit.i18nText("Fine-Design_Report_CellWrite_ToolTip_CellValue")});
tooltipTextField = new UITextField();
tooltipPane = ReactiveCardPane.create()
.addSupplier("define", () -> column(LayoutConstants.VERTICAL_GAP,
row(
cell(toolTipLabel).weight(1.2), cell(tooltipButtonGroup).weight(3.0)
),
row(
flex(1.2), cell(tooltipTextField).weight(3.0)
)
).getComponent())
.addSupplier("cellValue", () -> column(LayoutConstants.VERTICAL_GAP,
row(
cell(toolTipLabel).weight(1.2), cell(tooltipButtonGroup).weight(3.0)
)
).getComponent());
tooltipPane.select("define").populate();
Row tooltipTextRow = row(
flex(1.2), cell(tooltipTextField).weight(3.0)
).getComponent();
tooltipPane = column(10,
row(
cell(toolTipLabel).weight(1.2), cell(tooltipButtonGroup).weight(3.0)
),
cell(tooltipTextRow)
).getComponent();
tooltipButtonGroup.addChangeListener(e -> {
if (tooltipButtonGroup.getSelectedIndex() == 0) {
tooltipPane.select("define").populate();
} else {
tooltipPane.select("cellValue").populate();
}
tooltipTextRow.setVisible(tooltipButtonGroup.getSelectedIndex() == 0);
});
}
@ -354,35 +323,40 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
UILabel hideTypeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_CellWrite_TextOverflow_HideType"));
textOverflowCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_CellWrite_TextOverflow_HideWhenOverflow"));
overflowPane = ReactiveCardPane.create()
.addSupplier("empty", () -> column(LayoutConstants.VERTICAL_GAP,
row(cell(textOverflowCheckBox))
).getComponent())
.addSupplier("showChar", () -> column(LayoutConstants.VERTICAL_GAP,
row(cell(textOverflowCheckBox)),
row(cell(showPartLabel).weight(1.2), cell(showPartComboBox).weight(1.4), flex(0.1), cell(numberLabel).weight(0.5), cell(showCharNums).weight(1.0)),
row(cell(hideTypeLabel).weight(1.2), cell(textOverflowTypeComboBox).weight(3.0))
).getComponent())
.addSupplier("showCell", () -> column(LayoutConstants.VERTICAL_GAP,
row(cell(textOverflowCheckBox)),
row(cell(showPartLabel).weight(1.2), cell(showPartComboBox).weight(3.0)),
row(cell(hideTypeLabel).weight(1.2), cell(textOverflowTypeComboBox).weight(3.0))
).getComponent());
overflowPane.select("empty").populate();
// 字符长度-数量
Row numPane = row(flex(0.1), cell(numberLabel).weight(0.5), cell(showCharNums).weight(1.0)).getComponent();
// 显示部分 & 隐藏方式
JPanel overflowPolicyPane = column(10,
row(
cell(showPartLabel).weight(1.2),
row(
cell(showPartComboBox).weight(1.4),
cell(numPane).weight(1.6)
).weight(3)
),
row(
cell(hideTypeLabel).weight(1.2),
cell(textOverflowTypeComboBox).weight(3.0)
)
).getComponent();
overflowPane = column(10,
row(cell(textOverflowCheckBox)),
cell(overflowPolicyPane)
).getComponent();
overflowPolicyPane.setVisible(false);
showPartComboBox.addItemListener(e -> {
if (showPartComboBox.getSelectedIndex() == 0) {
overflowPane.select("showChar").populate();
} else {
overflowPane.select("showCell").populate();
}
numPane.setVisible(showPartComboBox.getSelectedIndex() == 0);
});
textOverflowCheckBox.addItemListener(e -> {
if (e.getStateChange() == ItemEvent.SELECTED) {
if (showPartComboBox.getSelectedIndex() == 0) {
overflowPane.select("showChar").populate();
} else {
overflowPane.select("showCell").populate();
}
overflowPolicyPane.setVisible(true);
numPane.setVisible(showPartComboBox.getSelectedIndex() == 0);
// 记录目前自动调整哪个被选中
for (int i = 0; i < adjustRadioButtons.length; i++) {
if (adjustRadioButtons[i].isSelected()) {
@ -392,7 +366,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
}
noAutoRadioButton.setSelected(true);
} else {
overflowPane.select("empty").populate();
overflowPolicyPane.setVisible(false);
adjustRadioButtons[curSelectedIndex].setSelected(true);
}
});
@ -557,12 +531,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
} else {
tooltipButtonGroup.setSelectedIndex(1);
}
if (tooltipButtonGroup.getSelectedIndex() == 0) {
tooltipPane.select("define").populate();
} else {
tooltipPane.select("cellValue").populate();
}
tooltipPane.setVisible(true);
tooltipPane.setVisible(tooltipButtonGroup.getSelectedIndex() == 0);
if (cellGUIAttr.isHideTextWhenOverflow()) {
textOverflowCheckBox.setSelected(true);
if (cellGUIAttr.isShowCharNum()) {
@ -607,12 +576,10 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
insertRowPolicyButtonGroup.setSelectedIndex(0);
this.valueEditor.populate(StringUtils.EMPTY);
}
String key = insertRowPolicyButtonGroup.getSelectedIndex() == 1 ? "default" : "empty";
insertRowPolicyPane.select(key).populate();
insertRowPolicyPane.setVisible(true);
insertRowPolicyPane.setVisible(insertRowPolicyButtonGroup.getSelectedIndex() == 1);
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (!jTemplate.isJWorkBook()) { //表单中报表块编辑屏蔽掉 插入行策略
insertRowPolicyPane.select("empty").populate();
insertRowPolicyPane.setVisible(false);
}
populateDesensitizationBean(cellElement);
}

8
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/model/UpdateDataWorker.java

@ -1,10 +1,11 @@
package com.fr.design.mainframe.cell.settingpane.desensitization.model;
import com.fr.data.desensitize.rule.DesensitizationRuleManager;
import com.fr.data.desensitize.rule.base.DesensitizationRule;
import com.fr.data.desensitize.rule.base.DesensitizationRuleSource;
import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository;
import javax.swing.*;
import javax.swing.SwingWorker;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
@ -25,8 +26,9 @@ public class UpdateDataWorker extends SwingWorker<Map<String, Object>, Void> {
protected Map<String, Object> doInBackground() {
Map<String, Object> result = new HashMap<>();
Map<String, String> allRoles = RemoteAuthorityRepository.getInstance().getAllRoles4Desensitization();
Map<DesensitizationRuleSource, Map<String, DesensitizationRule>> allRules = RemoteAuthorityRepository.getInstance().getAllRoles().getSourceRuleMap();
Map<DesensitizationRuleSource, Map<String, DesensitizationRule>> allRules = new HashMap<>();
allRules.put(DesensitizationRuleSource.SERVER, RemoteAuthorityRepository.getInstance().getAllRoles().getSourceRuleMap().get(DesensitizationRuleSource.SERVER));
allRules.put(DesensitizationRuleSource.CUSTOM, DesensitizationRuleManager.getInstance().getRulesBySource(DesensitizationRuleSource.CUSTOM));
result.put(ROLE_KEY, allRoles);
result.put(RULE_KEY, allRules);

4
designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java

@ -82,9 +82,9 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
void initTextField() {
colJTextField = new JTextField();
colJTextField.setEditable(false);
colJTextField.setEnabled(false);
rowJTextField = new JTextField();
rowJTextField.setEditable(false);
rowJTextField.setEnabled(false);
}
void initSelectButton() {

46
designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java

@ -13,8 +13,10 @@ import com.fr.report.core.sort.header.SortHeader;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.ColumnRow;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.util.ArrayList;
import java.util.Iterator;
@ -34,6 +36,7 @@ public class HeaderAreaPane extends JPanel {
SortColumnRowPane columnRowPane;
UIComboBox uiComboBox;
JPanel sortColumnRowPanel;
boolean showHeaderArea;
HeaderAreaPane(int headerAreaPaneWidth, int headerAreaPaneRightWidth) {
this.headerAreaPaneWidth = headerAreaPaneWidth;
@ -57,12 +60,43 @@ public class HeaderAreaPane extends JPanel {
}
private void initChangeListener() {
uiComboBox.addItemListener(e -> {
sortColumnRowPanel.setVisible(uiComboBox.getSelectedIndex() == 1);
uiComboBox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
boolean headerVisible = (uiComboBox.getSelectedIndex() == 1);
sortColumnRowPanel.setVisible(headerVisible);
// 仅在单元格状态改变时触发
if (showHeaderArea != headerVisible) {
showHeaderArea = headerVisible;
triggerItemChanged(headerVisible);
}
}
});
uiComboBox.setSelectedIndex(0);
}
private void triggerItemChanged(boolean isHeaderVisible) {
if (isHeaderVisible) {
handleCustomHeader();
} else {
handleNoHeader();
}
}
private void handleCustomHeader() {
ColumnRow columnRow = columnRowPane.updateBean();
if (cellSelectionManager.isNotSelectables(columnRow)) {
columnRowPane.setColumnRow(ColumnRow.ERROR);
} else {
cellSelectionManager.addNotSelectables(columnRow);
}
}
private void handleNoHeader() {
cellSelectionManager.removeNotSelectables(columnRowPane.updateBean());
columnRowPane.cancelSelectState();
}
public void populateBean(ColumnRow columnRow, boolean showHeaderArea, TemplateCellElement cellElement) {
this.cellElement = cellElement;
boolean enabled = true;
@ -75,9 +109,11 @@ public class HeaderAreaPane extends JPanel {
private void populateColumnRowPane(ColumnRow columnRow, boolean showHeaderArea, boolean enabled) {
cellSelectionManager.build(cellElement, columnRow);
if(showHeaderArea){
if (showHeaderArea) {
columnRow = cellSelectionManager.buildCurrentCell(cellElement, columnRow);
}
// 更新当前单元格是否已配置自定义表头排序
this.showHeaderArea = showHeaderArea;
columnRowPane.populateBean(columnRow, enabled, cellSelectionManager);
uiComboBox.setSelectedIndex(showHeaderArea ? 1 : 0);
uiComboBox.setEnabled(enabled);

1
designer-realize/src/main/java/com/fr/design/sort/header/HeaderSortRulePane.java

@ -94,6 +94,7 @@ public class HeaderSortRulePane extends JPanel {
private ColorControlWindow colorSelector;
IconButton(SortRule sortRule) {
this.setLayout(new BorderLayout());
this.sortRule = sortRule;
initComponents();
}

4
designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java

@ -22,8 +22,6 @@ import javax.swing.ImageIcon;
public class ToolBarButton extends UIButton implements MouseListener {
private Widget widget;
private WidgetOption no;
private final int ICON_WIDTH = FineUIScale.scale(16);
private final int ICON_HEIGHT = FineUIScale.scale(16);
public ToolBarButton(Icon icon, Widget widget) {
this(null, icon, widget);
@ -55,7 +53,7 @@ public class ToolBarButton extends UIButton implements MouseListener {
if (icon instanceof ImageIcon) {
//自定义上传的图标在设计器工具栏显示需要按照16*16进行缩放
Image originalImage = ((ImageIcon) icon).getImage();
Image scaledImage = originalImage.getScaledInstance(ICON_WIDTH, ICON_HEIGHT, Image.SCALE_SMOOTH);
Image scaledImage = originalImage.getScaledInstance(FineUIScale.scale(16), FineUIScale.scale(16), Image.SCALE_SMOOTH);
icon = new ImageIcon(scaledImage);
}
super.setIcon(icon);

28
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -377,7 +377,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
ColumnRowGroupCellRenderer2 cellRenderer2 = new ColumnRowGroupCellRenderer2();
cellRenderer2.setHorizontalAlignment(SwingConstants.LEFT);
column2.setCellRenderer(cellRenderer2);
column2.setCellEditor(new SmartColumnValueEditor(ValueEditorPaneFactory.cellGroupEditor()));
column2.setCellEditor(new ColumnValueEditor(ValueEditorPaneFactory.cellGroupEditor()));
} else {
SelectedColumnValueTableCellRenderer renderer = new SelectedColumnValueTableCellRenderer();
renderer.setHorizontalAlignment(SwingConstants.LEFT);
@ -580,6 +580,11 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
return this;
}
@Override
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected;
}
}
private class ColumnRowGroupCellRenderer2 extends FineTableHeaderUI.TableRenderer {
@ -613,26 +618,11 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
return this;
}
}
}
protected class SmartColumnValueEditor extends ColumnValueEditor {
protected SmartColumnValueEditor(Editor<?>[] types) {
super(types);
}
/**
* 双击修改
* @param anEvent 事件
* @return 是否可编辑
*/
@Override
public boolean isCellEditable(EventObject anEvent) {
if (anEvent instanceof MouseEvent) {
return ((MouseEvent) anEvent).getClickCount() >= 2;
@Override
public boolean checkSelected(boolean isSelected, Class columnClass) {
return isSelected;
}
return true;
}
}
}

99
designer-realize/src/main/java/com/fr/nx/app/designer/menu/CalculateAttrPane.java

@ -1,5 +1,9 @@
package com.fr.nx.app.designer.menu;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -56,9 +60,9 @@ public class CalculateAttrPane extends BasicBeanPane<CalculatorAttrMark> {
private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
this.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
JPanel featureFlagPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
JPanel featureFlagPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
ActionLabel featureLabel = new ActionLabel(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Experimental_Feature"));
featureLabel.setFont(new Font(null, Font.PLAIN, 10));
featureLabel.addActionListener(new ActionListener() {
@ -68,77 +72,60 @@ public class CalculateAttrPane extends BasicBeanPane<CalculatorAttrMark> {
wDialog.setVisible(true);
}
});
featureFlagPanel.add(featureLabel);
featureFlagPanel.add(Layouts.row(Layouts.flex(), Layouts.cell(featureLabel)).getComponent());
JPanel calculateAttrPanel = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
calculateAttrPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0));
initTreeConfigPanel();
// JPanel calculatedEndPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
// calculateEnd = new UICheckBox(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine-Calculate-End"));
// calculatedEndPanel.add(calculateEnd);
JPanel queryCachePanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
List<Component[]> components = new ArrayList<>();
components.add(new Component[]{featureFlagPanel});
components.add(new Component[]{initCalculateAttrPanel()});
components.add(new Component[]{treeConfigPanel});
JPanel content =
TableLayoutHelper.createGapTableLayoutPane(
components.toArray(new Component[0][]),
TableLayoutHelper.FILL_LASTCOLUMN,
5,
5
);
this.add(content, BorderLayout.CENTER);
}
private JPanel initCalculateAttrPanel() {
queryCache = new UICheckBox(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Calculate_Query_Cache"));
queryCachePanel.add(queryCache);
JPanel multiSourcePanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
multiSourceMode = new UICheckBox(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Feature_Multi_Source"));
multiSourcePanel.add(multiSourceMode);
JPanel cursorPagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
cursorPage = new UICheckBox(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Calculate_Prefer_Cursor_Pagination"));
UILabel tipLabel = new UILabel(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Calculate_Prefer_SQL_Pagination_Tip"));
tipLabel.setForeground(Color.GRAY);
cursorPagePanel.add(cursorPage);
cursorPagePanel.add(tipLabel);
// calculateAttrPanel.add(calculatedEndPanel);
calculateAttrPanel.add(queryCachePanel);
calculateAttrPanel.add(multiSourcePanel);
calculateAttrPanel.add(cursorPagePanel);
FineUIStyle.setStyle(tipLabel, FineUIStyle.LABEL_TIP);
JPanel calculateAttrPanel = Layouts.column(10,
Layouts.cell(queryCache),
Layouts.cell(multiSourceMode),
Layouts.cell(cursorPage),
Layouts.cell(tipLabel)).getComponent();
calculateAttrPanel.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
return calculateAttrPanel;
}
treeConfigPanel = FRGUIPaneFactory.createTitledBorderPane(
InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Tree_Config")
);
private void initTreeConfigPanel() {
treeConfigPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
treeConfigPanel.setVisible(FeatureManager.getInstance().isFlagEnable(FeatureFlags.TREE));
treeConfigPanel.setLayout(new BoxLayout(treeConfigPanel, BoxLayout.Y_AXIS));
JPanel treeAsyncQueryPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
treeAsyncQuery = new UICheckBox(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Tree_Async_Query"));
treeAsyncQueryPanel.add(treeAsyncQuery);
JPanel treeExpandLayerPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
UILabel treeExpandLayerLabel = new UILabel(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Tree_Expand_Layer"));
treeExpandLayer = new UISpinner(1, Integer.MAX_VALUE, 1, 1);
// 功能不支持,设置先禁用
treeExpandLayer.setEnabled(false);
treeExpandLayerPanel.add(treeExpandLayerLabel);
treeExpandLayerPanel.add(treeExpandLayer);
JPanel treeExpandLayerLabelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
UILabel multilineLabel = new UILabel(InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Tree_Expand_Layer_Label"));
multilineLabel.setForeground(TIPS_FONT_COLOR);
treeExpandLayerLabelPanel.add(multilineLabel);
treeConfigPanel.add(treeAsyncQueryPanel);
treeConfigPanel.add(treeExpandLayerPanel);
treeConfigPanel.add(treeExpandLayerLabelPanel);
List<Component[]> components = new ArrayList<>();
components.add(new Component[]{featureFlagPanel});
components.add(new Component[]{calculateAttrPanel});
components.add(new Component[]{treeConfigPanel});
JPanel content =
TableLayoutHelper.createGapTableLayoutPane(
components.toArray(new Component[0][]),
TableLayoutHelper.FILL_LASTCOLUMN,
5,
5
);
this.add(content, BorderLayout.CENTER);
FineUIStyle.setStyle(multilineLabel, FineUIStyle.LABEL_TIP);
treeConfigPanel.add(FineUIUtils.wrapComponentWithTitle(Layouts.column(10,
Layouts.cell(treeAsyncQuery),
Layouts.row(10, Layouts.cell(treeExpandLayerLabel), Layouts.cell(treeExpandLayer)),
Layouts.cell(multilineLabel)).getComponent(),
InterProviderFactory.getProvider().getLocText("Fine-Plugin_Engine_Tree_Config")));
}
@Override

7
designer-realize/src/main/java/com/fr/nx/app/designer/menu/FeatureFlagsPanel.java

@ -1,5 +1,6 @@
package com.fr.nx.app.designer.menu;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory;
@ -26,9 +27,8 @@ public class FeatureFlagsPanel extends BasicBeanPane<FeatureFlagBean> {
public FeatureFlagsPanel() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
this.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
mainPanel = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
mainPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0));
JPanel content =
TableLayoutHelper.createGapTableLayoutPane(
new Component[][]{new Component[]{mainPanel}},
@ -47,7 +47,8 @@ public class FeatureFlagsPanel extends BasicBeanPane<FeatureFlagBean> {
for (Pair<FeatureFlag, Boolean> entry : featureFlagBean.getAllFlags()) {
final FeatureFlag flag = entry.getFirst();
Boolean selected = entry.getSecond();
JPanel itemPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
JPanel itemPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
itemPanel.setBorder(new ScaledEmptyBorder(0, 0, 10, 0));
final UICheckBox cb = new UICheckBox(flag.getDisplayName());
cb.setSelected(selected);
cb.addActionListener(new ActionListener() {

43
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -20,7 +20,7 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.CustomVariableResolver;
import com.fr.design.formula.FormulaFactory;
import com.fr.design.formula.UIFormula;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.core.SimpleCardPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIHeadGroup;
@ -121,9 +121,9 @@ public class CellDSColumnEditor extends CellQuickEditor {
this.createPanes();
this.createSwitchTab();
return Layouts.column(10,
cell(tabsHeaderIconPane),
cell(cardContainer)
).getComponent();
cell(tabsHeaderIconPane),
cell(cardContainer)
).getComponent();
}
@Override
@ -268,8 +268,8 @@ public class CellDSColumnEditor extends CellQuickEditor {
protected JPanel createContentPane() {
initComponents();
return Layouts.column(LayoutConstants.VERTICAL_GAP,
cell(dataPane), cell(groupPane), cell(conditionPane)
).getComponent();
cell(dataPane), cell(groupPane), cell(conditionPane)
).getComponent();
}
private void initComponents(){
@ -589,7 +589,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
private JPanel contentPane;
private UIComboBox rsComboBox;
private ReactiveCardPane setTipCardPane;
private SimpleCardPane setTipCardPane;
private UITextField serialTextField;
private JFormulaField topFormulaPane;
private JFormulaField bottomFormulaPane;
@ -618,7 +618,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
initSetTipCardPane();
contentPane = Layouts.column(LayoutConstants.VERTICAL_GAP,
row(
cell(filterLabel).weight(1.2), cell(rsComboBox).weight(3)
cell(filterLabel).weight(1.2), cell(rsComboBox).weight(3)
),
cell(setTipCardPane)
).getComponent();
@ -639,21 +639,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
Color tipColor = FlatUIUtils.getUIColor("Label.tipColor", Color.GRAY);
Arrays.asList(oddTip, evenTip, specifyTip).forEach(it -> it.setForeground(tipColor));
setTipCardPane = ReactiveCardPane.create()
.addSupplier(TOP.name(), () -> row(flex(1.2), cell(topFormulaPane).weight(3)).getComponent())
.addSupplier(BOTTOM.name(), () -> row(flex(1.2), cell(bottomFormulaPane).weight(3)).getComponent())
.addSupplier(ODD.name(), () -> row(
flex(1.2),
cell(oddTip).weight(3)
).getComponent())
.addSupplier(EVEN.name(), () -> row(
flex(1.2),
cell(evenTip).weight(3)
).getComponent())
.addSupplier(SPECIFY.name(), () -> column(LayoutConstants.VERTICAL_GAP,
row(flex(1.2), cell(serialTextField).weight(3)),
row(flex(1.2), cell(specifyTip).weight(3))
).getComponent());
setTipCardPane = new SimpleCardPane();
setTipCardPane.add(TOP.name(), row(flex(1.2), cell(topFormulaPane).weight(3)).getComponent());
setTipCardPane.add(BOTTOM.name(), row(flex(1.2), cell(bottomFormulaPane).weight(3)).getComponent());
setTipCardPane.add(ODD.name(), row(flex(1.2), cell(oddTip).weight(3)).getComponent());
setTipCardPane.add(EVEN.name(), row(flex(1.2), cell(evenTip).weight(3)).getComponent());
setTipCardPane.add(SPECIFY.name(), column(10,
row(flex(1.2), cell(serialTextField).weight(3)),
row(flex(1.2), cell(specifyTip).weight(3))
).getComponent());
// 未定义不显示
setTipCardPane.setVisible(false);
}
@ -693,7 +687,8 @@ public class CellDSColumnEditor extends CellQuickEditor {
if (type == UNDEFINE) {
setTipCardPane.setVisible(false);
} else {
setTipCardPane.select(type.name()).populate();
setTipCardPane.setVisible(true);
setTipCardPane.show(type.name());
}
}

Loading…
Cancel
Save