Browse Source

Merge remote-tracking branch 'origin/release/11.0' into release/11.0

release/11.0
Destiny.Lin 1 year ago
parent
commit
052edea172
  1. 26
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 25
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java
  3. 10
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  4. 6
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
  5. 10
      designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  6. 24
      designer-base/src/main/java/com/fr/design/env/processor/AbstractRemoteDesignerWorkspaceInfoProcessor.java
  7. 25
      designer-base/src/main/java/com/fr/design/env/processor/RemoteDesignerWorkspaceInfoProcessor.java
  8. 12
      designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java
  9. 4
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  10. 3
      designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java
  11. 23
      designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/AbstractMobileStyleDefinePaneCreator.java
  12. 40
      designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/MobileStyleDefinePaneCreator.java
  13. 11
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java
  14. 69
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStylePane.java
  15. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java
  16. 11
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  17. BIN
      designer-base/src/main/resources/com/fr/design/images/mainframe/loading/loading.gif
  18. BIN
      designer-base/src/main/resources/com/fr/design/images/mainframe/loading/loading_en.gif
  19. BIN
      designer-base/src/main/resources/com/fr/design/images/mainframe/loading/loading_zh.gif
  20. BIN
      designer-base/src/main/resources/com/fr/design/images/mainframe/loading/loading_zh_TW.gif
  21. 57
      designer-base/src/main/resources/com/fr/design/login/guide.css
  22. 2
      designer-base/src/main/resources/com/fr/design/login/guide.html
  23. BIN
      designer-base/src/main/resources/com/fr/design/login/img/guide/login_guide.png
  24. BIN
      designer-base/src/main/resources/com/fr/design/login/img/guide/login_guide_en.png
  25. 0
      designer-base/src/main/resources/com/fr/design/login/img/guide/login_guide_zh.png
  26. BIN
      designer-base/src/main/resources/com/fr/design/login/img/guide/login_guide_zh_TW.png
  27. 57
      designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_en_US.css
  28. 57
      designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_ja_JP.css
  29. 57
      designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_ko_KR.css
  30. 57
      designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_zh_CN.css
  31. 57
      designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_zh_TW.css
  32. 10
      designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java
  33. 17
      designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java
  34. 6
      designer-chart/src/main/java/com/fr/van/chart/multilayer/data/MultiPiePlotTableDataContentPane.java
  35. 0
      designer-chart/src/main/resources/com/fr/design/images/emptydata/emptydata.png
  36. BIN
      designer-chart/src/main/resources/com/fr/design/images/emptydata/emptydata_en.png
  37. 0
      designer-chart/src/main/resources/com/fr/design/images/emptydata/emptydata_zh.png
  38. 0
      designer-chart/src/main/resources/com/fr/design/images/emptydata/emptydata_zh_TW.png
  39. BIN
      designer-chart/src/main/resources/com/fr/van/chart/background/background.png
  40. BIN
      designer-chart/src/main/resources/com/fr/van/chart/background/background_en.png
  41. 0
      designer-chart/src/main/resources/com/fr/van/chart/background/background_zh.png
  42. BIN
      designer-chart/src/main/resources/com/fr/van/chart/background/background_zh_TW.png
  43. 9
      designer-form/src/main/java/com/fr/design/designer/creator/XAutoChartCreator.java
  44. 22
      designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java
  45. 6
      designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java
  46. 11
      designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java
  47. 4
      designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java
  48. 37
      designer-form/src/main/java/com/fr/design/designer/properties/mobile/NumberEditorMobilePropertyUI.java
  49. 37
      designer-form/src/main/java/com/fr/design/designer/properties/mobile/PasswordMobilePropertyUI.java
  50. 37
      designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextAreaMobilePropertyUI.java
  51. 15
      designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextEditorMobilePropertyUI.java
  52. 94
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BaseTextEditorMobileDefinePane.java
  53. 11
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java
  54. 33
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/NumberEditorMobileDefinePane.java
  55. 25
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/PasswordMobileDefinePane.java
  56. 63
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java
  57. 25
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextAreaAdvancedDefinePane.java
  58. 56
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java
  59. 38
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobilePasswordEditSettingPane.java
  60. 43
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextAreaSettingPane.java
  61. 59
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextEditSettingPane.java
  62. 35
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextFieldInputSettingPane.java
  63. BIN
      designer-form/src/main/resources/com/fr/design/form/images/autochartpreview/auto_chart_preview.png
  64. BIN
      designer-form/src/main/resources/com/fr/design/form/images/autochartpreview/auto_chart_preview_en.png
  65. BIN
      designer-form/src/main/resources/com/fr/design/form/images/autochartpreview/auto_chart_preview_zh.png
  66. BIN
      designer-form/src/main/resources/com/fr/design/form/images/autochartpreview/auto_chart_preview_zh_TW.png
  67. 13
      designer-realize/src/main/java/com/fr/design/widget/WidgetMobilePaneFactory.java
  68. 41
      designer-realize/src/main/java/com/fr/design/widget/ui/mobile/NumberEditorMobilePane.java
  69. 42
      designer-realize/src/main/java/com/fr/design/widget/ui/mobile/PasswordMobilePane.java
  70. 39
      designer-realize/src/main/java/com/fr/design/widget/ui/mobile/ScanCodeMobilePane.java
  71. 42
      designer-realize/src/main/java/com/fr/design/widget/ui/mobile/TextAreaMobilePane.java
  72. 59
      designer-realize/src/main/java/com/fr/design/widget/ui/mobile/TextEditorMobilePane.java
  73. 24
      designer-realize/src/main/java/com/fr/grid/GridKeyAction.java
  74. 2
      designer-realize/src/main/java/com/fr/start/MainDesigner.java
  75. 12
      designer-realize/src/main/java/com/fr/start/SplashContext.java
  76. 12
      designer-realize/src/main/java/com/fr/start/common/SplashPane.java
  77. 20
      designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java
  78. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash.png
  79. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash@2x.png
  80. 0
      designer-realize/src/main/resources/com/fr/design/images/splash@2x_en.png
  81. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash@2x_zh.png
  82. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash@2x_zh_TW.png
  83. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash_zh.png
  84. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash_zh_TW.png
  85. BIN
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/open/open.png
  86. BIN
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/open/open_en.png
  87. 0
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/open/open_zh.png
  88. BIN
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/open/open_zh_TW.png
  89. BIN
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/remind/remind.png
  90. BIN
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/remind/remind_en.png
  91. 0
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/remind/remind_zh.png
  92. BIN
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/remind/remind_zh_TW.png

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

@ -1,6 +1,7 @@
package com.fr.design;
import com.fr.common.report.ReportState;
import com.fr.design.env.processor.RemoteDesignerWorkspaceInfoProcessor;
import com.fr.design.mainframe.manager.clip.TemplateTreeClipboard;
import com.fr.design.plugin.remind.PluginErrorDesignReminder;
import com.fr.design.data.DesignTableDataManager;
@ -101,6 +102,29 @@ public class EnvChangeEntrance {
}
}
/**
* 插件进行用户名转换
*
* @param workspaceInfo 环境信息
*/
private DesignerWorkspaceInfo customUserName(DesignerWorkspaceInfo workspaceInfo) {
//本地环境直接返回
if (workspaceInfo == null || workspaceInfo.getType() == DesignerWorkspaceType.Local) {
return workspaceInfo;
}
RemoteDesignerWorkspaceInfoProcessor processor = ExtraDesignClassManager.getInstance().getSingle(RemoteDesignerWorkspaceInfoProcessor.XML_TAG);
if (processor == null) {
return workspaceInfo;
}
try {
WorkspaceConnectionInfo workspaceConnectionInfo = processor.customUserName(workspaceInfo.getConnection());
return (RemoteDesignerWorkspaceInfo) ((RemoteDesignerWorkspaceInfo) workspaceInfo).cloneWithConnectionInfo(workspaceConnectionInfo);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return workspaceInfo;
}
}
/**
* 切换到新环境
*
@ -109,7 +133,7 @@ public class EnvChangeEntrance {
*/
private boolean switch2Env(final String envName, PopTipStrategy strategy) {
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager();
DesignerWorkspaceInfo selectedEnv = envManager.getWorkspaceInfo(envName);
DesignerWorkspaceInfo selectedEnv = customUserName(envManager.getWorkspaceInfo(envName));
DesignerWorkspaceInfoContext.setWorkspaceInfo(selectedEnv);
WorkspaceConnectionInfo connectionInfo = selectedEnv.getConnection();

25
designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java

@ -4,10 +4,21 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.IOUtils;
import javax.swing.*;
import java.awt.*;
import com.fr.general.locale.image.I18nImage;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.LayoutManager;
import java.awt.Rectangle;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@ -23,8 +34,10 @@ public class RemindPane extends JPanel {
private Icon checkIcon = IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/check.png");
private Icon unCheckIcon = IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/uncheck.png");
private Icon closeIcon = IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/remind_close.png");
private Icon labelIcon = IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/remind.png");
private Icon openIcon = IOUtils.readIcon("com/fr/design/mainframe/alphafine/images/open.png");
private static final String REMIND_IMAGE_URL = "/com/fr/design/mainframe/alphafine/images/open/open.png";
private Icon labelIcon = new ImageIcon(I18nImage.getImage(REMIND_IMAGE_URL));
private static final String OPEN_IMAGE_URL = "/com/fr/design/mainframe/alphafine/images/open/open.png";
private final Icon openIcon = new ImageIcon(I18nImage.getImage(OPEN_IMAGE_URL));
private static final int WIDTH = 600;
private static final int HEIGHT = 400;

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

@ -572,7 +572,7 @@ public abstract class DesignTableDataManager {
parameter.setValue(parameterMap.get(parameter.getName()));
}
}
parameterMap.put(SqlNoteConstants.SQL_NOTE_TEMPLATE, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath());
addTemplateInfoIfNeed(parameterMap);
return DataOperator.getInstance().previewTableData(TableDataSourceTailor.extractTableData(tableDataSource), tabledata, parameterMap, rowCount);
} catch (Exception e) {
throw new TableDataException(e.getMessage(), e);
@ -592,6 +592,12 @@ public abstract class DesignTableDataManager {
}
}
private static void addTemplateInfoIfNeed(Map<String, Object> parameterMap) {
if (JTemplate.isValid(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate())) {
parameterMap.put(SqlNoteConstants.SQL_NOTE_TEMPLATE, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath());
}
}
private static boolean needInputParams(boolean mustInputParameters, ParameterProvider[] parameters) {
if (mustInputParameters && ArrayUtils.isNotEmpty(parameters)) {
return true;
@ -669,7 +675,7 @@ public abstract class DesignTableDataManager {
if (needLoadingBar) {
MultiResultTableDataWrapper.loadingBar.start();
}
parameterMap.put(SqlNoteConstants.SQL_NOTE_TEMPLATE, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath());
addTemplateInfoIfNeed(parameterMap);
return DataOperator.getInstance().previewMultiResultTableData(tableData, parameterMap, 0);
}

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

@ -589,7 +589,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
} else {
path = driverPath;
}
if(JarFileParseUtil.hasDuplicateDriver(con.getDriver(), path)) {
if(hasDuplicateDriver(con.getDriver(), path)) {
testResult.setForeground(Color.RED);
testResult.setText(Toolkit.i18nText("Fine_Designer_Driver_Conflict"));
} else {
@ -605,7 +605,9 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
return xBorderPanel;
}
private boolean hasDuplicateDriver(String driver, String folder) {
return JarFileParseUtil.hasDuplicateDriver(driver, folder);
}
}
}

