Browse Source

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

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'f0442da478781daf7b736f7172328e09c5c7c720':
  REPORT-60752 【10.0】tab组件,移动端属性设置样式模板,从默认切换到自定义后不保存关闭窗口,再次进入后,选项会显示自定义,应该还是默认才对
zheng-1641779399395
Hades 3 years ago
parent
commit
027ebd0c93
  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 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());
fireStateChanged();
}
@Override
public void doCancel() {
stylePane = stylePane.generateCleanPane();
}
});
stylePane.populate(getValue());
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 CardLayout card;
private Set<Class<? extends MobileTemplateStyle>> 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<MobileTem
list.addAll(sets);
return Collections.unmodifiableList(list);
}
@Override
public AbstractTemplateStylePane<MobileTemplateStyle> generateCleanPane() {
return new MobileTemplateStylePane(this.tagLayout);
}
}

Loading…
Cancel
Save