From 146d4d97357244a303e8a2fe9e2be5fb3a486c44 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 20 Sep 2017 16:25:38 +0800 Subject: [PATCH] =?UTF-8?q?=20REPORT-4709=20[9.0=E4=BA=8C=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E?= =?UTF-8?q?=E6=80=A7-=E6=8F=92=E5=85=A5=E8=A1=8C=E7=AD=96=E7=95=A5-?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC=E7=B1=BB=E5=9E=8B=E4=B8=BA=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98=20=20REPORT-4710=20[9.0?= =?UTF-8?q?=E4=BA=8C=E8=BD=AE=E5=9B=9E=E5=BD=92]=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E6=A0=B7=E5=BC=8F=E8=BE=B9=E6=A1=86=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=90=8E=E6=B7=BB=E5=8A=A0=E9=A2=9C=E8=89=B2=E8=83=8C=E6=99=AF?= =?UTF-8?q?=EF=BC=8C=E5=B0=B1=E6=97=A0=E6=B3=95=E6=9B=B4=E6=94=B9=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/editor/DoubleDeckValueEditorPane.java | 6 +++--- .../src/com/fr/design/editor/ValueEditorPane.java | 12 +++++------- .../com/fr/design/editor/editor/FormulaEditor.java | 4 ++++ .../src/com/fr/design/gui/style/BorderPane.java | 7 +------ .../backgroundpane/ColorBackgroundQuickPane.java | 5 +++-- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java b/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java index 77f50aa6d..be285dd94 100644 --- a/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java +++ b/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java @@ -217,9 +217,9 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver, String name = currentEditor.getName(); Object columnIndex = currentEditor.getValue(); //bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了? -// if (ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { -// columnIndex = new Formula(columnIndex == null ? "" : columnIndex.toString()); -// } + if (columnIndex == null && ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { + columnIndex = ((FormulaEditor) currentEditor).getFormula(); + } return columnIndex; } diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPane.java b/designer_base/src/com/fr/design/editor/ValueEditorPane.java index 0a7600e2f..6b2a7fd30 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPane.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPane.java @@ -2,6 +2,7 @@ package com.fr.design.editor; import com.fr.base.Formula; import com.fr.design.DesignerEnvManager; +import com.fr.design.editor.editor.*; import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.UIObserver; @@ -11,10 +12,6 @@ import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.dialog.BasicPane; -import com.fr.design.editor.editor.ColumnNameEditor; -import com.fr.design.editor.editor.Editor; -import com.fr.design.editor.editor.TextEditor; -import com.fr.design.editor.editor.XMLANameEditor; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.StringUtils; @@ -207,9 +204,10 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName String name = currentEditor.getName(); Object columnIndex = currentEditor.getValue(); //bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了? -// if (ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { -// columnIndex = new Formula(columnIndex == null ? "" : columnIndex.toString()); -// } + //MoMeak:我也想注释了,但是有bug啊。。。 + if (columnIndex == null && ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { + columnIndex = ((FormulaEditor) currentEditor).getFormula(); + } return columnIndex; } diff --git a/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java b/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java index 44d8c9f8c..943fb3a66 100644 --- a/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java +++ b/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java @@ -96,6 +96,10 @@ public class FormulaEditor extends Editor { }).setVisible(true); } + public Formula getFormula(){ + return formula; + } + /** * Return the value of the CellEditor. */ diff --git a/designer_base/src/com/fr/design/gui/style/BorderPane.java b/designer_base/src/com/fr/design/gui/style/BorderPane.java index d5a3bd914..a78c4fd7e 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -203,21 +203,16 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse CellBorderStyle cellBorderStyle = this.update(); HashSet borderSet = new HashSet(Arrays.asList(BORDERARRAY)); + style = style.deriveBackground(backgroundPane.update()); if (backgroundPane.currentPane != backgroundPane.paneList[1]){ if (borderSet.contains(globalNameListener.getGlobalName())) { style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); - style = style.deriveBackground(backgroundPane.update()); - } else { - style = style.deriveBackground(backgroundPane.update()); } }else { if (borderSet.contains(globalNameListener.getGlobalName()) && !((ColorBackgroundQuickPane) backgroundPane.currentPane).isBackGroundColor()){ style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); - style = style.deriveBackground(backgroundPane.update()); - } else { - style = style.deriveBackground(backgroundPane.update()); } } diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java index 7839d0cdb..ef106b17b 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java @@ -29,8 +29,8 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { public void populateBean(Background background) { ColorBackground colorBackgroud = (ColorBackground) background; - isBackGroundColor = false; this.detailColorSelectPane.setColor(colorBackgroud.getColor()); + isBackGroundColor = false; } public Background updateBean() { @@ -50,8 +50,9 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { public void registerChangeListener(final UIObserverListener listener) { detailColorSelectPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { - listener.doChange(); isBackGroundColor = true; + listener.doChange(); + isBackGroundColor = false; } }); }