Browse Source

Merge pull request #6409 in DESIGN/design from final/10.0 to persist/10.0

* commit 'c73dd20885961a8fbfbd36378ace96fdb38d41af': (26 commits)
  REPORT-50016 填报属性设置-智能添加单元格组-出现重复单元格
  REPORT-61471 国际化url适配-韩文url-远程设计常见问题的弹窗显示和跳转地址问题
  REPORT-60356 设计器11.0适配-10.0打不开11.0提示弹窗和其他弹窗(提示自定义样式已丢失)同时打开了,没有设置弹窗优先级
  REPORT-55377 升级 tomcat 版本修复公开漏洞
  for duchamp mode
  CHART-21376 fix:大屏模板组合图新增类型 默认样式
  CHART-21357 fix:新增坐标轴样式
  CHART-21391 fix:大屏模板 组合图切换到自定义组合图 类型面板没有出来
  REPORT-61356  fix 统一api使用入口
  REPORT-60253 安装大数据集导出插件后,模板从本地切换到远程,再切换到本地,触发保存模板会弹窗 保存失败,有npe报错
  REPORT-61356 设计器启动加载完成后,停留的空白时间变长
  REPORT-60661 国际化url适配
  REPORT-60661 国际化url适配
  REPORT-60661 国际化url适配
  BI-95654   拷贝数据连接时复制了identity
  CHART-21219 特殊形状柱形图触发保存
  REPORT-60752 【10.0】tab组件,移动端属性设置样式模板,从默认切换到自定义后不保存关闭窗口,再次进入后,选项会显示自定义,应该还是默认才对
  REPORT-60561 全局自适应-样式细节优化
  REPORT-58193设计器埋点剥离二期-组件复用埋点-marketClick触发条件有问题
  REPORT-59476 文本控件校验规则支持国际化
  ...
persist/10.0 10.0.19.2021.10.27
superman 3 years ago
parent
commit
bba30ed45f
  1. 2
      build.gradle
  2. 3
      designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
  3. 4
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
  4. 18
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
  5. 4
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  6. 2
      designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java
  7. 9
      designer-base/src/main/java/com/fr/design/login/service/DesignerPassportManager.java
  8. 4
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  9. 5
      designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java
  10. 78
      designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java
  11. 5
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  12. 4
      designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java
  13. 5
      designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java
  14. 7
      designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java
  15. 37
      designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java
  16. 7
      designer-base/src/main/java/com/fr/env/HelpLink.java
  17. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java
  18. 89
      designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java
  19. 178
      designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java
  20. 3
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
  21. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java
  22. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java
  23. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java
  24. 49
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java
  25. 3
      designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java
  26. 3
      designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java
  27. 2
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  28. 3
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java
  29. 3
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java
  30. 28
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java
  31. 6
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java
  32. 13
      designer-realize/src/main/java/com/fr/design/webattr/ServerFitAttrPane.java
  33. 9
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

2
build.gradle

