From 539dd8ca4ce4778ceeba2afaebec012e3e475586 Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 21 Dec 2021 14:45:30 +0800 Subject: [PATCH 1/5] =?UTF-8?q?CHART-22090=20=E6=9D=A1=E4=BB=B6=E5=B1=9E?= =?UTF-8?q?=E6=80=A7-=E9=A2=9C=E8=89=B2=E6=8E=A7=E4=BB=B6=E6=AE=8B?= =?UTF-8?q?=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/component/VanChartUIListControlPane.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java index 8a18814ebd..07f35672c7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java @@ -25,6 +25,7 @@ import java.awt.BorderLayout; import java.awt.Component; import java.awt.FlowLayout; import java.awt.Point; +import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -210,6 +211,16 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem public void doCancel() { setVisible(false); } + + @Override + public void setVisible(boolean b) { + //把一些可能没隐藏的子弹框隐藏 比如 边框-颜色弹框 + for (Window window : getOwnedWindows()) { + window.setVisible(false); + } + + super.setVisible(b); + } } } From 8638c51f4ce98c08d66b9ad59c944c822b54359c Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 21 Dec 2021 14:48:14 +0800 Subject: [PATCH 2/5] update --- .../chart/designer/component/VanChartUIListControlPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java index 07f35672c7..ce8253b981 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java @@ -214,12 +214,12 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem @Override public void setVisible(boolean b) { + super.setVisible(b); + //把一些可能没隐藏的子弹框隐藏 比如 边框-颜色弹框 for (Window window : getOwnedWindows()) { window.setVisible(false); } - - super.setVisible(b); } } From 75a342690caa19f7ccb9dd7dd6d4ace4816605de Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 21 Dec 2021 18:58:26 +0800 Subject: [PATCH 3/5] =?UTF-8?q?CHART-22076=20fix:fvs.cpt=20=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E8=AE=BE=E7=BD=AE=E8=B6=85=E9=93=BE=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E8=B6=85=E9=93=BE=20=E6=96=87=E6=9C=AC=E7=99=BD?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/utils/gui/AdjustWorkBookDefaultStyleUtils.java | 7 ++++++- .../fr/design/mainframe/HyperlinkGroupPaneActionImpl.java | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java index 760fc3c808..a3121e36ca 100644 --- a/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java @@ -17,6 +17,7 @@ public class AdjustWorkBookDefaultStyleUtils { private static final Color TEMPLATE_BACKGROUND = new Color(16, 11, 43); private static final Color CELL_ELEMENT_BORDER = new Color(110, 110, 110); + private static final Color CELL_ELEMENT_FONT_FOREGROUND = Color.WHITE; private static Color currentStoryBack = null; @@ -31,7 +32,7 @@ public class AdjustWorkBookDefaultStyleUtils { public static void adjustCellElement(CellElement cellElement) { if (DesignModeContext.isDuchampMode()) { Style style = cellElement.getStyle(); - style = style.deriveFRFont(style.getFRFont().applyForeground(Color.WHITE)); + style = style.deriveFRFont(style.getFRFont().applyForeground(CELL_ELEMENT_FONT_FOREGROUND)); style = style.deriveBorder(0, CELL_ELEMENT_BORDER, 0, CELL_ELEMENT_BORDER, 0, CELL_ELEMENT_BORDER, @@ -40,6 +41,10 @@ public class AdjustWorkBookDefaultStyleUtils { } } + public static Color adjustCellElementFontForeground(Color color) { + return DesignModeContext.isDuchampMode() ? CELL_ELEMENT_FONT_FOREGROUND : color; + } + public static void adjustFloatElement(FloatElement floatElement) { if (DesignModeContext.isDuchampMode()) { Style style = floatElement.getStyle(); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java index 71a37e42f0..d90b7e8ec3 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java @@ -6,6 +6,7 @@ import com.fr.design.designer.TargetComponent; import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.general.FRFont; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; @@ -82,7 +83,7 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro frFont = frFont.applyForeground(Color.blue); frFont = frFont.applyUnderline(Constants.LINE_THIN); } else { - frFont = frFont.applyForeground(Color.black); + frFont = frFont.applyForeground(AdjustWorkBookDefaultStyleUtils.adjustCellElementFontForeground(Color.black)); frFont = frFont.applyUnderline(Constants.LINE_NONE); } editCellElement.setStyle(elementStyle.deriveFRFont(frFont)); From e49d512d1861fa87ea7fc73d84e42b7d5ad6732e Mon Sep 17 00:00:00 2001 From: shine Date: Wed, 22 Dec 2021 10:18:51 +0800 Subject: [PATCH 4/5] =?UTF-8?q?CHART-21877=20fix:fvs.cpt=20=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E8=AE=BE=E7=BD=AE=E5=8D=95=E5=85=83=E6=A0=BC=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E9=A2=9C=E8=89=B2=E5=90=8E=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=AD=97=E4=BD=93=E6=98=AF=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/style/BorderPane.java | 13 +++++++++---- .../utils/gui/AdjustWorkBookDefaultStyleUtils.java | 9 ++++++++- .../fr/design/actions/utils/ReportActionUtils.java | 5 +++-- .../cell/settingpane/AbstractCellAttrPane.java | 2 ++ .../mainframe/cell/settingpane/CellStylePane.java | 12 +++++++----- 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java index 9f948e7a18..a3151b2e71 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java @@ -17,14 +17,19 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.NewColorSelectBox; - +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.stable.Constants; import com.fr.stable.CoreConstants; -import javax.swing.*; +import javax.swing.Icon; +import javax.swing.JPanel; +import javax.swing.SwingConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.GridLayout; import java.util.Arrays; import java.util.HashSet; import java.util.Set; @@ -198,7 +203,7 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse public Style update(Style style) { if (style == null) { - style = Style.DEFAULT_STYLE; + style = AdjustWorkBookDefaultStyleUtils.adjustCellElement(Style.DEFAULT_STYLE); } if (backgroundPane.currentPane.isBackgroundChange()) { diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java index a3121e36ca..bfa742f9b1 100644 --- a/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java @@ -32,13 +32,20 @@ public class AdjustWorkBookDefaultStyleUtils { public static void adjustCellElement(CellElement cellElement) { if (DesignModeContext.isDuchampMode()) { Style style = cellElement.getStyle(); + style = adjustCellElement(style); + cellElement.setStyle(style); + } + } + + public static Style adjustCellElement(Style style) { + if (DesignModeContext.isDuchampMode()) { style = style.deriveFRFont(style.getFRFont().applyForeground(CELL_ELEMENT_FONT_FOREGROUND)); style = style.deriveBorder(0, CELL_ELEMENT_BORDER, 0, CELL_ELEMENT_BORDER, 0, CELL_ELEMENT_BORDER, 0, CELL_ELEMENT_BORDER); - cellElement.setStyle(style); } + return style; } public static Color adjustCellElementFontForeground(Color color) { diff --git a/designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java b/designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java index 2c0b73fe95..a40397b7f3 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java @@ -4,6 +4,7 @@ import com.fr.base.Style; import com.fr.design.actions.cell.style.StyleActionInterface; import com.fr.design.mainframe.DesignOperationEvent; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.event.EventDispatcher; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; @@ -15,7 +16,7 @@ import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.ElementCase; import com.fr.report.elementcase.TemplateElementCase; -import java.awt.*; +import java.awt.Rectangle; public class ReportActionUtils { private ReportActionUtils() { @@ -113,7 +114,7 @@ public class ReportActionUtils { CellElement editCellElement = report.getCellElement(((CellSelection) sel).getColumn(), ((CellSelection) sel).getRow()); if (editCellElement == null) { - return Style.DEFAULT_STYLE; + return AdjustWorkBookDefaultStyleUtils.adjustCellElement(Style.DEFAULT_STYLE); } //peter:直接返回当前编辑元素的Style diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java index 83ef31eaa9..358da10b5d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.cell.settingpane; import com.fr.design.mainframe.AbstractAttrPane; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; import com.fr.report.cell.DefaultTemplateCellElement; @@ -53,6 +54,7 @@ public abstract class AbstractCellAttrPane extends AbstractAttrPane { TemplateCellElement cellElement = elementCase.getTemplateCellElement(cs.getColumn(), cs.getRow()); if (cellElement == null) { cellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow()); + AdjustWorkBookDefaultStyleUtils.adjustCellElement(cellElement); } this.cellElement = cellElement; elementCase.addCellElement(this.cellElement); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java index 049b0111ae..0130d0fad0 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java @@ -5,16 +5,18 @@ import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.cell.settingpane.style.StylePane; import com.fr.design.style.BorderUtils; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.design.utils.gui.GUICoreUtils; - import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; -import javax.swing.*; +import javax.swing.JFrame; +import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Rectangle; /** * @author zhou @@ -101,12 +103,12 @@ public class CellStylePane extends AbstractCellAttrPane { TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); if (cellElement == null) { cellElement = new DefaultTemplateCellElement(column, row); + AdjustWorkBookDefaultStyleUtils.adjustCellElement(cellElement); elementCase.addCellElement(cellElement); } Style style = cellElement.getStyle(); if (style == null) { - style = Style.DEFAULT_STYLE; - + style = AdjustWorkBookDefaultStyleUtils.adjustCellElement(Style.DEFAULT_STYLE); } style = stylePane.updateStyle(style); cellElement.setStyle(style); From 8d46130275772012f8b8b859db8157cba50ccf60 Mon Sep 17 00:00:00 2001 From: pengda Date: Thu, 23 Dec 2021 15:23:26 +0800 Subject: [PATCH 5/5] =?UTF-8?q?CHART-22211=20=E7=94=98=E7=89=B9=E5=9B=BE?= =?UTF-8?q?=E7=94=A8=E6=96=87=E4=BB=B6=E6=95=B0=E6=8D=AE=E9=9B=86=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/component/GanttTableDataContentPane.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java index b8a2001147..82bb26e438 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java @@ -93,13 +93,13 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{ ganttDefinition.setEndTime(endTime == null ? StringUtils.EMPTY : String.valueOf(endTime)); Object markTime = markerTimeComboBox.getSelectedItem(); - ganttDefinition.setMarkTime(isNoneObject(markTime) ? StringUtils.EMPTY : String.valueOf(markTime)); + ganttDefinition.setMarkTime(isNoneObject(markTime) ? null : String.valueOf(markTime)); Object process = processComboBox.getSelectedItem(); - ganttDefinition.setProgress(isNoneObject(process) ? StringUtils.EMPTY : String.valueOf(process)); + ganttDefinition.setProgress(isNoneObject(process) ? null : String.valueOf(process)); Object taskID = taskIDComboBox.getSelectedItem(); - ganttDefinition.setLinkID(isNoneObject(taskID) ? StringUtils.EMPTY : String.valueOf(taskID)); + ganttDefinition.setLinkID(isNoneObject(taskID) ? null : String.valueOf(taskID)); } private boolean isNoneObject(Object markTime) { @@ -117,9 +117,9 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{ seriesComboBox.setSelectedItem(ganttDefinition.getSeriesName()); startTimeComboBox.setSelectedItem(ganttDefinition.getStartTime()); endTimeComboBox.setSelectedItem(ganttDefinition.getEndTime()); - markerTimeComboBox.setSelectedItem(StringUtils.isEmpty(ganttDefinition.getMarkTime()) ? NONE : ganttDefinition.getMarkTime()); - processComboBox.setSelectedItem(StringUtils.isEmpty(ganttDefinition.getProgress()) ? NONE : ganttDefinition.getProgress()); - taskIDComboBox.setSelectedItem(StringUtils.isEmpty(ganttDefinition.getLinkID()) ? NONE : ganttDefinition.getLinkID()); + markerTimeComboBox.setSelectedItem(ganttDefinition.getMarkTime() == null ? NONE : ganttDefinition.getMarkTime()); + processComboBox.setSelectedItem(ganttDefinition.getProgress() == null ? NONE : ganttDefinition.getProgress()); + taskIDComboBox.setSelectedItem(ganttDefinition.getLinkID() == null ? NONE : ganttDefinition.getLinkID()); } }