Browse Source

Pull request #14747: 无jira任务, fbp/release 合 fbp/feature

Merge in DESIGN/design from fbp/release to fbp/feature

* commit 'd289c2953d001bf41311635d0e6483d6aa4c4cd9':
  REPORT-133096 fix: 模版数据集的限制预览漏了
  REPORT-133032 【fr-fbp回归】模板数据集-点击预览或展开数据集报错
  REPORT-133032 【fr-fbp回归】模板数据集-点击预览或展开数据集报错
  REPORT-132950 - 【fr-fbp回归】236环境最新的镜像,数据连接编辑、删除等操作后保存报错NPE
  REPORT-132496 【fr-fbp回归】远程下预览数据集报错
  REPORT-132873 【fr-fbp回归】fbp工程,数据连接驱动检测异常
  REPORT-132511 & REPORT-131838 & REPORT-132461 & REPORT-132341 & REPORT-131797 & REPORT-132386 & REPORT-132359 & REPORT-132268 & REPORT-132234 & REPORT-132341【newUI】fix:fr-fbp回归及国际化问题修复
  REPORT-132184 & REPORT-132446 fix:问题修复
  REPORT-130733 【FBP数据源】fbp设计器新建数据连接,选择不到手动上传的驱动
  REPORT-132762 【fr-fbp回归】强制解锁模板后,原锁定用户保存模板,保存失败
  REPORT-132662 适配通知中心 代码规范
  拖拽条最大值标签不显示问题修复
  cancelbutton去除size
  fbp国际化控件增强
  REPORT-132662 适配通知中心
  fbp国际化
  无JIRA任务 改了前端bug,更新一波js
fbp/feature
superman 3 months ago committed by zhouping-周平
parent
commit
2f4777bf64
  1. 14
      designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java
  2. 3
      designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java
  3. 2
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  4. 6
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  5. 17
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
  6. 2
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
  7. 41
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java
  8. 9
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
  9. 38
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  10. 8
      designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java
  11. 1
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/FineSearchPane.java
  12. 1
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
  13. 1
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  14. 6
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java
  15. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  16. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java
  17. 2
      designer-base/src/main/java/com/fr/design/dialog/TipDialog.java
  18. 3
      designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java
  19. 15
      designer-base/src/main/java/com/fr/design/gui/icombobox/FRTreeComboBox.java
  20. 14
      designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java
  21. 6
      designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java
  22. 7
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  23. 4
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java
  24. 5
      designer-base/src/main/java/com/fr/design/javascript/EmailPane.java
  25. 13
      designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java
  26. 2
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java
  27. 3
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  28. 1
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java
  29. 1
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java
  30. 18
      designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java
  31. 7
      designer-base/src/main/java/com/fr/design/report/WatermarkPane.java
  32. 6
      designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java
  33. 4
      designer-base/src/main/java/com/fr/design/web/CustomIconPane.java
  34. 1
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  35. 13
      designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayConfigPane.java
  36. 140
      designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.js
  37. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  38. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  39. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  40. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  41. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  42. 1
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java
  43. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  44. 10
      designer-chart/src/main/java/com/fr/van/chart/pie/RadiusCardLayoutPane.java
  45. 7
      designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java
  46. 38
      designer-realize/src/main/java/com/fanruan/boot/env/function/DesignDatasourceComponent.java
  47. 4
      designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java
  48. 19
      designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java
  49. 1
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java
  50. 2
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java
  51. 1
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java
  52. 5
      designer-realize/src/main/java/com/fr/design/actions/report/ReportExportAttrAction.java
  53. 6
      designer-realize/src/main/java/com/fr/design/actions/report/ReportWebAttrAction.java
  54. 17
      designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java
  55. 5
      designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java
  56. 3
      designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java
  57. 13
      designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupPopUpPane.java
  58. 16
      designer-realize/src/main/java/com/fr/design/expand/ConditionParentPane.java
  59. 6
      designer-realize/src/main/java/com/fr/design/report/ImageExportPane.java
  60. 3
      designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java
  61. 41
      designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
  62. 8
      designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java
  63. 10
      designer-realize/src/main/java/com/fr/design/sort/common/SortColumnRowPane.java
  64. 13
      designer-realize/src/main/java/com/fr/design/sort/header/HeaderAreaPane.java
  65. 8
      designer-realize/src/main/java/com/fr/design/webattr/CommonPane.java
  66. 4
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java
  67. 3
      designer-realize/src/main/java/com/fr/design/webattr/PageWebSettingPane.java
  68. 10
      designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java

14
designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java

@ -6,6 +6,7 @@ import com.fr.design.border.FineBorderFactory;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.stable.os.OperatingSystem;
import com.fr.value.AtomicClearableLazyValue;
@ -448,4 +449,17 @@ public class FineUIUtils {
return FineUIScale.scale(DesignSizeI18nManager.getInstance().i18nDimension(i18nDimensionKey));
}
/**
* 创建一个支持自动换行的 UILabel并应用指定样式
*
* @param text 要显示的文本内容
* @param style 样式字符串
* @return 支持自动换行的 UILabel
*/
public static UILabel createLineWrapLabel(String text, String style) {
UILabel label = new UILabel(text);
FineUIStyle.setStyle(label, style);
UIComponentUtils.setLineWrap(label);
return label;
}
}

3
designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java

