From f0442da478781daf7b736f7172328e09c5c7c720 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 18 Oct 2021 10:34:06 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-60752=20=E3=80=9010.0=E3=80=91tab?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=BE=E7=BD=AE=E6=A0=B7=E5=BC=8F=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E4=BB=8E=E9=BB=98=E8=AE=A4=E5=88=87=E6=8D=A2=E5=88=B0?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=90=8E=E4=B8=8D=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=AA=97=E5=8F=A3=EF=BC=8C=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=90=8E=EF=BC=8C=E9=80=89=E9=A1=B9=E4=BC=9A?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=87=AA=E5=AE=9A=E4=B9=89=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E8=BF=98=E6=98=AF=E9=BB=98=E8=AE=A4=E6=89=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/accessibles/AbstractTemplateStylePane.java | 4 ++++ .../widget/accessibles/AccessibleTemplateStyleEditor.java | 5 +++++ .../widget/accessibles/MobileTemplateStylePane.java | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java index 482b2cebcd..399047a853 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java @@ -7,4 +7,8 @@ public abstract class AbstractTemplateStylePane extends BasicPane { public abstract void populate(T ob); public abstract T update(); + + public AbstractTemplateStylePane generateCleanPane() { + return this; + } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java index 195a92e8a9..4f863e28b8 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java @@ -32,6 +32,11 @@ public class AccessibleTemplateStyleEditor extends UneditableAccessibleEditor { setValue(stylePane.update()); fireStateChanged(); } + + @Override + public void doCancel() { + stylePane = stylePane.generateCleanPane(); + } }); stylePane.populate(getValue()); dlg.setVisible(true); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java index 38f70de814..55c543b8f8 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java @@ -44,12 +44,14 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane> extraStyle = new HashSet<>(); + private WCardTagLayout tagLayout; public MobileTemplateStylePane(WCardTagLayout tagLayout){ init(tagLayout); } public void init(WCardTagLayout tagLayout){ this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.tagLayout = tagLayout; listModel = new DefaultListModel(); card = new CardLayout(); right = FRGUIPaneFactory.createCardLayout_S_Pane(); @@ -147,4 +149,9 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane generateCleanPane() { + return new MobileTemplateStylePane(this.tagLayout); + } }