10
designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -6,6 +6,7 @@ import com.fr.log.FineLoggerFactory;
import com.fr.security.SecurityToolbox;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.fun.mark.Immutable;
import com.fr.stable.project.ProjectConstants;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
@ -166,6 +167,15 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
return object;
}
/**
* clone一个自定义连接信息的RemoteDesignerWorkspaceInfo
*/
public Object cloneWithConnectionInfo(WorkspaceConnectionInfo workspaceConnectionInfo) throws CloneNotSupportedException {
RemoteDesignerWorkspaceInfo object = (RemoteDesignerWorkspaceInfo) super.clone();
object.connection = workspaceConnectionInfo;
return object;
}
@Override
public boolean checkValid() throws Exception {

24
designer-base/src/main/java/com/fr/design/env/processor/AbstractRemoteDesignerWorkspaceInfoProcessor.java vendored

@ -0,0 +1,24 @@
package com.fr.design.env.processor;
import com.fr.stable.fun.mark.API;
/**
* 远程设计自定义用户名接口实现抽象类
*
* @author John.Ying
* @since 11.0
* Created on 2023/5/17
*/
@API(level = RemoteDesignerWorkspaceInfoProcessor.CURRENT_LEVEL)
public abstract class AbstractRemoteDesignerWorkspaceInfoProcessor implements RemoteDesignerWorkspaceInfoProcessor {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
}

25
designer-base/src/main/java/com/fr/design/env/processor/RemoteDesignerWorkspaceInfoProcessor.java vendored

@ -0,0 +1,25 @@
package com.fr.design.env.processor;
import com.fr.stable.fun.mark.Immutable;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
/**
* 远程设计自定义用户名接口
* px:为了二开插件开的接口不建议实现后面可能会变动
*
* @author John.Ying
* @since 11.0
* Created on 2023/5/17
*/
public interface RemoteDesignerWorkspaceInfoProcessor extends Immutable {
String XML_TAG = "RemoteDesignerWorkspaceInfoProcessor";
int CURRENT_LEVEL = 1;
/**
* 根据链接信息自定义用户名
*/
WorkspaceConnectionInfo customUserName(WorkspaceConnectionInfo workspaceInfo);
}

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

@ -20,6 +20,7 @@ import com.fr.design.javascript.jsapi.JSAPITreeHelper;
import com.fr.design.javascript.jsapi.JSAPIUserObject;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.http.HttpToolbox;
import com.fr.json.JSONArray;
import com.fr.json.JSONException;
@ -70,6 +71,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.ExecutionException;
public class JSContentWithDescriptionPane extends JSContentPane implements KeyListener {
@ -393,9 +395,13 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi
private void updateHelpDocuments(Object value, List<HelpDocument> helpDocuments) {
String url = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT) + value.toString();
try {
String result = HttpToolbox.get(url);
JSONObject jsonObject = new JSONObject(result);
JSONArray jsonArray = jsonObject.optJSONArray("list");
JSONArray jsonArray = null;
//目前简中繁中之外的语言高级编辑器功能及文档不完善,右侧展示的文档链接列表暂时为空白
if(GeneralContext.isChineseEnv()) {
String result = HttpToolbox.get(url);
JSONObject jsonObject = new JSONObject(result);
jsonArray = jsonObject.optJSONArray("list");
}
if (jsonArray != null) {
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject resultJSONObject = jsonArray.optJSONObject(i);

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

@ -54,6 +54,7 @@ import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.report.lock.LockInfoOperator;
import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
@ -61,7 +62,6 @@ import com.fr.stable.project.ProjectConstants;
import com.fr.third.org.apache.commons.io.FilenameUtils;
import com.fr.workspace.WorkContext;
import com.fr.report.lock.LockInfoOperator;
import javax.swing.BorderFactory;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
@ -537,7 +537,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
}
private boolean pathSupportVcsAction(String path) {
if (FileExtension.CPT.matchExtension(path) || FileExtension.FRM.matchExtension(path)) {
if (FileExtension.CPT.matchExtension(path) || FileExtension.FRM.matchExtension(path) || FileExtension.VIS.matchExtension(path)) {
return true;
}
return false;

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

@ -157,7 +157,8 @@ public class NorthRegionContainerPane extends JPanel {
if (!DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) {
ad.createAlphaFinePane().setVisible(false);
}
northEastPane.add(ad.createGuideEntryPane());
/// 新手引导功能,暂时屏蔽
// northEastPane.add(ad.createGuideEntryPane());
northEastPane.add(ad.createNotificationCenterPane());
OSSupportCenter.buildAction(new OSBasedAction() {

23
designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/AbstractMobileStyleDefinePaneCreator.java

@ -0,0 +1,23 @@
package com.fr.design.mainframe.mobile.processor;
import com.fr.stable.fun.mark.API;
/**
* 移动端Form控件样式模板通用属性替换接口
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/4/11
*/
@API(level = MobileStyleDefinePaneCreator.CURRENT_LEVEL)
public abstract class AbstractMobileStyleDefinePaneCreator implements MobileStyleDefinePaneCreator {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
}

40
designer-base/src/main/java/com/fr/design/mainframe/mobile/processor/MobileStyleDefinePaneCreator.java

@ -0,0 +1,40 @@
package com.fr.design.mainframe.mobile.processor;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.mainframe.mobile.ui.MobileStyleCustomDefinePane;
import com.fr.form.ui.Widget;
import com.fr.form.ui.mobile.MobileCommonExtraStyle;
import com.fr.form.ui.mobile.MobileStyle;
import com.fr.stable.fun.mark.Immutable;
import org.jetbrains.annotations.Nullable;
/**
* 移动端Form控件样式模板通用属性替换接口
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/4/11
*/
public interface MobileStyleDefinePaneCreator extends Immutable {
String XML_TAG = "MobileStyleDefinePaneCreator";
int CURRENT_LEVEL = 1;
/**
* <p> 创建通用属性样式界面可替换{@link com.fr.design.mainframe.mobile.ui.MobileStyleDefinePane}
* <p> 每种样式的通用属性面板是一样的
*
* @param widget 控件
* @param customDefinePane 自定义面板
* @param mobileStyle 移动端样式
* @return
*/
@Nullable BasicBeanPane<MobileStyle> createBaseBeanPane(Widget widget, Class<? extends MobileStyleCustomDefinePane> customDefinePane, Class<? extends MobileStyle> mobileStyle);
/**
* 替换通用属性面板注册额外属性
*
* @return 属性类
*/
@Nullable Class<? extends MobileCommonExtraStyle> classForCommonExtraStyle(Widget widget);
}

11
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java

@ -53,22 +53,28 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
private UISpinner borderRadius;
private NewColorSelectBox iconColor;
private MobileStyleFontConfigPane fontConfigPane;
private MobileStyle mobileStyle;
MobileStyleDefinePane(Widget widget, Class<? extends MobileStyleCustomDefinePane> customBeanPaneClass,
Class<? extends MobileStyle> mobileStyleClazz) {
this.widget = widget;
this.customBeanPane = Reflect.on(customBeanPaneClass).create(widget).get();
this.mobileStyleClazz = mobileStyleClazz;
initMobileStyle(widget);
init();
}
private void initMobileStyle(Widget widget) {
mobileStyle = widget.getMobileStyle() != null ? widget.getMobileStyle() : Reflect.on(mobileStyleClazz).create().get();
}
@Override
public void populateBean(MobileStyle ob) {
this.customBeanPane.populateBean(ob);
customCombo.setSelectedIndex(ob.isCommonCustom() ? 1 : 0);
if(ob.getCommonBackground() != null) {
colorSelectBox.setSelectObject(((ColorBackground)ob.getCommonBackground()).getColor());
if (ob.getCommonBackground() != null) {
colorSelectBox.setSelectObject(((ColorBackground) ob.getCommonBackground()).getColor());
}
borderType.setSelectedLineStyle(ob.getCommonBorderType());
if (ob.getCommonBorderColor() != null) {
@ -85,7 +91,6 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
@Override
public MobileStyle updateBean() {
MobileStyle mobileStyle = Reflect.on(mobileStyleClazz).create().get();
this.widget.setMobileStyle(mobileStyle);
this.customBeanPane.updateBean();
mobileStyle.setCommonCustom(customCombo.getSelectedIndex() == 1);

69
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStylePane.java

@ -5,17 +5,32 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.MobileWidgetStyleProvider;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.mobile.processor.MobileStyleDefinePaneCreator;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WScaleLayout;
import com.fr.form.ui.mobile.MobileCommonExtraStyle;
import com.fr.form.ui.mobile.MobileStyle;
import com.fr.form.ui.mobile.StyleClassMap;
import com.fr.form.ui.widget.CRBoundsWidget;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.observer.PluginEventType;
import com.fr.stable.ArrayUtils;
import javax.swing.*;
import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.ListCellRenderer;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.HashMap;
import java.util.Map;
@ -28,9 +43,11 @@ public class MobileStylePane extends BasicPane {
private JList styleList;
private Map<String, BasicBeanPane<MobileStyle>> map = new HashMap<>();
private boolean checkFlag = true;
public MobileStylePane(Widget widget) {
if(widget instanceof WScaleLayout) {
this.widget = ((CRBoundsWidget)((WScaleLayout) widget).getBoundsWidget()).getWidget();
if (widget instanceof WScaleLayout) {
this.widget = ((CRBoundsWidget) ((WScaleLayout) widget).getBoundsWidget()).getWidget();
} else {
this.widget = widget;
}
@ -63,13 +80,18 @@ public class MobileStylePane extends BasicPane {
}
private void init() {
initComponent();
initPluginListener();
}
private void initComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
listModel = new DefaultListModel<>();
card = new CardLayout();
right = FRGUIPaneFactory.createCardLayout_S_Pane();
right.setLayout(card);
MobileWidgetStyleProvider[] styleProviders = getMobileWidgetStyleProviders();
for(MobileWidgetStyleProvider styleProvider: styleProviders) {
for (MobileWidgetStyleProvider styleProvider : styleProviders) {
this.addProvider2View(styleProvider);
}
this.addWestList();
@ -107,7 +129,15 @@ public class MobileStylePane extends BasicPane {
listModel.addElement(displayName);
try {
MobileStyleDefinePaneCreator processor = ExtraDesignClassManager.getInstance().getSingle(MobileStyleDefinePaneCreator.XML_TAG);
BasicBeanPane<MobileStyle> mobileStyleBasicBeanPane = new MobileStyleDefinePane(widget, appearanceClazz, mobileStyleClazz);
if (checkFlag && processor != null && processor.createBaseBeanPane(widget, appearanceClazz, mobileStyleClazz) != null) {
mobileStyleBasicBeanPane = processor.createBaseBeanPane(widget, appearanceClazz, mobileStyleClazz);
Class<? extends MobileCommonExtraStyle> extraStyle = processor.classForCommonExtraStyle(widget);
if (extraStyle != null) {
StyleClassMap.putCommonStyle(extraStyle.getName(), extraStyle.getName());
}
}
right.add(displayName, mobileStyleBasicBeanPane);
map.put(displayName, mobileStyleBasicBeanPane);
} catch (Exception e) {
@ -133,4 +163,33 @@ public class MobileStylePane extends BasicPane {
styleProviders = ArrayUtils.insert(0, styleProviders, defaultMobileWidgetStyleProvider);
return styleProviders;
}
private void initPluginListener() {
EventDispatcher.listen(PluginEventType.AfterRun, new Listener<PluginContext>() {
@Override
public void on(Event event, PluginContext pluginContext) {
if (pluginContext.getRuntime().contain(MobileStyleDefinePaneCreator.XML_TAG)) {
checkFlag = true;
refreshDockingView();
}
}
});
EventDispatcher.listen(PluginEventType.BeforeStop, new Listener<PluginContext>() {
@Override
public void on(Event event, PluginContext pluginContext) {
if (pluginContext.getRuntime().contain(MobileStyleDefinePaneCreator.XML_TAG)) {
checkFlag = false;
refreshDockingView();
}
}
});
}
private void refreshDockingView() {
removeAll();
initComponent();
populate(widget.getMobileStyle());
this.updateUI();
this.repaint();
}
}

5
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java

@ -11,6 +11,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.theme.dialog.TemplateThemeProfileDialog;
import com.fr.general.IOUtils;
import com.fr.general.locale.image.I18nImage;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
@ -26,7 +27,6 @@ import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Toolkit;
import java.awt.Window;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@ -209,7 +209,8 @@ public class TemplateThemeBlock<T extends TemplateTheme> extends JPanel {
}
private static class ThumbnailPane extends JPanel {
private static final Image LOADING_IMAGE = Toolkit.getDefaultToolkit().createImage(ThumbnailPane.class.getResource("/com/fr/design/images/mainframe/loading.gif"));
private static final String LOADING_IMAGE_URL = "/com/fr/design/images/mainframe/loading/loading.gif";
private static final Image LOADING_IMAGE = I18nImage.getImage(LOADING_IMAGE_URL);
private Image thumbnail = null;
@Override

11
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -5,6 +5,7 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.UITitledBorder;
import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.design.env.processor.RemoteDesignerWorkspaceInfoProcessor;
import com.fr.design.fun.DesignerEnvProcessor;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -579,8 +580,14 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
private void tryConnectRemoteEnv() {
final RemoteDesignerWorkspaceInfo remoteEnv = updateBean();
final WorkspaceConnectionInfo connection = remoteEnv.getConnection();
WorkspaceConnectionInfo originalConnection = remoteEnv.getConnection();
final WorkspaceConnectionInfo connection;
RemoteDesignerWorkspaceInfoProcessor processor = ExtraDesignClassManager.getInstance().getSingle(RemoteDesignerWorkspaceInfoProcessor.XML_TAG);
if (processor != null) {
connection = processor.customUserName(originalConnection);
} else {
connection = originalConnection;
}
final SwingWorker<Boolean, Void> worker = new SwingWorker<Boolean, Void>() {
@Override

BIN
designer-base/src/main/resources/com/fr/design/images/mainframe/loading/loading.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/mainframe/loading/loading_en.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/mainframe/loading/loading_zh.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/mainframe/loading/loading_zh_TW.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

57
designer-base/src/main/resources/com/fr/design/login/guide.css

@ -1,57 +0,0 @@
.background-login-close {
color: white !important;
font-weight: bold;
font-size: 14px;
}
.background-guide-close {
background: url(./img/icon_install_normal.png) no-repeat center center;
background-size: cover;
width: 20px;
height: 20px;
cursor: pointer;
}
.background-guide-close:hover {
background-color: #E8E8E9;
}
.background-login-loading {
background: url(./img/login_loading.gif) no-repeat center center;
}
.background-plugin-need-update {
background: url(./img/icon_new.png) no-repeat center center;
}
.background-plugin-cant-use {
background: url(./img/icon_cantuse.png) no-repeat center center;
}
.background-plugin-is-disable {
background: url(./img/icon_disable.png) no-repeat center center;
}
.background-plugin-is-disable-new {
background: url(./img/icon_disable-new.png) no-repeat center center;
}
.background-plugin-selected {
background: url(./img/icon_marked.png) no-repeat center center;
}
.background-shop-title-close {
background: url(./img/icon_close40x40_normal.svg) no-repeat center center;
}
.background-dialog-confirm {
background: url(./img/warning.png) no-repeat center center;
background-size: contain;
}
.background-close-button {
background: url(./img/icon_close9x9_normal.png) no-repeat center center;
}
.background-close-button:hover {
background: url(./img/icon_close9x9_hover.png) no-repeat center center;
}
.designer-login-guide {
background: url(./img/login_guide.png) no-repeat center center;
background-size: cover;
}
.designer-guide-login-button {
font-size: 14px;
color: white;
border-radius: 4px;
background-color: #3685F2;
}

2
designer-base/src/main/resources/com/fr/design/login/guide.html

@ -15,7 +15,7 @@
<link rel="stylesheet" type="text/css" href="lib/bundle.css"/>
<script type="text/javascript" charset="UTF-8" src="lib/locale/login_zh_CN.js?_=compatible"></script>
<script type="text/javascript" charset="UTF-8" src="lib/locale/login_${language}.js"></script><script type="text/javascript" charset="UTF-8" src="lib/fineui.min.js"></script>
<link href="guide.css" rel="stylesheet"></head>
<link href="lib/locale/guide/guide_${language}.css" rel="stylesheet"></head>
</html>
<script type="text/javascript">
if (!/macintosh|mac os x/i.test(navigator.userAgent.toLowerCase())) {

BIN
designer-base/src/main/resources/com/fr/design/login/img/guide/login_guide.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 KiB

BIN
designer-base/src/main/resources/com/fr/design/login/img/guide/login_guide_en.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 KiB

0
designer-base/src/main/resources/com/fr/design/login/img/login_guide.png → designer-base/src/main/resources/com/fr/design/login/img/guide/login_guide_zh.png

Before

Width:  |  Height:  |  Size: 473 KiB

After

Width:  |  Height:  |  Size: 473 KiB

BIN
designer-base/src/main/resources/com/fr/design/login/img/guide/login_guide_zh_TW.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 KiB

57
designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_en_US.css

@ -0,0 +1,57 @@
.background-login-close {
color: white !important;
font-weight: bold;
font-size: 14px;
}
.background-guide-close {
background: url(../../../img/icon_install_normal.png) no-repeat center center;
background-size: cover;
width: 20px;
height: 20px;
cursor: pointer;
}
.background-guide-close:hover {
background-color: #E8E8E9;
}
.background-login-loading {
background: url(../../../img/login_loading.gif) no-repeat center center;
}
.background-plugin-need-update {
background: url(../../../img/icon_new.png) no-repeat center center;
}
.background-plugin-cant-use {
background: url(../../../img/icon_cantuse.png) no-repeat center center;
}
.background-plugin-is-disable {
background: url(../../../img/icon_disable.png) no-repeat center center;
}
.background-plugin-is-disable-new {
background: url(../../../img/icon_disable-new.png) no-repeat center center;
}
.background-plugin-selected {
background: url(../../../img/icon_marked.png) no-repeat center center;
}
.background-shop-title-close {
background: url(../../../img/icon_close40x40_normal.svg) no-repeat center center;
}
.background-dialog-confirm {
background: url(../../../img/warning.png) no-repeat center center;
background-size: contain;
}
.background-close-button {
background: url(../../../img/icon_close9x9_normal.png) no-repeat center center;
}
.background-close-button:hover {
background: url(../../../img/icon_close9x9_hover.png) no-repeat center center;
}
.designer-login-guide {
background: url(../../../img/guide/login_guide_en.png) no-repeat center center;
background-size: cover;
}
.designer-guide-login-button {
font-size: 14px;
color: white;
border-radius: 4px;
background-color: #3685F2;
}

57
designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_ja_JP.css

@ -0,0 +1,57 @@
.background-login-close {
color: white !important;
font-weight: bold;
font-size: 14px;
}
.background-guide-close {
background: url(../../../img/icon_install_normal.png) no-repeat center center;
background-size: cover;
width: 20px;
height: 20px;
cursor: pointer;
}
.background-guide-close:hover {
background-color: #E8E8E9;
}
.background-login-loading {
background: url(../../../img/login_loading.gif) no-repeat center center;
}
.background-plugin-need-update {
background: url(../../../img/icon_new.png) no-repeat center center;
}
.background-plugin-cant-use {
background: url(../../../img/icon_cantuse.png) no-repeat center center;
}
.background-plugin-is-disable {
background: url(../../../img/icon_disable.png) no-repeat center center;
}
.background-plugin-is-disable-new {
background: url(../../../img/icon_disable-new.png) no-repeat center center;
}
.background-plugin-selected {
background: url(../../../img/icon_marked.png) no-repeat center center;
}
.background-shop-title-close {
background: url(../../../img/icon_close40x40_normal.svg) no-repeat center center;
}
.background-dialog-confirm {
background: url(../../../img/warning.png) no-repeat center center;
background-size: contain;
}
.background-close-button {
background: url(../../../img/icon_close9x9_normal.png) no-repeat center center;
}
.background-close-button:hover {
background: url(../../../img/icon_close9x9_hover.png) no-repeat center center;
}
.designer-login-guide {
background: url(../../../img/guide/login_guide_en.png) no-repeat center center;
background-size: cover;
}
.designer-guide-login-button {
font-size: 14px;
color: white;
border-radius: 4px;
background-color: #3685F2;
}

57
designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_ko_KR.css

@ -0,0 +1,57 @@
.background-login-close {
color: white !important;
font-weight: bold;
font-size: 14px;
}
.background-guide-close {
background: url(../../../img/icon_install_normal.png) no-repeat center center;
background-size: cover;
width: 20px;
height: 20px;
cursor: pointer;
}
.background-guide-close:hover {
background-color: #E8E8E9;
}
.background-login-loading {
background: url(../../../img/login_loading.gif) no-repeat center center;
}
.background-plugin-need-update {
background: url(../../../img/icon_new.png) no-repeat center center;
}
.background-plugin-cant-use {
background: url(../../../img/icon_cantuse.png) no-repeat center center;
}
.background-plugin-is-disable {
background: url(../../../img/icon_disable.png) no-repeat center center;
}
.background-plugin-is-disable-new {
background: url(../../../img/icon_disable-new.png) no-repeat center center;
}
.background-plugin-selected {
background: url(../../../img/icon_marked.png) no-repeat center center;
}
.background-shop-title-close {
background: url(../../../img/icon_close40x40_normal.svg) no-repeat center center;
}
.background-dialog-confirm {
background: url(../../../img/warning.png) no-repeat center center;
background-size: contain;
}
.background-close-button {
background: url(../../../img/icon_close9x9_normal.png) no-repeat center center;
}
.background-close-button:hover {
background: url(../../../img/icon_close9x9_hover.png) no-repeat center center;
}
.designer-login-guide {
background: url(../../../img/guide/login_guide_en.png) no-repeat center center;
background-size: cover;
}
.designer-guide-login-button {
font-size: 14px;
color: white;
border-radius: 4px;
background-color: #3685F2;
}

57
designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_zh_CN.css

@ -0,0 +1,57 @@
.background-login-close {
color: white !important;
font-weight: bold;
font-size: 14px;
}
.background-guide-close {
background: url(../../../img/icon_install_normal.png) no-repeat center center;
background-size: cover;
width: 20px;
height: 20px;
cursor: pointer;
}
.background-guide-close:hover {
background-color: #E8E8E9;
}
.background-login-loading {
background: url(../../../img/login_loading.gif) no-repeat center center;
}
.background-plugin-need-update {
background: url(../../../img/icon_new.png) no-repeat center center;
}
.background-plugin-cant-use {
background: url(../../../img/icon_cantuse.png) no-repeat center center;
}
.background-plugin-is-disable {
background: url(../../../img/icon_disable.png) no-repeat center center;
}
.background-plugin-is-disable-new {
background: url(../../../img/icon_disable-new.png) no-repeat center center;
}
.background-plugin-selected {
background: url(../../../img/icon_marked.png) no-repeat center center;
}
.background-shop-title-close {
background: url(../../../img/icon_close40x40_normal.svg) no-repeat center center;
}
.background-dialog-confirm {
background: url(../../../img/warning.png) no-repeat center center;
background-size: contain;
}
.background-close-button {
background: url(../../../img/icon_close9x9_normal.png) no-repeat center center;
}
.background-close-button:hover {
background: url(../../../img/icon_close9x9_hover.png) no-repeat center center;
}
.designer-login-guide {
background: url(../../../img/guide/login_guide_zh.png) no-repeat center center;
background-size: cover;
}
.designer-guide-login-button {
font-size: 14px;
color: white;
border-radius: 4px;
background-color: #3685F2;
}

57
designer-base/src/main/resources/com/fr/design/login/lib/locale/guide/guide_zh_TW.css

@ -0,0 +1,57 @@
.background-login-close {
color: white !important;
font-weight: bold;
font-size: 14px;
}
.background-guide-close {
background: url(../../../img/icon_install_normal.png) no-repeat center center;
background-size: cover;
width: 20px;
height: 20px;
cursor: pointer;
}
.background-guide-close:hover {
background-color: #E8E8E9;
}
.background-login-loading {
background: url(../../../img/login_loading.gif) no-repeat center center;
}
.background-plugin-need-update {
background: url(../../../img/icon_new.png) no-repeat center center;
}
.background-plugin-cant-use {
background: url(../../../img/icon_cantuse.png) no-repeat center center;
}
.background-plugin-is-disable {
background: url(../../../img/icon_disable.png) no-repeat center center;
}
.background-plugin-is-disable-new {
background: url(../../../img/icon_disable-new.png) no-repeat center center;
}
.background-plugin-selected {
background: url(../../../img/icon_marked.png) no-repeat center center;
}
.background-shop-title-close {
background: url(../../../img/icon_close40x40_normal.svg) no-repeat center center;
}
.background-dialog-confirm {
background: url(../../../img/warning.png) no-repeat center center;
background-size: contain;
}
.background-close-button {
background: url(../../../img/icon_close9x9_normal.png) no-repeat center center;
}
.background-close-button:hover {
background: url(../../../img/icon_close9x9_hover.png) no-repeat center center;
}
.designer-login-guide {
background: url(../../../img/guide/login_guide_zh_TW.png) no-repeat center center;
background-size: cover;
}
.designer-guide-login-button {
font-size: 14px;
color: white;
border-radius: 4px;
background-color: #3685F2;
}

10
designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java

@ -14,8 +14,7 @@ import com.fr.design.style.background.image.ImageFileChooser;
import com.fr.design.style.background.image.ImagePreviewPane;
import com.fr.design.utils.ImageUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.locale.image.LocaleImageFactory;
import com.fr.general.locale.image.LocaleImageMark;
import com.fr.general.locale.image.I18nImage;
import com.fr.stable.Constants;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils;
@ -61,11 +60,10 @@ public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
private Image emptyDataImage = DEFAULT_EMPTY_DATA_IMAGE;
private SwingWorker<Void, Void> imageWorker;
private static final String EMPTY_DATA_IMAGE_PATH = "/com/fr/design/images/emptydata.png";
private static final String EMPTY_DATA_IMAGE_PATH = "/com/fr/design/images/emptydata/emptydata.png";
static {
LocaleImageMark localeImageMark = LocaleImageFactory.getOrCreateLocaleMark(EMPTY_DATA_IMAGE_PATH);
DEFAULT_EMPTY_DATA_IMAGE = localeImageMark.getValue();
static {;
DEFAULT_EMPTY_DATA_IMAGE = I18nImage.getImage(EMPTY_DATA_IMAGE_PATH);
}
@Override

17
designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java

@ -12,6 +12,7 @@ import com.fr.general.CloudCenter;
import com.fr.general.IOUtils;
import com.fr.general.SiteBlockedException;
import com.fr.general.http.HttpClient;
import com.fr.general.locale.image.I18nImage;
import com.fr.plugin.chart.DownloadSourcesEvent;
import com.fr.stable.CommonUtils;
import com.fr.stable.StableUtils;
@ -23,20 +24,19 @@ import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Rectangle;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import static com.fr.design.dialog.FineJOptionPane.OPTION_OK_CANCEL;
@ -65,7 +65,7 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent {
private double totalBytes = 0;
private static final double MAP_JSON_MB = 4.5 * 1024 * 1024;
private static final String BACKGROUND_IMAGE_URL = "com/fr/van/chart/background/background.png";
public void addMapJSONSiteInfo() {
this.addSiteInfo("map10.json", ChartConstants.MAP_JSON_URL, MAP_JSON_MB);
}
@ -189,8 +189,7 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent {
private void initDialog() {
// 创建标签,并在标签上放置一张图片
BufferedImage image = IOUtils.readImage("/com/fr/van/chart/background.png");
ImageIcon imageIcon = new ImageIcon(image);
ImageIcon imageIcon = new ImageIcon(I18nImage.getImage(BACKGROUND_IMAGE_URL));
UILabel label = new UILabel(imageIcon);
label.setBounds(0, 0, LOAD_WIDTH, LOAD_HEIGHT);

6
designer-chart/src/main/java/com/fr/van/chart/multilayer/data/MultiPiePlotTableDataContentPane.java

@ -58,6 +58,9 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
//将数据列名保存下来,在update时会删除层级名列表,需要用保存的list重新初始化新的层级名列表
private List columnNameList;
//汇总方式求和的索引
public static final int SUM_INDEX = 2;
public MultiPiePlotTableDataContentPane() {
}
@ -241,7 +244,8 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
for (UIComboBox uiComboBox : levelNameList) {
clearBoxItems(uiComboBox);
}
clearBoxItems(calculateCombox);
//默认选求和
calculateCombox.setSelectedIndex(SUM_INDEX);
refreshCenterPane();
}

0
designer-chart/src/main/resources/com/fr/design/images/en_us_emptydata.png → designer-chart/src/main/resources/com/fr/design/images/emptydata/emptydata.png

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
designer-chart/src/main/resources/com/fr/design/images/emptydata/emptydata_en.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

0
designer-chart/src/main/resources/com/fr/design/images/zh_cn_emptydata.png → designer-chart/src/main/resources/com/fr/design/images/emptydata/emptydata_zh.png

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

0
designer-chart/src/main/resources/com/fr/design/images/zh_tw_emptydata.png → designer-chart/src/main/resources/com/fr/design/images/emptydata/emptydata_zh_TW.png

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/background/background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/background/background_en.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

0
designer-chart/src/main/resources/com/fr/van/chart/background.png → designer-chart/src/main/resources/com/fr/van/chart/background/background_zh.png

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/background/background_zh_TW.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

9
designer-form/src/main/java/com/fr/design/designer/creator/XAutoChartCreator.java

@ -12,13 +12,14 @@ import com.fr.design.mainframe.EditingMouseListener;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.module.DesignModuleFactory;
import com.fr.form.ui.ChartAutoEditor;
import com.fr.general.IOUtils;
import com.fr.general.locale.image.I18nImage;
import com.fr.stable.Constants;
import com.fr.stable.bridge.StableFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import java.awt.*;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
@ -38,6 +39,8 @@ public class XAutoChartCreator extends XChartEditor {
super(editor, size);
}
private static final String AUTO_CHART_IMAGE_PATH = "com/fr/design/form/images/autochartpreview/auto_chart_preview.png";
/**
* 返回组件默认名
*
@ -103,7 +106,7 @@ public class XAutoChartCreator extends XChartEditor {
@Override
public void paintForeground(Graphics2D g) {
BufferedImage bufferedImage = IOUtils.readImage("com/fr/design/form/images/auto_chart_preview.png");
BufferedImage bufferedImage = I18nImage.getImage(AUTO_CHART_IMAGE_PATH);
GraphHelper.paintImage(
g, this.getWidth(), this.getHeight(), bufferedImage,
Constants.IMAGE_ADJUST,

22
designer-form/src/main/java/com/fr/design/designer/creator/XNumberEditor.java

@ -6,7 +6,9 @@ package com.fr.design.designer.creator;
import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.design.designer.properties.mobile.NumberEditorMobilePropertyUI;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor;
import com.fr.design.mainframe.widget.editors.SpinnerMaxNumberEditor;
import com.fr.design.mainframe.widget.editors.SpinnerMinNumberEditor;
@ -92,14 +94,18 @@ public class XNumberEditor extends XWrapperedFieldEditor {
}
@Override
protected JComponent initEditor() {
setBorder(FIELDBORDER);
return this;
}
protected JComponent initEditor() {
setBorder(FIELDBORDER);
return this;
}
@Override
protected String getIconName() {
return "number_field_16.png";
}
@Override
protected String getIconName() {
return "number_field_16.png";
}
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
return new WidgetPropertyUIProvider[]{new NumberEditorMobilePropertyUI(this)};
}
}

6
designer-form/src/main/java/com/fr/design/designer/creator/XPassword.java

@ -3,7 +3,9 @@
*/
package com.fr.design.designer.creator;
import com.fr.design.designer.properties.mobile.PasswordMobilePropertyUI;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.gui.ibutton.UIPasswordField;
import com.fr.design.mainframe.widget.editors.RegexEditor;
import com.fr.design.mainframe.widget.editors.WidgetValueEditor;
@ -68,4 +70,8 @@ public class XPassword extends XWrapperedFieldEditor {
(CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, waterMark});
}
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
return new WidgetPropertyUIProvider[]{new PasswordMobilePropertyUI(this)};
}
}

11
designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java

@ -6,7 +6,9 @@ package com.fr.design.designer.creator;
import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.design.designer.properties.mobile.TextAreaMobilePropertyUI;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.mainframe.widget.editors.RegexEditor;
import com.fr.design.mainframe.widget.editors.WidgetValueEditor;
import com.fr.design.mainframe.widget.renderer.RegexCellRencerer;
@ -25,8 +27,9 @@ import java.beans.IntrospectionException;
/**
* @author richer
* @since 6.5.3
* Created on 2016/3/29
*/
public class XTextArea extends XFieldEditor {
public class XTextArea extends XWrapperedFieldEditor {
public XTextArea(TextArea widget, Dimension initSize) {
super(widget, initSize);
@ -81,4 +84,10 @@ public class XTextArea extends XFieldEditor {
protected String getIconName() {
return "text_area_16.png";
}
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
return new WidgetPropertyUIProvider[]{new TextAreaMobilePropertyUI(this)};
}
}

4
designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java

@ -6,7 +6,7 @@ package com.fr.design.designer.creator;
import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.design.designer.properties.mobile.ScanCodeMobilePropertyUI;
import com.fr.design.designer.properties.mobile.TextEditorMobilePropertyUI;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.mainframe.widget.editors.RegexEditor;
@ -86,6 +86,6 @@ public class XTextEditor extends XWrapperedFieldEditor {
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
return new WidgetPropertyUIProvider[] {new ScanCodeMobilePropertyUI(this)};
return new WidgetPropertyUIProvider[]{new TextEditorMobilePropertyUI(this)};
}
}

37
designer-form/src/main/java/com/fr/design/designer/properties/mobile/NumberEditorMobilePropertyUI.java

@ -0,0 +1,37 @@
package com.fr.design.designer.properties.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.widget.ui.designer.mobile.NumberEditorMobileDefinePane;
/**
* 数字控件属性面板注册
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/30
*/
public class NumberEditorMobilePropertyUI extends AbstractWidgetPropertyUIProvider {
private XCreator xCreator;
public NumberEditorMobilePropertyUI(XCreator xCreator) {
this.xCreator = xCreator;
}
@Override
public AbstractPropertyTable createWidgetAttrTable() {
return null;
}
@Override
public BasicPane createWidgetAttrPane() {
return new NumberEditorMobileDefinePane(xCreator);
}
@Override
public String tableTitle() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Attr");
}
}

37
designer-form/src/main/java/com/fr/design/designer/properties/mobile/PasswordMobilePropertyUI.java

@ -0,0 +1,37 @@
package com.fr.design.designer.properties.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.widget.ui.designer.mobile.PasswordMobileDefinePane;
/**
* 密码控件移动端属性注册
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/30
*/
public class PasswordMobilePropertyUI extends AbstractWidgetPropertyUIProvider {
private XCreator xCreator;
public PasswordMobilePropertyUI(XCreator xCreator) {
this.xCreator = xCreator;
}
@Override
public AbstractPropertyTable createWidgetAttrTable() {
return null;
}
@Override
public BasicPane createWidgetAttrPane() {
return new PasswordMobileDefinePane(xCreator);
}
@Override
public String tableTitle() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Attr");
}
}

37
designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextAreaMobilePropertyUI.java

@ -0,0 +1,37 @@
package com.fr.design.designer.properties.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.widget.ui.designer.mobile.TextAreaAdvancedDefinePane;
/**
* 文本域控件移动端属性
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/29
*/
public class TextAreaMobilePropertyUI extends AbstractWidgetPropertyUIProvider {
private XCreator xCreator;
public TextAreaMobilePropertyUI(XCreator xCreator) {
this.xCreator = xCreator;
}
@Override
public AbstractPropertyTable createWidgetAttrTable() {
return null;
}
@Override
public BasicPane createWidgetAttrPane() {
return new TextAreaAdvancedDefinePane(xCreator);
}
@Override
public String tableTitle() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Attr");
}
}

15
designer-form/src/main/java/com/fr/design/designer/properties/mobile/ScanCodeMobilePropertyUI.java → designer-form/src/main/java/com/fr/design/designer/properties/mobile/TextEditorMobilePropertyUI.java

@ -5,13 +5,20 @@ import com.fr.design.designer.creator.XTextEditor;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.widget.ui.designer.mobile.ScanCodeMobileDefinePane;
import com.fr.design.widget.ui.designer.mobile.TextEditorMobileDefinePane;
public class ScanCodeMobilePropertyUI extends AbstractWidgetPropertyUIProvider {
/**
* 文本控件
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/30
*/
public class TextEditorMobilePropertyUI extends AbstractWidgetPropertyUIProvider {
private XCreator xCreator;
public ScanCodeMobilePropertyUI(XTextEditor xTextEditor) {
public TextEditorMobilePropertyUI(XTextEditor xTextEditor) {
this.xCreator = xTextEditor;
}
@ -22,7 +29,7 @@ public class ScanCodeMobilePropertyUI extends AbstractWidgetPropertyUIProvider {
@Override
public BasicPane createWidgetAttrPane() {
return new ScanCodeMobileDefinePane(xCreator);
return new TextEditorMobileDefinePane(xCreator);
}
@Override

94
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BaseTextEditorMobileDefinePane.java

@ -0,0 +1,94 @@
package com.fr.design.widget.ui.designer.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextEditSettingPane;
import com.fr.form.ui.TextEditor;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
/**
* <p> 文本类组件移动端高级属性的定义面板基础扩展可以直接继承此面板
* <p> 往内部添加其他配置
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/30
*/
public class BaseTextEditorMobileDefinePane extends MobileWidgetDefinePane {
private XCreator xCreator;
protected MobileTextEditSettingPane textSettingPane;
public BaseTextEditorMobileDefinePane(XCreator xCreator) {
this.xCreator = xCreator;
}
@Override
public void initPropertyGroups(Object source) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel container = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5);
addPropertyPanesToContainer(container);
this.add(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, container), BorderLayout.NORTH);
this.repaint();
}
/**
* 添加其他属性面板
*
* @param container 展开容器
*/
protected void addPropertyPanesToContainer(JPanel container) {
initSettingPane(container);
}
/**
* 初始化文本类基础面板
*
* @param container
*/
protected void initSettingPane(JPanel container) {
textSettingPane = new MobileTextEditSettingPane();
container.add(textSettingPane);
}
@Override
public void populate(FormDesigner designer) {
TextEditor textEditor = (TextEditor) xCreator.toData();
textSettingPane.populateBean(textEditor.getMobileTextEditAttr());
this.bindListeners2Widgets();
}
protected void bindListeners2Widgets() {
reInitAllListeners();
AttributeChangeListener changeListener = new AttributeChangeListener() {
@Override
public void attributeChange() {
update();
}
};
this.addAttributeChangeListener(changeListener);
}
private void reInitAllListeners() {
initListener(this);
}
@Override
public void update() {
TextEditor textEditor = (TextEditor) xCreator.toData();
textSettingPane.updateBean(textEditor.getMobileTextEditAttr());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
public XCreator getxCreator() {
return xCreator;
}
}

11
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java

@ -22,7 +22,6 @@ import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.mobile.ui.MobileCollapsedStyleExpandPane;
import com.fr.design.mainframe.mobile.ui.MobileComboBoxDialogEditor;
import com.fr.form.ui.ElementCaseEditor;
import com.fr.form.ui.mobile.MobileCollapsedStyle;
import com.fr.stable.StringUtils;
@ -30,7 +29,9 @@ import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
/**
* 报表块-移动端属性面板
@ -123,7 +124,6 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane {
panelWrapper.add(panel, BorderLayout.NORTH);
UIExpandablePane folderPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fit"), 280, 20, panelWrapper);
this.add(folderPane, BorderLayout.NORTH);
this.bingListeners2Widgets();
this.setGlobalNames();
this.repaint();
}
@ -165,7 +165,6 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane {
@Override
public void populate(FormDesigner designer) {
this.designer = designer;
this.addAttributeChangeListener(changeListener);
ElementCaseEditor elementCaseEditor = (ElementCaseEditor) xCreator.toData();
this.hComboBox.setSelectedItem(new Item(elementCaseEditor.getHorziontalAttr().description(), elementCaseEditor.getHorziontalAttr()));
this.vComboBox.setSelectedItem(new Item(elementCaseEditor.getVerticalAttr().description(), elementCaseEditor.getVerticalAttr()));
@ -178,6 +177,8 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane {
this.mobileCollapsedStyleEditor.setStyle(elementCaseEditor.getMobileCollapsedStyle());
fix(elementCaseEditor.getMobileCollapsedStyle());
this.mobileCollapsedStyleEditor.setSelected(elementCaseEditor.getMobileCollapsedStyle().isCollapsedWork());
this.bingListeners2Widgets();
this.addAttributeChangeListener(changeListener);
}
/**
@ -191,7 +192,6 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane {
@Override
public void update() {
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
String globalName = this.getGlobalName();
switch (globalName) {
case "hComboBox":
@ -220,6 +220,7 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane {
style.setCollapsedWork(this.mobileCollapsedStyleEditor.isSelectedCustom() && !FormDesignerUtils.isInAbsoluteLayout(xCreator));
((ElementCaseEditor) xCreator.toData()).setMobileCollapsedStyle(style);
}
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
}
private void setGlobalNames() {

33
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/NumberEditorMobileDefinePane.java

@ -0,0 +1,33 @@
package com.fr.design.widget.ui.designer.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.NumberEditor;
/**
* 数字控件
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/30
*/
public class NumberEditorMobileDefinePane extends BaseTextEditorMobileDefinePane {
public NumberEditorMobileDefinePane(XCreator xCreator) {
super(xCreator);
}
@Override
public void populate(FormDesigner designer) {
NumberEditor numberEditor = (NumberEditor) getxCreator().toData();
textSettingPane.populateBean(numberEditor.getMobileTextEditAttr());
this.bindListeners2Widgets();
}
@Override
public void update() {
NumberEditor numberEditor = (NumberEditor) getxCreator().toData();
textSettingPane.updateBean(numberEditor.getMobileTextEditAttr());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
}

25
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/PasswordMobileDefinePane.java

@ -0,0 +1,25 @@
package com.fr.design.widget.ui.designer.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.widget.ui.designer.mobile.component.MobilePasswordEditSettingPane;
import javax.swing.JPanel;
/**
* 密码控件移动端高级属性
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/30
*/
public class PasswordMobileDefinePane extends BaseTextEditorMobileDefinePane {
public PasswordMobileDefinePane(XCreator xCreator) {
super(xCreator);
}
@Override
protected void initSettingPane(JPanel container) {
textSettingPane = new MobilePasswordEditSettingPane();
container.add(textSettingPane);
}
}

63
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java

@ -1,63 +0,0 @@
package com.fr.design.widget.ui.designer.mobile;
import com.fr.base.mobile.MobileScanCodeAttr;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextFieldInputSettingPane;
import com.fr.form.ui.TextEditor;
import java.awt.BorderLayout;
public class ScanCodeMobileDefinePane extends MobileWidgetDefinePane {
private XCreator xCreator;
private MobileTextFieldInputSettingPane settingPane;
public ScanCodeMobileDefinePane(XCreator xCreator) {
this.xCreator = xCreator;
}
@Override
public void initPropertyGroups(Object source) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
settingPane = new MobileTextFieldInputSettingPane();
this.add(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, settingPane), BorderLayout.NORTH);
this.repaint();
}
private void bindListeners2Widgets() {
reInitAllListeners();
AttributeChangeListener changeListener = new AttributeChangeListener() {
@Override
public void attributeChange() {
update();
}
};
this.addAttributeChangeListener(changeListener);
}
private void reInitAllListeners() {
initListener(this);
}
@Override
public void populate(FormDesigner designer) {
MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr();
settingPane.populateBean(mobileScanCodeAttr);
this.bindListeners2Widgets();
}
@Override
public void update() {
MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr();
settingPane.updateBean(mobileScanCodeAttr);
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
}

25
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextAreaAdvancedDefinePane.java

@ -0,0 +1,25 @@
package com.fr.design.widget.ui.designer.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextAreaSettingPane;
import javax.swing.JPanel;
/**
* 文本域控件
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/29
*/
public class TextAreaAdvancedDefinePane extends BaseTextEditorMobileDefinePane {
public TextAreaAdvancedDefinePane(XCreator xCreator) {
super(xCreator);
}
@Override
protected void initSettingPane(JPanel container) {
textSettingPane = new MobileTextAreaSettingPane();
container.add(textSettingPane);
}
}

56
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TextEditorMobileDefinePane.java

@ -0,0 +1,56 @@
package com.fr.design.widget.ui.designer.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextEditSettingPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextFieldInputSettingPane;
import com.fr.form.ui.TextEditor;
import javax.swing.JPanel;
/**
* 文本控件移动端属性
* 输入方式
* 输入框属性
*
* @author hades
* @since 11.0
* Created on 2018/11/27
*/
public class TextEditorMobileDefinePane extends BaseTextEditorMobileDefinePane {
/**
* 输入方式
*/
private MobileTextFieldInputSettingPane inputSettingPane;
public TextEditorMobileDefinePane(XCreator xCreator) {
super(xCreator);
}
@Override
protected void initSettingPane(JPanel container) {
inputSettingPane = new MobileTextFieldInputSettingPane();
textSettingPane = new MobileTextEditSettingPane();
container.add(inputSettingPane);
container.add(textSettingPane);
}
@Override
public void populate(FormDesigner designer) {
TextEditor textEditor = (TextEditor) getxCreator().toData();
inputSettingPane.populateBean(textEditor.getMobileScanCodeAttr());
textSettingPane.populateBean(textEditor.getMobileTextEditAttr());
this.bindListeners2Widgets();
}
@Override
public void update() {
TextEditor textEditor = (TextEditor) getxCreator().toData();
inputSettingPane.updateBean(textEditor.getMobileScanCodeAttr());
textSettingPane.updateBean(textEditor.getMobileTextEditAttr());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
}

38
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobilePasswordEditSettingPane.java

@ -0,0 +1,38 @@
package com.fr.design.widget.ui.designer.mobile.component;
import com.fr.base.mobile.MobileTextEditAttr;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.i18n.Toolkit;
import java.awt.BorderLayout;
/**
* 密码控件编辑属性设置面板
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/30
*/
public class MobilePasswordEditSettingPane extends MobileTextEditSettingPane {
// 显示密码
private UICheckBox showPassword;
public MobilePasswordEditSettingPane() {
super();
showPassword = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Show_Password"), false);
this.add(showPassword, BorderLayout.NORTH);
}
@Override
public void populateBean(MobileTextEditAttr ob) {
super.populateBean(ob);
// 要兼容处理一下,为null 的话赋默认值,默认开启
this.showPassword.setSelected(ob.isShowPassword() == null || ob.isShowPassword());
}
@Override
public void updateBean(MobileTextEditAttr ob) {
super.updateBean(ob);
ob.setShowPassword(showPassword.isSelected());
}
}

43
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextAreaSettingPane.java

@ -0,0 +1,43 @@
package com.fr.design.widget.ui.designer.mobile.component;
import com.fr.base.mobile.MobileTextEditAttr;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.i18n.Toolkit;
import java.awt.BorderLayout;
/**
* 文本域控件
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/29
*/
public class MobileTextAreaSettingPane extends MobileTextEditSettingPane {
// 显示字数统计
private UICheckBox showWordCount;
public MobileTextAreaSettingPane() {
super();
showWordCount = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Show_Word_Count"), false);
this.add(showWordCount, BorderLayout.NORTH);
}
@Override
protected boolean getClearDefaultState() {
return false;
}
@Override
public void populateBean(MobileTextEditAttr ob) {
super.populateBean(ob);
// 要兼容处理一下,为null 的话赋默认值,默认不开启
this.showWordCount.setSelected(ob.isShowWordCount() != null && ob.isShowWordCount());
}
@Override
public void updateBean(MobileTextEditAttr ob) {
super.updateBean(ob);
ob.setShowWordCount(showWordCount.isSelected());
}
}

59
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextEditSettingPane.java

@ -0,0 +1,59 @@
package com.fr.design.widget.ui.designer.mobile.component;
import com.fr.base.mobile.MobileTextEditAttr;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.VerticalFlowLayout;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
/**
* 文本类基础设置
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/3/29
*/
public class MobileTextEditSettingPane extends BasicBeanPane<MobileTextEditAttr> {
// 允许一键清空
protected UICheckBox allowOneClickClear;
public MobileTextEditSettingPane() {
initLayout();
allowOneClickClear = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Allow_One_Click_Clear"), getClearDefaultState());
this.add(allowOneClickClear, BorderLayout.NORTH);
}
protected boolean getClearDefaultState() {
return true;
}
protected void initLayout() {
VerticalFlowLayout verticalFlowLayout = new VerticalFlowLayout(FlowLayout.LEADING, 0, 5);
verticalFlowLayout.setAlignLeft(true);
this.setLayout(verticalFlowLayout);
}
@Override
public void populateBean(MobileTextEditAttr ob) {
allowOneClickClear.setSelected(ob.isAllowOneClickClear() == null || ob.isAllowOneClickClear());
}
@Override
public MobileTextEditAttr updateBean() {
// do nothing
return null;
}
@Override
public void updateBean(MobileTextEditAttr ob) {
ob.setAllowOneClickClear(allowOneClickClear.isSelected());
}
@Override
protected String title4PopupWindow() {
return null;
}
}

35
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTextFieldInputSettingPane.java

@ -2,16 +2,21 @@ package com.fr.design.widget.ui.designer.mobile.component;
import com.fr.base.mobile.MobileScanCodeAttr;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIRadioButton;
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.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.layout.VerticalFlowLayout;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.Component;
import java.awt.Dimension;
/**
* @author hades
@ -31,7 +36,6 @@ public class MobileTextFieldInputSettingPane extends BasicBeanPane<MobileScanCod
public MobileTextFieldInputSettingPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel settingPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5);
manualInputCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Manual_Input"), true);
scanCodeCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Scan_Code_Input"), true);
nfcInputCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_NFC_Input"), false);
@ -40,12 +44,25 @@ public class MobileTextFieldInputSettingPane extends BasicBeanPane<MobileScanCod
// 更新面板是否可见
updateNfcContentTypePane(source.isSelected(), nfcContentTypePane.getSelectedType());
});
settingPane.add(manualInputCheckBox);
settingPane.add(scanCodeCheckBox);
settingPane.add(nfcInputCheckBox);
settingPane.add(nfcContentTypePane);
initComponents();
// 初始状态,内容类型面板不可见
nfcContentTypePane.setVisible(false);
nfcContentTypePane.setPreferredSize(new Dimension(0, 0));
}
private void initComponents() {
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Input_Way")), manualInputCheckBox},
new Component[]{null, scanCodeCheckBox},
new Component[]{null, nfcInputCheckBox},
new Component[]{null, nfcContentTypePane},
};
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] rowSize = {p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel settingPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.HGAP_LARGE, LayoutConstants.VGAP_LARGE);
this.add(settingPane, BorderLayout.NORTH);
}
@ -78,6 +95,11 @@ public class MobileTextFieldInputSettingPane extends BasicBeanPane<MobileScanCod
* @param contentType 内容类型
*/
private void updateNfcContentTypePane(boolean visible, MobileScanCodeAttr.NFCContentType contentType) {
if (visible) {
nfcContentTypePane.setPreferredSize(new Dimension(400, 60));
} else {
nfcContentTypePane.setPreferredSize(new Dimension(0, 0));
}
nfcContentTypePane.setVisible(visible);
nfcContentTypePane.setSelectedType(contentType);
}
@ -144,3 +166,4 @@ public class MobileTextFieldInputSettingPane extends BasicBeanPane<MobileScanCod
}
}

BIN
designer-form/src/main/resources/com/fr/design/form/images/autochartpreview/auto_chart_preview.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/images/autochartpreview/auto_chart_preview_en.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/images/autochartpreview/auto_chart_preview_zh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/images/autochartpreview/auto_chart_preview_zh_TW.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

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

@ -4,8 +4,14 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.CellWidgetOptionProvider;
import com.fr.design.widget.mobile.WidgetMobilePane;
import com.fr.design.widget.ui.mobile.MultiFileEditorMobilePane;
import com.fr.design.widget.ui.mobile.ScanCodeMobilePane;
import com.fr.design.widget.ui.mobile.NumberEditorMobilePane;
import com.fr.design.widget.ui.mobile.PasswordMobilePane;
import com.fr.design.widget.ui.mobile.TextAreaMobilePane;
import com.fr.design.widget.ui.mobile.TextEditorMobilePane;
import com.fr.form.ui.MultiFileEditor;
import com.fr.form.ui.NumberEditor;
import com.fr.form.ui.Password;
import com.fr.form.ui.TextArea;
import com.fr.form.ui.TextEditor;
import com.fr.form.ui.Widget;
import com.fr.general.GeneralContext;
@ -28,7 +34,10 @@ public class WidgetMobilePaneFactory {
static {
mobilePaneMap.put(MultiFileEditor.class, MultiFileEditorMobilePane.class);
mobilePaneMap.put(TextEditor.class, ScanCodeMobilePane.class);
mobilePaneMap.put(TextEditor.class, TextEditorMobilePane.class);
mobilePaneMap.put(TextArea.class, TextAreaMobilePane.class);
mobilePaneMap.put(NumberEditor.class, NumberEditorMobilePane.class);
mobilePaneMap.put(Password.class, PasswordMobilePane.class);
mobilePluginPaneMap.putAll(ExtraDesignClassManager.getInstance().getCellWidgetMobileOptionsMap());
GeneralContext.listenPluginRunningChanged(new PluginEventListener() {

41
designer-realize/src/main/java/com/fr/design/widget/ui/mobile/NumberEditorMobilePane.java

@ -0,0 +1,41 @@
package com.fr.design.widget.ui.mobile;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.widget.mobile.WidgetMobilePane;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextEditSettingPane;
import com.fr.form.ui.NumberEditor;
import com.fr.form.ui.Widget;
import java.awt.BorderLayout;
/**
* 数字控件移动端属性
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/4/11
*/
public class NumberEditorMobilePane extends WidgetMobilePane {
private MobileTextEditSettingPane textSettingPane;
@Override
protected void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
textSettingPane = new MobileTextEditSettingPane();
this.add(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, textSettingPane), BorderLayout.NORTH);
}
@Override
public void populate(Widget widget) {
NumberEditor numberEditor = (NumberEditor) widget;
textSettingPane.populateBean(numberEditor.getMobileTextEditAttr());
}
@Override
public void update(Widget widget) {
NumberEditor numberEditor = (NumberEditor) widget;
textSettingPane.updateBean(numberEditor.getMobileTextEditAttr());
}
}

42
designer-realize/src/main/java/com/fr/design/widget/ui/mobile/PasswordMobilePane.java

@ -0,0 +1,42 @@
package com.fr.design.widget.ui.mobile;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.widget.mobile.WidgetMobilePane;
import com.fr.design.widget.ui.designer.mobile.component.MobilePasswordEditSettingPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextEditSettingPane;
import com.fr.form.ui.TextEditor;
import com.fr.form.ui.Widget;
import java.awt.BorderLayout;
/**
* 密码控件移动端属性
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/4/11
*/
public class PasswordMobilePane extends WidgetMobilePane {
private MobileTextEditSettingPane textSettingPane;
@Override
protected void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
textSettingPane = new MobilePasswordEditSettingPane();
this.add(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, textSettingPane), BorderLayout.NORTH);
}
@Override
public void populate(Widget widget) {
TextEditor textEditor = (TextEditor) widget;
textSettingPane.populateBean(textEditor.getMobileTextEditAttr());
}
@Override
public void update(Widget widget) {
TextEditor textEditor = (TextEditor) widget;
textSettingPane.updateBean(textEditor.getMobileTextEditAttr());
}
}

39
designer-realize/src/main/java/com/fr/design/widget/ui/mobile/ScanCodeMobilePane.java

@ -1,39 +0,0 @@
package com.fr.design.widget.ui.mobile;
import com.fr.base.mobile.MobileScanCodeAttr;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.widget.mobile.WidgetMobilePane;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextFieldInputSettingPane;
import com.fr.form.ui.TextEditor;
import com.fr.form.ui.Widget;
import java.awt.BorderLayout;
public class ScanCodeMobilePane extends WidgetMobilePane {
private MobileTextFieldInputSettingPane settingPane;
@Override
protected void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
settingPane = new MobileTextFieldInputSettingPane();
this.add(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, settingPane), BorderLayout.NORTH);
}
@Override
public void populate(Widget widget) {
MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) widget).getMobileScanCodeAttr();
settingPane.populateBean(mobileScanCodeAttr);
}
@Override
public void update(Widget widget) {
MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) widget).getMobileScanCodeAttr();
settingPane.updateBean(mobileScanCodeAttr);
}
}

42
designer-realize/src/main/java/com/fr/design/widget/ui/mobile/TextAreaMobilePane.java

@ -0,0 +1,42 @@
package com.fr.design.widget.ui.mobile;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.widget.mobile.WidgetMobilePane;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextAreaSettingPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextEditSettingPane;
import com.fr.form.ui.TextEditor;
import com.fr.form.ui.Widget;
import java.awt.BorderLayout;
/**
* 文本域控件移动端属性
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/4/11
*/
public class TextAreaMobilePane extends WidgetMobilePane {
private MobileTextEditSettingPane textSettingPane;
@Override
protected void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
textSettingPane = new MobileTextAreaSettingPane();
this.add(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, textSettingPane), BorderLayout.NORTH);
}
@Override
public void populate(Widget widget) {
TextEditor textEditor = (TextEditor) widget;
textSettingPane.populateBean(textEditor.getMobileTextEditAttr());
}
@Override
public void update(Widget widget) {
TextEditor textEditor = (TextEditor) widget;
textSettingPane.updateBean(textEditor.getMobileTextEditAttr());
}
}

59
designer-realize/src/main/java/com/fr/design/widget/ui/mobile/TextEditorMobilePane.java

@ -0,0 +1,59 @@
package com.fr.design.widget.ui.mobile;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.widget.mobile.WidgetMobilePane;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextEditSettingPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileTextFieldInputSettingPane;
import com.fr.form.ui.TextEditor;
import com.fr.form.ui.Widget;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* 文本控件移动端属性面板
*
* @author Coral.Chen
* @since 11.0
* Created on 2023/4/12
*/
public class TextEditorMobilePane extends WidgetMobilePane {
/**
* 输入方式
*/
private MobileTextFieldInputSettingPane settingPane;
/**
* 输入框属性配置
*/
private MobileTextEditSettingPane textSettingPane;
@Override
protected void init() {
JPanel container = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
this.setLayout(FRGUIPaneFactory.createBorderLayout());
settingPane = new MobileTextFieldInputSettingPane();
textSettingPane = new MobileTextEditSettingPane();
container.add(settingPane);
container.add(textSettingPane);
this.add(new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, container), BorderLayout.NORTH);
}
@Override
public void populate(Widget widget) {
TextEditor textEditor = (TextEditor) widget;
settingPane.populateBean(textEditor.getMobileScanCodeAttr());
textSettingPane.populateBean(textEditor.getMobileTextEditAttr());
}
@Override
public void update(Widget widget) {
TextEditor textEditor = (TextEditor) widget;
settingPane.updateBean(textEditor.getMobileScanCodeAttr());
textSettingPane.updateBean(textEditor.getMobileTextEditAttr());
}
}

24
designer-realize/src/main/java/com/fr/grid/GridKeyAction.java

@ -69,28 +69,26 @@ public class GridKeyAction extends AbstractAction {
} else if ("right".equals(actionKey)) {
selectionMove(ReportConstants.MOVE_DIRECTION_RIGHT);
} else if ("up".equals(actionKey)) {
selectionMove(ReportConstants.MOVE_DIRECTION_UP);
directKeyPressed(ReportConstants.MOVE_DIRECTION_UP);
} else if ("down".equals(actionKey)) {
selectionMove(ReportConstants.MOVE_DIRECTION_DOWN);
directKeyPressed(ReportConstants.MOVE_DIRECTION_DOWN);
} else if ("enter".equals(actionKey)) {
enterKeyPressed();
directKeyPressed(ReportConstants.MOVE_DIRECTION_DOWN);
} else if ("tab".equals(actionKey)) {
tabKeyPressed();
directKeyPressed(ReportConstants.MOVE_DIRECTION_RIGHT);
}
}
private void enterKeyPressed() {
if (grid.isCellEditing()) {
grid.stopEditing();
}
selectionMove(ReportConstants.MOVE_DIRECTION_DOWN);
}
private void tabKeyPressed() {
/**
* 传入方向进行单元格的方向移动
*
* @param direction 方向
*/
private void directKeyPressed(int direction) {
if (grid.isCellEditing()) {
grid.stopEditing();
}
selectionMove(ReportConstants.MOVE_DIRECTION_RIGHT);
selectionMove(direction);
}
/**

2
designer-realize/src/main/java/com/fr/start/MainDesigner.java

@ -213,7 +213,6 @@ public class MainDesigner extends BaseDesigner {
ArrayList<ShortCut> shortCuts = new ArrayList<ShortCut>();
// shortCuts.add(new NewWorkBookXAction());
shortCuts.add(new NewWorkBookAction());
shortCuts.add(new NewPolyReportAction());
try {
if (DesignModuleFactory.getNewFormAction() != null) {
shortCuts.add((ShortCut) DesignModuleFactory.getNewFormAction().newInstance());
@ -221,6 +220,7 @@ public class MainDesigner extends BaseDesigner {
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
shortCuts.add(new NewPolyReportAction());
return shortCuts.toArray(new ShortCut[0]);
}

12
designer-realize/src/main/java/com/fr/start/SplashContext.java

@ -2,14 +2,12 @@ package com.fr.start;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.i18n.Toolkit;
import com.fr.design.locale.impl.SplashMark;
import com.fr.design.mainframe.bbs.BBSConstants;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.general.GeneralContext;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import com.fr.general.locale.image.I18nImage;
import com.fr.module.ModuleEvent;
import com.fr.stable.StringUtils;
@ -44,6 +42,11 @@ public class SplashContext {
private String guest = StringUtils.EMPTY;
private boolean hasShowThanks = false;
/**
* 正常图片路径
*/
private static final String SPLASH_IMAGE_PATH = "/com/fr/design/images/splash.png";
private ScheduledExecutorService scheduler = Executors
.newScheduledThreadPool(1, new NamedThreadFactory("SplashContext"));
@ -174,7 +177,6 @@ public class SplashContext {
}
private static String getSplashPath() {
LocaleMark<String> localeMark = LocaleCenter.getMark(SplashMark.class);
return localeMark.getValue();
return I18nImage.getImagePath(SPLASH_IMAGE_PATH);
}
}

12
designer-realize/src/main/java/com/fr/start/common/SplashPane.java

@ -3,9 +3,7 @@ package com.fr.start.common;
import com.bulenkov.iconloader.IconLoader;
import com.bulenkov.iconloader.util.JBUI;
import com.fr.base.GraphHelper;
import com.fr.design.locale.impl.SplashMark;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import com.fr.general.locale.image.I18nImage;
import com.fr.stable.GraphDrawHelper;
import com.fr.stable.GraphicsConfig;
import com.fr.stable.StringUtils;
@ -51,13 +49,17 @@ public class SplashPane extends JPanel {
private String thanksLog = StringUtils.EMPTY;
private String moduleText = StringUtils.EMPTY;
/**
* 正常图片路径
*/
private static final String SPLASH_PATH = "/com/fr/design/images/splash.png";
private static int uiScale(int i) {
return (int) (i * JBUI_INIT_SCALE);
}
private static String getSplashPath() {
LocaleMark<String> localeMark = LocaleCenter.getMark(SplashMark.class);
return localeMark.getValue();
return I18nImage.getImagePath(SPLASH_PATH);
}
private NotNullLazyValue<Font> fontValue = new NotNullLazyValue<Font>() {

20
designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java

@ -2,16 +2,14 @@ package com.fr.start.common;
import com.bulenkov.iconloader.IconLoader;
import com.fr.base.BaseUtils;
import com.fr.design.locale.impl.DoubleSplashMark;
import com.fr.design.locale.impl.SplashMark;
import com.fr.general.IOUtils;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.image.I18nImage;
import java.awt.RenderingHints;
import javax.swing.Icon;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
/**
@ -30,13 +28,23 @@ public class SplashPane4WinAndJDK11 extends SplashPane{
*/
private boolean isDouble = false;
/**
* 正常图片路径
*/
private static final String SPLASH_PATH = "/com/fr/design/images/splash.png";
/**
* 两倍图片路径
*/
private static final String DOUBLE_SPLASH_PATH = "/com/fr/design/images/splash@2x.png";
public SplashPane4WinAndJDK11() {
this.imagePath = getSplashPath4WinAndJdk11();
}
private String getSplashPath4WinAndJdk11() {
String path = (String) LocaleCenter.getMark(SplashMark.class).getValue();
String pathOfDouble = (String) LocaleCenter.getMark(DoubleSplashMark.class).getValue();
String path = I18nImage.getImagePath(SPLASH_PATH);
String pathOfDouble = I18nImage.getImagePath(DOUBLE_SPLASH_PATH);
// 为图片加上"@2x"
// 某些定制jar里面没有两倍图,判断一下,如果文件不存在,就返回一倍图的path
if (IOUtils.readResource(pathOfDouble) != null) {

BIN
designer-realize/src/main/resources/com/fr/design/images/splash.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 298 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 946 KiB

After

Width:  |  Height:  |  Size: 949 KiB

0
designer-realize/src/main/resources/com/fr/design/images/splash_en@2x.png → designer-realize/src/main/resources/com/fr/design/images/splash@2x_en.png

Before

Width:  |  Height:  |  Size: 949 KiB

After

Width:  |  Height:  |  Size: 949 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash@2x_zh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash@2x_zh_TW.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash_zh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash_zh_TW.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

BIN
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/open/open.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/open/open_en.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

0
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/open.png → designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/open/open_zh.png

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

BIN
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/open/open_zh_TW.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/remind/remind.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

BIN
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/remind/remind_en.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

0
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/remind.png → designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/remind/remind_zh.png

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

BIN
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/remind/remind_zh_TW.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

Loading…
Cancel
Save