From 4a5ff5cd8ee1bfa707448c7f43285fa358aa83a9 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Tue, 12 Oct 2021 14:51:43 +0800 Subject: [PATCH 01/51] =?UTF-8?q?REPORT-59476=20&&=20REPORT-59475=20?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=8E=A7=E4=BB=B6=E6=A0=A1=E9=AA=8C=E8=A7=84?= =?UTF-8?q?=E5=88=99=E6=94=AF=E6=8C=81=E5=9B=BD=E9=99=85=E5=8C=96=20&&=20?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=A0=A1=E9=AA=8C=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=94=AF=E6=8C=81=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beans/ErrorMsgTextFieldAdapter.java | 11 ++++ .../fr/design/beans/UITextFieldAdapter.java | 46 ++++++++++++++ .../com/fr/design/fun/RegPaneProvider.java | 11 ++++ .../design/fun/TextFieldAdapterProvider.java | 11 ++++ .../fun/impl/AbstractRegPaneProvider.java | 22 +++++++ .../AbstractTextFieldAdapterProvider.java | 22 +++++++ .../fr/design/gui/frpane/RegFieldPane.java | 60 ++++++++++--------- .../ui/designer/FieldEditorDefinePane.java | 53 ++++++++-------- .../designer/TextFieldEditorDefinePane.java | 35 +++++++---- .../widget/ui/FieldEditorDefinePane.java | 42 ++++++------- .../widget/ui/TextFieldEditorDefinePane.java | 20 +++++-- 11 files changed, 242 insertions(+), 91 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/beans/ErrorMsgTextFieldAdapter.java create mode 100644 designer-base/src/main/java/com/fr/design/beans/UITextFieldAdapter.java create mode 100644 designer-base/src/main/java/com/fr/design/fun/RegPaneProvider.java create mode 100644 designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java create mode 100644 designer-base/src/main/java/com/fr/design/fun/impl/AbstractRegPaneProvider.java create mode 100644 designer-base/src/main/java/com/fr/design/fun/impl/AbstractTextFieldAdapterProvider.java diff --git a/designer-base/src/main/java/com/fr/design/beans/ErrorMsgTextFieldAdapter.java b/designer-base/src/main/java/com/fr/design/beans/ErrorMsgTextFieldAdapter.java new file mode 100644 index 000000000..e2444a4ec --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/beans/ErrorMsgTextFieldAdapter.java @@ -0,0 +1,11 @@ +package com.fr.design.beans; + +import javax.swing.JComponent; + +public interface ErrorMsgTextFieldAdapter { + void setText(String str); + + String getText(); + + JComponent getErrorMsgTextField(); +} diff --git a/designer-base/src/main/java/com/fr/design/beans/UITextFieldAdapter.java b/designer-base/src/main/java/com/fr/design/beans/UITextFieldAdapter.java new file mode 100644 index 000000000..48fa6944f --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/beans/UITextFieldAdapter.java @@ -0,0 +1,46 @@ +package com.fr.design.beans; + +import com.fr.design.gui.itextfield.UITextField; + +import javax.swing.JComponent; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; + +public class UITextFieldAdapter implements ErrorMsgTextFieldAdapter { + private final UITextField uiTextField = new UITextField(); + + public UITextFieldAdapter(){ + addDocumentListener(); + } + @Override + public void setText(String str) { + uiTextField.setText(str); + } + + @Override + public String getText() { + return uiTextField.getText(); + } + + public void addDocumentListener() { + uiTextField.getDocument().addDocumentListener(new DocumentListener() { + + public void changedUpdate(DocumentEvent e) { + uiTextField.setToolTipText(uiTextField.getText()); + } + + public void insertUpdate(DocumentEvent e) { + uiTextField.setToolTipText(uiTextField.getText()); + } + + public void removeUpdate(DocumentEvent e) { + uiTextField.setToolTipText(uiTextField.getText()); + } + }); + } + + @Override + public JComponent getErrorMsgTextField() { + return uiTextField; + } +} \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/fun/RegPaneProvider.java b/designer-base/src/main/java/com/fr/design/fun/RegPaneProvider.java new file mode 100644 index 000000000..26fe62b5e --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/fun/RegPaneProvider.java @@ -0,0 +1,11 @@ +package com.fr.design.fun; + +import com.fr.design.gui.frpane.RegFieldPane; +import com.fr.stable.fun.mark.Immutable; + +public interface RegPaneProvider extends Immutable { + int CURRENT_LEVEL = 1; + String XML_TAG = "RegPaneProvider"; + + RegFieldPane createRegPane(); +} diff --git a/designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java b/designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java new file mode 100644 index 000000000..7ab8c782b --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java @@ -0,0 +1,11 @@ +package com.fr.design.fun; + +import com.fr.design.beans.ErrorMsgTextFieldAdapter; +import com.fr.stable.fun.mark.Immutable; + +public interface TextFieldAdapterProvider extends Immutable { + String XML_TAG = "TextFieldAdapterProvider"; + int CURRENT_LEVEL = 1; + + ErrorMsgTextFieldAdapter createTextFieldAdapter(); +} diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractRegPaneProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractRegPaneProvider.java new file mode 100644 index 000000000..98185f2a5 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractRegPaneProvider.java @@ -0,0 +1,22 @@ +package com.fr.design.fun.impl; + +import com.fr.design.fun.RegPaneProvider; +import com.fr.stable.fun.mark.API; + +/** + * @author Joe + * 2021/10/8 15:19 + */ +@API(level = RegPaneProvider.CURRENT_LEVEL) +public abstract class AbstractRegPaneProvider implements RegPaneProvider { + + @Override + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + @Override + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } +} diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractTextFieldAdapterProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractTextFieldAdapterProvider.java new file mode 100644 index 000000000..bc0836eb4 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractTextFieldAdapterProvider.java @@ -0,0 +1,22 @@ +package com.fr.design.fun.impl; + +import com.fr.design.fun.TextFieldAdapterProvider; +import com.fr.stable.fun.mark.API; + +/** + * @author Joe + * 2021/10/8 15:17 + */ +@API(level = TextFieldAdapterProvider.CURRENT_LEVEL) +public abstract class AbstractTextFieldAdapterProvider implements TextFieldAdapterProvider { + + @Override + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + @Override + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } +} diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java index 5d37fb4a9..38e33514b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java @@ -1,21 +1,25 @@ package com.fr.design.gui.frpane; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.beans.ErrorMsgTextFieldAdapter; +import com.fr.design.beans.UITextFieldAdapter; import com.fr.design.constants.LayoutConstants; import com.fr.design.designer.IntervalConstants; import com.fr.design.dialog.BasicPane; +import com.fr.design.fun.TextFieldAdapterProvider; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.TextEditor; import com.fr.form.ui.reg.NoneReg; import com.fr.form.ui.reg.RegExp; +import com.fr.log.FineLoggerFactory; - -import javax.swing.*; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; /** * Created by kerry on 2017/9/4. @@ -23,7 +27,7 @@ import java.awt.*; public class RegFieldPane extends RegPane { protected RegErrorMsgPane regErrorMsgPane; - public RegFieldPane(){ + public RegFieldPane() { this(ALL_REG_TYPE); } @@ -39,8 +43,8 @@ public class RegFieldPane extends RegPane { @Override public void regChangeAction() { - RegExp regExp = (RegExp)getRegComboBox().getSelectedItem(); - if(regExp instanceof NoneReg){ + RegExp regExp = (RegExp) getRegComboBox().getSelectedItem(); + if (regExp instanceof NoneReg) { regErrorMsgPane.setVisible(false); return; } @@ -67,33 +71,35 @@ public class RegFieldPane extends RegPane { } private static class RegErrorMsgPane extends BasicPane { - private UITextField regErrorMsgField; + private ErrorMsgTextFieldAdapter errorMsgTextFieldAdapter; public RegErrorMsgPane() { + initRegErrorMsgField(); + setStyle(); + } + + private void setStyle() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L5, 0, 0)); - initRegErrorMsgField(); UILabel tipLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip")); tipLabel.setPreferredSize(new Dimension(60, 20)); - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tipLabel, regErrorMsgField}}, TableLayoutHelper.FILL_LASTCOLUMN, 10, LayoutConstants.VGAP_MEDIUM); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tipLabel, errorMsgTextFieldAdapter.getErrorMsgTextField()}}, TableLayoutHelper.FILL_LASTCOLUMN, 10, LayoutConstants.VGAP_MEDIUM); this.add(panel); } private void initRegErrorMsgField() { - regErrorMsgField = new UITextField(); - regErrorMsgField.getDocument().addDocumentListener(new DocumentListener() { - public void changedUpdate(DocumentEvent e) { - regErrorMsgField.setToolTipText(regErrorMsgField.getText()); - } - - public void insertUpdate(DocumentEvent e) { - regErrorMsgField.setToolTipText(regErrorMsgField.getText()); - } + TextFieldAdapterProvider provider = ExtraDesignClassManager.getInstance().getSingle(TextFieldAdapterProvider.XML_TAG); + if (provider == null) { + errorMsgTextFieldAdapter = new UITextFieldAdapter(); + return; + } + try { + errorMsgTextFieldAdapter = provider.createTextFieldAdapter(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + errorMsgTextFieldAdapter = new UITextFieldAdapter(); - public void removeUpdate(DocumentEvent e) { - regErrorMsgField.setToolTipText(regErrorMsgField.getText()); - } - }); + } } @Override @@ -102,11 +108,11 @@ public class RegFieldPane extends RegPane { } public void populate(TextEditor textEditor) { - regErrorMsgField.setText(textEditor.getRegErrorMessage()); + errorMsgTextFieldAdapter.setText(textEditor.getRegErrorMessage()); } public void update(TextEditor textEditor) { - textEditor.setRegErrorMessage(regErrorMsgField.getText()); + textEditor.setRegErrorMessage(errorMsgTextFieldAdapter.getText()); } } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java index 45c2cd968..4ee699e0f 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java @@ -1,9 +1,17 @@ package com.fr.design.widget.ui.designer; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.beans.ErrorMsgTextFieldAdapter; +import com.fr.design.beans.UITextFieldAdapter; import com.fr.design.constants.LayoutConstants; import com.fr.design.designer.IntervalConstants; -import com.fr.design.designer.creator.*; +import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XCreatorUtils; +import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWFitLayout; +import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.foldablepane.UIExpandablePane; +import com.fr.design.fun.TextFieldAdapterProvider; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; @@ -11,19 +19,19 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.widget.ui.designer.component.FontSizeComboPane; import com.fr.form.ui.FieldEditor; +import com.fr.log.FineLoggerFactory; - -import javax.swing.*; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; public abstract class FieldEditorDefinePane extends AbstractDataModify { protected UICheckBox allowBlankCheckBox; // richer:错误信息,是所有控件共有的属性,所以放到这里来 - protected UITextField errorMsgTextField; + protected ErrorMsgTextFieldAdapter errorMsgTextField; protected JPanel validatePane; protected FontSizeComboPane fontSizePane; protected UITextField labelNameTextField; @@ -40,7 +48,6 @@ public abstract class FieldEditorDefinePane extends Abstr allowBlankCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Allow_Null")); allowBlankCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); fontSizePane = new FontSizeComboPane(); - errorMsgTextField = new UITextField(); JPanel contentPane = this.setFirstContentPane(); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); jPanel.add(contentPane, BorderLayout.CENTER); @@ -76,23 +83,17 @@ public abstract class FieldEditorDefinePane extends Abstr protected void initErrorMsgPane() { // 错误信息 - errorMsgTextField = new UITextField(); -// // richer:主要为了方便查看比较长的错误信息 - errorMsgTextField.getDocument().addDocumentListener(new DocumentListener() { - - public void changedUpdate(DocumentEvent e) { - errorMsgTextField.setToolTipText(errorMsgTextField.getText()); - } - - public void insertUpdate(DocumentEvent e) { - errorMsgTextField.setToolTipText(errorMsgTextField.getText()); - } - - public void removeUpdate(DocumentEvent e) { - errorMsgTextField.setToolTipText(errorMsgTextField.getText()); - } - }); - + TextFieldAdapterProvider provider = ExtraDesignClassManager.getInstance().getSingle(TextFieldAdapterProvider.XML_TAG); + if (provider == null) { + errorMsgTextField = new UITextFieldAdapter(); + return; + } + try { + errorMsgTextField = provider.createTextFieldAdapter(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + errorMsgTextField = new UITextFieldAdapter(); + } } @@ -111,7 +112,7 @@ public abstract class FieldEditorDefinePane extends Abstr validatePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); final UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip")); JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - final JPanel errorTipPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{uiLabel, errorMsgTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); + final JPanel errorTipPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{uiLabel, errorMsgTextField.getErrorMsgTextField()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); errorTipPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L5, 0, 0)); borderPane.add(errorTipPane, BorderLayout.CENTER); allowBlankCheckBox.addItemListener(new ItemListener() { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java index 2baea973c..6e6a2ff14 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java @@ -1,7 +1,9 @@ package com.fr.design.widget.ui.designer; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; +import com.fr.design.fun.RegPaneProvider; import com.fr.design.gui.frpane.RegFieldPane; import com.fr.design.gui.frpane.RegPane; import com.fr.design.gui.ilable.UILabel; @@ -11,10 +13,12 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.widget.ui.designer.component.FormWidgetValuePane; import com.fr.form.ui.TextEditor; - +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; + +import javax.swing.JPanel; +import javax.swing.SwingConstants; +import java.awt.Component; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -65,27 +69,36 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane widgetValueLabel.setVerticalAlignment(SwingConstants.TOP); Component[][] components = new Component[][]{ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Label_Name")), labelNameTextField}, - new Component[]{widgetValueLabel, formWidgetValuePane}, + new Component[]{widgetValueLabel, formWidgetValuePane}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_WaterMark"), SwingConstants.LEFT), waterMarkDictPane}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font_Size"), SwingConstants.LEFT), fontSizePane} }; double[] rowSize = {p, p, p, p, p, p}; - double[] columnSize = {p,f}; - int[][] rowCount = {{1, 1},{1, 3},{1, 1},{1, 1}}; - final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1}, {1, 3}, {1, 1}, {1, 1}}; + final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); boundsPane.add(panel); return boundsPane; } - public JPanel setValidatePane(){ + public JPanel setValidatePane() { return regPane; } - protected RegFieldPane createRegPane() { - return new RegFieldPane(); + RegPaneProvider provider = ExtraDesignClassManager.getInstance().getSingle(RegPaneProvider.XML_TAG); + if (provider == null) { + return new RegFieldPane(); + } + + try { + return provider.createRegPane(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + return new RegFieldPane(); + } } @Override @@ -102,7 +115,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane @Override protected TextEditor updateSubFieldEditorBean() { - TextEditor ob = (TextEditor)creator.toData(); + TextEditor ob = (TextEditor) creator.toData(); this.regPane.update(ob); ob.setWaterMark(waterMarkDictPane.getText()); formWidgetValuePane.update(ob); diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/FieldEditorDefinePane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/FieldEditorDefinePane.java index 9c20dfb65..07faec922 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/FieldEditorDefinePane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/FieldEditorDefinePane.java @@ -1,19 +1,21 @@ package com.fr.design.widget.ui; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.beans.ErrorMsgTextFieldAdapter; +import com.fr.design.beans.UITextFieldAdapter; import com.fr.design.constants.LayoutConstants; import com.fr.design.designer.IntervalConstants; import com.fr.design.foldablepane.UIExpandablePane; +import com.fr.design.fun.TextFieldAdapterProvider; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.FieldEditor; +import com.fr.log.FineLoggerFactory; import javax.swing.BorderFactory; import javax.swing.JPanel; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.ItemEvent; @@ -22,7 +24,7 @@ import java.awt.event.ItemListener; public abstract class FieldEditorDefinePane extends AbstractDataModify { protected UICheckBox allowBlankCheckBox; // richer:错误信息,是所有控件共有的属性,所以放到这里来 - protected UITextField errorMsgTextField; + protected ErrorMsgTextFieldAdapter errorMsgTextField; protected JPanel validatePane; public FieldEditorDefinePane() { @@ -45,23 +47,17 @@ public abstract class FieldEditorDefinePane extends Abstr protected void initErrorMsgPane() { // 错误信息 - errorMsgTextField = new UITextField(); -// // richer:主要为了方便查看比较长的错误信息 - errorMsgTextField.getDocument().addDocumentListener(new DocumentListener() { - - public void changedUpdate(DocumentEvent e) { - errorMsgTextField.setToolTipText(errorMsgTextField.getText()); - } - - public void insertUpdate(DocumentEvent e) { - errorMsgTextField.setToolTipText(errorMsgTextField.getText()); - } - - public void removeUpdate(DocumentEvent e) { - errorMsgTextField.setToolTipText(errorMsgTextField.getText()); - } - }); - + TextFieldAdapterProvider provider = ExtraDesignClassManager.getInstance().getSingle(TextFieldAdapterProvider.XML_TAG); + if (provider == null) { + errorMsgTextField = new UITextFieldAdapter(); + return; + } + try { + errorMsgTextField = provider.createTextFieldAdapter(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + errorMsgTextField = new UITextFieldAdapter(); + } } @Override @@ -101,7 +97,7 @@ public abstract class FieldEditorDefinePane extends Abstr allowBlankCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Allow_Null")); allowBlankCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - final JPanel errorTipPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{uiLabel, errorMsgTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); + final JPanel errorTipPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{uiLabel, errorMsgTextField.getErrorMsgTextField()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); errorTipPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0)); borderPane.add(errorTipPane, BorderLayout.CENTER); allowBlankCheckBox.addItemListener(new ItemListener() { @@ -117,7 +113,7 @@ public abstract class FieldEditorDefinePane extends Abstr new Component[]{allowBlankCheckBox}, new Component[]{borderPane}, }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,TableLayoutHelper.FILL_LASTCOLUMN, 5, 5); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, TableLayoutHelper.FILL_LASTCOLUMN, 5, 5); panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, IntervalConstants.INTERVAL_L6, 0)); validatePane.add(panel, BorderLayout.NORTH); diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/TextFieldEditorDefinePane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/TextFieldEditorDefinePane.java index d74d31c50..72e93e28c 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/TextFieldEditorDefinePane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/TextFieldEditorDefinePane.java @@ -1,14 +1,16 @@ package com.fr.design.widget.ui; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.fun.RegPaneProvider; import com.fr.design.gui.frpane.RegFieldPane; import com.fr.design.gui.frpane.RegPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.form.ui.TextEditor; - +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import java.awt.BorderLayout; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -60,7 +62,17 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane protected RegFieldPane createRegPane() { - return new RegFieldPane(); + RegPaneProvider provider = ExtraDesignClassManager.getInstance().getSingle(RegPaneProvider.XML_TAG); + if (provider == null) { + return new RegFieldPane(); + } + + try { + return provider.createRegPane(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + return new RegFieldPane(); + } } @Override From db98d5412d61f470b92be970311ad6c14439a6fc Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 13 Oct 2021 14:48:36 +0800 Subject: [PATCH 02/51] =?UTF-8?q?REPORT-58193=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=9F=8B=E7=82=B9=E5=89=A5=E7=A6=BB=E4=BA=8C=E6=9C=9F-?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=A4=8D=E7=94=A8=E5=9F=8B=E7=82=B9-marketCl?= =?UTF-8?q?ick=E8=A7=A6=E5=8F=91=E6=9D=A1=E4=BB=B6=E6=9C=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/FormWidgetDetailPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java index d792f0eca..7b3d4d239 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/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()); From fde1a587e2248dab3d19a5275e0b65d9302ae7d1 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 14 Oct 2021 16:06:44 +0800 Subject: [PATCH 03/51] =?UTF-8?q?REPORT-60561=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94-=E6=A0=B7=E5=BC=8F=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/report/fit/BaseFitAttrPane.java | 37 ++++++++++++------- .../java/com/fr/design/mainframe/JForm.java | 2 +- .../fr/design/webattr/ServerFitAttrPane.java | 13 ++++++- 3 files changed, 36 insertions(+), 16 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java b/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java index 31ea6417b..31afb3347 100644 --- a/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java +++ b/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 { protected JPanel contentJPanel; + protected UILabel belowSetLabel; protected UIComboBox itemChoose; protected java.util.List fitAttrModelList = new ArrayList<>(); @@ -97,7 +97,7 @@ public abstract class BaseFitAttrPane extends BasicBeanPane { } 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 { 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 { 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 { } + protected void initPrompt() { + } + protected void refresh() { validate(); repaint(); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 0bee88e90..6d7bf83ae 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -576,7 +576,7 @@ public class JForm extends JTemplate implements BaseJForm Date: Mon, 18 Oct 2021 10:34:06 +0800 Subject: [PATCH 04/51] =?UTF-8?q?REPORT-60752=20=E3=80=9010.0=E3=80=91tab?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=BE=E7=BD=AE=E6=A0=B7=E5=BC=8F=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E4=BB=8E=E9=BB=98=E8=AE=A4=E5=88=87=E6=8D=A2=E5=88=B0?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=90=8E=E4=B8=8D=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=AA=97=E5=8F=A3=EF=BC=8C=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=90=8E=EF=BC=8C=E9=80=89=E9=A1=B9=E4=BC=9A?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=87=AA=E5=AE=9A=E4=B9=89=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E8=BF=98=E6=98=AF=E9=BB=98=E8=AE=A4=E6=89=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/accessibles/AbstractTemplateStylePane.java | 4 ++++ .../widget/accessibles/AccessibleTemplateStyleEditor.java | 5 +++++ .../widget/accessibles/MobileTemplateStylePane.java | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java index 482b2cebc..399047a85 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java @@ -7,4 +7,8 @@ public abstract class AbstractTemplateStylePane extends BasicPane { public abstract void populate(T ob); public abstract T update(); + + public AbstractTemplateStylePane generateCleanPane() { + return this; + } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java index 195a92e8a..4f863e28b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java +++ b/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); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java index 38f70de81..55c543b8f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java @@ -44,12 +44,14 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane> 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 generateCleanPane() { + return new MobileTemplateStylePane(this.tagLayout); + } } From 3cefa616a2b21d5115cbc54ffb5c604936ae6f89 Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 18 Oct 2021 10:56:02 +0800 Subject: [PATCH 05/51] =?UTF-8?q?CHART-21219=20=E7=89=B9=E6=AE=8A=E5=BD=A2?= =?UTF-8?q?=E7=8A=B6=E6=9F=B1=E5=BD=A2=E5=9B=BE=E8=A7=A6=E5=8F=91=E4=BF=9D?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/VanChartHtmlLabelPane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java index 0e9cc416f..ebff936c1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java +++ b/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(); } From b3e55a4fdd64f60a5bb7553d9b30fe1ff7452dc5 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Mon, 18 Oct 2021 15:47:41 +0800 Subject: [PATCH 06/51] =?UTF-8?q?REPORT-59814=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=9F=8B=E7=82=B9=20groupingDetail=20=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=A6=82=E7=8E=87=E6=98=AF=E7=A9=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/collect/ComponentCollector.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java index 3ea805deb..2c24cdf57 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java @@ -288,12 +288,17 @@ public class ComponentCollector implements XMLable { private JSONArray getGroupingDetail() { JSONArray ja = JSONFactory.createJSON(JSON.ARRAY); - Group[] groups = DefaultShareGroupManager.getInstance().getAllGroup(); - for(Group group : groups) { - JSONObject jo = JSONFactory.createJSON(JSON.OBJECT); - jo.put(GROUP_NAME, group.getGroupName()); - jo.put(CONTAIN_AMOUNT, group.getAllBindInfoList().length); - ja.add(jo); + try { + DefaultShareGroupManager.getInstance().refresh(); + Group[] groups = DefaultShareGroupManager.getInstance().getAllGroup(); + for(Group group : groups) { + JSONObject jo = JSONFactory.createJSON(JSON.OBJECT); + jo.put(GROUP_NAME, group.getGroupName()); + jo.put(CONTAIN_AMOUNT, group.getAllBindInfoList().length); + ja.add(jo); + } + } catch (Exception e) { + e.printStackTrace(); } return ja; } From bd4d66f66cb73fe01206c9916ae902672a027756 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Tue, 19 Oct 2021 09:44:08 +0800 Subject: [PATCH 07/51] =?UTF-8?q?REPORT-59814=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/share/collect/ComponentCollector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java index 2c24cdf57..47b7dc7ef 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java @@ -298,7 +298,7 @@ public class ComponentCollector implements XMLable { ja.add(jo); } } catch (Exception e) { - e.printStackTrace(); + FineLoggerFactory.getLogger().error(e.getMessage()); } return ja; } From 051cf462140f5abb1deeaae5786bd5e2294c6428 Mon Sep 17 00:00:00 2001 From: xiqiu Date: Tue, 19 Oct 2021 14:26:40 +0800 Subject: [PATCH 08/51] =?UTF-8?q?BI-95654=20=20=20=E6=8B=B7=E8=B4=9D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=E6=97=B6=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E4=BA=86identity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapane/connect/ConnectionListPane.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index 1e3f96a98..daa408ab6 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/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()); + } + } + } } From 689adf8a38ee1f4dfc49bd4ac73a4e471098c8cd Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 19 Oct 2021 19:13:14 +0800 Subject: [PATCH 09/51] =?UTF-8?q?REPORT-60661=20=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96url=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/help/AboutPane.java | 3 +- .../design/actions/help/TutorialAction.java | 3 +- .../data/datapane/connect/JDBCDefPane.java | 4 +- .../com/fr/design/i18n/UrlI18nManager.java | 97 +++++++++++++++++++ .../mainframe/check/CheckFontInfoDialog.java | 4 +- .../src/main/java/com/fr/env/HelpLink.java | 4 +- .../com/fr/design/i18n/url_en.properties | 7 ++ .../com/fr/design/i18n/url_ja_JP.properties | 7 ++ .../com/fr/design/i18n/url_ko_KR.properties | 1 + .../com/fr/design/i18n/url_zh.properties | 7 ++ .../com/fr/design/i18n/url_zh_TW.properties | 7 ++ .../gui/xpane/BorderLineAndImagePane.java | 3 +- .../designer/mobile/ParaMobileDefinePane.java | 3 +- 13 files changed, 142 insertions(+), 8 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/i18n/UrlI18nManager.java create mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_en.properties create mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_ja_JP.properties create mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_ko_KR.properties create mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_zh.properties create mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_zh_TW.properties diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java index 615854088..b369911bf 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java @@ -9,6 +9,7 @@ import com.fr.design.DesignerEnvManager; import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.UrlI18nManager; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; @@ -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); diff --git a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java index f1094d331..bf7dd942d 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java @@ -1,6 +1,7 @@ package com.fr.design.actions.help; import com.fr.design.i18n.Toolkit; +import com.fr.design.i18n.UrlI18nManager; import com.fr.design.login.AbstractDesignerSSO; import com.fr.design.menu.MenuKeySet; import com.fr.general.CloudCenter; @@ -28,7 +29,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() { diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 0da46965b..6f8e737ae 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -10,6 +10,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.i18n.Toolkit; +import com.fr.design.i18n.UrlI18nManager; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -159,7 +160,8 @@ 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 = CloudCenter.getInstance().acquireUrlByKind("odbc.help"); + String url = UrlI18nManager.getInstance().getI18nUrl("odbc.help"); BrowseUtils.browser(url); } }); diff --git a/designer-base/src/main/java/com/fr/design/i18n/UrlI18nManager.java b/designer-base/src/main/java/com/fr/design/i18n/UrlI18nManager.java new file mode 100644 index 000000000..aa498213e --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/i18n/UrlI18nManager.java @@ -0,0 +1,97 @@ +package com.fr.design.i18n; + +import com.fr.general.CloudCenter; +import com.fr.general.GeneralContext; +import com.fr.locale.LocaleBundle; +import com.fr.locale.LocaleFiles; +import com.fr.locale.LocaleManager; +import com.fr.locale.impl.FineLocaleManager; +import com.fr.stable.ProductConstants; +import com.fr.stable.StringUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + + +public class UrlI18nManager { + private static final String I18N_URL_PATH = "com/fr/design/i18n/url"; + + private static UrlI18nManager instance = new UrlI18nManager(); + + public static UrlI18nManager getInstance() { + return instance; + } + + private LocaleManager localeManager = FineLocaleManager.create(); + + private UrlI18nManager() { + localeManager.addResource(I18N_URL_PATH); + } + + public String getI18nUrl(String key) { + String i18NUrl = getI18nUrlFromCloudCenter(key); + if (StringUtils.isBlank(i18NUrl)) { + i18NUrl = getI18nUrlFromLocal(key); + } + return i18NUrl; + } + + private String getI18nUrlFromCloudCenter(String key) { + List availableKeys = getCloudCenterAvailableKeys(key); + for (String availableKey : availableKeys) { + String i18NUrl = CloudCenter.getInstance().acquireConf(availableKey); + if (!StringUtils.isBlank(i18NUrl)) { + return i18NUrl; + } + } + return StringUtils.EMPTY; + } + + private List getCloudCenterAvailableKeys(String key) { + List availableKeys = new ArrayList<>(); + availableKeys.add(key + "." + GeneralContext.getLocale() + "." + ProductConstants.MAIN_VERSION); + availableKeys.add(key + "." + Locale.ENGLISH + "." + ProductConstants.MAIN_VERSION); + availableKeys.add(key + "." + Locale.CHINA + "." + ProductConstants.MAIN_VERSION); + availableKeys.add(key + "." + GeneralContext.getLocale()); + availableKeys.add(key + "." + Locale.ENGLISH); + availableKeys.add(key + "." + Locale.CHINA); + availableKeys.add(key + "." + ProductConstants.MAIN_VERSION); + availableKeys.add(key); + return availableKeys; + } + + private String getI18nUrlFromLocal(String key) { + List availableLocales = getAvailableLocales(); + LocaleBundle localeBundle = null; + for (Locale availableLocale : availableLocales) { + localeBundle = localeManager.getLocalBundle(availableLocale); + if (isExist(localeBundle, localeManager, key)) { + break; + } + } + if (localeBundle != null) { + return localeBundle.getText(localeManager, key); + } else { + return StringUtils.EMPTY; + } + } + + private List getAvailableLocales() { + List availableLocales = new ArrayList<>(); + availableLocales.add(GeneralContext.getLocale()); + availableLocales.add(Locale.ENGLISH); + availableLocales.add(Locale.CHINA); + return availableLocales; + } + + private boolean isExist(LocaleBundle localeBundle, LocaleManager localeManager, String key) { + List filesList = localeManager.getReverseList(); + for (LocaleFiles files : filesList) { + if (files.contains(localeBundle.getLocale(), key)) { + return true; + } + } + return false; + } +} diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java index 0671ed1b6..86021733d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java @@ -5,6 +5,7 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.Toolkit; +import com.fr.design.i18n.UrlI18nManager; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.CloudCenter; @@ -49,7 +50,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); diff --git a/designer-base/src/main/java/com/fr/env/HelpLink.java b/designer-base/src/main/java/com/fr/env/HelpLink.java index c717ce6ea..b0d5eab32 100644 --- a/designer-base/src/main/java/com/fr/env/HelpLink.java +++ b/designer-base/src/main/java/com/fr/env/HelpLink.java @@ -1,5 +1,6 @@ package com.fr.env; +import com.fr.design.i18n.UrlI18nManager; import com.fr.general.locale.LocaleCenter; import com.fr.general.locale.LocaleMark; import com.fr.locale.InterProviderFactory; @@ -18,8 +19,7 @@ public class HelpLink { public static String getLink(String solution) { Map map = new HashMap<>(); - LocaleMark 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); diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_en.properties new file mode 100644 index 000000000..7f4fafc35 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/i18n/url_en.properties @@ -0,0 +1,7 @@ +help=https://help.fanruan.com/finereport-en/ +help.remote.design=https://help.fanruan.com/finereport-en/doc-view-3862.html?source=4 +odbc.help=https://help.fanruan.com/finereport-en/doc-view-289.html +plugin.mobile.style=https://help.fanruan.com/finereport-en/doc-view-2656.html +help.install.font=https://help.fanruan.com/finereport-en/doc-view-3875.html +website=https://www.finereport.com/en/ +nine.point.help=https://help.fanruan.com/finereport-en/doc-view-3876.html \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_ja_JP.properties new file mode 100644 index 000000000..6d0a960fa --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/i18n/url_ja_JP.properties @@ -0,0 +1,7 @@ +help=https://help.fanruan.com/finereport-jp/ +help.remote.design=https://help.fanruan.com/finereport-jp/doc-view-3891.html +odbc.help=https://help.fanruan.com/finereport-jp/doc-view-289.html +plugin.mobile.style=https://help.fanruan.com/finereport-jp/doc-view-2656.html +help.install.font=https://help.fanruan.com/finereport-jp/doc-view-3892.html +website=https://www.finereport.com/jp/ +nine.point.help=https://help.fanruan.com/finereport-jp/doc-view-3896.html \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_ko_KR.properties new file mode 100644 index 000000000..407896231 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/i18n/url_ko_KR.properties @@ -0,0 +1 @@ +website=https://www.finereport.com/kr/ \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_zh.properties new file mode 100644 index 000000000..ef25a7bf8 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/i18n/url_zh.properties @@ -0,0 +1,7 @@ +help=https://help.fanruan.com/finereport/ +help.remote.design=https://help.fanruan.com/finereport/doc-view-3925.html +odbc.help=https://help.fanruan.com/finereport/doc-view-289.html +plugin.mobile.style=https://help.fanruan.com/finereport/doc-view-2656.html +help.install.font=https://help.fanruan.com/finereport/doc-view-3999.html +website=https://www.finereport.com/ +nine.point.help=https://help.fanruan.com/finereport/doc-view-4135.html \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_zh_TW.properties new file mode 100644 index 000000000..1a207e9f3 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/i18n/url_zh_TW.properties @@ -0,0 +1,7 @@ +help=https://help.fanruan.com/finereport-tw/ +help.remote.design=https://help.fanruan.com/finereport/doc-view-3925.html +odbc.help=https://help.fanruan.com/finereport/doc-view-289.html +plugin.mobile.style=https://help.fanruan.com/finereport/doc-view-2656.html +help.install.font=https://help.fanruan.com/finereport/doc-view-3999.html +website=https://www.finereport.com/tw/ +nine.point.help=https://help.fanruan.com/finereport-tw/doc-view-4519.html \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java index 0f2b853d1..3d2e86c59 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java @@ -20,6 +20,7 @@ import com.fr.design.gui.ibutton.UIButtonUI; import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.UrlI18nManager; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -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(); } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java index 906fa6e55..759a05ba7 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java @@ -9,6 +9,7 @@ import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.fun.ParameterExpandablePaneUIProvider; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.UrlI18nManager; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -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); } From 4da049f96bc2d7ab40137c405024d21bcb97582a Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 19 Oct 2021 20:05:41 +0800 Subject: [PATCH 10/51] =?UTF-8?q?REPORT-60661=20=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96url=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/help/AboutPane.java | 2 +- .../design/actions/help/TutorialAction.java | 3 +- .../data/datapane/connect/JDBCDefPane.java | 3 +- .../com/fr/design/i18n/UrlI18nManager.java | 97 ------------------- .../mainframe/check/CheckFontInfoDialog.java | 3 +- .../src/main/java/com/fr/env/HelpLink.java | 5 +- .../com/fr/design/i18n/url_en.properties | 7 -- .../com/fr/design/i18n/url_ja_JP.properties | 7 -- .../com/fr/design/i18n/url_ko_KR.properties | 1 - .../com/fr/design/i18n/url_zh.properties | 7 -- .../com/fr/design/i18n/url_zh_TW.properties | 7 -- .../gui/xpane/BorderLineAndImagePane.java | 2 +- .../designer/mobile/ParaMobileDefinePane.java | 2 +- 13 files changed, 8 insertions(+), 138 deletions(-) delete mode 100644 designer-base/src/main/java/com/fr/design/i18n/UrlI18nManager.java delete mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_en.properties delete mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_ja_JP.properties delete mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_ko_KR.properties delete mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_zh.properties delete mode 100644 designer-base/src/main/resources/com/fr/design/i18n/url_zh_TW.properties diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java index b369911bf..eaff26ba5 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java @@ -9,12 +9,12 @@ import com.fr.design.DesignerEnvManager; import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.i18n.UrlI18nManager; import com.fr.design.layout.FRGUIPaneFactory; 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; diff --git a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java index bf7dd942d..4f06b1c56 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java @@ -1,12 +1,11 @@ package com.fr.design.actions.help; import com.fr.design.i18n.Toolkit; -import com.fr.design.i18n.UrlI18nManager; 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; diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 6f8e737ae..a5b8fc347 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -10,15 +10,14 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.i18n.Toolkit; -import com.fr.design.i18n.UrlI18nManager; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; 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; diff --git a/designer-base/src/main/java/com/fr/design/i18n/UrlI18nManager.java b/designer-base/src/main/java/com/fr/design/i18n/UrlI18nManager.java deleted file mode 100644 index aa498213e..000000000 --- a/designer-base/src/main/java/com/fr/design/i18n/UrlI18nManager.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.fr.design.i18n; - -import com.fr.general.CloudCenter; -import com.fr.general.GeneralContext; -import com.fr.locale.LocaleBundle; -import com.fr.locale.LocaleFiles; -import com.fr.locale.LocaleManager; -import com.fr.locale.impl.FineLocaleManager; -import com.fr.stable.ProductConstants; -import com.fr.stable.StringUtils; - -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - - -public class UrlI18nManager { - private static final String I18N_URL_PATH = "com/fr/design/i18n/url"; - - private static UrlI18nManager instance = new UrlI18nManager(); - - public static UrlI18nManager getInstance() { - return instance; - } - - private LocaleManager localeManager = FineLocaleManager.create(); - - private UrlI18nManager() { - localeManager.addResource(I18N_URL_PATH); - } - - public String getI18nUrl(String key) { - String i18NUrl = getI18nUrlFromCloudCenter(key); - if (StringUtils.isBlank(i18NUrl)) { - i18NUrl = getI18nUrlFromLocal(key); - } - return i18NUrl; - } - - private String getI18nUrlFromCloudCenter(String key) { - List availableKeys = getCloudCenterAvailableKeys(key); - for (String availableKey : availableKeys) { - String i18NUrl = CloudCenter.getInstance().acquireConf(availableKey); - if (!StringUtils.isBlank(i18NUrl)) { - return i18NUrl; - } - } - return StringUtils.EMPTY; - } - - private List getCloudCenterAvailableKeys(String key) { - List availableKeys = new ArrayList<>(); - availableKeys.add(key + "." + GeneralContext.getLocale() + "." + ProductConstants.MAIN_VERSION); - availableKeys.add(key + "." + Locale.ENGLISH + "." + ProductConstants.MAIN_VERSION); - availableKeys.add(key + "." + Locale.CHINA + "." + ProductConstants.MAIN_VERSION); - availableKeys.add(key + "." + GeneralContext.getLocale()); - availableKeys.add(key + "." + Locale.ENGLISH); - availableKeys.add(key + "." + Locale.CHINA); - availableKeys.add(key + "." + ProductConstants.MAIN_VERSION); - availableKeys.add(key); - return availableKeys; - } - - private String getI18nUrlFromLocal(String key) { - List availableLocales = getAvailableLocales(); - LocaleBundle localeBundle = null; - for (Locale availableLocale : availableLocales) { - localeBundle = localeManager.getLocalBundle(availableLocale); - if (isExist(localeBundle, localeManager, key)) { - break; - } - } - if (localeBundle != null) { - return localeBundle.getText(localeManager, key); - } else { - return StringUtils.EMPTY; - } - } - - private List getAvailableLocales() { - List availableLocales = new ArrayList<>(); - availableLocales.add(GeneralContext.getLocale()); - availableLocales.add(Locale.ENGLISH); - availableLocales.add(Locale.CHINA); - return availableLocales; - } - - private boolean isExist(LocaleBundle localeBundle, LocaleManager localeManager, String key) { - List filesList = localeManager.getReverseList(); - for (LocaleFiles files : filesList) { - if (files.contains(localeBundle.getLocale(), key)) { - return true; - } - } - return false; - } -} diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java index 86021733d..a8c19c697 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java @@ -5,11 +5,10 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.Toolkit; -import com.fr.design.i18n.UrlI18nManager; 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; diff --git a/designer-base/src/main/java/com/fr/env/HelpLink.java b/designer-base/src/main/java/com/fr/env/HelpLink.java index b0d5eab32..133a23490 100644 --- a/designer-base/src/main/java/com/fr/env/HelpLink.java +++ b/designer-base/src/main/java/com/fr/env/HelpLink.java @@ -1,8 +1,7 @@ package com.fr.env; -import com.fr.design.i18n.UrlI18nManager; -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; diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_en.properties deleted file mode 100644 index 7f4fafc35..000000000 --- a/designer-base/src/main/resources/com/fr/design/i18n/url_en.properties +++ /dev/null @@ -1,7 +0,0 @@ -help=https://help.fanruan.com/finereport-en/ -help.remote.design=https://help.fanruan.com/finereport-en/doc-view-3862.html?source=4 -odbc.help=https://help.fanruan.com/finereport-en/doc-view-289.html -plugin.mobile.style=https://help.fanruan.com/finereport-en/doc-view-2656.html -help.install.font=https://help.fanruan.com/finereport-en/doc-view-3875.html -website=https://www.finereport.com/en/ -nine.point.help=https://help.fanruan.com/finereport-en/doc-view-3876.html \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_ja_JP.properties deleted file mode 100644 index 6d0a960fa..000000000 --- a/designer-base/src/main/resources/com/fr/design/i18n/url_ja_JP.properties +++ /dev/null @@ -1,7 +0,0 @@ -help=https://help.fanruan.com/finereport-jp/ -help.remote.design=https://help.fanruan.com/finereport-jp/doc-view-3891.html -odbc.help=https://help.fanruan.com/finereport-jp/doc-view-289.html -plugin.mobile.style=https://help.fanruan.com/finereport-jp/doc-view-2656.html -help.install.font=https://help.fanruan.com/finereport-jp/doc-view-3892.html -website=https://www.finereport.com/jp/ -nine.point.help=https://help.fanruan.com/finereport-jp/doc-view-3896.html \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_ko_KR.properties deleted file mode 100644 index 407896231..000000000 --- a/designer-base/src/main/resources/com/fr/design/i18n/url_ko_KR.properties +++ /dev/null @@ -1 +0,0 @@ -website=https://www.finereport.com/kr/ \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_zh.properties deleted file mode 100644 index ef25a7bf8..000000000 --- a/designer-base/src/main/resources/com/fr/design/i18n/url_zh.properties +++ /dev/null @@ -1,7 +0,0 @@ -help=https://help.fanruan.com/finereport/ -help.remote.design=https://help.fanruan.com/finereport/doc-view-3925.html -odbc.help=https://help.fanruan.com/finereport/doc-view-289.html -plugin.mobile.style=https://help.fanruan.com/finereport/doc-view-2656.html -help.install.font=https://help.fanruan.com/finereport/doc-view-3999.html -website=https://www.finereport.com/ -nine.point.help=https://help.fanruan.com/finereport/doc-view-4135.html \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/url_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/url_zh_TW.properties deleted file mode 100644 index 1a207e9f3..000000000 --- a/designer-base/src/main/resources/com/fr/design/i18n/url_zh_TW.properties +++ /dev/null @@ -1,7 +0,0 @@ -help=https://help.fanruan.com/finereport-tw/ -help.remote.design=https://help.fanruan.com/finereport/doc-view-3925.html -odbc.help=https://help.fanruan.com/finereport/doc-view-289.html -plugin.mobile.style=https://help.fanruan.com/finereport/doc-view-2656.html -help.install.font=https://help.fanruan.com/finereport/doc-view-3999.html -website=https://www.finereport.com/tw/ -nine.point.help=https://help.fanruan.com/finereport-tw/doc-view-4519.html \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java index 3d2e86c59..6e8cac0d8 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java @@ -20,7 +20,6 @@ import com.fr.design.gui.ibutton.UIButtonUI; import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.i18n.UrlI18nManager; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -32,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; diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java index 759a05ba7..be598f553 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java @@ -9,7 +9,6 @@ import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.fun.ParameterExpandablePaneUIProvider; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.i18n.UrlI18nManager; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -22,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; From a931c0d0525376546169595cc3dcf2f63a49e409 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 19 Oct 2021 20:07:50 +0800 Subject: [PATCH 11/51] =?UTF-8?q?REPORT-60661=20=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96url=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/data/datapane/connect/JDBCDefPane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index a5b8fc347..1f9b90dbb 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -159,7 +159,6 @@ 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); } From 47b00511334c3c1e35d2267eada86623a72314de Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 21 Oct 2021 15:30:26 +0800 Subject: [PATCH 12/51] =?UTF-8?q?REPORT-61356=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=90=AF=E5=8A=A8=E5=8A=A0=E8=BD=BD=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=81=9C=E7=95=99=E7=9A=84=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8F=98=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/NorthRegionContainerPane.java | 79 ++++++++++++++----- 1 file changed, 61 insertions(+), 18 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java index b07071057..05198ba0e 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java @@ -17,6 +17,8 @@ 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.plugin.observer.PluginListenerRegistration; import com.fr.stable.os.support.OSBasedAction; import com.fr.stable.os.support.OSSupportCenter; @@ -38,6 +40,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 +79,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) { + PluginListenerRegistration.getInstance().stopListen(pluginOnRunOrStopListener); + } + }; + PluginEventListener pluginEventListener = new PluginEventListener() { @Override - public boolean accept(PluginContext context) { + public void on(PluginEvent event) { + existDesignExtraPlugin = true; + } + }; + GeneralContext.listenPluginRunningChanged(pluginEventListener, pluginFilter); + PluginListenerRegistration.getInstance().listen(PluginEventType.AfterAllActive, afterAllPluginsActiveListener); + PluginListenerRegistration.getInstance().listen(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) { From 793caec8900b40ee63f4c9c597273d2c3b050090 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 21 Oct 2021 15:51:30 +0800 Subject: [PATCH 13/51] =?UTF-8?q?REPORT-60253=20=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=A4=A7=E6=95=B0=E6=8D=AE=E9=9B=86=E5=AF=BC=E5=87=BA=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=90=8E=EF=BC=8C=E6=A8=A1=E6=9D=BF=E4=BB=8E=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=88=87=E6=8D=A2=E5=88=B0=E8=BF=9C=E7=A8=8B=EF=BC=8C?= =?UTF-8?q?=E5=86=8D=E5=88=87=E6=8D=A2=E5=88=B0=E6=9C=AC=E5=9C=B0=EF=BC=8C?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98=E6=A8=A1=E6=9D=BF=E4=BC=9A?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=20=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=EF=BC=8C=E6=9C=89npe=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 4 +++- .../main/java/com/fr/design/mainframe/JTemplateFactory.java | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index f2e3470a8..1ccc07303 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -381,7 +381,9 @@ public abstract class JTemplate> */ @Deprecated public void refreshResource() { - refreshResource(this.editingFILE); + if (JTemplateFactory.isAvailable()) { + refreshResource(this.editingFILE); + } } public void refreshResource(FILE file) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java index 5e75cc64b..9aa8204d6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java @@ -93,4 +93,7 @@ public final class JTemplateFactory { ALL_APP.remove(app); } } -} \ No newline at end of file + + public static boolean isAvailable() { + return !ALL_APP.isEmpty(); + }} \ No newline at end of file From c43a01c40c3b87a17c868aa157d4bfd112727566 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 21 Oct 2021 16:33:58 +0800 Subject: [PATCH 14/51] =?UTF-8?q?REPORT-61356=20=20fix=20=E7=BB=9F?= =?UTF-8?q?=E4=B8=80api=E4=BD=BF=E7=94=A8=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/NorthRegionContainerPane.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java index 05198ba0e..91899e5b5 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java @@ -18,7 +18,6 @@ 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.plugin.observer.PluginListenerRegistration; import com.fr.stable.os.support.OSBasedAction; import com.fr.stable.os.support.OSSupportCenter; @@ -110,7 +109,7 @@ public class NorthRegionContainerPane extends JPanel { PluginEventListener beforeAllPluginStopListener = new PluginEventListener() { @Override public void on(PluginEvent event) { - PluginListenerRegistration.getInstance().stopListen(pluginOnRunOrStopListener); + GeneralContext.stopListenPlugin(pluginOnRunOrStopListener); } }; PluginEventListener pluginEventListener = new PluginEventListener() { @@ -120,8 +119,8 @@ public class NorthRegionContainerPane extends JPanel { } }; GeneralContext.listenPluginRunningChanged(pluginEventListener, pluginFilter); - PluginListenerRegistration.getInstance().listen(PluginEventType.AfterAllActive, afterAllPluginsActiveListener); - PluginListenerRegistration.getInstance().listen(PluginEventType.BeforeAllStop, beforeAllPluginStopListener); + GeneralContext.listenPlugin(PluginEventType.AfterAllActive, afterAllPluginsActiveListener); + GeneralContext.listenPlugin(PluginEventType.BeforeAllStop, beforeAllPluginStopListener); } From 35e7d2d23f9e4ab3353a9836d71b9a2b8c360775 Mon Sep 17 00:00:00 2001 From: shine Date: Fri, 22 Oct 2021 11:34:39 +0800 Subject: [PATCH 15/51] =?UTF-8?q?CHART-21391=20fix:=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=20=E7=BB=84=E5=90=88=E5=9B=BE=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E5=88=B0=E8=87=AA=E5=AE=9A=E4=B9=89=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=9B=BE=20=E7=B1=BB=E5=9E=8B=E9=9D=A2=E6=9D=BF=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=87=BA=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/chart/ChartEditPane.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index 70b7130f1..6b75dff69 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/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; } From ba77f3016e1a04befe88a64bd8c42a7dbbdef960 Mon Sep 17 00:00:00 2001 From: shine Date: Fri, 22 Oct 2021 14:50:45 +0800 Subject: [PATCH 16/51] =?UTF-8?q?CHART-21357=20fix:=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=9D=90=E6=A0=87=E8=BD=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/config/DefaultStyleConstants.java | 89 +++++++++++++++++++ .../chart/config/DefaultStyleHelper4Van.java | 87 ++++++++++++++++++ .../VanChartCustomPlotSelectPane.java | 3 +- .../designer/style/axis/VanChartAxisPane.java | 7 +- .../VanChartAxisScrollPaneWithTypeSelect.java | 9 +- 5 files changed, 188 insertions(+), 7 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java new file mode 100644 index 000000000..e529fc1d6 --- /dev/null +++ b/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(); + } + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java new file mode 100644 index 000000000..b65e7eecb --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java @@ -0,0 +1,87 @@ +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.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.map.VanChartMapPlot; + +/** + * @author shine + * @version 10.0 + * Created by shine on 2021/10/22 + * vanchart的专门写一个,因为主体代码 新增y轴 组合图新增图表都要用 + */ +public class DefaultStyleHelper4Van { + + public static void dealVanPlot(Plot plot) { + 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); + } + + } + + public static VanChartAxis dealAxisDefault(VanChartAxis 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; + } + + 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; + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java index 8f7b9557d..b5a8a13f9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java +++ b/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 { CustomPlotType customPlotType = selectedPlotTypeList.get(i); if (!CustomPlotFactory.customPlotContains(newCustomPlotList, customPlotType)){ VanChartPlot vanChartPlot = CustomPlotFactory.getCustomPlot(customPlotType); + DefaultStyleHelper4Van.dealVanPlot(vanChartPlot); vanChartPlot.setCustomType(CustomStyle.CUSTOM.toString()); //设置公共属性 setCommonAttr(vanChartPlot, customPlot); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java index 5c71317f2..e8379e78b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java +++ b/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 { List 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 { List yAxisList = editingPlot.getYAxisList(); VanChartAxis axis = editingPlot.createYAxis(name, VanChartConstants.AXIS_LEFT); yAxisList.add(axis); + DefaultStyleHelper4Van.dealAxisDefault(axis); VanChartXYAxisPaneInterface axisPane = initYAxisPane(axis); axisPane.populate(axis); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java index ef042e0f2..daa7ca3c9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java +++ b/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)){ From 19bdeeacc366d9c8268ee9dff1ab80ddbd94b237 Mon Sep 17 00:00:00 2001 From: shine Date: Fri, 22 Oct 2021 15:24:06 +0800 Subject: [PATCH 17/51] =?UTF-8?q?CHART-21376=20fix:=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=BB=84=E5=90=88=E5=9B=BE=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=20=E9=BB=98=E8=AE=A4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/config/DefaultStyleHelper4Van.java | 91 ++++++++++++++++++- .../VanChartCustomPlotSelectPane.java | 2 +- 2 files changed, 91 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java index b65e7eecb..95eee394a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java +++ b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java @@ -7,11 +7,17 @@ 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 @@ -21,7 +27,39 @@ import com.fr.plugin.chart.map.VanChartMapPlot; */ public class DefaultStyleHelper4Van { - public static void dealVanPlot(Plot plot) { + public static void dealVanPlot4Custom(VanChartPlot plot, CustomPlotType customPlotType) { + 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 void dealVanPlotCommonAttr(Plot plot) { + if (!ChartEditContext.duchampMode()) { + return; + } if (plot instanceof VanChartPlot) { VanChartPlot vanChartPlot = (VanChartPlot) plot; @@ -60,6 +98,9 @@ public class DefaultStyleHelper4Van { } 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); @@ -84,4 +125,52 @@ public class DefaultStyleHelper4Van { } 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; + } + + } + } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java index b5a8a13f9..99498c58a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java @@ -260,7 +260,7 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane { CustomPlotType customPlotType = selectedPlotTypeList.get(i); if (!CustomPlotFactory.customPlotContains(newCustomPlotList, customPlotType)){ VanChartPlot vanChartPlot = CustomPlotFactory.getCustomPlot(customPlotType); - DefaultStyleHelper4Van.dealVanPlot(vanChartPlot); + DefaultStyleHelper4Van.dealVanPlot4Custom(vanChartPlot, customPlotType); vanChartPlot.setCustomType(CustomStyle.CUSTOM.toString()); //设置公共属性 setCommonAttr(vanChartPlot, customPlot); From 283fddcfb24cc7d36c6733bf3a80a2b2bd9844b2 Mon Sep 17 00:00:00 2001 From: shine Date: Fri, 22 Oct 2021 17:02:47 +0800 Subject: [PATCH 18/51] for duchamp mode --- .../chart/config/DefaultStyleHelper4Van.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java index 95eee394a..5f7e318a7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java +++ b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java @@ -23,11 +23,14 @@ import com.fr.plugin.chart.type.GaugeStyle; * @author shine * @version 10.0 * Created by shine on 2021/10/22 - * vanchart的专门写一个,因为主体代码 新增y轴 组合图新增图表都要用 + * vanchart的抽出来,因为主体代码 新增y轴 组合图新增图表都要用 */ public class DefaultStyleHelper4Van { public static void dealVanPlot4Custom(VanChartPlot plot, CustomPlotType customPlotType) { + if (!ChartEditContext.duchampMode()) { + return; + } dealVanPlotCommonAttr(plot); switch (customPlotType) { case PIE: @@ -55,8 +58,18 @@ public class DefaultStyleHelper4Van { } + 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; + } - public static void dealVanPlotCommonAttr(Plot plot) { + static void dealVanPlotCommonAttr(Plot plot) { if (!ChartEditContext.duchampMode()) { return; } @@ -97,17 +110,6 @@ public class DefaultStyleHelper4Van { } - 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; - } - private static void dealBorder(VanChartPlot vanChartPlot) { ConditionAttr defaultAttr = vanChartPlot.getConditionCollection().getDefaultAttr(); AttrBorder attrBorder = defaultAttr.getExisted(AttrBorder.class); From 7651eb4a229ae0a2d47abaa61e21e5fc332e0946 Mon Sep 17 00:00:00 2001 From: vito Date: Mon, 25 Oct 2021 10:34:17 +0800 Subject: [PATCH 19/51] =?UTF-8?q?REPORT-55377=20=E5=8D=87=E7=BA=A7=20tomca?= =?UTF-8?q?t=20=E7=89=88=E6=9C=AC=E4=BF=AE=E5=A4=8D=E5=85=AC=E5=BC=80?= =?UTF-8?q?=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index da6b0daf8..bf1616759 100644 --- a/build.gradle +++ b/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 From 3c7aed8fc59b62cd0a40539af9ae7470173e40f9 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 25 Oct 2021 14:21:34 +0800 Subject: [PATCH 20/51] =?UTF-8?q?REPORT-60356=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A811.0=E9=80=82=E9=85=8D-10.0=E6=89=93=E4=B8=8D=E5=BC=80?= =?UTF-8?q?11.0=E6=8F=90=E7=A4=BA=E5=BC=B9=E7=AA=97=E5=92=8C=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E5=BC=B9=E7=AA=97=EF=BC=88=E6=8F=90=E7=A4=BA=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=A0=B7=E5=BC=8F=E5=B7=B2=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=EF=BC=89=E5=90=8C=E6=97=B6=E6=89=93=E5=BC=80=E4=BA=86=EF=BC=8C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=AE=BE=E7=BD=AE=E5=BC=B9=E7=AA=97=E4=BC=98?= =?UTF-8?q?=E5=85=88=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/app/CptApp.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java index 431b401fc..876270c87 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java +++ b/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")); From 0a6bbd3517217a5ff09258084ff2fd1bfa95acc0 Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 26 Oct 2021 13:53:09 +0800 Subject: [PATCH 21/51] =?UTF-8?q?CHART-21418=20fix:=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=BC=B9=E6=A1=86=20=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=98=AF=E4=BB=8EdisplayComponent=E4=B8=8A=E9=9D=A2=E7=A6=BB?= =?UTF-8?q?=E5=BC=80=E7=9A=84=EF=BC=8C=E9=9A=90=E8=97=8F=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/style/AbstractSelectBox.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java index 1d66094f1..7ebaa9d9d 100644 --- a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java +++ b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java @@ -6,7 +6,11 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Insets; +import java.awt.Rectangle; import java.awt.RenderingHints; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; @@ -94,6 +98,18 @@ public abstract class AbstractSelectBox extends AbstractPopBox implements Mou hidePopupMenu(); } }); + + displayComponent.addMouseListener(new MouseAdapter() { + @Override + public void mouseExited(MouseEvent e) { + Rectangle rectangle = displayComponent.getBounds(); + if (e.getY() < rectangle.y) { + //如果是从displayComponent上面离开的,隐藏弹出界面。 + hidePopupMenu(); + } + + } + }); } public void setEnabled(boolean enabled) { From 0dfea644723e97c69c6f9e35daedba21f757dece Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 26 Oct 2021 14:54:17 +0800 Subject: [PATCH 22/51] =?UTF-8?q?REPORT-61471=20=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96url=E9=80=82=E9=85=8D-=E9=9F=A9=E6=96=87url-=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1=E5=B8=B8=E8=A7=81=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E7=9A=84=E5=BC=B9=E7=AA=97=E6=98=BE=E7=A4=BA=E5=92=8C=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=9C=B0=E5=9D=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java b/designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java index b9854c6bc..24ff7e10c 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/UIDetailErrorLinkDialog.java +++ b/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); From 56df61ca0a6abf5bfe38522b7bbfbe9355008b0a Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 27 Oct 2021 12:59:53 +0800 Subject: [PATCH 23/51] =?UTF-8?q?REPORT-50016=20=E5=A1=AB=E6=8A=A5?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE-=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=95=E5=85=83=E6=A0=BC=E7=BB=84-?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=87=8D=E5=A4=8D=E5=8D=95=E5=85=83=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../write/submit/SmartInsertDBManipulationPane.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java index 7b7867372..3818f1ac8 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java +++ b/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); + } } } } From 0210104f7ca9b774b38889992f200af6cdf8b5f1 Mon Sep 17 00:00:00 2001 From: shine Date: Wed, 27 Oct 2021 15:12:16 +0800 Subject: [PATCH 24/51] =?UTF-8?q?CHART-20951=20fix:=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=AD=E7=9A=84=E5=9B=BE=E8=A1=A8=20?= =?UTF-8?q?=E8=AD=A6=E6=88=92=E7=BA=BF=E6=96=87=E5=AD=97=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/van/chart/config/DefaultStyleConstants.java | 2 ++ .../com/fr/van/chart/config/DefaultStyleHelper4Van.java | 8 ++++++++ .../designer/style/background/ChartNameObjectCreator.java | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java index e529fc1d6..6d0de41ce 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java +++ b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java @@ -26,6 +26,8 @@ public class DefaultStyleConstants { static final Color AXIS_LINE = new Color(46, 75, 102); static final Color GRID_LINE = new Color(30, 55, 78); + static final FRFont ALERT_FONT = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.PLAIN, 9, new Color(255, 0, 0)); + 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); diff --git a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java index 5f7e318a7..d6fc30bd5 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java +++ b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java @@ -9,6 +9,7 @@ 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.VanChartAlertValue; import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; @@ -69,6 +70,13 @@ public class DefaultStyleHelper4Van { return axis; } + public static void dealAxisAlert(VanChartAlertValue vanChartAlertValue) { + if (!ChartEditContext.duchampMode()) { + return; + } + vanChartAlertValue.setAlertFont(DefaultStyleConstants.ALERT_FONT); + } + static void dealVanPlotCommonAttr(Plot plot) { if (!ChartEditContext.duchampMode()) { return; diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/ChartNameObjectCreator.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/ChartNameObjectCreator.java index 8a5a33ca8..4d8bbe990 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/ChartNameObjectCreator.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/ChartNameObjectCreator.java @@ -3,10 +3,11 @@ package com.fr.van.chart.designer.style.background; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.UnrepeatedNameHelper; -import com.fr.log.FineLoggerFactory; import com.fr.general.NameObject; +import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.attr.axis.VanChartAlertValue; import com.fr.stable.Nameable; +import com.fr.van.chart.config.DefaultStyleHelper4Van; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; @@ -37,6 +38,7 @@ public class ChartNameObjectCreator extends NameObjectCreator { VanChartAlertValue vanChartAlertValue = constructor.newInstance(); vanChartAlertValue.setAxisNamesArray((String[]) object); vanChartAlertValue.setAxisName(((String[]) object)[0]); + DefaultStyleHelper4Van.dealAxisAlert(vanChartAlertValue); return new NameObject(helper.createUnrepeatedName(this.menuName()), vanChartAlertValue); } catch (NoSuchMethodException e) { From 50533781060d763e223179dc75c829bfe5c0558a Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 27 Oct 2021 17:28:05 +0800 Subject: [PATCH 25/51] =?UTF-8?q?REPORT-61652=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94-=E6=A0=B7=E5=BC=8F=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E4=BC=98=E5=8C=96-=E6=9F=90=E4=B8=AA=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=9B=BD=E9=99=85=E5=8C=96=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/report/fit/BaseFitAttrPane.java | 5 +++-- .../fr/design/report/fit/menupane/ReportFitAttrAction.java | 5 +++-- .../resources/com/fr/design/i18n/dimension_en.properties | 6 +++++- .../resources/com/fr/design/i18n/dimension_ja_JP.properties | 6 +++++- .../resources/com/fr/design/i18n/dimension_ko_KR.properties | 6 +++++- .../resources/com/fr/design/i18n/dimension_zh.properties | 6 +++++- .../resources/com/fr/design/i18n/dimension_zh_TW.properties | 6 +++++- .../fr/design/actions/server/ServerConfigManagerAction.java | 3 ++- 8 files changed, 33 insertions(+), 10 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java b/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java index 31afb3347..1a3126182 100644 --- a/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java +++ b/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java @@ -5,6 +5,7 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.report.fit.menupane.FitPreviewPane; @@ -90,9 +91,9 @@ public abstract class BaseFitAttrPane extends BasicBeanPane { } for (int i = 0; i < columnSize.length; i++) { if (i == 0) { - columnSize[i] = 80; + columnSize[i] = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.report.fit.firstColumn").getWidth();; } else { - columnSize[i] = 100; + columnSize[i] = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.report.fit.column").getWidth();; } } diff --git a/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java b/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java index 36328d9bd..c1dd3afd6 100644 --- a/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java +++ b/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java @@ -4,6 +4,7 @@ import com.fr.design.actions.JTemplateAction; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.UIDialog; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; @@ -66,13 +67,13 @@ public class ReportFitAttrAction extends JTemplateAction { private void showReportFitDialog(ReportFitAttr fitAttr, final JTemplate jwb, final FitProvider wbTpl, final BasicBeanPane attrPane) { attrPane.populateBean(fitAttr); - UIDialog dialog = attrPane.showMediumWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { + UIDialog dialog = attrPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { @Override public void doOk() { wbTpl.setReportFitAttr(attrPane.updateBean()); jwb.fireTargetModified(); } - }); + }, DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.report.fit.templatePane.dialog")); dialog.setVisible(true); } diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties index b69ede5ea..686c3da8a 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties @@ -8,4 +8,8 @@ com.fr.design.version.check.dialog=490*95 com.fr.design.version.detail.label=750*30 com.fr.design.version.detail.dialog=900*500 com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*36 -com.fr.design.web.pane.text.field=450*20 \ No newline at end of file +com.fr.design.web.pane.text.field=450*20 +com.fr.design.actions.server.dialog=800*630 +com.fr.design.report.fit.templatePane.dialog=800*400 +com.fr.design.report.fit.firstColumn=120*20 +com.fr.design.report.fit.column=160*20 \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties index 7d09dee4d..5937b272a 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties @@ -7,4 +7,8 @@ com.fr.design.version.check.dialog=430*95 com.fr.design.version.detail.label=650*30 com.fr.design.version.detail.dialog=800*500 com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*36 -com.fr.design.web.pane.text.field=400*20 \ No newline at end of file +com.fr.design.web.pane.text.field=400*20 +com.fr.design.actions.server.dialog=700*630 +com.fr.design.report.fit.templatePane.dialog=600*400 +com.fr.design.report.fit.firstColumn=170*20 +com.fr.design.report.fit.column=100*20 \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties index 28823bf1a..5615b3555 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties @@ -7,4 +7,8 @@ com.fr.design.version.check.dialog=450*95 com.fr.design.version.detail.label=700*30 com.fr.design.version.detail.dialog=850*500 com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*36 -com.fr.design.web.pane.text.field=450*20 \ No newline at end of file +com.fr.design.web.pane.text.field=450*20 +com.fr.design.actions.server.dialog=700*630 +com.fr.design.report.fit.templatePane.dialog=600*400 +com.fr.design.report.fit.firstColumn=130*20 +com.fr.design.report.fit.column=100*20 \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties index 56998f7f7..c507fcc08 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties @@ -8,4 +8,8 @@ com.fr.design.version.check.dialog=230*95 com.fr.design.version.detail.label=450*30 com.fr.design.version.detail.dialog=600*500 com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*20 -com.fr.design.web.pane.text.field=450*20 \ No newline at end of file +com.fr.design.web.pane.text.field=450*20 +com.fr.design.actions.server.dialog=700*630 +com.fr.design.report.fit.templatePane.dialog=600*400 +com.fr.design.report.fit.firstColumn=80*20 +com.fr.design.report.fit.column=100*20 \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties index 58e6ae121..8a383a438 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties @@ -7,4 +7,8 @@ com.fr.design.version.check.dialog=230*95 com.fr.design.version.detail.label=450*30 com.fr.design.version.detail.dialog=600*500 com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*20 -com.fr.design.web.pane.text.field=450*20 \ No newline at end of file +com.fr.design.web.pane.text.field=450*20 +com.fr.design.actions.server.dialog=700*630 +com.fr.design.report.fit.templatePane.dialog=600*400 +com.fr.design.report.fit.firstColumn=80*20 +com.fr.design.report.fit.column=100*20 \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/actions/server/ServerConfigManagerAction.java b/designer-realize/src/main/java/com/fr/design/actions/server/ServerConfigManagerAction.java index 601605418..9b8c6744e 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/server/ServerConfigManagerAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/server/ServerConfigManagerAction.java @@ -9,6 +9,7 @@ import com.fr.config.ServerPreferenceConfig; import com.fr.design.actions.UpdateAction; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.mainframe.DesignerContext; import com.fr.design.menu.MenuKeySet; import com.fr.design.webattr.EditReportServerParameterPane; @@ -25,7 +26,7 @@ import java.awt.event.ActionEvent; * Server Config Manager */ public class ServerConfigManagerAction extends UpdateAction { - public static final Dimension DEFAULT = new Dimension(700, 630); + public static final Dimension DEFAULT = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.actions.server.dialog"); public ServerConfigManagerAction() { this.setMenuKeySet(SERVER_CONFIG_MANAGER); From fd87cb7b7e2f824067713f3f3205bc62ea33e7d3 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 27 Oct 2021 17:56:08 +0800 Subject: [PATCH 26/51] =?UTF-8?q?REPORT-61652=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94-=E6=A0=B7=E5=BC=8F=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E4=BC=98=E5=8C=96-=E6=9F=90=E4=B8=AA=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=9B=BD=E9=99=85=E5=8C=96=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/report/fit/BaseFitAttrPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java b/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java index 1a3126182..7a2e0e472 100644 --- a/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java +++ b/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java @@ -91,9 +91,9 @@ public abstract class BaseFitAttrPane extends BasicBeanPane { } for (int i = 0; i < columnSize.length; i++) { if (i == 0) { - columnSize[i] = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.report.fit.firstColumn").getWidth();; + columnSize[i] = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.report.fit.firstColumn").getWidth(); } else { - columnSize[i] = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.report.fit.column").getWidth();; + columnSize[i] = DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.report.fit.column").getWidth(); } } From c08b5b0213a60fbe15683f4516c56e0217f8bc92 Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 28 Oct 2021 14:08:35 +0800 Subject: [PATCH 27/51] update --- .../fr/design/style/AbstractSelectBox.java | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java index 7ebaa9d9d..41eeacdba 100644 --- a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java +++ b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java @@ -1,5 +1,19 @@ package com.fr.design.style; +import com.fr.design.constants.UIConstants; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIButtonUI; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.style.background.BackgroundJComponent; +import com.fr.design.utils.gui.GUIPaintUtils; +import com.fr.stable.Constants; + +import javax.swing.AbstractButton; +import javax.swing.JPanel; +import javax.swing.border.AbstractBorder; +import javax.swing.event.AncestorEvent; +import javax.swing.event.AncestorListener; +import javax.swing.plaf.ButtonUI; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; @@ -8,27 +22,10 @@ import java.awt.Graphics2D; import java.awt.Insets; import java.awt.Rectangle; import java.awt.RenderingHints; -import java.awt.event.FocusAdapter; -import java.awt.event.FocusEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; -import javax.swing.AbstractButton; -import javax.swing.JPanel; -import javax.swing.border.AbstractBorder; -import javax.swing.event.AncestorEvent; -import javax.swing.event.AncestorListener; -import javax.swing.plaf.ButtonUI; - -import com.fr.design.constants.UIConstants; -import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.gui.ibutton.UIButtonUI; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.utils.gui.GUIPaintUtils; -import com.fr.design.style.background.BackgroundJComponent; -import com.fr.stable.Constants; - /** * @author kunsnat E-mail:kunsnat@gmail.com * @version 创建时间:2011-10-31 下午03:28:31 类说明: 抽象出来的弹出box. 可以弹出颜色选择, 图案选择, 纹理选择. From 930d95a4528ebe1748f92a406c39ea87a1fee189 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 28 Oct 2021 17:42:02 +0800 Subject: [PATCH 28/51] =?UTF-8?q?REPORT-61736=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E8=83=8C=E6=99=AF=E6=8F=92=E5=85=A5=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E4=BB=A5=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E4=BD=8D=E7=BD=AE=EF=BC=8C=E6=9D=A1=E4=BB=B6=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E6=A1=86=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java index 452deb5c8..fc4b8e368 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java +++ b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java @@ -163,6 +163,8 @@ public class JavaFxNativeFileChooser implements FileChooserProvider { try { latch.await(); } catch (InterruptedException ignore) { + } finally { + setShowDialogState(false); } return selectedFiles.length > 0 ? JFileChooser.APPROVE_OPTION : JFileChooser.CANCEL_OPTION; } From 3dc7263f558ce06d7dcc5bf38419cb9ba0dbe883 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 2 Nov 2021 11:19:06 +0800 Subject: [PATCH 29/51] =?UTF-8?q?REPORT-59614=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E4=B8=8B=E6=97=A0=E6=8E=A8=E9=80=81=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/socketio/DesignerSocketIO.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index fba15b043..2cb2099bf 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -115,6 +115,7 @@ public class DesignerSocketIO { private static IO.Options createOptions() { IO.Options options = new IO.Options(); + options.path = WebSocketConfig.getInstance().getSocketContext(); try { if (ComparatorUtils.equals(currentProtocol, HTTPS)) { options.sslContext = getSSLContext(); From 62ef8a99b1ecf184ea9520b7c72f64422721ac8e Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 2 Nov 2021 19:02:16 +0800 Subject: [PATCH 30/51] =?UTF-8?q?REPORT-61654=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-=E9=9D=9E=E4=B8=AD=E6=96=87=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-=E5=AD=97=E4=BD=93=E7=BC=BA=E5=A4=B1=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E7=9A=84=E5=BC=B9=E7=AA=97=E5=86=85=E5=AE=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/com/fr/design/i18n/dimension_ko_KR.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties index 5615b3555..96a966f8b 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties @@ -1,5 +1,5 @@ com.fr.design.mainframe.check.CheckButton=230*118 -com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=490*185 +com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=550*185 com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*35 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280 com.fr.env.RemoteEnvPane.dialog=458*132 From 6c33a708599a073dd546368d395afa42799ff2fd Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 3 Nov 2021 11:34:06 +0800 Subject: [PATCH 31/51] =?UTF-8?q?REPORT-61654=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-=E9=9D=9E=E4=B8=AD=E6=96=87=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-=E5=AD=97=E4=BD=93=E7=BC=BA=E5=A4=B1=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E7=9A=84=E5=BC=B9=E7=AA=97=E5=86=85=E5=AE=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/com/fr/design/i18n/dimension_en.properties | 2 +- .../resources/com/fr/design/i18n/dimension_ja_JP.properties | 2 +- .../main/resources/com/fr/design/i18n/dimension_zh.properties | 2 +- .../resources/com/fr/design/i18n/dimension_zh_TW.properties | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties index 686c3da8a..786fe2ad0 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties @@ -1,6 +1,6 @@ com.fr.design.mainframe.check.CheckButton=305*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=630*185 -com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=630*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=570*31 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=630*280 com.fr.design.report.ReportColumnsPane=800*600 com.fr.env.RemoteEnvPane.dialog=458*132 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties index 5937b272a..0956fa79d 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties @@ -1,6 +1,6 @@ com.fr.design.mainframe.check.CheckButton=280*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=610*185 -com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=610*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=550*31 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=610*280 com.fr.env.RemoteEnvPane.dialog=458*132 com.fr.design.version.check.dialog=430*95 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties index c507fcc08..931b79b44 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties @@ -1,7 +1,7 @@ # \u9ED8\u8BA4\u4E3A\u7C7B\u7684\u5168\u9650\u5B9A\u540D\uFF08\u53EF\u81EA\u5B9A\u4E49key\uFF09= width * height com.fr.design.mainframe.check.CheckButton=250*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185 -com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=325*31 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280 com.fr.env.RemoteEnvPane.dialog=308*132 com.fr.design.version.check.dialog=230*95 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties index 8a383a438..8ea7fd7c2 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties @@ -1,6 +1,6 @@ com.fr.design.mainframe.check.CheckButton=250*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185 -com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=325*31 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280 com.fr.env.RemoteEnvPane.dialog=308*132 com.fr.design.version.check.dialog=230*95 From 6026f0d575fd41c4ce7f68da6ee22e5f63bf8e82 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 3 Nov 2021 15:47:22 +0800 Subject: [PATCH 32/51] =?UTF-8?q?REPORT-60887=20MAC=20OS=20x=E7=94=B5?= =?UTF-8?q?=E8=84=91=E4=B8=8A=20=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E9=A3=98=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/designer/creator/XCreator.java | 3 ++ .../designer/ui/PopupDialogContext.java | 47 +++++++++++++++++++ .../designer/ui/SelectedPopupDialog.java | 17 +++++++ 3 files changed, 67 insertions(+) create mode 100644 designer-form/src/main/java/com/fr/design/designer/ui/PopupDialogContext.java diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index 87a1926cb..86db17a11 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -11,6 +11,7 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.events.DesignerEditor; import com.fr.design.designer.beans.models.SelectionModel; +import com.fr.design.designer.ui.PopupDialogContext; import com.fr.design.designer.ui.SelectedPopupDialog; import com.fr.design.fun.ShareWidgetUIProcessor; import com.fr.design.fun.WidgetPropertyUIProvider; @@ -778,6 +779,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo if (popup == null) { popup = new SelectedPopupDialog(this, designer); } + PopupDialogContext.checkSelectedPop(this); JFrame frame = LogMessageBar.getInstance().getLogFrame(); if (frame!= null && frame.isActive()) { return; @@ -876,6 +878,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo if (popup != null) { popup.setVisible(false); } + PopupDialogContext.checkSelectedPop(this); } public void processPopup(boolean canVisible) { diff --git a/designer-form/src/main/java/com/fr/design/designer/ui/PopupDialogContext.java b/designer-form/src/main/java/com/fr/design/designer/ui/PopupDialogContext.java new file mode 100644 index 000000000..06fb2cb76 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/designer/ui/PopupDialogContext.java @@ -0,0 +1,47 @@ +package com.fr.design.designer.ui; + +import com.fr.design.designer.creator.XCreator; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + + +/** + * 把弹窗统一管理起来 防止出现异常情况下游离的弹窗 + * + * @author hades + * @version 10.0 + * Created by hades on 2021/11/02 + */ +public class PopupDialogContext { + + private static List dialogs = new ArrayList<>(); + + public static void add(SelectedPopupDialog selectedPopupDialog) { + if (dialogs.contains(selectedPopupDialog)) { + return; + } + dialogs.add(selectedPopupDialog); + } + + public static void remove(SelectedPopupDialog selectedPopupDialog) { + dialogs.remove(selectedPopupDialog); + } + + public static void checkSelectedPop(XCreator creator) { + Iterator iterator = dialogs.iterator(); + List removedDialog = new ArrayList<>(); + while (iterator.hasNext()) { + SelectedPopupDialog dialog = iterator.next(); + if (dialog.isVisible() && creator != dialog.getCreator()) { + iterator.remove(); + removedDialog.add(dialog); + } + } + for (SelectedPopupDialog dialog : removedDialog) { + dialog.setVisible(false); + } + } + +} diff --git a/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java b/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java index 44978ad66..22f0d3760 100644 --- a/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java +++ b/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java @@ -25,11 +25,14 @@ public class SelectedPopupDialog extends JDialog { private boolean canVisible = true; + private final XCreator creator; + public SelectedPopupDialog(XCreator creator, FormDesigner designer) { super(OperatingSystem.isMacos() ? new JFrame() : DesignerContext.getDesignerFrame()); this.setUndecorated(true); this.setModal(false); this.setFocusableWindowState(false); + this.creator = creator; controlPanel = new PopupControlPanel(creator, designer); this.getContentPane().add(controlPanel); this.setSize(controlPanel.getDefaultDimension()); @@ -44,6 +47,16 @@ public class SelectedPopupDialog extends JDialog { return controlPanel.hasVisibleButtons(); } + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible) { + PopupDialogContext.add(this); + } else { + PopupDialogContext.remove(this); + } + } + public void setRelativeBounds(Rectangle rectangle) { this.controlPanel.setRelativeBounds(rectangle); } @@ -55,4 +68,8 @@ public class SelectedPopupDialog extends JDialog { public void setCanVisible(boolean canVisible) { this.canVisible = canVisible; } + + public XCreator getCreator() { + return this.creator; + } } From 9df5abe79cdb5a4b4334afbe0aae157db6139750 Mon Sep 17 00:00:00 2001 From: pengda Date: Thu, 4 Nov 2021 10:22:07 +0800 Subject: [PATCH 33/51] =?UTF-8?q?REPORT-61306=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E7=BC=A9=E6=94=BE=E6=97=B6=EF=BC=8C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=9A=84=E5=BC=B9=E7=AA=97=E6=9C=AA=E8=B7=9F?= =?UTF-8?q?=E9=9A=8F=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=86=85=E9=83=A8=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E8=80=8C=E6=98=AF=E5=9B=BA=E5=AE=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=9C=A8=E5=8F=B3=E4=BE=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/notification/ui/NotificationCenterDialog.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java index 10e10ecdb..2541d04b4 100644 --- a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java @@ -2,6 +2,7 @@ package com.fr.design.notification.ui; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.notification.Notification; import com.fr.design.notification.NotificationCenter; import java.awt.BorderLayout; @@ -119,7 +120,7 @@ public class NotificationCenterDialog extends JDialog { if (winSize.width > screenSize.width) { winSize.width = screenSize.width; } - //这里设置位置:水平居中,竖直偏上 - win.setLocation(screenSize.width - winSize.width - 90, 50); + win.setLocation((DesignerContext.getDesignerFrame().getWidth() - winSize.width - 100 + DesignerContext.getDesignerFrame().getX()), + DesignerContext.getDesignerFrame().getY() + winSize.height); } } From ab86d37db01776bd73c7b9a5d0f3e6b25fc7f401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 4 Nov 2021 16:31:10 +0800 Subject: [PATCH 34/51] =?UTF-8?q?REPORT-59744=20=E8=81=9A=E5=90=88?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=E6=89=8B=E5=8A=A8=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E4=BB=A5=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E5=A4=84=E4=BD=8D=E7=BD=AE=E5=81=8F=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/poly/group/PolyBoundsGroup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java b/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java index aadeb0178..599a14f44 100644 --- a/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java +++ b/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java @@ -52,7 +52,7 @@ public class PolyBoundsGroup implements GroupModel { @Override public Object getValue(int row, int column) { UnitRectangle ur = block.getBounds(); - Rectangle r = ur.toRectangle(resolution); + Rectangle r = ur.toRoundRectangle(resolution); if (column == 0) { switch (row) { case 0: @@ -83,7 +83,7 @@ public class PolyBoundsGroup implements GroupModel { if (column == 1) { int v = value == null ? 0 : ((Number) value).intValue(); UnitRectangle ur = block.getBounds(); - Rectangle r = ur.toRectangle(resolution); + Rectangle r = ur.toRoundRectangle(resolution); switch (row) { case 0: r.x = v; From 6479efca90317e0ce14c9c78238d3ff0c366473c Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 4 Nov 2021 16:52:29 +0800 Subject: [PATCH 35/51] =?UTF-8?q?CHART-21418=20fix:=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E4=BF=AE=E6=94=B9=20=E5=8C=BA=E5=88=86=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E5=9C=A8=E4=B8=8A=E9=9D=A2=E8=BF=98=E6=98=AF=E4=B8=8B?= =?UTF-8?q?=E9=9D=A2=20=E5=A6=82=E6=9E=9C=E5=9C=A8=E4=B8=8A=E9=9D=A2=20?= =?UTF-8?q?=E5=88=99=E6=98=AF=E4=BB=8EdisplayComponent=E4=B8=8B=E9=9D=A2?= =?UTF-8?q?=E7=A6=BB=E5=BC=80=20=E9=9A=90=E8=97=8F=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/style/AbstractSelectBox.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java index 41eeacdba..4e82d3805 100644 --- a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java +++ b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java @@ -10,6 +10,7 @@ import com.fr.stable.Constants; import javax.swing.AbstractButton; import javax.swing.JPanel; +import javax.swing.JWindow; import javax.swing.border.AbstractBorder; import javax.swing.event.AncestorEvent; import javax.swing.event.AncestorListener; @@ -20,6 +21,7 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Insets; +import java.awt.Point; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.event.MouseAdapter; @@ -99,9 +101,25 @@ public abstract class AbstractSelectBox extends AbstractPopBox implements Mou displayComponent.addMouseListener(new MouseAdapter() { @Override public void mouseExited(MouseEvent e) { + if (!isPopupVisible()) { + //如果弹出框==null 或者 弹出框不可见 直接return + return; + } + Point popMenuP = getControlWindow().getLocation(); + Point displayComponentP = displayComponent.getLocationOnScreen(); + if (popMenuP.getX() < displayComponentP.getX() - 1) { + //如果 弹出框横向超出屏幕 往左调整了 和displayComponent横向错开 就不处理了 + return; + } + Rectangle rectangle = displayComponent.getBounds(); - if (e.getY() < rectangle.y) { - //如果是从displayComponent上面离开的,隐藏弹出界面。 + boolean bottomPopAndExitTop = displayComponentP.getY() < popMenuP.getY() && e.getY() <= rectangle.y; + boolean topPopAndExitBottom = displayComponentP.getY() > popMenuP.getY() && e.getY() >= rectangle.y + rectangle.getHeight(); + boolean exitLeftOrRight = rectangle.x > e.getX() || rectangle.x + rectangle.getWidth() < e.getX(); + if (bottomPopAndExitTop || topPopAndExitBottom || exitLeftOrRight) { + //弹出框在displayComponent下面 且 鼠标是从displayComponent上面离开的,隐藏弹出界面。 + //弹出框在displayComponent上面 且 鼠标是从displayComponent下面离开的,隐藏弹出界面。 + //鼠标从displayComponent左边 或者 右边 离开,隐藏弹出界面。 hidePopupMenu(); } From 103beaec4cf49352c9af70ad3ab77a930ec3c9dd Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 4 Nov 2021 17:23:38 +0800 Subject: [PATCH 36/51] =?UTF-8?q?REPORT-61610=20fix:=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=8A=A0=E8=BD=BD=20=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2=E6=8A=A5=E9=94=99=20A.clas?= =?UTF-8?q?s=20can=20not=20cast=20to=20A.class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/ChartPropertyPane.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index 2d4d5fef6..c3918aba2 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -10,12 +10,22 @@ import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.ChartTypeInterfaceManager; +import com.fr.design.chart.fun.ChartTypeUIProvider; import com.fr.design.designer.TargetComponent; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.ChartEditPaneProvider; import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.module.DesignModuleFactory; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.GeneralContext; +import com.fr.plugin.context.PluginContext; +import com.fr.plugin.injectable.PluginModule; +import com.fr.plugin.injectable.SpecialLevel; +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.AssistUtils; import javax.swing.BorderFactory; @@ -39,8 +49,11 @@ public class ChartPropertyPane extends BaseChartPropertyPane { //ID一样的话 不用新建chartEditPane private String currentID; + private static PluginEventListener pluginEventListener; + private ChartPropertyPane() { initComponent(); + addListener(); } protected void initComponent() { @@ -48,6 +61,27 @@ public class ChartPropertyPane extends BaseChartPropertyPane { this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); } + private void addListener() { + if (pluginEventListener != null) { + GeneralContext.stopListenPlugin(pluginEventListener); + } + pluginEventListener = new PluginEventListener() { + @Override + public void on(PluginEvent event) { + //禁用启用图表插件 这边id置空。这样展示图表配置属性不管和上一个id是否一样 都新建chartEditPane + currentID = null; + } + }; + GeneralContext.listenPlugin(PluginEventType.AfterRun, pluginEventListener, new PluginFilter() { + + @Override + public boolean accept(PluginContext context) { + + return context.contain(PluginModule.ExtraChartDesign); + } + }); + } + @Override public void updateChartEditPane(String plotID) { if (!AssistUtils.equals(currentID, plotID)) { From cc3ae6732b1177ac0e68777c4b4c56d7e0eb7f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 4 Nov 2021 17:46:33 +0800 Subject: [PATCH 37/51] =?UTF-8?q?REPORT-61695=20=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8-=E8=87=AA=E9=80=82=E5=BA=94=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E4=B8=8B=E7=BB=84=E4=BB=B6=E5=8F=B3=E4=BE=A7=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=9D=A2=E6=9D=BF=E6=98=BE=E7=A4=BA=E2=80=9C=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=A4=A7=E5=B0=8F=E2=80=9D=EF=BC=8C=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E4=B8=8B=E6=98=BE=E7=A4=BA=E7=9A=84=E6=98=AF?= =?UTF-8?q?=E2=80=9C=E6=8E=A7=E4=BB=B6=E4=BD=8D=E7=BD=AE=E2=80=9D=E2=80=9C?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=A4=A7=E5=B0=8F=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java index ae3dfc255..99b1ddaa0 100644 --- a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java @@ -51,7 +51,7 @@ public class WidgetBoundsPaneFactory { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Component_Size")), + new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget_Size")), ratioLocked != null ? createRightPane(width, ratioLocked, height) : createRightPane(width, height)}, new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))}, }; From 660f291c475ab8da8621e917bb49694d89a08216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 4 Nov 2021 20:23:06 +0800 Subject: [PATCH 38/51] =?UTF-8?q?REPORT-61618=20=E5=A4=8D=E7=94=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=94=9F=E6=88=90=E6=97=B6=E5=B8=A6=E2=80=9C?= =?UTF-8?q?-=E2=80=9D=EF=BC=8C=E5=AF=BC=E8=87=B4=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=E5=A4=B1=E6=95=88@Jaimme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/data/BasicTableDataUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java b/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java index 57c7e23a1..c711a1999 100644 --- a/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java +++ b/designer-base/src/main/java/com/fr/design/data/BasicTableDataUtils.java @@ -11,7 +11,7 @@ import com.fr.stable.StringUtils; * Created by hades on 2020/4/27 */ public abstract class BasicTableDataUtils { - private static final String SEPARATOR = "-"; + private static final String SEPARATOR = "_"; private static final int LEN = 2; From 08ec528ba25a6550e2e7115201b8c448018cbbb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 4 Nov 2021 20:27:19 +0800 Subject: [PATCH 39/51] REPORT-61695 --- .../main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java index 99b1ddaa0..ae3dfc255 100644 --- a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java @@ -51,7 +51,7 @@ public class WidgetBoundsPaneFactory { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget_Size")), + new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Component_Size")), ratioLocked != null ? createRightPane(width, ratioLocked, height) : createRightPane(width, height)}, new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))}, }; From 9ecac9978a7342813635da46462e28e929082385 Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 4 Nov 2021 20:54:03 +0800 Subject: [PATCH 40/51] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=EF=BC=9A=E6=AF=8F=E4=B8=AA=E5=AE=9E=E4=BE=8B=E5=90=84=E8=87=AA?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E6=8F=92=E4=BB=B6=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/ChartPropertyPane.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index c3918aba2..135f14f6c 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -49,8 +49,6 @@ public class ChartPropertyPane extends BaseChartPropertyPane { //ID一样的话 不用新建chartEditPane private String currentID; - private static PluginEventListener pluginEventListener; - private ChartPropertyPane() { initComponent(); addListener(); @@ -62,17 +60,13 @@ public class ChartPropertyPane extends BaseChartPropertyPane { } private void addListener() { - if (pluginEventListener != null) { - GeneralContext.stopListenPlugin(pluginEventListener); - } - pluginEventListener = new PluginEventListener() { + GeneralContext.listenPlugin(PluginEventType.AfterRun, new PluginEventListener() { @Override public void on(PluginEvent event) { //禁用启用图表插件 这边id置空。这样展示图表配置属性不管和上一个id是否一样 都新建chartEditPane currentID = null; } - }; - GeneralContext.listenPlugin(PluginEventType.AfterRun, pluginEventListener, new PluginFilter() { + }, new PluginFilter() { @Override public boolean accept(PluginContext context) { From 4ea706cf0c63fbafbca0cef02c7cc514d77e8e04 Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 4 Nov 2021 20:55:09 +0800 Subject: [PATCH 41/51] update --- .../main/java/com/fr/design/mainframe/ChartPropertyPane.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index 135f14f6c..7d787f15a 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -10,18 +10,15 @@ import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.ChartTypeInterfaceManager; -import com.fr.design.chart.fun.ChartTypeUIProvider; import com.fr.design.designer.TargetComponent; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.ChartEditPaneProvider; import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.mainframe.chart.ChartEditPane; -import com.fr.design.module.DesignModuleFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.GeneralContext; import com.fr.plugin.context.PluginContext; import com.fr.plugin.injectable.PluginModule; -import com.fr.plugin.injectable.SpecialLevel; import com.fr.plugin.manage.PluginFilter; import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEventListener; From d1bea1c69e96e1fa41308aadf5d35ca21f9b3b26 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 4 Nov 2021 21:05:08 +0800 Subject: [PATCH 42/51] =?UTF-8?q?REPORT-61410=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E9=A2=84=E8=A7=88=E6=97=B6=E5=8F=AF=E5=A4=8D=E5=88=B6?= =?UTF-8?q?-=E8=A1=A8=E5=A4=B4=E5=A4=8D=E5=88=B6=E9=97=AE=E9=A2=98=20&&=20?= =?UTF-8?q?REPORT-61409=20=E6=95=B0=E6=8D=AE=E9=9B=86=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=97=B6=E5=8F=AF=E5=A4=8D=E5=88=B6-=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E7=A9=BA=E5=80=BC=E6=97=B6=E6=98=BE=E7=A4=BA=E6=88=90Null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/preview/CopyableJTable.java | 51 ++++++++++++------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java index eb8d188a1..a452a4d37 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/CopyableJTable.java @@ -106,6 +106,7 @@ public class CopyableJTable extends SortableJTable { self.updateEndPoint(-1, column); self.refreshTable(); } + self.requestFocusInWindow(); } private int getColumn(MouseEvent e) { @@ -249,26 +250,9 @@ public class CopyableJTable extends SortableJTable { FineLoggerFactory.getLogger().info("copy cell value"); java.util.List> table = new ArrayList<>(); if ((startRow != endRow || startCol != endCol) && Math.min(startCol, endCol) > -1) { - for (int i = Math.min(startRow, endRow); i <= Math.max(startRow, endRow); i++) { - table.add(new ArrayList<>()); - for (int j = Math.min(startCol, endCol); j <= Math.max(startCol, endCol); j++) { - Object text = this.getTableValue(i, j); - table.get(table.size() - 1).add(text); - } - } + copyAreaData(table); } else if (pointList.size() > 0) { - Collections.sort(pointList, Comparator.comparing(Point::getX).thenComparing(Point::getY)); - int startRow = pointList.get(0).x; - int currentRow = startRow; - table.add(new ArrayList<>()); - for (Point point : pointList) { - while (currentRow < point.x) { - table.add(new ArrayList<>()); - currentRow++; - } - Object text = this.getTableValue(point.x, point.y); - table.get(table.size() - 1).add(text); - } + copyPointsData(table); } Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard(); @@ -276,6 +260,35 @@ public class CopyableJTable extends SortableJTable { clip.setContents(tText, null); } + private void copyAreaData(java.util.List> table) { + for (int i = Math.min(startRow, endRow); i <= Math.max(startRow, endRow); i++) { + table.add(new ArrayList<>()); + for (int j = Math.min(startCol, endCol); j <= Math.max(startCol, endCol); j++) { + Object text = this.getTableValue(i, j); + if (text != null) { + table.get(table.size() - 1).add(text); + } + } + } + } + + private void copyPointsData(java.util.List> table) { + Collections.sort(pointList, Comparator.comparing(Point::getX).thenComparing(Point::getY)); + int startRow = pointList.get(0).x; + int currentRow = startRow; + table.add(new ArrayList<>()); + for (Point point : pointList) { + while (currentRow < point.x) { + table.add(new ArrayList<>()); + currentRow++; + } + Object text = this.getTableValue(point.x, point.y); + if (text != null) { + table.get(table.size() - 1).add(text); + } + } + } + private Object getTableValue(int row, int col) { Object value = null; if (col > -1) { From 7e996b635a79c655a10730ab8bfd6dabe3c5d977 Mon Sep 17 00:00:00 2001 From: pengda Date: Fri, 5 Nov 2021 13:59:26 +0800 Subject: [PATCH 43/51] =?UTF-8?q?REPORT-62016=20BI=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/versioncheck/VersionCheckUtils.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index e5624c453..d2794cd6e 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -64,6 +64,11 @@ public class VersionCheckUtils { private static final String ID = "id"; private static final String VERSION = "version"; private static final String NAME = "name"; + private static final String RUNNING = "running"; + private static final String SYNC = "sync"; + private static final String GROUP = "group"; + private static final String BI = "bi"; + private static final String BIPREFIX = "com.finebi"; private static final Set pluginsNeedIgnore = new HashSet<>(); static { pluginsNeedIgnore.addAll(Arrays.asList( @@ -263,13 +268,10 @@ public class VersionCheckUtils { Map pluginsNameMap = ReportHelper.getPluginNameMap(); for (int i = 0; i < remotePlugins.size(); i++) { remotePlugin = remotePlugins.getJSONObject(i); - if (ComparatorUtils.equals(remotePlugin.getString("running"), "false") || (remotePlugin.containsKey("sync") && !remotePlugin.getBoolean("sync"))) { + if (isPluginNeedIgnore(remotePlugin)) { continue; } String remotePluginID = remotePlugin.getString(ID); - if (pluginsNeedIgnore.contains(remotePluginID)) { - continue; - } if (localPluginsMap.containsKey(remotePluginID)) { if (ComparatorUtils.equals(localPluginsMap.get(remotePluginID).getVersion(), remotePlugin.getString(VERSION))) { continue; @@ -290,6 +292,12 @@ public class VersionCheckUtils { return differentPlugins; } + private static boolean isPluginNeedIgnore(JSONObject remotePlugin) { + return ComparatorUtils.equals(remotePlugin.getString(RUNNING), "false") || (remotePlugin.containsKey(SYNC) && !remotePlugin.getBoolean(SYNC)) + || (remotePlugin.containsKey(GROUP) && ComparatorUtils.equals(remotePlugin.containsKey(GROUP), BI) || remotePlugin.getString(ID).startsWith(BIPREFIX) + || pluginsNeedIgnore.contains(remotePlugin.getString(ID))); + } + public static JSONArray syncPlugins(JSONArray differentPlugins) { Set uninstallFailed = uninstallPlugins(differentPlugins); List plugins = getSyncPlugins(differentPlugins, uninstallFailed); From fd8213b03d3af41490fb403bfdc7083885b865f3 Mon Sep 17 00:00:00 2001 From: "Joe.Jiang" Date: Fri, 5 Nov 2021 14:18:37 +0800 Subject: [PATCH 44/51] =?UTF-8?q?REPORT-62179=20=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=9A=84=E6=9C=80=E5=A4=A7=E6=9C=80=E5=B0=8F?= =?UTF-8?q?=E5=80=BC=E6=A0=A1=E9=AA=8C=E9=9C=80=E6=94=AF=E6=8C=81=E5=85=AC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/NumberEditorValidatePane.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java index d77e1e900..7fd88dd95 100644 --- a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java +++ b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java @@ -1,6 +1,10 @@ package com.fr.design.widget.component; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.beans.ErrorMsgTextFieldAdapter; +import com.fr.design.beans.UITextFieldAdapter; import com.fr.design.designer.IntervalConstants; +import com.fr.design.fun.TextFieldAdapterProvider; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; @@ -9,6 +13,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.NumberEditor; +import com.fr.log.FineLoggerFactory; import com.fr.stable.AssistUtils; import com.fr.stable.StringUtils; @@ -35,7 +40,7 @@ public class NumberEditorValidatePane extends JPanel { private UISpinner minValueSpinner; private UISpinner decimalLength; private JPanel limitNumberPane; - private UITextField errorMsgTextField; + private ErrorMsgTextFieldAdapter errorMsgTextField; private JPanel errorMsgTextFieldPane; private ActionListener allowDecimalsListener; @@ -100,9 +105,20 @@ public class NumberEditorValidatePane extends JPanel { } private void initErrorMsgPane() { - errorMsgTextField = new UITextField(); + TextFieldAdapterProvider provider = ExtraDesignClassManager.getInstance().getSingle(TextFieldAdapterProvider.XML_TAG); + if (provider != null) { + try { + errorMsgTextField = provider.createTextFieldAdapter(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + errorMsgTextField = new UITextFieldAdapter(); + } + } else { + errorMsgTextField = new UITextFieldAdapter(); + } + errorMsgTextFieldPane = TableLayoutHelper.createGapTableLayoutPane( - new Component[][]{new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip")), errorMsgTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + new Component[][]{new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip")), errorMsgTextField.getErrorMsgTextField()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); } From 0e529ab1a399ff47941b93af8550846923a71343 Mon Sep 17 00:00:00 2001 From: shine Date: Fri, 5 Nov 2021 15:53:19 +0800 Subject: [PATCH 45/51] =?UTF-8?q?REPORT-61610=20fix:=E5=9B=9E=E9=80=80?= =?UTF-8?q?=E6=9C=80=E5=BC=80=E5=A7=8B=E5=85=B3=E4=BA=8E=20=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=E7=9A=84=E5=9B=BE=E8=A1=A8=E7=B1=BB=E5=9E=8B=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E6=96=B0=E5=BB=BA=E5=9B=BE=E8=A1=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=95=8C=E9=9D=A2=20=E7=9A=84=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/ChartPropertyPane.java | 40 ++----------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index 7d787f15a..4efe977ff 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -16,14 +16,6 @@ import com.fr.design.gui.chart.ChartEditPaneProvider; import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.mainframe.chart.ChartEditPane; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.GeneralContext; -import com.fr.plugin.context.PluginContext; -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.AssistUtils; import javax.swing.BorderFactory; import javax.swing.Icon; @@ -43,12 +35,8 @@ public class ChartPropertyPane extends BaseChartPropertyPane { protected ChartEditPane chartEditPane; - //ID一样的话 不用新建chartEditPane - private String currentID; - private ChartPropertyPane() { initComponent(); - addListener(); } protected void initComponent() { @@ -56,33 +44,11 @@ public class ChartPropertyPane extends BaseChartPropertyPane { this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); } - private void addListener() { - GeneralContext.listenPlugin(PluginEventType.AfterRun, new PluginEventListener() { - @Override - public void on(PluginEvent event) { - //禁用启用图表插件 这边id置空。这样展示图表配置属性不管和上一个id是否一样 都新建chartEditPane - currentID = null; - } - }, new PluginFilter() { - - @Override - public boolean accept(PluginContext context) { - - return context.contain(PluginModule.ExtraChartDesign); - } - }); - } - @Override public void updateChartEditPane(String plotID) { - if (!AssistUtils.equals(currentID, plotID)) { - chartEditPane = ChartTypeInterfaceManager.getInstance().getChartEditPane(plotID); - chartEditPane.setContainer(container); - currentID = plotID; - resetChartEditPane(); - } else { - chartEditPane.resetLastChartCollection(); - } + chartEditPane = ChartTypeInterfaceManager.getInstance().getChartEditPane(plotID); + chartEditPane.setContainer(container); + resetChartEditPane(); } @Override From 123f3ce4c2081431769ade5a50a48033af60722d Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Fri, 5 Nov 2021 16:44:26 +0800 Subject: [PATCH 46/51] =?UTF-8?q?REPORT-61654=20=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/com/fr/design/i18n/dimension_ko_KR.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties index 96a966f8b..17031793f 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties @@ -1,7 +1,7 @@ com.fr.design.mainframe.check.CheckButton=230*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=550*185 com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*35 -com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280 +com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=550*280 com.fr.env.RemoteEnvPane.dialog=458*132 com.fr.design.version.check.dialog=450*95 com.fr.design.version.detail.label=700*30 From 5226dd118d71685d81f330cf4823847cf1cb4f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Fri, 5 Nov 2021 18:10:14 +0800 Subject: [PATCH 47/51] =?UTF-8?q?REPORT-60528=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E5=9C=A8=E5=BC=B9=E7=AA=97=E6=8F=90=E7=A4=BA?= =?UTF-8?q?tablayout=E9=AB=98=E5=BA=A6=E6=9C=89=E9=97=AE=E9=A2=98=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=EF=BC=8C=E5=88=A4=E6=96=AD=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/FRCardMainBorderLayoutAdapter.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java index 726c39706..dd9e03c8d 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java @@ -64,21 +64,18 @@ public class FRCardMainBorderLayoutAdapter extends FRBorderLayoutAdapter { 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 { - // 自适应布局平分高度导致变矮的场景 + JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (jt != null && jt.getUndoManager().canUndo()) { + // 自适应布局平分高度导致变矮的场景,优先做撤销 UIUtil.invokeLaterIfNeeded(new Runnable() { @Override public void run() { - JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (jt != null) { - jt.undo(); - } + jt.undo(); } }); - + } else if (container.getBackupBound() != null) { + // 手动拖动导致变矮的场景 + container.setSize(container.getBackupBound().getSize()); } return true; } else { From 6635b86a64401b2557244a3a36c2dc2d9a3d7840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 8 Nov 2021 14:11:29 +0800 Subject: [PATCH 48/51] =?UTF-8?q?REPORT-57521=20=E5=9B=9E=E9=80=80?= =?UTF-8?q?=E4=BB=A3=E7=A0=81-=E8=BF=9C=E7=A8=8B=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E6=97=B6websocket=E6=96=AD=E5=BC=80=E6=83=85=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/toast/DesignerToastMsgUtil.java | 16 +- .../mainframe/toast/ToastMsgDialog.java | 9 +- .../mainframe/socketio/DesignerSocketIO.java | 142 +++++------------- 3 files changed, 40 insertions(+), 127 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java b/designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java index 300f8537e..d7e83dc2e 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toast/DesignerToastMsgUtil.java @@ -31,13 +31,6 @@ public class DesignerToastMsgUtil { } - public static ToastMsgDialog createPromptDialog(String text) { - return createDialog(PROMPT_ICON, toastPane(text), DesignerContext.getDesignerFrame()); - } - - public static ToastMsgDialog createPromptDialog(JPanel contentPane) { - return createDialog(PROMPT_ICON, contentPane, DesignerContext.getDesignerFrame()); - } public static void toastPrompt(JPanel contendPane) { toastPane(PROMPT_ICON, contendPane, DesignerContext.getDesignerFrame()); @@ -76,11 +69,6 @@ public class DesignerToastMsgUtil { } private static void toastPane(Icon icon, JPanel contendPane, Window parent) { - ToastMsgDialog dialog = createDialog(icon, contendPane, parent); - dialog.setVisible(true); - } - - private static ToastMsgDialog createDialog(Icon icon, JPanel contendPane, Window parent) { JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane(); UILabel uiLabel = new UILabel(icon); uiLabel.setVerticalAlignment(SwingConstants.TOP); @@ -95,7 +83,7 @@ public class DesignerToastMsgUtil { } else { dialog = new ToastMsgDialog((Frame) parent, pane); } - return dialog; + dialog.setVisible(true); } @@ -130,4 +118,4 @@ public class DesignerToastMsgUtil { .toString(); } -} +} \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java index 69865c705..c3f9b096d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toast/ToastMsgDialog.java @@ -24,7 +24,6 @@ public class ToastMsgDialog extends UIDialog { private ScheduledExecutorService TIMER; private int hide_height = 0; private JPanel contentPane; - private boolean show = false; public ToastMsgDialog(Frame parent, JPanel panel) { super(parent); @@ -66,7 +65,6 @@ public class ToastMsgDialog extends UIDialog { public void display(JPanel outerJPanel) { - show = true; outerJPanel.setLocation(0, -hide_height); ScheduledExecutorService TIP_TOOL_TIMER = createToastScheduleExecutorService(); TIP_TOOL_TIMER.scheduleAtFixedRate(new Runnable() { @@ -100,7 +98,6 @@ public class ToastMsgDialog extends UIDialog { TIP_TOOL_TIMER.shutdown(); ToastMsgDialog.this.setVisible(false); ToastMsgDialog.this.dispose(); - ToastMsgDialog.this.show = false; } outerJPanel.setLocation(point.x, point.y - 5); Dimension dimension = ToastMsgDialog.this.getSize(); @@ -162,7 +159,5 @@ public class ToastMsgDialog extends UIDialog { super.dispose(); } - public boolean isShow() { - return show; - } -} + +} \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index 5916b4f32..eeba97ae4 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -7,33 +7,20 @@ import com.fr.design.EnvChangeEntrance; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.env.DesignerWorkspaceInfoContext; -import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; -import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.loghandler.DesignerLogger; -import com.fr.design.mainframe.share.ui.base.MouseClickListener; -import com.fr.design.mainframe.toast.DesignerToastMsgUtil; -import com.fr.design.mainframe.toast.ToastMsgDialog; import com.fr.design.ui.util.UIUtil; -import com.fr.design.utils.BrowseUtils; import com.fr.event.EventDispatcher; -import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.report.RemoteDesignConstants; import com.fr.serialization.SerializerHelper; import com.fr.stable.ArrayUtils; -import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.third.apache.log4j.spi.LoggingEvent; -import com.fr.third.org.apache.http.client.config.RequestConfig; -import com.fr.third.org.apache.http.client.methods.CloseableHttpResponse; -import com.fr.third.org.apache.http.client.methods.HttpGet; import com.fr.third.org.apache.http.conn.ssl.NoopHostnameVerifier; import com.fr.third.org.apache.http.conn.ssl.TrustSelfSignedStrategy; -import com.fr.third.org.apache.http.impl.client.CloseableHttpClient; -import com.fr.third.org.apache.http.impl.client.HttpClients; import com.fr.third.org.apache.http.ssl.SSLContexts; import com.fr.web.WebSocketConfig; import com.fr.web.socketio.WebSocketProtocol; @@ -42,27 +29,22 @@ import com.fr.workspace.Workspace; import com.fr.workspace.base.WorkspaceConstants; import com.fr.workspace.connect.WorkspaceConnection; import com.fr.workspace.connect.WorkspaceConnectionInfo; +import com.fr.workspace.server.socket.SocketInfoOperator; import io.socket.client.IO; import io.socket.client.Socket; import io.socket.emitter.Emitter; -import javax.net.ssl.SSLContext; -import javax.swing.BorderFactory; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.UIManager; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Cursor; -import java.awt.event.MouseEvent; import java.io.File; import java.io.FileInputStream; +import java.security.KeyStore; +import java.util.Arrays; +import javax.net.ssl.SSLContext; +import javax.swing.*; import java.io.IOException; import java.net.URI; import java.net.URL; -import java.security.KeyStore; -import java.util.Arrays; import java.util.Timer; +import java.util.TimerTask; public class DesignerSocketIO { @@ -72,21 +54,18 @@ public class DesignerSocketIO { Disconnecting } - private static final String WEBSOCKET_HELP_DOC = CloudCenter.getInstance().acquireUrlByKind("websocketConnect", "https://help.fanruan.com/finereport/doc-view-2512.html"); private static final String HTTPS = "https"; private static final String HTTP = "http"; private static Socket socket = null; private static Status status = Status.Disconnected; private static Timer disConnectHintTimer = null; private static long disConnectHintTimerDelay = 3000; - private static final int TIMEOUT = 5000; //维护一个当前工作环境的uri列表 private static String[] uri; //维护一个关于uri列表的计数器 private static int count; // 当前webSocket选择的协议 private static String currentProtocol; - private static ToastMsgDialog dialog = null; public static void close() { @@ -153,7 +132,7 @@ public class DesignerSocketIO { String certPath = connection.getCertPath(); String certSecretKey = connection.getCertSecretKey(); if (StringUtils.isBlank(certPath) || StringUtils.isBlank(certSecretKey)) { - return SSLContexts.createDefault(); + return SSLContexts.createDefault(); } KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType()); try (FileInputStream keystore = new FileInputStream(new File(certPath))) { @@ -206,7 +185,6 @@ public class DesignerSocketIO { private static final Emitter.Listener failRetry = new Emitter.Listener() { @Override public void call(Object... args) { - showSocketDisconnectToast(); printLog(args, PrintEventLogImpl.WARN, "failed args: {}"); status = Status.Disconnecting; socket.close(); @@ -245,38 +223,41 @@ public class DesignerSocketIO { @Override public void call(Object... objects) { FineLoggerFactory.getLogger().info("start disConnectHintTimer"); - /* - * todo 远程心跳断开不一定 socket 断开 和远程紧密相关的业务都绑定在心跳上,切换成心跳断开之后进行提醒, - * socket 只用推日志和通知配置变更 - */ - printLog(objects, PrintEventLogImpl.ERROR, "disConnected args: {}"); - if (status != Status.Disconnecting) { - dealWithSocketDisconnect(); - } - status = Status.Disconnected; + disConnectHintTimer = new Timer(); + disConnectHintTimer.schedule(new TimerTask() { + @Override + public void run() { + try { + /* + * todo 远程心跳断开不一定 socket 断开 和远程紧密相关的业务都绑定在心跳上,切换成心跳断开之后进行提醒, + * socket 只用推日志和通知配置变更 + */ + printLog(objects, PrintEventLogImpl.ERROR, "disConnected args: {}"); + if (status != Status.Disconnecting) { + showConnectionLostDialog(); + } + status = Status.Disconnected; + } finally { + disConnectHintTimer.cancel(); + disConnectHintTimer = null; + } + } + }, disConnectHintTimerDelay); } }; - private static void dealWithSocketDisconnect() { - if (checkRPCConnect()) { - showSocketDisconnectToast(); - } else { - showRPCDisconnectDialog(); - } - } - - private static void showSocketDisconnectToast() { + private static void showConnectionLostDialog() { try { UIUtil.invokeLaterIfNeeded(new Runnable() { @Override public void run() { - if (dialog == null) { - dialog = DesignerToastMsgUtil.createPromptDialog(createDialogContent()); - } - - if (!dialog.isShow()) { - dialog.setVisible(true); - } + FineJOptionPane.showMessageDialog( + DesignerContext.getDesignerFrame(), + Toolkit.i18nText("Fine-Design_Basic_Remote_Disconnected"), + UIManager.getString("OptionPane.messageDialogTitle"), + JOptionPane.ERROR_MESSAGE, + UIManager.getIcon("OptionPane.errorIcon")); + EnvChangeEntrance.getInstance().chooseEnv(); } }); } catch (Exception e) { @@ -284,57 +265,6 @@ public class DesignerSocketIO { } } - private static JPanel createDialogContent() { - JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - jPanel.add(new UILabel(Toolkit.i18nText("Fine-Design_WebSocket_Lost_Tip")), BorderLayout.WEST); - UILabel hyperLinkLabel = new UILabel(Toolkit.i18nText("Fine-Design_WebSocket_Lost_Tip_HyperLink_Text")); - hyperLinkLabel.addMouseListener(new MouseClickListener() { - @Override - public void mouseClicked(MouseEvent e) { - BrowseUtils.browser(WEBSOCKET_HELP_DOC); - } - }); - hyperLinkLabel.setBorder(BorderFactory.createEmptyBorder(0, 3, 0, 0)); - hyperLinkLabel.setForeground(Color.BLUE); - hyperLinkLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - jPanel.add(hyperLinkLabel, BorderLayout.CENTER); - return jPanel; - } - - private static void showRPCDisconnectDialog() { - UIUtil.invokeLaterIfNeeded(new Runnable() { - @Override - public void run() { - FineJOptionPane.showMessageDialog( - DesignerContext.getDesignerFrame(), - Toolkit.i18nText("Fine-Design_Basic_Remote_Disconnected"), - UIManager.getString("OptionPane.messageDialogTitle"), - JOptionPane.ERROR_MESSAGE, - UIManager.getIcon("OptionPane.errorIcon")); - EnvChangeEntrance.getInstance().chooseEnv(); - } - }); - } - - private static boolean checkRPCConnect() { - CloseableHttpClient httpclient = HttpClients.createDefault(); - WorkspaceConnectionInfo info = getConnectionInfo(); - HttpGet httpGet = new HttpGet(StableUtils.pathJoin(info.getUrl(), WorkspaceConstants.CONTROLLER_PREFIX, WorkspaceConstants.VT)); - RequestConfig requestConfig = RequestConfig - .custom() - .setConnectTimeout(TIMEOUT) - .setConnectionRequestTimeout(TIMEOUT) - .build(); - httpGet.setConfig(requestConfig); - try { - CloseableHttpResponse response = httpclient.execute(httpGet); - } catch (Exception e) { - FineLoggerFactory.getLogger().error(e, e.getMessage()); - return false; - } - return true; - } - //配置变更监听器 private static final Emitter.Listener modifyConfig = new Emitter.Listener() { @Override @@ -387,4 +317,4 @@ public class DesignerSocketIO { }; } -} +} \ No newline at end of file From 05a116c13ff1a341de5f838d5b20181b560e6cf8 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 8 Nov 2021 20:00:13 +0800 Subject: [PATCH 49/51] =?UTF-8?q?=E6=97=A0=E4=BB=BB=E5=8A=A1=20=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/actions/help/AboutPane.java | 3 +-- .../java/com/fr/design/actions/help/TutorialAction.java | 4 ++-- .../com/fr/design/data/datapane/connect/JDBCDefPane.java | 4 ++-- .../com/fr/design/mainframe/check/CheckFontInfoDialog.java | 5 ++--- designer-base/src/main/java/com/fr/env/HelpLink.java | 7 ++++--- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java index eaff26ba5..615854088 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java @@ -14,7 +14,6 @@ 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; @@ -83,7 +82,7 @@ public class AboutPane extends JPanel { addPhoneAndQQPane(contentPane); // 官网 - JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Official_Website"), UrlI18nManager.getInstance().getI18nUrl("website")); + JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Official_Website"), CloudCenter.getInstance().acquireConf("website." + GeneralContext.getLocale(), ProductConstants.WEBSITE_URL)); // 支持邮箱 String defaultEmail = CloudCenter.getInstance().acquireConf("support.email", ProductConstants.SUPPORT_EMAIL); diff --git a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java index 5a1439114..51a390c82 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java +++ b/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 UrlI18nManager.getInstance().getI18nUrl("help"); + return CloudCenter.getInstance().acquireUrlByKind(createDocKey(), "http://help.finereport.com"); } // 生成帮助文档 sitecenter key, help.zh_CN.10 diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 1f9b90dbb..0da46965b 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/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 = UrlI18nManager.getInstance().getI18nUrl("odbc.help"); + String url = CloudCenter.getInstance().acquireUrlByKind("odbc.help"); BrowseUtils.browser(url); } }); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java index a8c19c697..0671ed1b6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java +++ b/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,8 +49,7 @@ 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"), - UrlI18nManager.getInstance().getI18nUrl("help.install.font") - ); + CloudCenter.getInstance().acquireUrlByKind("help.install.font", "https://help.fanruan.com/finereport/doc-view-3999.html")); linkMessage.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink")); messagePanel.add(linkMessage); diff --git a/designer-base/src/main/java/com/fr/env/HelpLink.java b/designer-base/src/main/java/com/fr/env/HelpLink.java index 133a23490..c717ce6ea 100644 --- a/designer-base/src/main/java/com/fr/env/HelpLink.java +++ b/designer-base/src/main/java/com/fr/env/HelpLink.java @@ -1,7 +1,7 @@ package com.fr.env; - -import com.fr.i18n.UrlI18nManager; +import com.fr.general.locale.LocaleCenter; +import com.fr.general.locale.LocaleMark; import com.fr.locale.InterProviderFactory; import com.fr.stable.StringUtils; import java.util.HashMap; @@ -18,7 +18,8 @@ public class HelpLink { public static String getLink(String solution) { Map map = new HashMap<>(); - String link = UrlI18nManager.getInstance().getI18nUrl("help.remote.design"); + LocaleMark linkMark = LocaleCenter.getMark(RemoteDesignLocaleMark.class); + String link = linkMark.getValue(); 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); From bcbe3ea85658dd44f9768582befb1e61901e00e6 Mon Sep 17 00:00:00 2001 From: eason Date: Tue, 9 Nov 2021 10:09:29 +0800 Subject: [PATCH 50/51] =?UTF-8?q?CHART-21786:=E4=B8=8D=E9=99=90=E5=88=B6?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=A0=87=E8=AE=B0=E7=82=B9=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/component/marker/VanChartImageMarkerPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartImageMarkerPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartImageMarkerPane.java index d28354bdb..3d6c85f4e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartImageMarkerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartImageMarkerPane.java @@ -31,8 +31,8 @@ public class VanChartImageMarkerPane extends BasicBeanPane { public VanChartImageMarkerPane() { imageBackgroundPane = new ImageBackgroundQuickPane(false); imageBackgroundPane.setPreferredSize(getImageBackgroundPreferredSize(imageBackgroundPane.getPreferredSize())); - width = new UISpinnerWithPx(0, 100, 0.5, 30); - height = new UISpinnerWithPx(0, 100, 0.5, 30); + width = new UISpinnerWithPx(0, Integer.MAX_VALUE, 0.5, 30); + height = new UISpinnerWithPx(0, Integer.MAX_VALUE, 0.5, 30); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; From 3137f71571d4c9f58ffe2be3d8fb6a08a6ee2cd1 Mon Sep 17 00:00:00 2001 From: Lanlan Date: Tue, 9 Nov 2021 10:15:35 +0800 Subject: [PATCH 51/51] =?UTF-8?q?REPORT-62133=20mac=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=AE=89=E8=A3=85=E5=8C=85=E8=B5=B7=E4=B8=8D=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/DesignerEnvManager.java | 8 ++++++++ .../com/fr/design/login/DesignerLoginHelper.java | 2 +- .../login/config/DesignerLoginConfigManager.java | 14 ++++++++++++++ .../design/login/guide/DesignerGuideHelper.java | 16 +++++++++++----- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 9c23dcc51..b8d63ca7a 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -867,6 +867,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { designerLoginConfigManager.setPluginRemindOnFirstLaunch(pluginRemindOnFirstLaunch); } + public boolean isUseOldVersionLogin() { + return designerLoginConfigManager.isUseOldVersionLogin(); + } + + public void setUseOldVersionLogin(boolean useOldVersionLogin) { + designerLoginConfigManager.setUseOldVersionLogin(useOldVersionLogin); + } + /** * 内置服务器是否使用时启动 * diff --git a/designer-base/src/main/java/com/fr/design/login/DesignerLoginHelper.java b/designer-base/src/main/java/com/fr/design/login/DesignerLoginHelper.java index 2d2dd935d..8976a0734 100644 --- a/designer-base/src/main/java/com/fr/design/login/DesignerLoginHelper.java +++ b/designer-base/src/main/java/com/fr/design/login/DesignerLoginHelper.java @@ -47,7 +47,7 @@ public class DesignerLoginHelper { } public static void showLoginDialog(DesignerLoginSource source, Map params, Window window) { - if (!SupportOSImpl.DESIGNER_LOGIN.support()) { + if (!SupportOSImpl.DESIGNER_LOGIN.support() || DesignerEnvManager.getEnvManager().isUseOldVersionLogin()) { WebViewDlgHelper.createLoginDialog(window); return; } diff --git a/designer-base/src/main/java/com/fr/design/login/config/DesignerLoginConfigManager.java b/designer-base/src/main/java/com/fr/design/login/config/DesignerLoginConfigManager.java index a0ab68109..b0fb0e292 100644 --- a/designer-base/src/main/java/com/fr/design/login/config/DesignerLoginConfigManager.java +++ b/designer-base/src/main/java/com/fr/design/login/config/DesignerLoginConfigManager.java @@ -70,6 +70,10 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter { * 插件管理第一次启动时的提醒 */ private boolean pluginRemindOnFirstLaunch = true; + /** + * 使用旧版登录 + */ + private boolean useOldVersionLogin = false; private DesignerLoginConfigManager() { @@ -98,6 +102,7 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter { this.setLastLoginAccount(reader.getAttrAsString("lastLoginAccount", StringUtils.EMPTY)); this.setLoginRemindBeforeJumpBBS(reader.getAttrAsBoolean("loginRemindBeforeJumpBBS", true)); this.setPluginRemindOnFirstLaunch(reader.getAttrAsBoolean("pluginRemindOnFirstLaunch", true)); + this.setUseOldVersionLogin(reader.getAttrAsBoolean("useOldVersionLogin", false)); } } @@ -117,6 +122,7 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter { writer.attr("lastLoginAccount", lastLoginAccount); writer.attr("loginRemindBeforeJumpBBS", loginRemindBeforeJumpBBS); writer.attr("pluginRemindOnFirstLaunch", pluginRemindOnFirstLaunch); + writer.attr("useOldVersionLogin", useOldVersionLogin); writer.end(); } @@ -223,4 +229,12 @@ public class DesignerLoginConfigManager implements XMLReadable, XMLWriter { public void setPluginRemindOnFirstLaunch(boolean pluginRemindOnFirstLaunch) { this.pluginRemindOnFirstLaunch = pluginRemindOnFirstLaunch; } + + public boolean isUseOldVersionLogin() { + return useOldVersionLogin; + } + + public void setUseOldVersionLogin(boolean useOldVersionLogin) { + this.useOldVersionLogin = useOldVersionLogin; + } } diff --git a/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java b/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java index b3513bb6d..3e4c0dae5 100644 --- a/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java +++ b/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java @@ -8,9 +8,7 @@ import com.fr.design.login.utils.DesignerLoginUtils; import com.fr.design.mainframe.DesignerContext; import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.update.push.DesignerPushUpdateManager; -import com.fr.general.CloudCenter; -import com.fr.general.CloudCenterConfig; -import com.fr.general.http.HttpToolbox; +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import javax.swing.WindowConstants; @@ -39,7 +37,11 @@ public class DesignerGuideHelper { public static void prepareShowGuideDialog() { // 如果存在更新升级的弹窗,则不显示引导页面 - if (!DesignerLoginUtils.isOnline() || !SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) { + if (!DesignerLoginUtils.isOnline() + || !SupportOSImpl.DESIGNER_LOGIN.support() + || !FRContext.isChineseEnv() + || DesignerPushUpdateManager.getInstance().isShouldPopUp() + || DesignerEnvManager.getEnvManager().isUseOldVersionLogin()) { return; } if (isActivatedForOneWeek()) { @@ -52,7 +54,11 @@ public class DesignerGuideHelper { DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() { @Override public void designerOpened() { - showGuideDialog(); + try { + showGuideDialog(); + } catch (Throwable t) { + FineLoggerFactory.getLogger().warn(t.getMessage(), t); + } } }); }