@ -13,6 +13,7 @@ import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.KeySetUtils;
import javax.swing.SwingUtilities;
import java.awt.Dimension;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@ -42,7 +43,7 @@ public class TableDataSourceAction extends TemplateComponentAction<JTemplate<?,
populate(tds);
}
};
final BasicDialog reportTableDataDialog = tableDataPane.showLargeWindow(SwingUtilities.getWindowAncestor(this.getEditingComponent()), null);
final BasicDialog reportTableDataDialog = tableDataPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(this.getEditingComponent()), null, new Dimension(1200, 600));
reportTableDataDialog.addDialogActionListener(new DialogActionAdapter() {
@Override

2
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -1252,7 +1252,7 @@ public class PreferencePane extends BasicPane {
@Override
public BasicDialog showWindow(Window window, DialogActionListener l) {
return showWindowWithCustomSize(window, l, new Dimension(BasicDialog.DEFAULT.width, BasicDialog.DEFAULT.height + OFFSET_HEIGHT));
return showWindowWithCustomSize(window, l, new Dimension(BasicDialog.DEFAULT.width + OFFSET_HEIGHT, BasicDialog.DEFAULT.height + OFFSET_HEIGHT));
}
private void tryGc() {

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

@ -586,13 +586,15 @@ public abstract class DesignTableDataManager {
TableDataSource source = TableDataSourceTailor.extractTableData(tableDataSource);
bean.setDataSource(source);
bean.setDataName(DataOperator.getTableDataName(source, tabledata));
bean.setParameterMap(parameterMap);
bean.setStart(rowCount);
bean.setEnd(-1);
bean.updateConvertMap(parameterMap);
if (checkBean(bean)) {
return (EmbeddedTableData) TableDataRepository.getInstance().previewTableData(bean).getTableData();
} else {
PreviewDataBean dataBean = new PreviewDataBean();
dataBean.setDataSource(tabledata);
dataBean.setParameterMap(parameterMap);
dataBean.updateConvertMap(parameterMap);
dataBean.setStart(rowCount);
dataBean.setEnd(-1);
return (EmbeddedTableData) TableDataRepository.getInstance().previewTableData(dataBean).getTableData();

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

@ -222,12 +222,22 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
removedConnNames.add(s);
break;
case ADDED:
addConnections.add(ConnectionInfoBeanHelper.createConnectionInfoBean(s, connection, true));
ConnectionInfoBean add = ConnectionInfoBeanHelper.createConnectionInfoBean(s, connection, true);
if (StringUtils.isNotEmpty(add.getConnectionData())) {
addConnections.add(add);
validConnection.add(connection);
} else {
FineLoggerFactory.getLogger().error("Unable to find the corresponding processor : {}", connection.getClass());
}
break;
case UPDATED:
updateConnection.add(ConnectionInfoBeanHelper.createConnectionInfoBean(s, connection, true));
ConnectionInfoBean update = ConnectionInfoBeanHelper.createConnectionInfoBean(s, connection, true);
if (StringUtils.isNotEmpty(update.getConnectionData())) {
updateConnection.add(update);
validConnection.add(connection);
} else {
FineLoggerFactory.getLogger().error("Unable to find the corresponding processor : {}", connection.getClass());
}
break;
default:
break;
@ -251,7 +261,8 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
* @return
*/
private boolean needUpdate0(Connection origin, Connection connection) {
return !connection.equals(origin) || !isEmbedConnection(connection);
// 先不考虑插件
return !connection.equals(origin);
}
/**

2
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java

@ -22,7 +22,6 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.GeneralContext;
import com.fr.stable.ArrayUtils;
import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;
@ -171,6 +170,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
searchField = new UITextField();
searchField.setPlaceholder(Toolkit.i18nText("Fine-Design_Basic_Table_Search"));
searchField.getDocument().addDocumentListener(searchListener);
searchField.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Table_Search"));
// 搜索图标
UILabel searchLabel = new UILabel(new LazyIcon("search"));
searchLabel.setBorder(new ScaledEmptyBorder(0, 3, 0, 3));

41
designer-base/src/main/java/com/fr/design/data/datapane/connect/DBCPAttrPane.java

@ -1,8 +1,8 @@
package com.fr.design.data.datapane.connect;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.data.core.db.dialect.DialectFactory;
import com.fr.data.impl.JDBCDatabaseConnection;
@ -19,9 +19,7 @@ import com.fr.general.ComparatorUtils;
import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import javax.swing.JTextField;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Window;
import java.awt.event.InputMethodEvent;
import java.awt.event.InputMethodListener;
@ -78,35 +76,14 @@ public class DBCPAttrPane extends BasicPane {
// JPanel northFlowPane
northFlowPane = Layouts.column(LayoutConstants.VERTICAL_GAP,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_ConnectionPool_Attr"))).with(FineUIUtils::wrapBoldLabelWithUnderline),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Initial_Size"))).weight(1),
cell(DBCP_INITIAL_SIZE).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Min_Idle"))).weight(1),
cell(DBCP_MIN_IDLE).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Return"))).weight(1),
cell(DBCP_TESTONRETURN).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_While_Idle"))).weight(1),
cell(DBCP_TESTWHILEIDLE).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Evictionruns_millis"))).weight(1),
cell(DBCP_TIMEBETWEENEVICTIONRUNSMILLS).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Num_Test_Per_Evction_Run"))).weight(1),
cell(DBCP_NUMTESTSPEREVICTIONRUN).weight(1), flex(1.2)
),
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Mix_Evictable_Idle_Time_Millis"))).weight(1),
cell(DBCP_MINEVICTABLEIDLETIMEMILLIS).weight(1), flex(1.2)
),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Dbcp_Warning"))).with(it -> it.setForeground(FlatUIUtils.getUIColor("Label.strongHintColor", Color.RED)))
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Initial_Size"))).weight(1), cell(DBCP_INITIAL_SIZE).weight(1)),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Min_Idle"))).weight(1), cell(DBCP_MIN_IDLE).weight(1)),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Return"))).weight(1), cell(DBCP_TESTONRETURN).weight(1)),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_While_Idle"))).weight(1), cell(DBCP_TESTWHILEIDLE).weight(1)),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Evictionruns_millis"))).weight(1), cell(DBCP_TIMEBETWEENEVICTIONRUNSMILLS).weight(1)),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Num_Test_Per_Evction_Run"))).weight(1), cell(DBCP_NUMTESTSPEREVICTIONRUN).weight(1)),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Mix_Evictable_Idle_Time_Millis"))).weight(1), cell(DBCP_MINEVICTABLEIDLETIMEMILLIS).weight(1)),
cell(FineUIUtils.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Dbcp_Warning"), FineUIStyle.LABEL_WARNING_TIP))
).getComponent();
defaultPane.add(northFlowPane);
this.add(defaultPane);

9
designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

@ -5,7 +5,6 @@ package com.fr.design.data.datapane.connect;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
@ -13,7 +12,6 @@ import com.fr.data.driver.util.JarFileParseUtil;
import com.fr.data.impl.Connection;
import com.fr.data.impl.JDBCDatabaseConnection;
import com.fr.data.impl.JNDIDatabaseConnection;
import com.fr.data.operator.DataOperatorProvider;
import com.fr.data.security.ssl.impl.NormalSsl;
import com.fr.data.solution.ExceptionSolutionSelector;
import com.fr.data.solution.entity.DriverPage;
@ -31,14 +29,12 @@ import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.rpc.ExceptionHandler;
import com.fr.rpc.RPCInvokerExceptionInfo;
import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.engine.exception.DriverUnExistException;
import org.jetbrains.annotations.NotNull;
import com.fr.workspace.server.entity.connection.ConnectionBean;
import com.fr.workspace.server.repository.connection.ConnectionRepository;
import javax.swing.JDialog;
@ -479,6 +475,9 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
uiLabel.setIcon(new LazyIcon("error", 20));
message.setText(Toolkit.i18nText("Fine-Design_Basic_Connection_Failed"));
Connection database = DatabaseConnectionPane.this.updateBean();
if (e.getCause() instanceof DriverUnExistException) {
((DriverUnExistException) e.getCause()).setThrowable(new ClassNotFoundException(database.getDriver()));
}
SolutionProcessor select = ExceptionSolutionSelector.get().select(e, database);
String detail = select.getResultException().getDetailMessage();
String solution = select.getResultException().getSolution();

38
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -7,6 +7,7 @@ import com.fr.data.driver.DriverLoader;
import com.fr.data.driver.config.DriverLoaderConfig;
import com.fr.data.impl.JDBCDatabaseConnection;
import com.fr.data.solution.entity.DriverClasses;
import com.fr.datasource.connection.impl.DefaultDatabaseType;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.ibutton.UIButton;
@ -22,11 +23,14 @@ import com.fr.design.utils.BrowseUtils;
import com.fr.file.filter.ChooseFileFilter;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils;
import com.fr.third.guava.collect.HashBiMap;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.repository.connection.ConnectionRepository;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
@ -60,6 +64,16 @@ public class JDBCDefPane extends JPanel {
public static final String DRIVER_TYPE = "driver_type";
public static final String USER_NAME = "user_name";
private static final String OTHER_DB = "Others";
public static final String ORACLE = "Oracle";
public static final String DB2 = "DB2";
public static final String SQL_SERVER = "SQL Server";
public static final String MYSQL = "MySQL";
public static final String SYBASE = "Sybase";
public static final String ACCESS = "Access";
public static final String DERBY = "Derby";
public static final String POSTGRE = "Postgre";
public static final String SQLITE = "SQLite";
public static final String INCEPTOR = "Inceptor";
private static final Pattern ORACLE_URL = Pattern.compile("^jdbc:oracle:thin:@[/]*([-0-9a-zA-Z_\\.\\\\]+)(:([0-9]+|port))?([:/](.*))?.*", Pattern.CASE_INSENSITIVE);
private static final Pattern GENERAL_URL = Pattern.compile("^jdbc:(mysql|sqlserver|db2|derby|postgresql|inceptor|inceptor2|hive2)://([-0-9a-zA-Z_\\.\\\\]+)(:([0-9]+|port))?((/|;DatabaseName=)(.*))?.*", Pattern.CASE_INSENSITIVE);
private static final Pattern PORT = Pattern.compile("^0$|^[1-9][\\d]*[\\d]*$");
@ -67,9 +81,22 @@ public class JDBCDefPane extends JPanel {
// 编码转换.
private String originalCharSet = null;
private static Map<String, DriverURLName[]> jdbcMap = new HashMap<String, DriverURLName[]>();
// 用于映射connection的database字段
private static Map<String, String> dbTypeMap = new HashMap<>();
private JPanel linkPanel;
static {
dbTypeMap.put(ORACLE, DefaultDatabaseType.ORACLE.getType());
dbTypeMap.put(DB2, DefaultDatabaseType.IBM_DB2.getType());
dbTypeMap.put(SQL_SERVER, DefaultDatabaseType.MICROSOFT_SQL_SERVER.getType());
dbTypeMap.put(MYSQL, DefaultDatabaseType.MYSQL.getType());
dbTypeMap.put(SYBASE, DefaultDatabaseType.SAP_ASE.getType());
dbTypeMap.put(ACCESS, DefaultDatabaseType.OTHER.getType());
dbTypeMap.put(DERBY, DefaultDatabaseType.DERBY.getType());
dbTypeMap.put(POSTGRE, DefaultDatabaseType.POSTGRESQL.getType());
dbTypeMap.put(SQLITE, DefaultDatabaseType.SQLITE.getType());
dbTypeMap.put(INCEPTOR, DefaultDatabaseType.TRANSWARP_INCEPTOR.getType());
jdbcMap.put(OTHER_DB, new DriverURLName[]{new DriverURLName("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:"),
new DriverURLName("org.hsqldb.jdbcDriver", "jdbc:hsqldb:file:[PATH_TO_DB_FILES]"), new DriverURLName("com.inet.tds.TdsDriver", "jdbc:inetdae7:localhost:1433/"),
new DriverURLName("COM.cloudscape.JDBCDriver", "jdbc:cloudscape:/cloudscape/"),
@ -104,7 +131,7 @@ public class JDBCDefPane extends JPanel {
private ReactiveCardPane centerPanel;
private ReactiveCardPane driverSelectRow;
// 请不要改动dbtype,只应该最后添加
private final String[] dbtype = {"Oracle", "DB2", "SQL Server", "MySQL", "Sybase", "Access", "Derby", "Postgre", "SQLite", "Inceptor", OTHER_DB};
private final String[] dbtype = {ORACLE, DB2, SQL_SERVER, MYSQL, SYBASE, ACCESS, DERBY, POSTGRE, SQLITE, INCEPTOR, OTHER_DB};
private JDBCDatabaseConnection jdbcDatabase;
@ -151,6 +178,7 @@ public class JDBCDefPane extends JPanel {
if (needRefresh) {
jdbcDatabase.setDatabase(StringUtils.EMPTY);
}
jdbcDatabase.setDatabase(dbTypeMap.getOrDefault(GeneralUtils.objectToString(dbtypeComboBox.getSelectedItem()), DefaultDatabaseType.OTHER.getType()));
changePane(dbtypeComboBox.getSelectedItem());
JDBCConnectionDef.getInstance().setConnection((String) dbtypeComboBox.getSelectedItem(), jdbcDatabase);
DatabaseConnectionPane.JDBC.getAdvancedAttrPane().populate(jdbcDatabase);
@ -331,7 +359,13 @@ public class JDBCDefPane extends JPanel {
}
private void initMap() {
Map<String, DriverLoader> driverLoaders = DriverLoaderConfig.getInstance().getDriverLoaders();
Map<String, DriverLoader> driverLoaders = null;
try {
driverLoaders = ConnectionRepository.getInstance().getDriverLoaders();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
driverLoaders = new HashMap<>();
}
nameAndRepresent = getDriverLoaderAndRepresent(driverLoaders);
}

8
designer-base/src/main/java/com/fr/design/data/datapane/connect/LocalConnectionSource.java

@ -3,10 +3,12 @@ package com.fr.design.data.datapane.connect;
import com.fr.data.driver.DriverClassNotFoundException;
import com.fr.data.impl.Connection;
import com.fr.decision.webservice.bean.datasource.ConnectionInfoBean;
import com.fr.decision.webservice.exception.general.DriverNotFoundException;
import com.fr.decision.webservice.v10.datasource.connection.processor.impl.ConnectionProcessorFactory;
import com.fr.design.i18n.Toolkit;
import com.fr.log.FineLoggerFactory;
import com.fr.security.encryption.transmission.TransmissionEncryptionManager;
import com.fr.workspace.engine.exception.DriverUnExistException;
import com.fr.workspace.server.repository.connection.BaseConnectionSource;
import java.sql.SQLException;
@ -25,6 +27,8 @@ public class LocalConnectionSource extends BaseConnectionSource {
// 暂时这么处理,后续最好拉到外层包装一下
TransmissionEncryptionManager.setTransEncryptionLevel(1);
ConnectionProcessorFactory.testConnectionWithSchemaReturn(database);
} catch (DriverNotFoundException e) {
throw new DriverUnExistException();
} finally {
TransmissionEncryptionManager.removeTransEncryptionLevel();
}
@ -36,6 +40,8 @@ public class LocalConnectionSource extends BaseConnectionSource {
Connection connection = ConnectionProcessorFactory.createConnection(bean);
validate(bean.getConnectionName(), connection);
ConnectionProcessorFactory.addConnection(bean);
} catch (DriverNotFoundException e) {
throw new DriverUnExistException();
} finally {
TransmissionEncryptionManager.removeTransEncryptionLevel();
}
@ -54,6 +60,8 @@ public class LocalConnectionSource extends BaseConnectionSource {
Connection connection = ConnectionProcessorFactory.createConnection(bean);
validate(bean.getConnectionName(), connection);
ConnectionProcessorFactory.updateConnection(bean.getConnectionName(), bean);
} catch (DriverNotFoundException e) {
throw new DriverUnExistException();
} finally {
TransmissionEncryptionManager.removeTransEncryptionLevel();
}

1
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/FineSearchPane.java

@ -159,7 +159,6 @@ public class FineSearchPane extends JPanel implements HoverAware {
@Override
public void requestFocus() {
super.requestFocus();
searchTextField.requestFocus();
}
}

1
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java

@ -55,7 +55,6 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
//类名
classNameTextField = new UITextField();
UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));
browserButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
final ClassNameSelectPane bPane = new ClassNameSelectPane();

1
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

@ -208,6 +208,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
@Override
public void keyPressed(KeyEvent e) {
searchField.setToolTipText(searchField.getText());
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
e.setKeyCode(KeyEvent.VK_UP);
DBTableDataPane.this.connectionTableProcedurePane.requestFocus();

6
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java

@ -22,6 +22,7 @@ import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import java.awt.BorderLayout;
import java.awt.Color;
@ -69,8 +70,9 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
// 显示double,date类;渲染date类
dataJTable.setDefaultRenderer(Double.class, new DoubleRenderer());
dataJTable.setDefaultRenderer(Date.class, new FineTableHeaderUI.TableRenderer());
dataJTable.setDefaultRenderer(Integer.class, new DateRenderer());
dataJTable.setDefaultRenderer(Date.class, new DateRenderer());
dataJTable.setDefaultRenderer(Integer.class, new DoubleRenderer());
dataJTable.setDefaultRenderer(Number.class, new DoubleRenderer());
dataJTable.setDefaultEditor(Date.class, new DateEditor(new UIDatePicker(UIDatePicker.STYLE_CN_DATE1)));
tableStructureChanged();

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java

@ -196,9 +196,11 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
urlText.setEditable(false);
// 选择按钮
chooseFile = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Selection"));
chooseFile.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Selection"));
chooseFile.addActionListener(chooseFileListener);
// 测试连接按钮
testConnection = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection"));
testConnection.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection"));
testConnection.setEnabled(false);
testConnection.addActionListener(testConnectionListener);
// 提示信息

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java

@ -329,7 +329,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane<MultiTDTableData
).weight(0.2),
//条件公式
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Conditions_Formula") + "=")).weight(0.15),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Conditions_Formula") + "=")).with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Conditions_Formula") + "=")).weight(0.15),
row(5, cell(formulaContentTextField).weight(0.95), cell(formulaButton).weight(0.05)).weight(0.85)
).weight(0.77),
flex(0.03)

2
designer-base/src/main/java/com/fr/design/dialog/TipDialog.java

@ -5,6 +5,7 @@ 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 com.fr.design.utils.gui.UIComponentUtils;
import com.fr.general.IOUtils;
import com.fr.stable.StringUtils;
@ -36,6 +37,7 @@ public abstract class TipDialog extends JDialog implements ActionListener {
iconPane.setPreferredSize(new Dimension(50, 50));
JPanel tipPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
UILabel tipLabel = new UILabel(tip);
UIComponentUtils.setLineWrap(tipLabel);
tipPane.add(tipLabel);
northPane.add(iconPane, BorderLayout.WEST);
northPane.add(tipPane, BorderLayout.CENTER);

3
designer-base/src/main/java/com/fr/design/gui/frpane/UINumberDragPane.java

@ -38,9 +38,10 @@ public class UINumberDragPane extends BasicBeanPane<Double> implements GlobalNam
public UINumberDragPane(double minValue, double maxValue, double dierta) {
dragBar = new UISlider((int) minValue, (int) maxValue);
dragBar.setPaintLabels(true);
dragBar.setMajorTickSpacing((int) maxValue);
dragBar.setMajorTickSpacing((int) maxValue - (int) minValue);
spinner = createUISpinner(minValue, maxValue, dierta);
spinner.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"));
spinner.setValue(dragBar.getValue());
this.setLayout(new BorderLayout());
this.add(Layouts.row(
cell(dragBar).weight(0.7), flex(0.1), cell(spinner).weight(0.7)

15
designer-base/src/main/java/com/fr/design/gui/icombobox/FRTreeComboBox.java

@ -1,17 +1,13 @@
package com.fr.design.gui.icombobox;
import com.fine.theme.light.ui.FineComboBoxUI;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils;
import com.fr.general.NameObject;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JComboBox;
import javax.swing.JComponent;
@ -25,7 +21,6 @@ import javax.swing.UIManager;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.event.PopupMenuListener;
import javax.swing.plaf.basic.BasicComboBoxUI;
import javax.swing.plaf.basic.ComboPopup;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
@ -34,13 +29,9 @@ import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
import java.util.Enumeration;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.IllegalComponentStateException;
import java.awt.RenderingHints;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
@ -50,10 +41,12 @@ import java.awt.event.MouseListener;
import java.awt.event.MouseMotionAdapter;
import java.awt.event.MouseMotionListener;
import static com.fine.theme.utils.FineUIScale.scale;
public class FRTreeComboBox extends UIComboBox {
private static final int PAGE_DIFF = 5;
private static final int DEFAULT_HEIGHT = 120;
private static final int PAGE_DIFF = scale(5);
private static final int DEFAULT_HEIGHT = scale(120);
// richer:下拉展示用的tree
protected JTree tree;

14
designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java

@ -1,6 +1,6 @@
package com.fr.design.gui.style;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.TemplateTheme;
import com.fr.design.dialog.BasicPane;
@ -12,15 +12,11 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.widget.FRWidgetFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
@ -71,14 +67,8 @@ public class FollowingThemePane extends BasicPane implements UIObserver {
});
UILabel followingThemeLabel = FRWidgetFactory.createLineWrapLabel(name);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
JPanel followingThemePane =
TableLayoutHelper.createGapTableLayoutPane( new Component[][]{new Component[] { followingThemeLabel, FRGUIPaneFactory.createBorderLayoutNorthPaneWithComponent(followingThemeButtonGroup)}},
new double[] { p }, new double[] {FineUIScale.scale(SETTING_LABEL_WIDTH), f }, 10, 0);
JPanel followingThemePane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, followingThemeLabel, followingThemeButtonGroup);
followingThemePane.setVisible(false);
followingThemePane.setPreferredSize(new Dimension(FineUIScale.scale(275), (int) followingThemePane.getPreferredSize().getHeight()));
add(followingThemePane, BorderLayout.NORTH);
container = FRGUIPaneFactory.createBorderLayout_S_Pane();

6
designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java

@ -64,14 +64,14 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
UILabel widthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width"));
widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE);
newWindowConfPane.add(column(10,
row(cell(heightLabel).weight(0.13), cell(heightTextFiled).weight(0.87)),
row(cell(widthLabel).weight(0.13), cell(widthTextFiled).weight(0.87))
row(cell(heightLabel).weight(0.2), cell(heightTextFiled).weight(0.8)),
row(cell(widthLabel).weight(0.2), cell(widthTextFiled).weight(0.8))
).getComponent());
JPanel centerPanel = new JPanel(new BorderLayout());
centerPanel.add(column(10,
row(cell(targetFrameLabel).weight(0.13), cell(targetFrameComboBox).weight(0.87)),
row(cell(targetFrameLabel).weight(0.2), cell(targetFrameComboBox).weight(0.8)),
cell(newWindowConfPane)
).getComponent());
newWindowConfPane.setVisible(false);

7
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java

@ -44,7 +44,6 @@ import java.util.List;
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;
/**
@ -174,8 +173,8 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
});
reportletNamePane.add(row(4,
cell(reportPathTextField).weight(0.85),
cell(browserButton).weight(0.15)
cell(reportPathTextField).weight(0.8),
cell(browserButton).weight(0.2)
).getComponent());
return reportletNamePane;
}
@ -292,7 +291,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
postComboBox = new UIComboBox(new String[]{"GET", "POST"});
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
showParameterInterface.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
content.add(row(4,
cell(postComboBox).weight(0.75),
cell(showParameterInterface).weight(0.25)

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

@ -57,8 +57,8 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane<WebHyperlink> {
UILabel urlLabel = new UILabel("URL");
JPanel urlWithHelp = new JPanel(new BorderLayout());
urlWithHelp.add(row(
cell(urlLabel).weight(0.13),
cell(urlTextField).weight(0.87)
cell(urlLabel).weight(0.2),
cell(urlTextField).weight(0.8)
).getComponent());
if (this.needRenamePane) {

5
designer-base/src/main/java/com/fr/design/javascript/EmailPane.java

@ -13,6 +13,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.js.EmailJavaScript;
import com.fr.stable.StringUtils;
import com.fr.workspace.server.repository.config.ConfigRepository;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
@ -64,7 +65,7 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
initCenterPane(mainTextLabel, scrollPane, fill, preferred);
this.add(centerPane, BorderLayout.CENTER);
mainTextEditor.setAutoscrolls(true);
checkEmailConfig(EmailCenter.isEmailConfigValid());
checkEmailConfig(ConfigRepository.getInstance().isEmailConfigValid());
}
/**
@ -128,7 +129,7 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
if (showTplContent != null) {
showTplContent.setSelected(ob ==null ? false: ob.isShowTplContent());
}
checkEmailConfig(EmailCenter.isEmailConfigValid());
checkEmailConfig(ConfigRepository.getInstance().isEmailConfigValid());
}
@Override

13
designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java

@ -1,6 +1,5 @@
package com.fr.design.javascript;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
import com.fr.base.Parameter;
import com.fr.base.extension.FileExtension;
@ -147,7 +146,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
}
});
return column(LayoutConstants.VERTICAL_GAP,
row(cell(parameterLabel).weight(0.1), cell(extendParametersCheckBox).weight(0.2), flex(0.7)),
row(cell(parameterLabel).weight(0.2), cell(extendParametersCheckBox).weight(0.3), flex(0.5)),
cell(parameterViewPane)
).getComponent();
}
@ -180,9 +179,9 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
});
return column(LayoutConstants.HORIZONTAL_GAP,
row(
cell(nameLabel).weight(0.1),
cell(defaultNameRadio).weight(0.15),
row(LayoutConstants.HGAP_LARGE, cell(customNameRadio), cell(fileNameFormulaEditor)).weight(0.75)
cell(nameLabel).weight(0.2),
cell(defaultNameRadio).weight(0.25),
row(LayoutConstants.HGAP_LARGE, cell(customNameRadio), cell(fileNameFormulaEditor).weight(1)).weight(0.55)
),
cell(fileNameTipLabel)
).getComponent();
@ -234,7 +233,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
UILabel typeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Export_JS_Type"));
exportTypeComboBox = getComboBoxWithModel(new String[]{ExportJavaScript.EXPORT_PDF, ExportJavaScript.EXPORT_EXCEL_PAGE, ExportJavaScript.EXPORT_EXCEL_SIMPLE, ExportJavaScript.EXPORT_EXCEL_SHEET, ExportJavaScript.EXPORT_WORD, ExportJavaScript.EXPORT_IMAGE}
, EXPORT_TYPES_MAP);
return row(cell(typeLabel).weight(0.1), cell(exportTypeComboBox).weight(0.5), flex(0.4)).getComponent();
return row(cell(typeLabel).weight(0.2), cell(exportTypeComboBox).weight(0.6), flex(0.2)).getComponent();
}
@Override
@ -794,7 +793,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
}
}
});
return row(cell(templateLabel).weight(0.1), cell(currentTemplateRadio).weight(0.15), cell(otherTemplateRadio).weight(0.15), flex(0.6)).getComponent();
return row(cell(templateLabel).weight(0.2), cell(currentTemplateRadio).weight(0.25), cell(otherTemplateRadio).weight(0.25), flex(0.3)).getComponent();
}
@Override

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

@ -48,6 +48,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
contentDBManiPane = new ArrayList();
contentDBManiPane.add(createDBManipulationPane());
paneList.add(new Commit2DBJavaScriptPane(this, contentDBManiPane));
paneList.add(initEmaiPane());
if (isWorkBookValid()) {
paneList.add(new ExportJavaScriptPane());
}
@ -103,6 +104,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
*/
public UIButton createCallButton() {
UIButton callButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Callback_Function"));
callButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Callback_Function"));
callButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

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

@ -708,7 +708,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
// 确认按钮
confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm"));
confirmButton.setPreferredSize(new Dimension(60, 25));
confirmButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -719,8 +718,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
// 取消按钮
UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel"));
cancelButton.setPreferredSize(new Dimension(60, 25));
cancelButton.addActionListener(new ActionListener() {
@Override

1
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java

@ -83,6 +83,7 @@ public class ChartFontPane extends BasicPane {
double[] rows = {p, p, p};
double[] columnSize = {labelWidth, totalWidth};
UILabel text = new UILabel(getUILabelText(), SwingConstants.LEFT);
text.setToolTipText(getUILabelText());
Component[][] components = {
new Component[]{null, null},
new Component[]{text, fontNameComboBox},

1
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java

@ -28,6 +28,7 @@ public class ChartSeriesStylePane extends AbstractChartStylePane {
protected void initComponents() {
colorTypeButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Custom_Color"),
Toolkit.i18nText("Fine-Design_Chart_Legend_Gradual")});
colorTypeButton.getButton(0).setToolTipText(Toolkit.i18nText("Fine-Design_Chart_Custom_Color"));
gradientBar = new FixedGradientBar(4, 130);
initListener();
}

18
designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java

@ -45,14 +45,16 @@ public class ParameterPane extends BasicBeanPane<Parameter> {
valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane();
// richer:要排列显示的控件
JPanel centerPane = column(LayoutConstants.VERTICAL_GAP,
row(20,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name"))).weight(0.1),
cell(nameTextField).weight(0.8),
flex(0.1)),
row(20,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.1),
cell(valueEditor).weight(0.8),
flex(0.1))
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name"))).weight(0.2),
cell(nameTextField).weight(0.7),
flex(0.1)
),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.2),
cell(valueEditor).weight(0.7),
flex(0.1)
)
).getComponent();
centerPane.setBorder(new ScaledEmptyBorder(0, 20, 0, 0));
this.add(centerPane, BorderLayout.CENTER);

7
designer-base/src/main/java/com/fr/design/report/WatermarkPane.java

@ -16,6 +16,7 @@ import com.fr.design.gui.ispinner.UnsignedIntUISpinner;
import com.fr.design.gui.style.FRFontPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.style.color.NewColorSelectPane;
import com.fr.design.utils.gui.UIComponentUtils;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
@ -159,9 +160,9 @@ public class WatermarkPane extends BasicPane {
//水印间距提示居中布局
JPanel watermarkGapTipsPane = row(LayoutConstants.HGAP_LARGE,
flex(0.15),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"))).weight(0.2),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"))).with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"))).weight(0.2),
flex(0.3),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"))).weight(0.2),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"))).with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"))).weight(0.2),
flex(0.15)
).getComponent();
//水印间距排列
@ -186,7 +187,7 @@ public class WatermarkPane extends BasicPane {
}
private JPanel getTopAlignLabelPane(String labelText) {
return column(LayoutConstants.VERTICAL_GAP, cell(new UILabel(labelText))).
return column(LayoutConstants.VERTICAL_GAP, cell(new UILabel(labelText)).with(UIComponentUtils::setLineWrap)).
with(it -> it.setBorder(new ScaledEmptyBorder(2,0,0,0))).getComponent();
}

6
designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java

@ -79,14 +79,12 @@ public class PatternBackgroundPane extends BPane {
contentPane.add(FineUIUtils.wrapComponentWithTitle(column(
10,
row(
60,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Foreground") + ":")).weight(0.1),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Foreground") + ":")).weight(0.2),
cell(foregroundColorPane).weight(0.45),
flex()
),
row(
60,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background") + ":")).weight(0.1),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background") + ":")).weight(0.2),
cell(backgroundColorPane).weight(0.45),
flex()
)

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

