Browse Source

REPORT-60752 【10.0】tab组件,移动端属性设置样式模板,从默认切换到自定义后不保存关闭窗口,再次进入后,选项会显示自定义,应该还是默认才对

zheng-1641779399395
hades 3 years ago
parent
commit
f0442da478
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleTemplateStyleEditor.java
  3. 7
      designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java

4
designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AbstractTemplateStylePane.java

@ -7,4 +7,8 @@ public abstract class AbstractTemplateStylePane<T> extends BasicPane {
public abstract void populate(T ob); public abstract void populate(T ob);
public abstract T update(); public abstract T update();
public AbstractTemplateStylePane<T> generateCleanPane() {
return this;
}
} }

5
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()); setValue(stylePane.update());
fireStateChanged(); fireStateChanged();
} }
@Override
public void doCancel() {
stylePane = stylePane.generateCleanPane();
}
}); });
stylePane.populate(getValue()); stylePane.populate(getValue());
dlg.setVisible(true); dlg.setVisible(true);

7
designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/MobileTemplateStylePane.java

@ -44,12 +44,14 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTem
private JPanel right; private JPanel right;
private CardLayout card; private CardLayout card;
private Set<Class<? extends MobileTemplateStyle>> extraStyle = new HashSet<>(); private Set<Class<? extends MobileTemplateStyle>> extraStyle = new HashSet<>();
private WCardTagLayout tagLayout;
public MobileTemplateStylePane(WCardTagLayout tagLayout){ public MobileTemplateStylePane(WCardTagLayout tagLayout){
init(tagLayout); init(tagLayout);
} }
public void init(WCardTagLayout tagLayout){ public void init(WCardTagLayout tagLayout){
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.tagLayout = tagLayout;
listModel = new DefaultListModel(); listModel = new DefaultListModel();
card = new CardLayout(); card = new CardLayout();
right = FRGUIPaneFactory.createCardLayout_S_Pane(); right = FRGUIPaneFactory.createCardLayout_S_Pane();
@ -147,4 +149,9 @@ public class MobileTemplateStylePane extends AbstractTemplateStylePane<MobileTem
list.addAll(sets); list.addAll(sets);
return Collections.unmodifiableList(list); return Collections.unmodifiableList(list);
} }
@Override
public AbstractTemplateStylePane<MobileTemplateStyle> generateCleanPane() {
return new MobileTemplateStylePane(this.tagLayout);
}
} }

Loading…
Cancel
Save