@ -68,7 +68,7 @@ allprojects {
implementation 'org.swingexplorer:swexpl:2.0.1'
implementation 'org.swingexplorer:swag:1.0'
implementation 'net.java.dev.jna:jna:5.4.0'
implementation 'org.apache.tomcat:tomcat-catalina:8.5.69'
implementation 'org.apache.tomcat:tomcat-catalina:8.5.72'
implementation 'io.socket:socket.io-client:0.7.0'
implementation 'com.fr.third:fine-third:' + frVersion
implementation 'com.fr.core:fine-core:' + frDevVersion

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

@ -14,6 +14,7 @@ import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils;
import com.fr.i18n.UrlI18nManager;
import com.fr.locale.InterProviderFactory;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
@ -82,7 +83,7 @@ public class AboutPane extends JPanel {
addPhoneAndQQPane(contentPane);
// 官网
JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Official_Website"), CloudCenter.getInstance().acquireConf("website." + GeneralContext.getLocale(), ProductConstants.WEBSITE_URL));
JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Official_Website"), UrlI18nManager.getInstance().getI18nUrl("website"));
// 支持邮箱
String defaultEmail = CloudCenter.getInstance().acquireConf("support.email", ProductConstants.SUPPORT_EMAIL);

4
designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

@ -3,9 +3,9 @@ package com.fr.design.actions.help;
import com.fr.design.i18n.Toolkit;
import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.general.http.HttpToolbox;
import com.fr.i18n.UrlI18nManager;
import com.fr.stable.CommonUtils;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
@ -28,7 +28,7 @@ public class TutorialAction extends AbstractDesignerSSO {
@Override
public String getJumpUrl() {
return CloudCenter.getInstance().acquireUrlByKind(createDocKey(), "http://help.finereport.com");
return UrlI18nManager.getInstance().getI18nUrl("help");
}
public String getOffLineWarnMessage() {

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

@ -9,6 +9,7 @@ import com.fr.design.fun.ConnectionProvider;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.i18n.Toolkit;
import com.fr.file.ConnectionConfig;
import com.fr.general.ComparatorUtils;
@ -18,13 +19,14 @@ import com.fr.stable.Nameable;
import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.*;
import javax.swing.SwingUtilities;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
/**
* Connection List Pane.
@ -159,4 +161,18 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
connectionConfig.addConnection(nameObject.getName(), (Connection) nameObject.getObject());
}
}
@Override
public void onCopyItem() {
super.onCopyItem();
ListModelElement selectedValue = getSelectedValue();
// identity 需要重置
if (selectedValue != null && selectedValue.wrapper != null) {
Object temp = ((NameObject) selectedValue.wrapper).getObject();
if (temp instanceof JDBCDatabaseConnection) {
JDBCDatabaseConnection object = (JDBCDatabaseConnection) temp;
object.setIdentity(UUID.randomUUID().toString());
}
}
}
}

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

@ -16,8 +16,8 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.BrowseUtils;
import com.fr.file.filter.ChooseFileFilter;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.i18n.UrlI18nManager;
import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils;
@ -159,7 +159,7 @@ public class JDBCDefPane extends JPanel {
odbcTipsLink.setPreferredSize(new Dimension(GraphHelper.getWidth(Toolkit.i18nText("Fine-Design_Basic_Odbc_Tips")), odbcTipsLink.getPreferredSize().height));
odbcTipsLink.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
String url = CloudCenter.getInstance().acquireUrlByKind("odbc.help");
String url = UrlI18nManager.getInstance().getI18nUrl("odbc.help");
BrowseUtils.browser(url);
}
});

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

@ -92,7 +92,7 @@ public class UIDetailErrorLinkDialog extends UIDialog {
contentPane.add(link, BorderLayout.SOUTH);
// 确定 + 取消
JPanel actionPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, GAP_10, GAP_10));
JPanel actionPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, GAP_10, GAP_5));
actionPane.add(createButton(Toolkit.i18nText("Fine-Design_Report_OK")));
actionPane.add(createButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")));
this.getContentPane().add(topPane, BorderLayout.NORTH);

9
designer-base/src/main/java/com/fr/design/login/service/DesignerPassportManager.java

@ -5,6 +5,7 @@ import com.fr.design.login.DesignerLoginType;
import com.fr.design.upm.event.CertificateEvent;
import com.fr.event.EventDispatcher;
import com.fr.json.JSONObject;
import com.fr.stable.StringUtils;
/**
* @author Lanlan
@ -96,6 +97,14 @@ public class DesignerPassportManager {
return uid;
}
/**
* 登出帆软通行证
*/
public void logout() {
saveUserInfo(-1, StringUtils.EMPTY, StringUtils.EMPTY, StringUtils.EMPTY, DesignerLoginType.UNKNOWN, StringUtils.EMPTY);
EventDispatcher.fire(CertificateEvent.LOGOUT, StringUtils.EMPTY);
}
/**
* 保存登录信息
*/

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

@ -381,7 +381,9 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
*/
@Deprecated
public void refreshResource() {
refreshResource(this.editingFILE);
if (JTemplateFactory.isAvailable()) {
refreshResource(this.editingFILE);
}
}
public void refreshResource(FILE file) {

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

@ -93,4 +93,7 @@ public final class JTemplateFactory {
ALL_APP.remove(app);
}
}
}
public static boolean isAvailable() {
return !ALL_APP.isEmpty();
}}

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

@ -17,6 +17,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.plugin.observer.PluginEventType;
import com.fr.stable.os.support.OSBasedAction;
import com.fr.stable.os.support.OSSupportCenter;
@ -38,6 +39,17 @@ public class NorthRegionContainerPane extends JPanel {
private JMenuBar menuBar;
private PluginFilter pluginFilter = new PluginFilter() {
@Override
public boolean accept(PluginContext context) {
return context.contain(PluginModule.ExtraDesign);
}
};
private volatile boolean existDesignExtraPlugin;
public static NorthRegionContainerPane getInstance() {
if (THIS == null) {
synchronized (NorthRegionContainerPane.class) {
@ -66,34 +78,64 @@ public class NorthRegionContainerPane extends JPanel {
//hugh: private修改为protected方便oem的时候修改右上的组件构成
//顶部日志+登陆按钮
final JPanel northEastPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
initPluginListener(northEastPane, ad);
refreshNorthEastPane(northEastPane, ad);
return northEastPane;
}
private void initPluginListener(JPanel northEastPane, ToolBarMenuDock ad) {
//优先级为-1,保证最后全面刷新一次
GeneralContext.listenPluginRunningChanged(new PluginEventListener(-1) {
PluginEventListener pluginOnRunOrStopListener = new PluginEventListener(-1) {
@Override
public void on(PluginEvent event) {
refreshNorthEastPane(northEastPane, ad);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (DesignerContext.getDesignerFrame() == null) {
return;
}
DesignerContext.getDesignerFrame().refresh();
DesignerContext.getDesignerFrame().repaint();
}
});
refreshAll(northEastPane, ad);
}
}, new PluginFilter() {
};
// 在设计器启动时仅在最后一个插件启用时候进行刷新一次 如果插件启用过程中存在实现了设计器接口的插件
PluginEventListener afterAllPluginsActiveListener = new PluginEventListener() {
@Override
public void on(PluginEvent event) {
//优先级为-1,保证最后全面刷新一次
GeneralContext.listenPluginRunningChanged(pluginOnRunOrStopListener, pluginFilter);
// 在设计器启动时仅在最后一个插件启用时候进行刷新一次 如果插件启用过程中存在实现了设计器接口的插件
boolean needRefresh = DesignerContext.getDesignerFrame() != null && DesignerContext.getDesignerFrame().isVisible() && existDesignExtraPlugin;
if (needRefresh) {
refreshAll(northEastPane, ad);
}
}
};
PluginEventListener beforeAllPluginStopListener = new PluginEventListener() {
@Override
public void on(PluginEvent event) {
GeneralContext.stopListenPlugin(pluginOnRunOrStopListener);
}
};
PluginEventListener pluginEventListener = new PluginEventListener() {
@Override
public boolean accept(PluginContext context) {
public void on(PluginEvent event) {
existDesignExtraPlugin = true;
}
};
GeneralContext.listenPluginRunningChanged(pluginEventListener, pluginFilter);
GeneralContext.listenPlugin(PluginEventType.AfterAllActive, afterAllPluginsActiveListener);
GeneralContext.listenPlugin(PluginEventType.BeforeAllStop, beforeAllPluginStopListener);
return context.contain(PluginModule.ExtraDesign);
}
private void refreshAll(JPanel northEastPane, ToolBarMenuDock ad) {
refreshNorthEastPane(northEastPane, ad);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (DesignerContext.getDesignerFrame() == null) {
return;
}
DesignerContext.getDesignerFrame().refresh();
DesignerContext.getDesignerFrame().repaint();
}
});
refreshNorthEastPane(northEastPane, ad);
return northEastPane;
}
private void refreshNorthEastPane(final JPanel northEastPane, final ToolBarMenuDock ad) {

5
designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java

@ -7,8 +7,8 @@ import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.CloudCenter;
import com.fr.general.IOUtils;
import com.fr.i18n.UrlI18nManager;
import javax.swing.BorderFactory;
import javax.swing.JDialog;
@ -49,7 +49,8 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
JPanel messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"),
Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"),
CloudCenter.getInstance().acquireUrlByKind("help.install.font", "https://help.fanruan.com/finereport/doc-view-3999.html"));
UrlI18nManager.getInstance().getI18nUrl("help.install.font")
);
linkMessage.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink"));
messagePanel.add(linkMessage);

4
designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java

@ -7,4 +7,8 @@ public abstract class AbstractTemplateStylePane<T> extends BasicPane {
public abstract void populate(T ob);
public abstract T update();
public AbstractTemplateStylePane<T> generateCleanPane() {
return this;
}
}

5
designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java

@ -32,6 +32,11 @@ public class AccessibleTemplateStyleEditor extends UneditableAccessibleEditor {
setValue(stylePane.update());
fireStateChanged();
}
@Override
public void doCancel() {
stylePane = stylePane.generateCleanPane();
}
});
stylePane.populate(getValue());
dlg.setVisible(true);

