From 326eb6bb1eefb6716c8ff6eb4145c06c8f02f1fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 21 Jul 2020 17:35:58 +0800 Subject: [PATCH 1/6] =?UTF-8?q?CHART-14689=20=20=E9=A2=84=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E9=85=8D=E8=89=B2=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/module/ChartPreFillStylePane.java | 56 ++++++++----------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java b/designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java index 34f917f153..5bcdaca537 100644 --- a/designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java +++ b/designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java @@ -2,14 +2,16 @@ package com.fr.design.module; import com.fr.base.ChartColorMatching; import com.fr.design.beans.BasicBeanPane; -import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.style.ChartColorAdjustPane; import com.fr.design.style.background.gradient.FixedGradientBar; +import javax.swing.BorderFactory; import javax.swing.JPanel; import java.util.ArrayList; import java.util.Collections; @@ -19,7 +21,6 @@ import java.awt.CardLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; -import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -35,8 +36,7 @@ public class ChartPreFillStylePane extends BasicBeanPane { private JPanel changeColorSetPane; private CardLayout cardLayout; - private UIButton accButton; - private UIButton gradientButton; + private UIButtonGroup groupButton; private ChartColorAdjustPane colorAdjustPane; private FixedGradientBar colorGradient; @@ -52,22 +52,20 @@ public class ChartPreFillStylePane extends BasicBeanPane { JPanel customPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); - JPanel buttonPane = new JPanel(); - buttonPane.setLayout(new FlowLayout(FlowLayout.LEFT)); - buttonPane.add(accButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Color"))); - buttonPane.add(gradientButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Gradient_Color"))); - customPane.add(buttonPane, BorderLayout.NORTH); + groupButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Custom_Color"), Toolkit.i18nText("Fine-Design_Chart_Gradient_Color")}); + groupButton.setPreferredSize(new Dimension(155, 20)); + groupButton.setSelectedIndex(0); + customPane.add(groupButton, BorderLayout.NORTH); changeColorSetPane = new JPanel(cardLayout = new CardLayout()); - changeColorSetPane.add(colorGradient = new FixedGradientBar(4, 130), "gradient"); + changeColorSetPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0)); + changeColorSetPane.add(colorGradient = new FixedGradientBar(4, 150), "gradient"); changeColorSetPane.add(colorAdjustPane = new ChartColorAdjustPane(), "acc"); cardLayout.show(changeColorSetPane, "acc"); customPane.add(changeColorSetPane, BorderLayout.CENTER); - accButton.setSelected(true); - - customPane.setPreferredSize(new Dimension(200, 200)); - colorGradient.setPreferredSize(new Dimension(120, 30)); + customPane.setPreferredSize(new Dimension(155, 200)); + colorGradient.setPreferredSize(new Dimension(155, 30)); colorGradient.getSelectColorPointBtnP1().setColorInner(Color.WHITE); colorGradient.getSelectColorPointBtnP2().setColorInner(FixedGradientBar.NEW_CHARACTER); @@ -84,24 +82,20 @@ public class ChartPreFillStylePane extends BasicBeanPane { } private void initListener() { - - accButton.addActionListener(new ActionListener() { + groupButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - accButton.setSelected(true); - gradientButton.setSelected(false); - cardLayout.show(changeColorSetPane, "acc"); + checkCardPane(); } }); + } - gradientButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - gradientButton.setSelected(true); - accButton.setSelected(false); - cardLayout.show(changeColorSetPane, "gradient"); - } - }); + private void checkCardPane() { + if (groupButton.getSelectedIndex() == 0) { + cardLayout.show(changeColorSetPane, "acc"); + } else { + cardLayout.show(changeColorSetPane, "gradient"); + } } @Override @@ -117,8 +111,7 @@ public class ChartPreFillStylePane extends BasicBeanPane { boolean isGradient = condition.getGradient(); List colorList = condition.getColorList(); if (isGradient) { - gradientButton.setSelected(true); - accButton.setSelected(false); + groupButton.setSelectedIndex(1); cardLayout.show(changeColorSetPane, "gradient"); if (colorList.size() == 2) { @@ -127,8 +120,7 @@ public class ChartPreFillStylePane extends BasicBeanPane { colorGradient.repaint(); } } else { - accButton.setSelected(true); - gradientButton.setSelected(false); + groupButton.setSelectedIndex(0); cardLayout.show(changeColorSetPane, "acc"); if (colorList.isEmpty()) { @@ -148,7 +140,7 @@ public class ChartPreFillStylePane extends BasicBeanPane { List colorList = new ArrayList(); - if (gradientButton.isSelected()) { + if (groupButton.getSelectedIndex() == 1) { chartColorMatching.setGradient(true); Color start = colorGradient.getSelectColorPointBtnP1().getColorInner(); From 75d9b30d8c71e0b548731cfcff4b6109a49a81e6 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 21 Jul 2020 18:54:33 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-34878=20&&=20REPORT-34936=20linux?= =?UTF-8?q?=E4=B8=8B=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=E5=92=8C=E8=B6=85?= =?UTF-8?q?=E9=93=BE=E4=BF=9D=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/controlpane/UIListControlPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java index 786eb2d305..100daf511b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java @@ -219,7 +219,7 @@ public abstract class UIListControlPane extends UIControlPane implements ListCon } popupEditDialog.setVisible(true); PopupDialogSaveAction osBasedAction = OSSupportCenter.getAction(PopupDialogSaveAction.class); - osBasedAction.execute(this, popupEditDialog); + osBasedAction.register(this, popupEditDialog); } } From fde23b8576a7e053a34ad40f82e9be01dd3c422d Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Wed, 22 Jul 2020 09:16:58 +0800 Subject: [PATCH 3/6] =?UTF-8?q?REPORT-34954=20=E5=9C=A8=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E8=AE=BE=E7=BD=AE=E4=B8=AD=EF=BC=8C=E6=9C=AA=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E6=95=B0=E6=8D=AE=E6=97=B6=E7=9B=B4=E6=8E=A5=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=B8=8A=E4=B8=8B=E6=A0=87=E4=BB=8D=E7=84=B6=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=90=8C=E6=97=B6=E8=AE=BE=E7=BD=AE(=E6=8F=90?= =?UTF-8?q?=E9=94=99=E4=BA=86=EF=BC=8C=E4=B9=8B=E5=89=8D=E6=8F=90=E5=88=B0?= =?UTF-8?q?=E4=BA=86release)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/cell/editor/RichTextToolBar.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java b/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java index b3a78d34d9..a8f4b2ac1a 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java @@ -258,6 +258,7 @@ public class RichTextToolBar extends BasicPane{ boolean isSub = RichTextToolBar.this.subPane.isSelected(); MutableAttributeSet attr = new SimpleAttributeSet(); if (!isSub && RichTextToolBar.this.superPane.isSelected()) { + RichTextToolBar.this.superPane.setSelected(false); StyleConstants.setSuperscript(attr, false); } // 调用setCharacterAttributes函数设置文本区选择文本的字体 @@ -273,6 +274,7 @@ public class RichTextToolBar extends BasicPane{ // 调用setCharacterAttributes函数设置文本区选择文本的字体 MutableAttributeSet attr = new SimpleAttributeSet(); if (!isSuper && RichTextToolBar.this.subPane.isSelected()) { + RichTextToolBar.this.subPane.setSelected(false); StyleConstants.setSubscript(attr, false); } StyleConstants.setSuperscript(attr, !isSuper); From 76042b86331212db997c9a98e4d5f8815489cecb Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 22 Jul 2020 11:47:00 +0800 Subject: [PATCH 4/6] =?UTF-8?q?REPORT-35688=20=E5=9B=BD=E9=99=85=E5=8C=96-?= =?UTF-8?q?=E9=A2=84=E5=AE=9A=E4=B9=89=E6=A0=B7=E5=BC=8F=EF=BC=8C=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 --- .../actions/server/StyleListAction.java | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java b/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java index ff16a33633..97b4963240 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java @@ -17,6 +17,7 @@ import com.fr.transaction.WorkerCallBack; import com.fr.transaction.WorkerFacade; import javax.swing.*; +import java.awt.*; import java.awt.event.ActionEvent; @@ -24,6 +25,8 @@ import java.awt.event.ActionEvent; * StyleList Action */ public class StyleListAction extends UpdateAction { + public static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(710, 600); + public StyleListAction() { this.setMenuKeySet(PREDEFINED_STYLES); this.setName(getMenuKeySet().getMenuKeySetName() + "..."); @@ -37,23 +40,23 @@ public class StyleListAction extends UpdateAction { * * @param evt 事件 */ - public void actionPerformed(ActionEvent evt) { - DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); - final StyleManagerPane styleListPane = new StyleManagerPane(); - final BasicDialog styleListDialog = styleListPane.showWindow(designerFrame); - styleListDialog.addDialogActionListener(new DialogActionAdapter() { - @Override - public void doOk() { - if (!styleListPane.isNamePermitted()) { - styleListDialog.setDoOKSucceed(false); + public void actionPerformed(ActionEvent evt) { + DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); + final StyleManagerPane styleListPane = new StyleManagerPane(); + final BasicDialog styleListDialog = styleListPane.showWindowWithCustomSize(designerFrame, null, WINDOW_CUSTOM_SIZE); + styleListDialog.addDialogActionListener(new DialogActionAdapter() { + @Override + public void doOk() { + if (!styleListPane.isNamePermitted()) { + styleListDialog.setDoOKSucceed(false); } - Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) { - @Override - public void run() { - styleListPane.update(ServerPreferenceConfig.getInstance()); - } - }.addCallBack(new CallBackAdaptor(){ - @Override + Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) { + @Override + public void run() { + styleListPane.update(ServerPreferenceConfig.getInstance()); + } + }.addCallBack(new CallBackAdaptor() { + @Override public void afterCommit() { DesignerContext.getDesignerBean("predefinedStyle").refreshBeanElement(); } From e6c10db5cf73d83c9dca9181c5cb8a48ed939002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 22 Jul 2020 11:47:52 +0800 Subject: [PATCH 5/6] =?UTF-8?q?CHART-14689=20=E5=88=87=E6=8D=A2=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=8D=A2=E8=A1=8C=E4=B8=8D=E9=99=90=E5=88=B6=E9=AB=98?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/module/ChartPreFillStylePane.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java b/designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java index 5bcdaca537..09ba3d3ce6 100644 --- a/designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java +++ b/designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java @@ -53,7 +53,6 @@ public class ChartPreFillStylePane extends BasicBeanPane { JPanel customPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); groupButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Custom_Color"), Toolkit.i18nText("Fine-Design_Chart_Gradient_Color")}); - groupButton.setPreferredSize(new Dimension(155, 20)); groupButton.setSelectedIndex(0); customPane.add(groupButton, BorderLayout.NORTH); @@ -64,11 +63,11 @@ public class ChartPreFillStylePane extends BasicBeanPane { cardLayout.show(changeColorSetPane, "acc"); customPane.add(changeColorSetPane, BorderLayout.CENTER); - customPane.setPreferredSize(new Dimension(155, 200)); + customPane.setPreferredSize(new Dimension(155, 300)); colorGradient.setPreferredSize(new Dimension(155, 30)); colorGradient.getSelectColorPointBtnP1().setColorInner(Color.WHITE); colorGradient.getSelectColorPointBtnP2().setColorInner(FixedGradientBar.NEW_CHARACTER); - + double p = TableLayout.PREFERRED; double[] columnSize = {p, p}; double[] rowSize = {p, p, p}; From ffe989fd945597b41879fa8d47f8ad14fd548786 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 22 Jul 2020 14:19:17 +0800 Subject: [PATCH 6/6] =?UTF-8?q?REPORT-35690=20=E5=9B=BD=E9=99=85=E5=8C=96-?= =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E5=BF=AB=E6=8D=B7=E9=94=AE=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/report/ReportWriteAttrAction.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/report/ReportWriteAttrAction.java b/designer-realize/src/main/java/com/fr/design/actions/report/ReportWriteAttrAction.java index 92451deb26..e4a8ca7857 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/report/ReportWriteAttrAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/report/ReportWriteAttrAction.java @@ -3,6 +3,7 @@ package com.fr.design.actions.report; import com.fr.design.actions.ReportComponentAction; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.dialog.DialogActionListener; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.WorkSheetDesigner; @@ -11,10 +12,15 @@ import com.fr.design.webattr.ReportWriteAttrPane; import com.fr.general.IOUtils; import com.fr.report.worksheet.WorkSheet; +import java.awt.Dimension; + + /** * ReportWriteAttrAction */ public class ReportWriteAttrAction extends ReportComponentAction { + public static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(720, 600); + public ReportWriteAttrAction(WorkSheetDesigner t) { super(t); this.setMenuKeySet(KeySetUtils.REPORT_WRITE); @@ -49,7 +55,7 @@ public class ReportWriteAttrAction extends ReportComponentAction