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; } }); }