From 44764ccffad84dc5da34d95f5d4918ad0ee28cb1 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 13 Sep 2017 15:13:51 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-4117=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E6=8E=A7=E4=BB=B6=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E6=99=BA=E8=83=BD=E9=80=89=E6=8B=A9=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E5=90=8E=E8=87=AA=E5=8A=A8=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/CellWidgetPropertyPane.java | 40 ++++++++++++------- .../src/com/fr/design/widget/WidgetPane.java | 11 +++-- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java index 39b3e3d93..38d3c3905 100644 --- a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java @@ -102,31 +102,41 @@ public class CellWidgetPropertyPane extends BasicPane { } public void update() { - if (cellElement == null) {// 利用默认的CellElement. + if (cellElement == null || !cellEditorDefPane.isShouldFireSelectedEvent()) { return; } final CellSelection finalCS = (CellSelection) ePane.getSelection(); final TemplateElementCase tplEC = ePane.getEditingElementCase(); - ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() { - public void dealWith(CellElement editCellElement) { - Widget cellWidget = cellEditorDefPane.update(); - // p:最后把这个cellEditorDef设置到CellGUIAttr. - TemplateCellElement cellElement = (TemplateCellElement) editCellElement; - if (cellWidget instanceof NoneWidget) { - cellElement.setWidget(null); - } else { - if (cellElement.getWidget() != null) { - cellWidget = upDateWidgetAuthority(cellElement, cellWidget); - } - cellElement.setWidget(cellWidget); - } + if(finalCS.isSelectedOneCell(ePane)){ + if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去 + tplEC.addCellElement(cellElement); } - }); + setCellWidget(cellElement); + }else{ + ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() { + public void dealWith(CellElement editCellElement) { + // p:最后把这个cellEditorDef设置到CellGUIAttr. + TemplateCellElement templateCellElement = (TemplateCellElement) editCellElement; + setCellWidget(templateCellElement); + } + }); + } if(DesignerContext.getDesignerFrame().getSelectedJTemplate() != null){ DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); } } + private void setCellWidget(TemplateCellElement cellElement){ + Widget cellWidget = cellEditorDefPane.update(); + if (cellWidget instanceof NoneWidget) { + cellElement.setWidget(null); + } else { + if (cellElement.getWidget() != null) { + cellWidget = upDateWidgetAuthority(cellElement, cellWidget); + } + cellElement.setWidget(cellWidget); + } + } public void reInitAllListener(){ cellEditorDefPane.registerListener(); diff --git a/designer/src/com/fr/design/widget/WidgetPane.java b/designer/src/com/fr/design/widget/WidgetPane.java index 36f99491f..d8e816d80 100644 --- a/designer/src/com/fr/design/widget/WidgetPane.java +++ b/designer/src/com/fr/design/widget/WidgetPane.java @@ -47,6 +47,12 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener this.initComponents(pane); } + + public boolean isShouldFireSelectedEvent(){ + return shouldFireSelectedEvent; + } + + protected void initComponents(ElementCasePane pane) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); @@ -136,8 +142,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener String name = ((NameWidget) widget).getName(); shouldFireSelectedEvent = false; editorTypeComboBox.setSelectedItem(new Item(name, name)); - shouldFireSelectedEvent = true; cellEditorCardPane.populate(widget); + shouldFireSelectedEvent = true; } // 内置组件 else { @@ -145,10 +151,9 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) { clazz = Button.class; } - cellEditorCardPane.populate(widget); - shouldFireSelectedEvent = false; editorTypeComboBox.setSelectedItemByWidgetClass(clazz); + cellEditorCardPane.populate(widget); shouldFireSelectedEvent = true; } removeAttributeChangeListener(); From 503267adb690179ae5a655318d148ba3fb22d0c8 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 13 Sep 2017 15:23:56 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=94=B9=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/images/control/down.png | Bin 222 -> 278 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/designer_base/src/com/fr/design/images/control/down.png b/designer_base/src/com/fr/design/images/control/down.png index f044ad4c159f45364a1c9e0e9cd0cda8d3b3786c..ac8c423944ef3ff5d54d9f6ace93fd84b7dab31d 100644 GIT binary patch delta 250 zcmV`;_wV1Iau`HUNczKZD<(4;l?Y$!)DNQ ziP7MmIK$14Dz9QWe8f3@F0f2u5K;&=?h^MfU|A<=t<2M5z~X9r&EZHgM_byQjSWWy t*35div4Ptmxt(!(S`(W9GXoP3!}MU&$hVEwkAe0wc)I$ztaD0e0sz%5J?{Vj From 1eca294690b25d7245f7b180d31ddd75796a171e Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 13 Sep 2017 15:35:53 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=BA=A2=E8=BE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/icontainer/UIScrollPaneUI.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java b/designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java index 20b7a4301..4e2dbdd94 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java @@ -36,13 +36,11 @@ public class UIScrollPaneUI extends MetalScrollPaneUI implements PropertyChangeL // Note: It never happened before Java 1.5 that scrollbar is null JScrollBar sb = scrollpane.getHorizontalScrollBar(); if (sb != null) { - sb.setBackground(Color.red); sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); } sb = scrollpane.getVerticalScrollBar(); if (sb != null) { - sb.setBackground(Color.red); sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); } } From 9ef4aa711ced5d131015c909d92106ee3e749495 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 13 Sep 2017 15:49:08 +0800 Subject: [PATCH 4/5] REPORT-4558 --- .../src/com/fr/design/parameter/RootDesignDefinePane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java index 3e454b19e..6cb07d4f0 100644 --- a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java @@ -21,7 +21,7 @@ import com.fr.design.widget.ui.designer.AbstractDataModify; import com.fr.form.ui.container.WParameterLayout; import com.fr.general.Background; import com.fr.general.Inter; -import com.fr.stable.Constants; +import com.fr.report.stable.FormConstants; import javax.swing.*; import java.awt.*; @@ -82,7 +82,7 @@ public class RootDesignDefinePane extends AbstractDataModify { Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"),}; - Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT}; + Integer[] hAlignment = new Integer[]{FormConstants.LEFTPOSITION, FormConstants.CENTERPOSITION, FormConstants.RIGHTPOSITION}; hAlignmentPane = new UIButtonGroup(hAlignmentIconArray, hAlignment); hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Left") , Inter.getLocText("FR-Designer-StyleAlignment_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Right")}); From f07c010dfb7d294203f764b40234eeaebe80ffdf Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 13 Sep 2017 16:08:09 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/actions/file/OpenTemplateAction.java | 2 +- .../src/com/fr/design/gui/controlpane/JListControlPane.java | 2 +- .../src/com/fr/design/gui/controlpane/UIListControlPane.java | 2 +- .../com/fr/design/mainframe/DesignerFrameFileDealerPane.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/file/OpenTemplateAction.java b/designer_base/src/com/fr/design/actions/file/OpenTemplateAction.java index d02c60acd..12fcf4921 100644 --- a/designer_base/src/com/fr/design/actions/file/OpenTemplateAction.java +++ b/designer_base/src/com/fr/design/actions/file/OpenTemplateAction.java @@ -22,7 +22,7 @@ public class OpenTemplateAction extends UpdateAction { this.setMenuKeySet(KeySetUtils.OPEN_TEMPLATE); this.setName(getMenuKeySet().getMenuKeySetName()); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/open.png")); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/open.png")); this.setAccelerator(getMenuKeySet().getKeyStroke()); } diff --git a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java index 52802921a..474b1ca6f 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java @@ -360,7 +360,7 @@ public abstract class JListControlPane extends JControlPane { this.creator = creators[0]; this.setName(Inter.getLocText("FR-Action_Add")); this.setMnemonic('A'); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); } @Override diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java index 6cc45922e..81165a2b9 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -447,7 +447,7 @@ public abstract class UIListControlPane extends UIControlPane { this.creator = creators[0]; this.setName(Inter.getLocText("FR-Action_Add")); this.setMnemonic('A'); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); } /** diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 89901ac54..f89a0766f 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -171,7 +171,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt public OpenReportAction() { this.setName(KeySetUtils.OPEN_TEMPLATE.getMenuKeySetName()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/open.png")); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/open.png")); } @Override