7
designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java

@ -44,12 +44,14 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTem
private JPanel right;
private CardLayout card;
private Set<Class<? extends MobileTemplateStyle>> extraStyle = new HashSet<>();
private WCardTagLayout tagLayout;
public MobileTemplateStylePane(WCardTagLayout tagLayout){
init(tagLayout);
}
public void init(WCardTagLayout tagLayout){
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.tagLayout = tagLayout;
listModel = new DefaultListModel();
card = new CardLayout();
right = FRGUIPaneFactory.createCardLayout_S_Pane();
@ -147,4 +149,9 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTem
list.addAll(sets);
return Collections.unmodifiableList(list);
}
@Override
public AbstractTemplateStylePane<MobileTemplateStyle> generateCleanPane() {
return new MobileTemplateStylePane(this.tagLayout);
}
}

37
designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java

@ -17,7 +17,6 @@ import com.fr.report.fit.ReportFitAttr;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -33,6 +32,7 @@ import static com.fr.design.i18n.Toolkit.i18nText;
public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
protected JPanel contentJPanel;
protected UILabel belowSetLabel;
protected UIComboBox itemChoose;
protected java.util.List<FitAttrModel> fitAttrModelList = new ArrayList<>();
@ -97,7 +97,7 @@ public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
}
attrJPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
attrJPanel.setBorder(new EmptyBorder(0, 100, 10, 100));
attrJPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 10, 0));
contentJPanel.add(attrJPanel);
}
@ -136,9 +136,18 @@ public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
protected void initPreviewJPanel() {
previewJPanel = new FitPreviewPane();
previewJPanel.setBorder(BorderFactory.createEmptyBorder(0, getPreviewJPanelLeft(), 0, 0));
contentJPanel.add(previewJPanel);
}
private int getPreviewJPanelLeft() {
int left = 0;
if (belowSetLabel.getPreferredSize() != null) {
left = belowSetLabel.getPreferredSize().width + BELOW_SET_COMPONENT_HSPACE;
}
return left;
}
protected int getStateInPC(int index) {
FitType[] fitTypes = fitAttrModel.getFitTypes();
return fitTypes[index].getState();
@ -188,29 +197,26 @@ public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
protected void initComponents() {
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
contentJPanel = new JPanel();
contentJPanel.setLayout(FRGUIPaneFactory.createCenterFlowLayout());
contentJPanel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(false, FlowLayout.LEFT, 0, 0);
this.add(contentJPanel);
initItemChoose();
initPrompt();
}
private void initItemChoose() {
JPanel chooseJPanel = new JPanel();
chooseJPanel.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
JPanel chooseJPanel = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
ItemListener itemListener = getItemListener();
itemChoose = new UIComboBox(getItemNames());
itemChoose.addItemListener(itemListener);
UILabel belowSetLabel = new UILabel(i18nText("Fine-Design_Report_Blow_Set"));
belowSetLabel = new UILabel(i18nText("Fine-Design_Report_Blow_Set"));
JPanel hSpaceLabel = new JPanel();
hSpaceLabel.setSize(BELOW_SET_COMPONENT_HSPACE, 0);
JPanel buttonPane = GUICoreUtils.createFlowPane(new Component[]{
belowSetLabel, itemChoose}, FlowLayout.LEFT, BELOW_SET_COMPONENT_HSPACE);
belowSetLabel, hSpaceLabel, itemChoose}, FlowLayout.LEFT);
chooseJPanel.add(buttonPane);
chooseJPanel.setPreferredSize(new Dimension(500, 50));
JPanel jPanel = new JPanel();
jPanel.setLayout(FRGUIPaneFactory.createBorderLayout());
jPanel.add(chooseJPanel, BorderLayout.WEST);
contentJPanel.add(jPanel);
chooseJPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
contentJPanel.add(chooseJPanel);
}
@ -221,6 +227,9 @@ public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
}
protected void initPrompt() {
}
protected void refresh() {
validate();
repaint();

7
designer-base/src/main/java/com/fr/env/HelpLink.java vendored

@ -1,7 +1,7 @@
package com.fr.env;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import com.fr.i18n.UrlI18nManager;
import com.fr.locale.InterProviderFactory;
import com.fr.stable.StringUtils;
import java.util.HashMap;
@ -18,8 +18,7 @@ public class HelpLink {
public static String getLink(String solution) {
Map<String, String> map = new HashMap<>();
LocaleMark<String> linkMark = LocaleCenter.getMark(RemoteDesignLocaleMark.class);
String link = linkMark.getValue();
String link = UrlI18nManager.getInstance().getI18nUrl("help.remote.design");
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Change_PassWord"), StringUtils.EMPTY);
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Cert_Error_Solution"), link);
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Connection_Unknown_Error_Solution"), link);

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java

@ -22,9 +22,11 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.ChartTypePane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.form.main.Form;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.JPanel;
@ -334,7 +336,10 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
String chartID = chart.getID();
boolean currentPane = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(chartID);
return (currentPane != isDefaultPane) || (!currentPane && lastIndex != currentIndex);
boolean duchampCustomChart = ChartEditContext.duchampMode()
&& VanChartCustomPlot.VAN_CHART_CUSTOM_PLOT_ID.equals(chartID);
return (currentPane != isDefaultPane) || (!currentPane && lastIndex != currentIndex) || duchampCustomChart;
}
return false;
}

89
designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java

@ -0,0 +1,89 @@
package com.fr.van.chart.config;
import com.fr.base.ChartPreStyleConfig;
import com.fr.chart.base.ChartBaseUtils;
import com.fr.chart.base.ChartConstants;
import com.fr.general.Background;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
import com.fr.stable.CodeUtils;
import com.fr.stable.Constants;
import java.awt.Color;
import java.awt.Font;
/**
* @author shine
* @version 10.0
* Created by shine on 2021/6/25
*/
public class DefaultStyleConstants {
static final FRFont TITLE = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.BOLD, 14, new Color(241, 246, 255));
static final FRFont LEGEND = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.PLAIN, 9, new Color(159, 173, 191));
static final FRFont AXIS_LABEL = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.PLAIN, 9, new Color(159, 173, 191));
static final FRFont AXIS_TITLE = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.PLAIN, 9, new Color(200, 211, 228));
static final Color AXIS_LINE = new Color(46, 75, 102);
static final Color GRID_LINE = new Color(30, 55, 78);
static final FRFont DATA_SHEET = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.PLAIN, 9, new Color(159, 173, 191));
static final Color DATA_SHEET_BORDER = new Color(46, 75, 102);
static final Color BORDER = Color.BLACK;
static final int BORDER_WIDTH = Constants.LINE_NONE;
static final int SPECIAL_BORDER_WIDTH = Constants.LINE_THIN;
static final FRFont PIE_CATEGORY_LABEL = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.PLAIN, 10, new Color(232, 232, 232));
static final Color GAUGE_PANE_BACK_COLOR = null;
static final Color GAUGE_HINGE = null;
static final Color GAUGE_PANE_BACK_COLOR_4_RING = new Color(72, 73, 79);
static final Color GAUGE_SLOT_BACKGROUND_COLOR = new Color(72, 73, 79);
private static final String FONT_NAME = ChartBaseUtils.getLocalDefaultFont("verdana");
static final FRFont THERMOMETER_LABEL_FONT = FRFont.getInstance(FONT_NAME, Font.BOLD, 9, new Color(232, 232, 232));//试管仪表盘标签的默认样式
static final FRFont THERMOMETER_AXIS_LABEL = FRFont.getInstance(FONT_NAME, Font.PLAIN, 8, new Color(159, 173, 191));
static final FRFont RING_VALUE_LABEL_FONT = FRFont.getInstance(FONT_NAME, Font.PLAIN, ChartConstants.AUTO_FONT_SIZE, new Color(232, 232, 232));//百分比圆环仪表盘值标签的默认样式
static final FRFont POINTER_VALUE_LABEL_FONT = FRFont.getInstance(FONT_NAME, Font.PLAIN, ChartConstants.AUTO_FONT_SIZE, new Color(232, 232, 232));//多指针仪表盘值标签的默认样式
static final FRFont POINTER_CATE_LABEL_FONT = FRFont.getInstance(FONT_NAME, Font.PLAIN, 10, new Color(232, 232, 232));//多指针仪表盘分类标签的默认样式
static final Color MAP_NULL_VALUE_COLOR = new Color(168, 168, 168);
static final Color MAP_BORDER = Color.BLACK;
static final Color MAP_LEGEND_BACK = Color.BLACK;
static final Color MAP_TITLE_BACK = Color.BLACK;
static final Color DRILL_MAP_DRILL_TOOLS_BACK = Color.BLACK;
static final float DRILL_MAP_DRILL_TOOLS_BACK_OPACITY = 0.8f;
//todo vancharts
private static final Color GANTT_OUT_LINE = GRID_LINE;
private static final FRFont GANTT_LABEL = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.PLAIN, 8, new Color(217, 217, 217));
private static final Color GANTT_BORDER_LINE = new Color(30, 36, 58);
private static final Color GAUGE_TICK = new Color(39, 49, 71);
static final Background BACK = null;
static String COLORS = null;
static {
ChartPreStyleConfig config = ChartPreStyleConfig.getInstance();
try {
DefaultStyleConstants.COLORS = CodeUtils.cjkDecode("\u7ecf\u5178\u9ad8\u4eae");
// 没有经典高亮, 用新特性
if (config.getPreStyle(DefaultStyleConstants.COLORS) == null) {
DefaultStyleConstants.COLORS = CodeUtils.cjkDecode("\u65b0\u7279\u6027");
}
// 没有新特性, 用第一个配色
if (config.getPreStyle(DefaultStyleConstants.COLORS) == null) {
if (config.names().hasNext()) {
String name = GeneralUtils.objectToString(config.names().next());
if (config.getPreStyle(name) != null) {
DefaultStyleConstants.COLORS = name;
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

178
designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java

@ -0,0 +1,178 @@
package com.fr.van.chart.config;
import com.fr.chart.base.AttrBorder;
import com.fr.chart.base.AttrFillStyle;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.DataSheet;
import com.fr.config.predefined.ColorFillStyle;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.plugin.chart.PiePlot4VanChart;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.base.AttrLabelDetail;
import com.fr.plugin.chart.custom.type.CustomPlotType;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.type.GaugeStyle;
/**
* @author shine
* @version 10.0
* Created by shine on 2021/10/22
* vanchart的抽出来因为主体代码 新增y轴 组合图新增图表都要用
*/
public class DefaultStyleHelper4Van {
public static void dealVanPlot4Custom(VanChartPlot plot, CustomPlotType customPlotType) {
if (!ChartEditContext.duchampMode()) {
return;
}
dealVanPlotCommonAttr(plot);
switch (customPlotType) {
case PIE:
case DIFFERENT_PIE:
case SAME_PIE:
dealPie(plot);
break;
case SLOT:
case POINTER_360:
case POINTER_180:
case CUVETTE:
case RING:
dealGauge(plot);
break;
case COLUMN:
case LINE:
case AREA:
case BUBBLE:
case RADAR:
case STACK_RADAR:
case SCATTER:
default:
break;
}
}
public static VanChartAxis dealAxisDefault(VanChartAxis axis) {
if (!ChartEditContext.duchampMode()) {
return axis;
}
axis.getTitle().getTextAttr().setFRFont(DefaultStyleConstants.AXIS_TITLE);
axis.getTextAttr().setFRFont(DefaultStyleConstants.AXIS_LABEL);
axis.setAxisColor(DefaultStyleConstants.AXIS_LINE);
axis.setMainGridColor(DefaultStyleConstants.GRID_LINE);
return axis;
}
static void dealVanPlotCommonAttr(Plot plot) {
if (!ChartEditContext.duchampMode()) {
return;
}
if (plot instanceof VanChartPlot) {
VanChartPlot vanChartPlot = (VanChartPlot) plot;
ColorFillStyle colorFillStyle = new ColorFillStyle();
colorFillStyle.setColorStyle(ChartConstants.COLOR_ACC);
colorFillStyle.setFillStyleName(DefaultStyleConstants.COLORS);
AttrFillStyle plotFillStyle = vanChartPlot.getPlotFillStyle();
if (plotFillStyle == null) {
plotFillStyle = new AttrFillStyle();
vanChartPlot.setPlotFillStyle(plotFillStyle);
}
plotFillStyle.setColorFillStyle(colorFillStyle);
if (vanChartPlot.getLegend() != null) {
vanChartPlot.getLegend().setFRFont(DefaultStyleConstants.LEGEND);
}
if (vanChartPlot instanceof VanChartRectanglePlot) {
VanChartRectanglePlot vanChartRectanglePlot = (VanChartRectanglePlot) vanChartPlot;
for (VanChartAxis axis : vanChartRectanglePlot.getXAxisList()) {
dealAxisDefault(axis);
}
for (VanChartAxis axis : vanChartRectanglePlot.getYAxisList()) {
dealAxisDefault(axis);
}
}
dealBorder(vanChartPlot);
DataSheet dataSheet = vanChartPlot.getDataSheet();
dataSheet.getTextAttr().setFRFont(DefaultStyleConstants.DATA_SHEET);
dataSheet.setBorderColor(DefaultStyleConstants.DATA_SHEET_BORDER);
}
}
private static void dealBorder(VanChartPlot vanChartPlot) {
ConditionAttr defaultAttr = vanChartPlot.getConditionCollection().getDefaultAttr();
AttrBorder attrBorder = defaultAttr.getExisted(AttrBorder.class);
if (attrBorder != null) {
attrBorder.setBorderColor(DefaultStyleConstants.BORDER);
attrBorder.setBorderStyle(defaultBorderWidth(vanChartPlot));
}
}
private static int defaultBorderWidth(VanChartPlot vanChartPlot) {
//pie multipie treemap map drillmap heatmap
if (vanChartPlot instanceof PiePlot4VanChart
|| vanChartPlot instanceof VanChartMapPlot) {
return DefaultStyleConstants.SPECIAL_BORDER_WIDTH;
}
return DefaultStyleConstants.BORDER_WIDTH;
}
static void dealPie(Plot plot) {
if (plot instanceof PiePlot4VanChart) {
ConditionAttr defaultAttr = plot.getConditionCollection().getDefaultAttr();
AttrLabel attrLabel = defaultAttr.getExisted(AttrLabel.class);
if (attrLabel == null) {
attrLabel = ((PiePlot4VanChart) plot).getDefaultAttrLabel();
defaultAttr.addDataSeriesCondition(attrLabel);
}
attrLabel.getSecondLabelDetail().getTextAttr().setFRFont(DefaultStyleConstants.PIE_CATEGORY_LABEL);
}
}
static void dealGauge(Plot param) {
if (!(param instanceof VanChartGaugePlot)) {
return;
}
VanChartGaugePlot plot = (VanChartGaugePlot) param;
plot.getGaugeDetailStyle().setPaneBackgroundColor(plot.getGaugeStyle() == GaugeStyle.RING ? DefaultStyleConstants.GAUGE_PANE_BACK_COLOR_4_RING : DefaultStyleConstants.GAUGE_PANE_BACK_COLOR);
plot.getGaugeDetailStyle().setSlotBackgroundColor(DefaultStyleConstants.GAUGE_SLOT_BACKGROUND_COLOR);
plot.getGaugeDetailStyle().setHingeColor(DefaultStyleConstants.GAUGE_HINGE);
ConditionAttr defaultAttr = plot.getConditionCollection().getDefaultAttr();
AttrLabel attrLabel = defaultAttr.getExisted(AttrLabel.class);
if (attrLabel != null) {
AttrLabelDetail detail = attrLabel.getAttrLabelDetail();
AttrLabelDetail valueDetail = attrLabel.getGaugeValueLabelDetail();
switch (plot.getGaugeStyle()) {
case POINTER:
case POINTER_SEMI:
detail.getContent().getCategoryFormat().setEnable(false);
detail.getTextAttr().setFRFont(DefaultStyleConstants.POINTER_CATE_LABEL_FONT);
valueDetail.getTextAttr().setFRFont(DefaultStyleConstants.POINTER_VALUE_LABEL_FONT);
break;
case RING:
case SLOT:
valueDetail.getTextAttr().setFRFont(DefaultStyleConstants.RING_VALUE_LABEL_FONT);
break;
case THERMOMETER:
detail.getTextAttr().setFRFont(DefaultStyleConstants.THERMOMETER_LABEL_FONT);
valueDetail.getTextAttr().setFRFont(DefaultStyleConstants.THERMOMETER_LABEL_FONT);
plot.getGaugeAxis().getTextAttr().setFRFont(DefaultStyleConstants.THERMOMETER_AXIS_LABEL);
break;
}
}
}
}

3
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java

@ -6,13 +6,13 @@ import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.custom.CustomPlotFactory;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.custom.type.CustomPlotType;
import com.fr.plugin.chart.custom.type.CustomStyle;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import com.fr.van.chart.custom.CustomPlotDesignerPaneFactory;
import javax.swing.JOptionPane;
@ -260,6 +260,7 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane<Chart> {
CustomPlotType customPlotType = selectedPlotTypeList.get(i);
if (!CustomPlotFactory.customPlotContains(newCustomPlotList, customPlotType)){
VanChartPlot vanChartPlot = CustomPlotFactory.getCustomPlot(customPlotType);
DefaultStyleHelper4Van.dealVanPlot4Custom(vanChartPlot, customPlotType);
vanChartPlot.setCustomType(CustomStyle.CUSTOM.toString());
//设置公共属性
setCommonAttr(vanChartPlot, customPlot);

7
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java

@ -5,6 +5,7 @@ import com.fr.design.constants.KeyWords;
import com.fr.design.gui.autocomplete.AutoCompletion;
import com.fr.design.gui.autocomplete.BasicCompletion;
import com.fr.design.gui.autocomplete.DefaultCompletionProvider;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -45,7 +46,7 @@ public class VanChartHtmlLabelPane extends JPanel {
private UICheckBox isCustomHeight;
private UITextField customHeight;
private VanChartStylePane parent;
private AbstractAttrNoScrollPane parent;
private JPanel widthAndHeightPane;
@ -53,7 +54,7 @@ public class VanChartHtmlLabelPane extends JPanel {
contentTextArea.setText(text);
}
public void setParent(VanChartStylePane parent) {
public void setParent(AbstractAttrNoScrollPane parent) {
this.parent = parent;
}
@ -126,7 +127,7 @@ public class VanChartHtmlLabelPane extends JPanel {
};
}
private void fireJSChange() {
protected void fireJSChange() {
if (parent != null) {
parent.attributeChanged();
}

7
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java

@ -14,16 +14,17 @@ import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.axis.component.VanChartAxisButtonPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.awt.BorderLayout;
import java.awt.CardLayout;
/**
* 样式-坐标轴界面
@ -104,6 +105,7 @@ public class VanChartAxisPane extends BasicBeanPane<VanChart> {
List<VanChartAxis> xAxisList = editingPlot.getXAxisList();
VanChartAxis axis = editingPlot.createXAxis(name, VanChartConstants.AXIS_BOTTOM);
xAxisList.add(axis);
DefaultStyleHelper4Van.dealAxisDefault(axis);
VanChartXYAxisPaneInterface axisPane = initXAxisPane(axis);
axisPane.populate(axis);
@ -119,6 +121,7 @@ public class VanChartAxisPane extends BasicBeanPane<VanChart> {
List<VanChartAxis> yAxisList = editingPlot.getYAxisList();
VanChartAxis axis = editingPlot.createYAxis(name, VanChartConstants.AXIS_LEFT);
yAxisList.add(axis);
DefaultStyleHelper4Van.dealAxisDefault(axis);
VanChartXYAxisPaneInterface axisPane = initYAxisPane(axis);
axisPane.populate(axis);

9
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java

@ -1,15 +1,16 @@
package com.fr.van.chart.designer.style.axis;
import com.fr.chart.chartattr.Axis;
import com.fr.design.i18n.Toolkit;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartTimeAxis;
import com.fr.plugin.chart.attr.axis.VanChartValueAxis;
import com.fr.plugin.chart.type.AxisType;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import com.fr.van.chart.designer.AbstractVanChartScrollPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.VanChartStylePane;
@ -83,9 +84,9 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll
public void populate(VanChartAxis axis){
AxisType axisType = axis.getAxisType();
textAxisPane.populateBean(new VanChartAxis(axis.getAxisName(), axis.getPosition()));
timeAxisPane.populateBean(new VanChartTimeAxis(axis.getAxisName(), axis.getPosition()));
valueAxisPane.populateBean(new VanChartValueAxis(axis.getAxisName(), axis.getPosition()));
textAxisPane.populateBean(DefaultStyleHelper4Van.dealAxisDefault(new VanChartAxis(axis.getAxisName(), axis.getPosition())));
timeAxisPane.populateBean(DefaultStyleHelper4Van.dealAxisDefault(new VanChartTimeAxis(axis.getAxisName(), axis.getPosition())));
valueAxisPane.populateBean(DefaultStyleHelper4Van.dealAxisDefault(new VanChartValueAxis(axis.getAxisName(), axis.getPosition())));
if(ComparatorUtils.equals(axisType, AxisType.AXIS_CATEGORY)){
textAxisPane.populateBean(axis);
} else if(ComparatorUtils.equals(axisType, AxisType.AXIS_TIME)){

49
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java

@ -4,11 +4,12 @@ import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.cardlayout.XWCardTagLayout;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.form.layout.FRBorderLayout;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.ui.util.UIUtil;
import com.fr.general.ComparatorUtils;
import javax.swing.JOptionPane;
import java.awt.BorderLayout;
import java.awt.Rectangle;
@ -46,18 +47,42 @@ public class FRCardMainBorderLayoutAdapter extends FRBorderLayoutAdapter {
Rectangle rectangle = creator.getBounds();
//不能超出控件边界
if (ComparatorUtils.equals(constraints, BorderLayout.NORTH) || ComparatorUtils.equals(constraints, BorderLayout.SOUTH)) {
int containerHeight = container.getHeight();
if (rectangle.height > containerHeight) {
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
return true;
}
return isBeyondMinConstraint(rectangle.height, container.getHeight());
} else if (ComparatorUtils.equals(constraints, BorderLayout.EAST) || ComparatorUtils.equals(constraints, BorderLayout.WEST)) {
int containerWidth = container.getWidth();
if (rectangle.width > containerWidth) {
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
return true;
}
return isBeyondMinConstraint(rectangle.width, container.getWidth());
}
return false;
}
/**
* 是否超出最小限制
*
* @param minConstraint 最小限制
* @param value 数值
* @return 是否超出最小限制
*/
private boolean isBeyondMinConstraint(int minConstraint, int value) {
if (minConstraint > value) {
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
if (container.getBackupBound() != null) {
// 手动拖动导致变矮的场景
container.setSize(container.getBackupBound().getSize());
} else {
// 自适应布局平分高度导致变矮的场景
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
JTemplate<?, ?> jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jt != null) {
jt.undo();
}
}
});
}
return true;
} else {
return false;
}
}
}

3
designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java

@ -31,6 +31,7 @@ import com.fr.env.utils.DesignerInteractionHistory;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.general.Background;
import com.fr.general.IOUtils;
import com.fr.i18n.UrlI18nManager;
import com.fr.stable.Constants;
import com.fr.stable.GraphDrawHelper;
import com.fr.stable.ProjectLibrary;
@ -121,7 +122,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver {
public void actionPerformed(ActionEvent e) {
Desktop desktop = Desktop.getDesktop();
try {
desktop.browse(new URI(TWEAK_NINE_POINT_HELP_URL));
desktop.browse(new URI(UrlI18nManager.getInstance().getI18nUrl("nine.point.help")));
} catch (IOException | URISyntaxException ioException) {
ioException.printStackTrace();
}

3
designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java

@ -96,7 +96,8 @@ public class FormWidgetDetailPane extends FormDockView{
}
headGroup = new UIHeadGroup(paneNames) {
protected void tabChanged(int newSelectedIndex) {
if (newSelectedIndex == 1) {
//初始化还未展示的时候不需要收集其 marketClick
if (this.isShowing() && newSelectedIndex == 1) {
ComponentCollector.getInstance().collectMarkerClick();
}
cardLayout.show(centerPane, paneList.get(newSelectedIndex).getTitle());

2
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -576,7 +576,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
}
private ShortCut getReportFitAttrAction() {
protected ShortCut getReportFitAttrAction() {
FormAdaptiveConfigUIProcessor adaptiveConfigUI = ExtraDesignClassManager.getInstance().getSingle(FormAdaptiveConfigUIProcessor.MARK_STRING);
if (adaptiveConfigUI != null) {
return adaptiveConfigUI.getConfigShortCut(this);

3
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java

@ -21,6 +21,7 @@ import com.fr.form.ui.container.WParameterLayout;
import com.fr.form.ui.container.WSortLayout;
import com.fr.form.ui.mobile.MobileParamStyle;
import com.fr.general.CloudCenter;
import com.fr.i18n.UrlI18nManager;
import com.fr.log.FineLoggerFactory;
import com.fr.report.mobile.EmptyMobileParamStyle;
@ -104,7 +105,7 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane {
@Override
public void mouseClicked(MouseEvent e) {
try {
Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("plugin.mobile.style")));
Desktop.getDesktop().browse(new URI(UrlI18nManager.getInstance().getI18nUrl("plugin.mobile.style")));
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
}

3
designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java

@ -100,8 +100,7 @@ class CptApp extends AbstractWorkBookApp {
final JDialog jd = new JDialog();
// 模态一下,因为可能会多个样式丢失
// jd.setModal(true);
jd.setAlwaysOnTop(true);
jd.setModal(true);
jd.setSize(450, 150);
jd.setResizable(false);
jd.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png"));

28
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -6,6 +6,7 @@ package com.fr.design.mainframe.bbs;
import com.fr.design.DesignerEnvManager;
import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.LoginContextListener;
import com.fr.design.extra.UserLoginContext;
import com.fr.design.gui.ilable.UILabel;
@ -14,6 +15,7 @@ import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.locale.impl.BbsSpaceMark;
import com.fr.design.login.DesignerLoginHelper;
import com.fr.design.login.DesignerLoginSource;
import com.fr.design.login.service.DesignerPassportManager;
import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.impl.SupportOSImpl;
@ -29,6 +31,7 @@ import com.fr.general.locale.LocaleMark;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import javax.swing.SwingConstants;
import java.awt.Cursor;
import java.awt.Frame;
@ -120,8 +123,33 @@ public class UserInfoLabel extends UILabel {
UserLoginContext.fireLoginContextListener(DesignerLoginSource.SWITCH_ACCOUNT);
}
});
//退出登录
UIMenuItem logout = new UIMenuItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_BBSLogin_Logout"));
logout.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
String[] options = new String[]{
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_BBSLogin_Logout"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Cancel")
};
int rv = FineJOptionPane.showConfirmDialog(
DesignerLoginHelper.getDialog(),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_BBSLogin_Logout_Tip"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE,
null,
options,
options[1]
);
if (rv == JOptionPane.YES_OPTION) {
DesignerPassportManager.getInstance().logout();
}
}
});
menu.add(priviteMessage);
menu.add(closeOther);
menu.add(logout);
GUICoreUtils.showPopupMenu(menu, UserInfoLabel.this, 0, MENU_HEIGHT);
} else {
UserLoginContext.fireLoginContextListener(DesignerLoginSource.NORMAL);

6
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -86,6 +86,12 @@ public class UserInfoPane extends BasicPane {
markSignIn(text);
}
});
EventDispatcher.listen(CertificateEvent.LOGOUT, new Listener<String>() {
@Override
public void on(Event event, String text) {
markUnSignIn();
}
});
}
public UserInfoLabel getUserInfoLabel() {

13
designer-realize/src/main/java/com/fr/design/webattr/ServerFitAttrPane.java

@ -1,6 +1,8 @@
package com.fr.design.webattr;
import com.fr.config.Configuration;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.report.fit.BaseFitAttrPane;
import com.fr.design.report.fit.FitAttrModel;
import com.fr.general.ComparatorUtils;
@ -9,6 +11,7 @@ import com.fr.report.fit.ReportFitConfig;
import com.fr.transaction.Configurations;
import com.fr.transaction.Worker;
import java.awt.Color;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
@ -33,7 +36,6 @@ public class ServerFitAttrPane extends BaseFitAttrPane {
super.populateBean(reportFitAttr);
}
public ReportFitAttr updateBean() {
ReportFitAttr reportFitAttr = super.updateBean();
Configurations.update(new Worker() {
@ -74,5 +76,14 @@ public class ServerFitAttrPane extends BaseFitAttrPane {
}
};
}
@Override
protected void initPrompt() {
if (fitAttrModelList.size() == 3) {
UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Designer_Fit_Attr_Pane_Hint"));
uiLabel.setForeground(Color.lightGray);
contentJPanel.add(uiLabel);
}
}
}

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

@ -431,7 +431,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
if (oriCellSelection != null && isSameStartPoint(cellselection, oriCellSelection)) {
dealDragSelection(add, cellselection, newValue);
} else if (cellselection.getSelectedType() == CellSelection.CHOOSE_ROW || cellselection.getSelectedType() == CellSelection.CHOOSE_COLUMN) {
dealSelectColRow(add, cellselection);
dealSelectColRow(add, cellselection, newValue);
} else {
ColumnRow columnRow = ColumnRow.valueOf(cellselection.getColumn(), cellselection.getRow());
String allColumnRow = newValue.toString();
@ -503,12 +503,15 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
return cs1.getColumn() == cs2.getColumn() && cs1.getRow() == cs2.getRow();
}
private void dealSelectColRow(ColumnRowGroup add, CellSelection se) {
private void dealSelectColRow(ColumnRowGroup add, CellSelection se, ColumnRowGroup newValue) {
int c = se.getColumn(), cs = se.getColumnSpan(),
r = se.getRow(), rs = se.getRowSpan();
for (int i = 0; i < cs; i++) {
for (int j = 0; j < rs; j++) {
add.addColumnRow(ColumnRow.valueOf(c + i, r + j));
ColumnRow columnRow = ColumnRow.valueOf(c + i, r + j);
if (!newValue.contains(columnRow)) {
add.addColumnRow(columnRow);
}
}
}
}

Loading…
Cancel
Save