diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java index 404ef27d79..980e51b013 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java @@ -20,15 +20,15 @@ import java.awt.CardLayout; /** * Created by plough on 2018/8/13. */ -class JControlUpdatePane extends JPanel { +public class JControlUpdatePane extends JPanel { private ListControlPaneProvider listControlPane; private CardLayout card; - private JPanel cardPane; + protected JPanel cardPane; private BasicBeanPane[] updatePanes; private ListModelElement elEditing; - private JControlUpdatePane(ListControlPaneProvider listControlPane) { + protected JControlUpdatePane(ListControlPaneProvider listControlPane) { this.listControlPane = listControlPane; initUpdatePane(); } @@ -77,8 +77,6 @@ class JControlUpdatePane extends JPanel { cardPane.add(updatePanes[i], String.valueOf(i)); } card.show(cardPane, String.valueOf(i)); - cardPane.revalidate(); - cardPane.repaint(); try { if (ob2Populate instanceof Listener) { listControlPane.wrapperListener((Listener) ob2Populate); diff --git a/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java b/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java index a74cf2d7af..fa15dbea72 100644 --- a/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java +++ b/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java @@ -22,6 +22,7 @@ import com.fr.report.core.SheetUtils; import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.Nameable; +import javax.swing.*; import java.util.ArrayList; import java.util.List; @@ -76,6 +77,11 @@ public class ConditionAttributesGroupPane extends UIListControlPane { return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Add_Condition"); } + @Override + protected JPanel createControlUpdatePane() { + return ConditionAttributesUpdatePane.newInstance(this); + } + public void populate(ElementCasePane ePane) { this.ePane = ePane; this.editSelection = ePane.getSelection(); diff --git a/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesUpdatePane.java b/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesUpdatePane.java new file mode 100644 index 0000000000..4863452b8c --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesUpdatePane.java @@ -0,0 +1,22 @@ +package com.fr.design.present; + +import com.fr.design.gui.controlpane.JControlUpdatePane; +import com.fr.design.gui.controlpane.ListControlPaneProvider; + +public class ConditionAttributesUpdatePane extends JControlUpdatePane { + + protected ConditionAttributesUpdatePane(ListControlPaneProvider listControlPane) { + super(listControlPane); + } + + public static JControlUpdatePane newInstance(ListControlPaneProvider listControlPane) { + return new ConditionAttributesUpdatePane(listControlPane); + } + + public void populate() { + super.populate(); + + cardPane.revalidate(); + cardPane.repaint(); + } +}