@ -154,7 +154,6 @@ public class CustomIconPane extends BasicPane {
private void initAddButton(JPanel buttonPane) {
UIButton addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));
addButton.setPreferredSize(new Dimension(80, 25));
addButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
final EditIconDialog add = new EditIconDialog();
@ -182,7 +181,7 @@ public class CustomIconPane extends BasicPane {
private void initRemoveButton(JPanel buttonPane) {
removeButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
removeButton.setPreferredSize(new Dimension(80, 25));
removeButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove"));
removeButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (iconManager.isSystemIcon(selectedIconName)) {
@ -211,7 +210,6 @@ public class CustomIconPane extends BasicPane {
private void initEditButton(JPanel buttonPane) {
editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editButton.setPreferredSize(new Dimension(80, 25));
editButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (iconManager.isSystemIcon(selectedIconName)) {

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

@ -280,6 +280,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
private UIButton addEventButton() {
UIButton addSubmitEventButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Event"));
addSubmitEventButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Event"));
addSubmitEventButton.addActionListener(new ActionListener() {
@Override

13
designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayConfigPane.java

@ -5,12 +5,16 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.widgettheme.control.attr.WidgetDisplayEnhanceMarkAttr;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* 控件主题显示增强配置窗口
*
@ -27,20 +31,17 @@ public class WidgetThemeDisplayConfigPane extends BasicPane {
}
private void initComponents() {
VerticalFlowLayout layout = new VerticalFlowLayout();
layout.setAlignLeft(true);
this.setLayout(layout);
this.setLayout(new BorderLayout());
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(northPane);
widgetEnhance = new UICheckBox(Toolkit.i18nText("Fine-Design_Widget_Enable_Display_Enhance"));
widgetEnhance.setSelected(true);
northPane.add(widgetEnhance);
JPanel southPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(southPane);
UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Widget_Display_Enhance_Tip"));
label.setForeground(Color.GRAY);
southPane.add(label);
this.add(column(10, cell(northPane), cell(southPane)).getComponent());
}
@Override

140
designer-base/src/main/resources/com/fr/design/data/tabledata/datacenter/web/data-choose.main.js

File diff suppressed because one or more lines are too long

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

@ -33,3 +33,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=100*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=600*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400
com.fr.design.mainframe.EastRegionContainerPane.standard=480*400
com.fr.design.ds.column.cellEditor.pane=900*600
com.fr.design.actions.reportWebAttr.dialog=800*630

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

@ -32,3 +32,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=160*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=600*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400
com.fr.design.mainframe.EastRegionContainerPane.standard=480*400
com.fr.design.ds.column.cellEditor.pane=900*600
com.fr.design.actions.reportWebAttr.dialog=700*630

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

@ -32,3 +32,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=500*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=340*400
com.fr.design.mainframe.EastRegionContainerPane.standard=340*400
com.fr.design.ds.column.cellEditor.pane=900*600
com.fr.design.actions.reportWebAttr.dialog=700*630

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

@ -32,3 +32,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=400*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=286*400
com.fr.design.mainframe.EastRegionContainerPane.standard=286*400
com.fr.design.ds.column.cellEditor.pane=700*600
com.fr.design.actions.reportWebAttr.dialog=660*600

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

@ -31,3 +31,6 @@ com.fr.design.update.ui.dialog.UpdateMainDialog.updateButton=80*24
com.fr.design.mainframe.EastRegionContainerPane.maximum=400*400
com.fr.design.mainframe.EastRegionContainerPane.minimum=286*400
com.fr.design.mainframe.EastRegionContainerPane.standard=286*400
com.fr.design.ds.column.cellEditor.pane=700*600
com.fr.design.actions.reportWebAttr.dialog=700*630

1
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java

@ -39,7 +39,6 @@ public class LabelAlphaPane extends ConditionAttrSingleConditionPane<DataSeriesC
nameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alpha"));
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alpha") + ":");
alphaPane = new UINumberDragPaneWithPercent(0, ALPHASIZE);
JPanel panel = new JPanel(new BorderLayout());
panel.add(label, BorderLayout.WEST);

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -190,7 +190,8 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
radiusPane = initRadiusPane();
UILabel label = FRWidgetFactory.createLineWrapLabel(title);
Component[][] components = new Component[][]{
new Component[]{label, radiusPane},
new Component[]{label, radiusPane.getRadiusType()},
new Component[]{null, radiusPane.getCardPane()},
};
radiusPaneWithTitle = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return ((VanChartPlot) plot).isInCustom() ? null : radiusPaneWithTitle;

10
designer-chart/src/main/java/com/fr/van/chart/pie/RadiusCardLayoutPane.java

@ -83,6 +83,14 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
}
public UIButtonGroup getRadiusType() {
return radiusType;
}
public VanChartCardLayoutPane getCardPane() {
return cardPane;
}
@Override
protected String title4PopupWindow() {
return null;
@ -97,6 +105,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
radius.setValue(vanChartRadius.getRadius());
//设置card显示界面
cardPane.updatePane(radiusType.getSelectedIndex() == 0 ? "auto" : "fixed");
cardPane.setVisible(radiusType.getSelectedIndex() != 0);
}
}
@ -108,6 +117,7 @@ public class RadiusCardLayoutPane extends BasicBeanPane<Plot> {
vanChartRadius.setRadiusType(radiusType.getSelectedIndex() == 0 ? RadiusType.AUTO : RadiusType.FIXED);
vanChartRadius.setRadius((int) radius.getValue());
cardPane.updatePane(radiusType.getSelectedIndex() == 0 ? "auto" : "fixed");
cardPane.setVisible(radiusType.getSelectedIndex() != 0);
}
}

7
designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvComponent.java vendored

@ -100,6 +100,8 @@ import com.fr.transaction.HibernateTransactor;
import com.fr.transaction.RemoteTransactor;
import com.fr.transaction.TransactorFactory;
import com.fr.workspace.WorkContext;
import com.fanruan.config.LocalConfigSource;
import com.fr.workspace.server.repository.config.LocalConfigSourceShell;
import java.net.URI;
import java.sql.Connection;
@ -121,7 +123,9 @@ import java.util.Properties;
"com.fr.decision.workflow.bean",
"com.fr.report.entity",
"com.fr.cons.entity",
"com.fr.report.write.entity"
"com.fr.report.write.entity",
"com.fanruan.messenger.ums.entity",
"com.fanruan.messenger.oa.basic.db.entity"
})
public class DesignEnvComponent {
@ -146,6 +150,7 @@ public class DesignEnvComponent {
.method(ElementMatchers.isAnnotatedWith(FaultTolerance.class))
.intercept(MethodDelegation.to(FaultToleranceInterceptor.class))));
Carina.getApplicationContext().group(CurrentTenantKey.class).add(ScheduleThreadCurrentTenantProvider.INSTANCE);
Carina.getApplicationContext().singleton(LocalConfigSourceShell.class).set(new LocalConfigSource());
}
@Start

38
designer-realize/src/main/java/com/fanruan/boot/env/function/DesignDatasourceComponent.java vendored

@ -12,15 +12,28 @@ import com.fanruan.config.impl.data.ConnectionConfigWriter;
import com.fanruan.config.impl.data.ConnectionConfigWriterFactory;
import com.fanruan.config.impl.data.TableDataConfigProviderFactory;
import com.fanruan.data.ConnectionConfigWrapper;
import com.fanruan.datasource.connection.processor.ElasticSearchConnectionProcessor;
import com.fanruan.datasource.connection.processor.FTPConnectionProcessor;
import com.fanruan.datasource.connection.processor.LocalFileConnectionProcessor;
import com.fanruan.datasource.connection.processor.PublicDatasetConnectionProcessor;
import com.fanruan.datasource.connection.processor.SSHConnectionProcessor;
import com.fanruan.datasource.connection.processor.SapRfcConnectionProcessor;
import com.fanruan.datasource.connection.processor.kafka.KafkaConnectionProcessor;
import com.fanruan.datasource.connection.processor.mongo.MongoConnectionProcessor;
import com.fanruan.workplace.http.codec.SerializerRegister;
import com.fanruan.workplace.http.codec.SerializerRegisterGroup;
import com.fanruan.workplace.http.codec.xml.XmlableSerializer;
import com.fr.base.MultiParameterParser;
import com.fr.base.ParameterType;
import com.fr.base.ParameterTypeHandler;
import com.fr.base.TableData;
import com.fr.base.parameter.FormulaParameterParser;
import com.fr.base.parameter.TableColumnParameterParser;
import com.fr.data.driver.classloader.DriverClassLoaderHelper;
import com.fr.data.driver.classloader.impl.ChildFirstDriverClassLoader;
import com.fr.data.driver.classloader.impl.ChildOnlyDriverClassLoader;
import com.fr.data.driver.constants.DriverLoaderStrategies;
import com.fr.data.impl.Connection;
import com.fr.decision.webservice.v10.datasource.connection.processor.impl.ConnectionPluginProcessor;
import com.fr.decision.webservice.v10.datasource.connection.processor.impl.ConnectionProcessorFactory;
import com.fr.decision.webservice.v10.datasource.connection.processor.impl.JDBCConnectionProcessor;
@ -53,13 +66,12 @@ public class DesignDatasourceComponent extends DatasourceComponent {
public void prepare() {
super.prepare();
// 注册数据连接处理器
ConnectionProcessorFactory.register(JDBCConnectionProcessor.KEY);
ConnectionProcessorFactory.register(JNDIConnectionProcessor.KEY);
ConnectionProcessorFactory.register(ConnectionPluginProcessor.KEY);
ConnectionProcessorFactory.register(JDYConnectionProcessor.KEY);
initConnectionProcessor();
DataSetProcessorFactory.init();
Carina.getApplicationContext().singleton(LocalConnectionShell.class).set(new LocalConnectionSource());
Carina.getApplicationContext().singleton(LocalTableDataShell.class).set(new LocalTableDataSource());
Carina.getApplicationContext().group(SerializerRegisterGroup.class).add(new SerializerRegister(Connection.class, XmlableSerializer.getInstance()));
Carina.getApplicationContext().group(SerializerRegisterGroup.class).add(new SerializerRegister(TableData.class, XmlableSerializer.getInstance()));
}
/**
@ -92,4 +104,22 @@ public class DesignDatasourceComponent extends DatasourceComponent {
public void stop() {
}
/**
* 设计器当前没有更好的扫描手段只能先手动注册了
*/
private void initConnectionProcessor() {
ConnectionProcessorFactory.register(JDBCConnectionProcessor.KEY);
ConnectionProcessorFactory.register(JNDIConnectionProcessor.KEY);
ConnectionProcessorFactory.register(ConnectionPluginProcessor.KEY);
ConnectionProcessorFactory.register(JDYConnectionProcessor.KEY);
ConnectionProcessorFactory.register(new KafkaConnectionProcessor());
ConnectionProcessorFactory.register(new MongoConnectionProcessor());
ConnectionProcessorFactory.register(new ElasticSearchConnectionProcessor());
ConnectionProcessorFactory.register(new FTPConnectionProcessor());
ConnectionProcessorFactory.register(new LocalFileConnectionProcessor());
ConnectionProcessorFactory.register(new PublicDatasetConnectionProcessor());
ConnectionProcessorFactory.register(new SapRfcConnectionProcessor());
ConnectionProcessorFactory.register(new SSHConnectionProcessor());
}
}

4
designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java

@ -11,6 +11,7 @@ import com.fanruan.workplace.conetxt.CompatiblePool;
import com.fanruan.workplace.http.HttpConstants;
import com.fanruan.workplace.http.RepositoryManager;
import com.fanruan.workplace.http.WorkspaceHeartBeatShell;
import com.fr.report.UnLockedHandler;
import com.fr.workspace.engine.exception.RemoteDesignLoginLockHandler;
import com.fr.workspace.engine.exception.RemoteDesignNoAuthHandler;
import com.fr.workspace.engine.exception.RemoteDesignPasswordNeedUpdateHandler;
@ -48,6 +49,7 @@ import com.fr.workspace.engine.FineWorkspaceFactory;
import com.fr.workspace.engine.base.FineObjectPool;
import com.fr.workspace.engine.client.heartbeart.FineWorkspaceHeartbeat;
import com.fr.workspace.engine.client.heartbeart.WorkspaceHeartbeat;
import com.fr.workspace.engine.exception.RemoteDriverUnExistHandler;
import com.fr.workspace.engine.resource.FineWorkResource;
import com.fr.workspace.engine.resource.FineWorkResourceAdaptor;
import com.fr.workspace.pool.WorkRPCRegister;
@ -151,6 +153,8 @@ public class DesignWorkContextComponent {
RemoteExceptionConvert.registerException(HttpConstants.REMOTE_AUTHORITY_ERROR_CODE, new RemoteDesignNoAuthHandler());
RemoteExceptionConvert.registerException(HttpConstants.PASSWORD_EMPTY_ERROR_CODE, new RemoteDesignUserPwdErrorHandler());
RemoteExceptionConvert.registerException(HttpConstants.LOGIN_LOCK, new RemoteDesignLoginLockHandler());
RemoteExceptionConvert.registerException(HttpConstants.TPL_HAS_BEAN_UNLOCK, new UnLockedHandler());
RemoteExceptionConvert.registerException(HttpConstants.DRIVER_NOT_EXIST, new RemoteDriverUnExistHandler());
}
private void supplementalCommon() {

19
designer-realize/src/main/java/com/fanruan/config/LocalConfigSource.java

@ -0,0 +1,19 @@
package com.fanruan.config;
import com.fr.base.email.EmailCenter;
import com.fr.workspace.server.repository.config.BaseConfigSource;
/**
* 本地配置资源
*
* @author Destiny.Lin
* @since 11.0
* Created on 2024/8/29
*/
public class LocalConfigSource extends BaseConfigSource {
@Override
public boolean isEmailConfigValid() {
return EmailCenter.isEmailConfigValid();
}
}

1
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java

@ -176,6 +176,7 @@ public class ITReplaceNorthPanel {
*/
public void initContentPanel() {
findLabel = new UILabel(Toolkit.i18nText("Fine-Design_Replace_Search_Element"));
findLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Replace_Search_Element"));
rangeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Replace_Search_Range"));
iconLabel = new UILabel(CHANGE_ICON);
resultLabel = new UILabel();

2
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java

@ -51,7 +51,7 @@ public class ITReplaceWestPanel {
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Template_Level_Search_Replace_Default";
private static final String HELP_URL = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private static final int FILL_COUNT = 12;
public static final int LEFT_WIDTH = 100;
public static final int LEFT_WIDTH = 150;
public static final String CONTENT_TEXT = "<html><font color = 'rgb(255,255,255)'>" + Toolkit.i18nText("Fine-Design_Basic_Templates_Content") + "</font></html>";
public static final String SETTING_TEXT = "<html><font color = 'rgb(255,255,255)'>" + Toolkit.i18nText("Fine-Design_Replace_Setting") + "</font></html>";

1
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java

@ -65,7 +65,6 @@ public class ITTableEditor extends UITableModelAdapter {
this.setDefaultEditor(Boolean.class, new ITBooleanEditor());
this.setDefaultRenderer(Boolean.class, new ITBooleanRenderer());
this.createTable().getColumnModel().getColumn(ITReplaceSouthPanel.CONTENT_INDEX).setMaxWidth(FineUIScale.scale(50));
this.createTable().getColumnModel().getColumn(ITReplaceSouthPanel.CHECKBOX_INDEX).setMaxWidth(FineUIScale.scale(28));
this.createTable().getColumnModel().getColumn(ITReplaceSouthPanel.CHECKBOX_INDEX).setCellRenderer(new ITBooleanRenderer());

5
designer-realize/src/main/java/com/fr/design/actions/report/ReportExportAttrAction.java

@ -10,6 +10,7 @@ import com.fr.design.menu.KeySetUtils;
import com.fr.design.report.ReportExportAttrPane;
import com.fr.main.TemplateWorkBook;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
public class ReportExportAttrAction extends JWorkBookAction {
@ -35,14 +36,14 @@ public class ReportExportAttrAction extends JWorkBookAction {
final TemplateWorkBook wbTpl = jwb.getTarget();
final ReportExportAttrPane dialog = new ReportExportAttrPane();
dialog.populate(wbTpl.getReportExportAttr());
dialog.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
dialog.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
wbTpl.setReportExportAttr(dialog.update());
jwb.fireTargetModified();
}
}).setVisible(true);
}, new Dimension(800, 600)).setVisible(true);
}
}

6
designer-realize/src/main/java/com/fr/design/actions/report/ReportWebAttrAction.java

@ -8,6 +8,7 @@ import com.fine.theme.icon.LazyIcon;
import com.fr.design.actions.JWorkBookAction;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JWorkBook;
import com.fr.design.menu.KeySetUtils;
@ -50,9 +51,8 @@ public class ReportWebAttrAction extends JWorkBookAction {
populate(wbTpl.getReportWebAttr());
}
};
final BasicDialog dialog = reportWebAttrPane.showWindow(
DesignerContext.getDesignerFrame()
);
final BasicDialog dialog = reportWebAttrPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), null,
DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.actions.reportWebAttr.dialog"));
dialog.addDialogActionListener(new DialogActionAdapter() {
@Override

17
designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java

@ -11,19 +11,14 @@ import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.gui.FineDesignScreen;
import com.fr.general.ComparatorUtils;
import com.fr.grid.Grid;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.painter.BiasTextPainter;
import com.fr.report.elementcase.TemplateElementCase;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
@ -121,16 +116,22 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor {
scrollPane.setBorder(new FineRoundBorder());
formulaTextArea.setBorder(null);
choice1 = new UIRadioButton((com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Upper_Left_To_Lower_Right")));
choice2 = new UIRadioButton((com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Lower_Left_To_Upper_Right")));
String leftToLowerText = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Upper_Left_To_Lower_Right");
choice1 = new UIRadioButton(leftToLowerText);
choice1.setToolTipText(leftToLowerText);
choice1.addActionListener(leftUp);
String leftToUpperText = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Lower_Left_To_Upper_Right");
choice2 = new UIRadioButton(leftToUpperText);
choice2.setToolTipText(leftToUpperText);
choice2.addActionListener(leftDown);
final ButtonGroup group = new ButtonGroup();
group.add(choice1);
group.add(choice2);
add(Layouts.column(10, Layouts.cell(formulaLabel).weight(0.1), Layouts.cell(scrollPane).weight(0.12), Layouts.row(5, Layouts.cell(choice1), Layouts.cell(choice2)).weight(0.12)).getComponent());
add(Layouts.column(10,
Layouts.cell(formulaLabel).weight(0.1), Layouts.cell(scrollPane).weight(0.12),
Layouts.row(5, Layouts.cell(choice1).weight(1), Layouts.cell(choice2).weight(1)).weight(0.12)).getComponent());
}
@Override

5
designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java

@ -5,6 +5,7 @@ import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.dscolumn.DSColumnPane;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.grid.Grid;
import com.fr.log.FineLoggerFactory;
@ -13,7 +14,6 @@ import com.fr.report.core.SheetUtils;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.poly.PolyECBlock;
import com.fr.report.worksheet.WorkSheet;
import com.fanruan.product.ProductConstants;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
@ -65,7 +65,8 @@ public class DSColumnCellEditor extends AbstractCellEditor implements DialogActi
this.dsColumnPane = new DSColumnPane();
dsColumnPane.putElementcase(grid.getElementCasePane());
dsColumnPane.putCellElement(cellElement);
BasicDialog dsColumnDialog = this.dsColumnPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(grid), null, DSColumnPane.DEFAULT_DIMENSION);
BasicDialog dsColumnDialog = this.dsColumnPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(grid), null,
DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.ds.column.cellEditor.pane"));
dsColumnDialog.addDialogActionListener(this);
try {

3
designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java

@ -15,7 +15,6 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
@ -26,8 +25,6 @@ import java.beans.PropertyChangeListener;
*/
public class DSColumnPane extends BasicPane {
public static final Dimension DEFAULT_DIMENSION = new Dimension(700, 600);
private TableDataSource tplEC;
private FineTabbedPane tabbedPane;
private DSColumnBasicPane basicPane = null;

13
designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupPopUpPane.java

@ -24,6 +24,8 @@ import java.awt.event.ItemListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX;
import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE;
public class ResultSetGroupPopUpPane extends ResultSetGroupPane {
@ -68,12 +70,15 @@ public class ResultSetGroupPopUpPane extends ResultSetGroupPane {
functionComboBox = new FunctionComboBox(GUICoreUtils.getFunctionArray());
this.add(column(LayoutConstants.VERTICAL_GAP,
row(10,
cell(groupRadioButton), cell(groupComboBox), cell(advancedButton)
row(LayoutConstants.HORIZONTAL_GAP,
cell(groupRadioButton),
cell(groupComboBox).with(it -> it.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX)),
cell(advancedButton)
),
cell(listRadioButton),
row(10,
cell(summaryRadioButton), cell(functionComboBox)
row(LayoutConstants.HORIZONTAL_GAP,
cell(summaryRadioButton),
cell(functionComboBox).with(it -> it.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX))
)
).getComponent());

16
designer-realize/src/main/java/com/fr/design/expand/ConditionParentPane.java

@ -13,6 +13,7 @@ import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.fix;
public class ConditionParentPane extends JPanel {
private ParentPane leftParentPane;
@ -31,16 +32,11 @@ public class ConditionParentPane extends JPanel {
this.setLayout(new BorderLayout());
leftParentPane = new ParentPane(ParentPane.LEFT, listener);
upParentPane = new ParentPane(ParentPane.UP, listener);
this.add(row(10,
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Left_Parent") + ": ")).weight(0.1),
cell(leftParentPane).weight(0.3)
).weight(0.3),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Up_Parent") + ": ")).weight(0.1),
cell(upParentPane).weight(0.3)
).weight(0.3),
flex(0.2)
this.add(row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Left_Parent") + ": ")), fix(10), cell(leftParentPane),
fix(20),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Up_Parent") + ": ")), fix(10), cell(upParentPane),
flex()
).getComponent());
}
public void putElementcase(ElementCasePane t){

6
designer-realize/src/main/java/com/fr/design/report/ImageExportPane.java

@ -64,14 +64,14 @@ public class ImageExportPane extends AbstractExportPane {
cell(this.globalFormatJpg).weight(0.8),
cell(this.globalFormatPng).weight(0.4),
flex()),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Image_Export_Rendering_Quality"), FineUIStyle.LABEL_SECONDARY)).weight(0.4),
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Image_Export_Rendering_Quality"), FineUIStyle.LABEL_SECONDARY)).with(it -> it.setToolTipText(Toolkit.i18nText("Fine-Design_Image_Export_Rendering_Quality"))).weight(0.4),
cell(this.globalRenderQuality).weight(0.8),
cell(this.globalRenderSpeed).weight(0.4),
cell(this.globalRenderSpeed).with(it -> it.setToolTipText(it.getText())).weight(0.4),
flex()),
column(LayoutConstants.VGAP_SMALL,
row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Image_Export_Typesetting"), FineUIStyle.LABEL_SECONDARY)).weight(0.4),
cell(this.templateThumbnail).weight(0.8),
cell(this.templatePaging).weight(0.4),
cell(this.templatePaging).with(it -> it.setToolTipText(it.getText())).weight(0.4),
flex()),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Image_Export_Tips"), FineUIStyle.LABEL_TIP))
)

3
designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java

@ -186,6 +186,7 @@ public class ReportColumnsPane extends BasicPane{
toUILabel.setText(COLUMN_ROW_TEXTS[1 - rowOrColumn]);
showBlankCheckBox.setText(SHOW_BLANK[rowOrColumn]);
copyLabel.setText(REPORT_COLUMN_RAPEAT[rowOrColumn] + ":");
copyLabel.setToolTipText(REPORT_COLUMN_RAPEAT[rowOrColumn] + ":");
}
/**
@ -332,7 +333,7 @@ public class ReportColumnsPane extends BasicPane{
private JPanel createRowPane() {
repeatColDataTextField = new UITextField();
copyLabel = new UILabel(REPORT_COLUMN_RAPEAT[rowOrColumn]);
copyLabel.setToolTipText(REPORT_COLUMN_RAPEAT[rowOrColumn]);
copyTitleTextField = new UITextField();
JPanel colPane = column(
10,

41
designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java

@ -2,12 +2,10 @@ package com.fr.design.report;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon;
import com.fr.config.ServerPreferenceConfig;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.general.ComparatorUtils;
import com.fr.transaction.Configurations;
@ -18,7 +16,6 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -64,20 +61,21 @@ public class WriteShortCutsPane extends JPanel{
private JPanel getFeatureNamePane(){
JPanel featureNamePane = new JPanel(new BorderLayout());
featureNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.RIGHT);
UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"));
UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER);
UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER);
UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"), SwingConstants.RIGHT);
UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"));
UIComponentUtils.setLineWrap(shortName, MAX_LABEL_WIDTH);
nextColHK = new UILabel(nextColString, SwingConstants.CENTER);
JPanel switchBtnPane = getSwitchBtnPane();
UIButton switchbt = new UIButton(new LazyIcon("switch", 24));
switchbt.addActionListener(getListener());
switchbt.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Exchange_Key"));
nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(column(10,
row(10, cell(name).weight(0.13), cell(nextCol).weight(0.15), cell(new JPanel()).weight(0.12), cell(nextRow).weight(0.15), flex(0.45)),
row(10, cell(shortName).weight(0.13), cell(nextColHK).weight(0.15), cell(switchBtnPane).weight(0.12), cell(nextRowHK).weight(0.15), flex(0.45))
row(cell(name).weight(0.2), cell(nextCol).weight(0.3), flex(0.1), cell(nextRow).weight(0.3), flex(0.1)),
row(cell(shortName).weight(0.2), cell(nextColHK).weight(0.3), row(flex(), cell(switchbt), flex()).weight(0.1), cell(nextRowHK).weight(0.3), flex(0.1))
).getComponent());
featureNamePane.add(centerPane, BorderLayout.CENTER);
@ -85,31 +83,20 @@ public class WriteShortCutsPane extends JPanel{
return featureNamePane;
}
private JPanel getSwitchBtnPane() {
UIButton switchbt = new UIButton(new LazyIcon("switch", new Dimension(36, 24)));
switchbt.addActionListener(getListener());
switchbt.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Exchange_Key"));
JPanel switchBtnPane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane();
switchBtnPane.add(switchbt);
return switchBtnPane;
}
private JPanel getHintsPane(){
JPanel hintsPane = new JPanel(new BorderLayout());
hintsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.RIGHT);
UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER);
UILabel preRowText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Row"), SwingConstants.CENTER);
preCol = new UILabel("Shift+" + nextColString, SwingConstants.LEFT);
preRow = new UILabel("Shift+" + nextRowString, SwingConstants.LEFT);
UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"));
UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"));
UILabel preRowText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Row"));
preCol = new UILabel("Shift+" + nextColString);
preRow = new UILabel("Shift+" + nextRowString);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(column(10,
row(10, cell(systemDefault).weight(0.13), cell(preColText).weight(0.24), cell(preCol).weight(0.14), flex(0.64)),
row(10, cell(new JPanel()).weight(0.13), cell(preRowText).weight(0.24), cell(preRow).weight(0.14), flex(0.64))
row(cell(systemDefault).weight(0.2), cell(preColText).weight(0.3), cell(preCol).weight(0.3), flex(0.2)),
row( cell(new JPanel()).weight(0.2), cell(preRowText).weight(0.3), cell(preRow).weight(0.3), flex(0.2))
).getComponent());
hintsPane.add(centerPane, BorderLayout.CENTER);

8
designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java

@ -12,6 +12,7 @@ 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.UIComponentUtils;
import com.fr.page.ReportPageAttrProvider;
import com.fr.stable.ColumnRow;
import com.fr.stable.FT;
@ -323,11 +324,14 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
cell(initPageFrozenFootPane())
).getComponent();
UILabel tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Engine_Freeze_Tip"));
FineUIStyle.setStyle(tipLabel, FineUIStyle.LABEL_TIP);
JPanel pagePanel = column(
20,
cell(wrapComponentWithTitle(outrepeatPanel, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Repeat"))),
cell(wrapComponentWithTitle(outfreezePanel, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Frozen"))),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Engine_Freeze_Tip"))).with(it -> FineUIStyle.setStyle(it, FineUIStyle.LABEL_TIP))
cell(tipLabel).with(UIComponentUtils::setLineWrap)
).getComponent();
JPanel labelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
@ -389,7 +393,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
FineTabbedPane.TabPaneBuilder tabbedPaneBuilder = new FineTabbedPane.TabPaneBuilder();
tabbedPaneBuilder.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Page_Preview"), pagePanel); //分页预览
tabbedPaneBuilder.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Write_Preview"), freezePanel);
tabbedPane = tabbedPaneBuilder.withHeadRatio(0.35f).build();
tabbedPane = tabbedPaneBuilder.withHeadRatio(0.4f).build();
//去除对应的焦点虚线边框
tabbedPane.setFocusable(false);
this.add(tabbedPane);

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

@ -7,6 +7,7 @@ import com.fr.base.background.ColorBackground;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.ElementCasePane;
@ -51,6 +52,7 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
private final static Icon ENABLE_ICON = new LazyIcon("cellSelect");
private boolean enabled;
SelectActionListener selectActionListener;
private AbstractAttrNoScrollPane parent;
HeaderAreaPane.CellSelectionManager cellSelectionManager;
@ -63,6 +65,13 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
initTextField();
initSelectButton();
initLayout();
//翻新前AbstractAttrNoScrollPane中递归注册已加载的Pane事件,UI翻新后部分面板未提前加载导致事件未注册,先主动调用下后续再重构
registerChangeListener(new UIObserverListener() {
@Override
public void doChange() {
parent.attributeChanged();
}
});
}
private void initLayout() {
@ -75,7 +84,6 @@ public class SortColumnRowPane extends JPanel implements UIObserver {
).getComponent());
}
void intUILabel() {
elementLabel = new UILabel(new LazyIcon("cellelement_small"));
}

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

@ -34,6 +34,7 @@ public class HeaderAreaPane extends JPanel {
ReactiveCardPane cardPane;
UIComboBox uiComboBox;
UILabel headerLabel;
boolean showHeaderArea;
HeaderAreaPane(int headerAreaPaneWidth, int headerAreaPaneRightWidth) {
this.headerAreaPaneWidth = headerAreaPaneWidth;
@ -53,12 +54,22 @@ public class HeaderAreaPane extends JPanel {
private void initChangeListener() {
uiComboBox.addItemListener(e -> {
if ((showHeaderArea ? 1 : 0) != uiComboBox.getSelectedIndex()) {
triggerItemChanged();
}
});
uiComboBox.setEnabled(false);
}
private void triggerItemChanged() {
if (uiComboBox.getSelectedIndex() == 0) {
cardPane.select("none").populate();
showHeaderArea = false;
cellSelectionManager.removeNotSelectables(columnRowPane.updateBean());
columnRowPane.cancelSelectState();
} else {
cardPane.select("custom").populate();
showHeaderArea = true;
ColumnRow columnRow = columnRowPane.updateBean();
if (cellSelectionManager.isNotSelectables(columnRow)) {
columnRowPane.setColumnRow(ColumnRow.ERROR);
@ -66,8 +77,6 @@ public class HeaderAreaPane extends JPanel {
cellSelectionManager.addNotSelectables(columnRow);
}
}
});
uiComboBox.setEnabled(false);
}
private void initCardPane() {

8
designer-realize/src/main/java/com/fr/design/webattr/CommonPane.java

@ -35,14 +35,14 @@ public class CommonPane extends JPanel {
JPanel workPanel = new JPanel(new BorderLayout());
workPanel.add(column(LayoutConstants.VERTICAL_GAP,
//标题
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Title"))).weight(0.2),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Title"))).weight(0.25),
cell(this.titleTextField).weight(0.5),
flex(0.3)
flex(0.25)
),
//报表缓存有效时间
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cache_Validate_Time"))).weight(0.2),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cache_Validate_Time"))).weight(0.25),
row(cell(this.cacheValidateTimeEditor).weight(0.6), fix(5), cell(new UILabel("milliseconds")).weight(0.4)).weight(0.4),
flex(0.4)
flex(0.35)
)
).with(it -> it.setBorder(new ScaledEmptyBorder(10,10,10,10))).getComponent());
this.add(workPanel);

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

@ -201,7 +201,7 @@ public class EditToolBar extends BasicPane {
buttonColorGroupPane.setVisible(false);
//样式设置面板布局,默认背景-按钮颜色
backgroundPane.add(column(LayoutConstants.VERTICAL_GAP,
row(LayoutConstants.HORIZONTAL_GAP, cell(defaultCheckBox).weight(0.15), cell(bgButton).weight(0.2), flex(0.65)).weight(1),
row(LayoutConstants.HORIZONTAL_GAP, cell(defaultCheckBox).weight(0.25), cell(bgButton).weight(0.2), flex(0.55)).weight(1),
cell(buttonColorGroupPane).weight(1)
).getComponent());
@ -762,6 +762,6 @@ public class EditToolBar extends BasicPane {
}
};
bgColorButtonGroup.setPreferredSize(new Dimension(FineUIScale.scale(135), bgColorButtonGroup.getPreferredSize().height));
return row(10, cell(headLabel).weight(0.15), cell(bgColorButtonGroup).weight(0.3), flex(0.55)).getComponent();
return row(10, cell(headLabel).weight(0.25), cell(bgColorButtonGroup).weight(0.3), flex(0.45)).getComponent();
}
}

3
designer-realize/src/main/java/com/fr/design/webattr/PageWebSettingPane.java

@ -110,7 +110,8 @@ public class PageWebSettingPane extends WebSettingPane<WebPage> {
return column(LayoutConstants.VERTICAL_GAP,
//报表显示位置
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location"))).weight(0.15),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location")))
.with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location"))).weight(0.15),
row( cell(centerRadioButton), fix(12), cell(leftRadioButton), flex()).weight(0.85)
),

10
designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java

@ -105,11 +105,11 @@ public class WriteToolBarPane extends AbstractEditToolBarPane {
cell(isAutoStash)
).getComponent();
JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
northPane.add(sheetPane);
northPane.add(showLocPane);
northPane.add(backgroundPane);
northPane.add(unloadCheckPane);
JPanel northPane = column(LayoutConstants.VERTICAL_GAP,
row(cell(sheetPane).weight(1), fix(20), cell(showLocPane).weight(1)),
cell(backgroundPane),
cell(unloadCheckPane)
).getComponent();
//工具栏编辑
editToolBarButton.addActionListener(editBtnListener);

Loading…
Cancel
Save