Browse Source

完善注释,重构泛型写法,完善变量名

feature/x
obo 1 year ago
parent
commit
e7d50660bb
  1. 12
      designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayAction.java
  2. 8
      designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayConfigPane.java
  3. 2
      designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java
  4. 2
      designer-form/src/main/java/com/fr/design/widget/ui/btn/AbstractExtraButtonPane.java
  5. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java
  6. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java
  7. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java
  8. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java
  9. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java
  10. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/NumberEditorDefinePane.java
  11. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java
  12. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java
  13. 49
      designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAcceptor.java
  14. 43
      designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeParaCreatorPaneAcceptor.java
  15. 2
      designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java
  16. 2
      designer-realize/src/main/java/com/fr/design/widget/ui/FieldEditorDefinePane.java

12
designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayAction.java

@ -30,19 +30,19 @@ public class WidgetThemeDisplayAction<T extends JTemplate<?, ?>> extends JTempla
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
final T jwb = getEditingComponent(); final T jTemplate = getEditingComponent();
if (jwb == null) { if (jTemplate == null) {
return; return;
} }
BaseBook wbTpl = jwb.getTarget(); BaseBook baseBook = jTemplate.getTarget();
WidgetDisplayEnhanceMarkAttr attr = WidgetThemeDesignerUtils.getStrongestControlAttrFromTemplate(wbTpl); WidgetDisplayEnhanceMarkAttr attr = WidgetThemeDesignerUtils.getStrongestControlAttrFromTemplate(baseBook);
final WidgetThemeDisplayConfigPane configPane = new WidgetThemeDisplayConfigPane(); final WidgetThemeDisplayConfigPane configPane = new WidgetThemeDisplayConfigPane();
configPane.populate(attr); configPane.populate(attr);
configPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { configPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
wbTpl.addAttrMark(configPane.update()); baseBook.addAttrMark(configPane.update());
jwb.fireTargetModified(); jTemplate.fireTargetModified();
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().activeOldJTemplate(); HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().activeOldJTemplate();
} }
}).setVisible(true); }).setVisible(true);

8
designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayConfigPane.java

@ -67,9 +67,15 @@ public class WidgetThemeDisplayConfigPane extends BasicPane {
WidgetDisplayEnhanceMarkAttr attr = new WidgetDisplayEnhanceMarkAttr(); WidgetDisplayEnhanceMarkAttr attr = new WidgetDisplayEnhanceMarkAttr();
attr.setWidgetEnhance(widgetEnhance.isSelected()); attr.setWidgetEnhance(widgetEnhance.isSelected());
if (widgetEnhance.isSelected()) { if (widgetEnhance.isSelected()) {
//埋点信息 collectWidgetDisplayEnhanceRecord();
} }
return attr; return attr;
} }
/**
* 记录埋点信息具体实现在云端运维插件这里只作为切入点
*/
private void collectWidgetDisplayEnhanceRecord() {
//记录埋点
}
} }

2
designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java

@ -204,7 +204,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
private void refreshExtraAdvancedPane() { private void refreshExtraAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
backgroundPane.removeAll(); backgroundPane.removeAll();
new WidgetThemeParaCreatorPaneAcceptor<WParameterLayout>().accept(creator, extraPaneList); WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList);
Set<WidgetAdvancedPaneProvider<WParameterLayout>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<WParameterLayout>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<WParameterLayout> provider : providers) { for (WidgetAdvancedPaneProvider<WParameterLayout> provider : providers) {
if (!provider.accept(creator)) { if (!provider.accept(creator)) {

2
designer-form/src/main/java/com/fr/design/widget/ui/btn/AbstractExtraButtonPane.java

@ -47,7 +47,7 @@ public abstract class AbstractExtraButtonPane<T extends Button> extends ButtonWi
*/ */
protected void refreshExtraAdvancedPane(Class cls) { protected void refreshExtraAdvancedPane(Class cls) {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeCreatorPaneAcceptor<T>().accept(cls, extraPaneList); WidgetThemeCreatorPaneAcceptor.accept(cls, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<T> provider : providers) { for (WidgetAdvancedPaneProvider<T> provider : providers) {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java

@ -66,7 +66,7 @@ public abstract class ButtonDefinePane<T extends Button> extends AbstractDataMod
private void refreshAdvancedPane() { private void refreshAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeParaCreatorPaneAcceptor<T>().accept(creator, extraPaneList); WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList);
containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<T> provider : providers) { for (WidgetAdvancedPaneProvider<T> provider : providers) {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java

@ -78,7 +78,7 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
protected void refreshExtraAdvancedPane() { protected void refreshExtraAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeParaCreatorPaneAcceptor<CheckBox>().accept(creator, extraPaneList); WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<CheckBox>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<CheckBox>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<CheckBox> provider : providers) { for (WidgetAdvancedPaneProvider<CheckBox> provider : providers) {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java

@ -100,7 +100,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
protected void refreshExtraAdvancedPane() { protected void refreshExtraAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeParaCreatorPaneAcceptor<DateEditor>().accept(creator, extraPaneList); WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<DateEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<DateEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<DateEditor> provider : providers) { for (WidgetAdvancedPaneProvider<DateEditor> provider : providers) {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java

@ -68,7 +68,7 @@ public abstract class DirectWriteEditorDefinePane<T extends DirectWriteEditor> e
protected void refreshExtraAdvancedPane() { protected void refreshExtraAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeParaCreatorPaneAcceptor<T>().accept(creator, extraPaneList); WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<T> provider : providers) { for (WidgetAdvancedPaneProvider<T> provider : providers) {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java

@ -111,7 +111,7 @@ public class LabelDefinePane extends AbstractDataModify<Label> {
protected void refreshExtraAdvancedPane() { protected void refreshExtraAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeParaCreatorPaneAcceptor<Label>().accept(creator, extraPaneList); WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<Label>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<Label>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<Label> provider : providers) { for (WidgetAdvancedPaneProvider<Label> provider : providers) {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/NumberEditorDefinePane.java

@ -76,7 +76,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
protected void refreshExtraAdvancedPane() { protected void refreshExtraAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeParaCreatorPaneAcceptor<NumberEditor>().accept(creator, extraPaneList); WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<NumberEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<NumberEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<NumberEditor> provider : providers) { for (WidgetAdvancedPaneProvider<NumberEditor> provider : providers) {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java

@ -87,7 +87,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor>
protected void refreshExtraAdvancedPane() { protected void refreshExtraAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeParaCreatorPaneAcceptor<TextEditor>().accept(creator, extraPaneList); WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<TextEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<TextEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<TextEditor> provider : providers) { for (WidgetAdvancedPaneProvider<TextEditor> provider : providers) {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java

@ -70,7 +70,7 @@ public abstract class ButtonGroupDefinePane<T extends ButtonGroup> extends Field
protected void refreshExtraAdvancedPane() { protected void refreshExtraAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeParaCreatorPaneAcceptor<T>().accept(creator, extraPaneList); WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<T> provider : providers) { for (WidgetAdvancedPaneProvider<T> provider : providers) {

49
designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAcceptor.java

@ -38,19 +38,14 @@ import java.util.Set;
* @since 11.0 * @since 11.0
* Created on 2023/11/13 * Created on 2023/11/13
*/ */
public class WidgetThemeCreatorPaneAcceptor<T> { public class WidgetThemeCreatorPaneAcceptor {
/** private WidgetThemeCreatorPaneAcceptor() {}
* 构造器考虑泛型
*/
public WidgetThemeCreatorPaneAcceptor() {
//
}
/** /**
* editor相关处理类 * editor相关处理类
*/ */
private final Set<Class> editorSet = new HashSet<>(Arrays.asList( private static final Set<Class> EDITOR_SET = new HashSet<>(Arrays.asList(
TextArea.class, TextArea.class,
TextEditor.class, TextEditor.class,
NumberEditor.class, NumberEditor.class,
@ -64,7 +59,7 @@ public class WidgetThemeCreatorPaneAcceptor<T> {
/** /**
* normal相关处理类 * normal相关处理类
*/ */
private final Set<Class> normalSet = new HashSet<>(Arrays.asList( private static final Set<Class> NORMAL_SET = new HashSet<>(Arrays.asList(
AppendRowButton.class, AppendRowButton.class,
FreeButton.class, FreeButton.class,
DeleteRowButton.class, DeleteRowButton.class,
@ -79,55 +74,43 @@ public class WidgetThemeCreatorPaneAcceptor<T> {
* @param creator 控件creator * @param creator 控件creator
* @param extraPaneList 列表 * @param extraPaneList 列表
*/ */
public void accept(Class creator, List<BasicBeanPane<T>> extraPaneList) { public static <T> void accept(Class<T> creator, List<BasicBeanPane<T>> extraPaneList) {
if(WidgetThemeDesignerUtils.enableWidgetEnhance()) {
acceptEditor(creator, extraPaneList); acceptEditor(creator, extraPaneList);
acceptRoot(creator, extraPaneList);
acceptTree(creator, extraPaneList); acceptTree(creator, extraPaneList);
acceptLabel(creator, extraPaneList);
acceptNormal(creator, extraPaneList); acceptNormal(creator, extraPaneList);
acceptButton(creator, extraPaneList); acceptButton(creator, extraPaneList);
} }
}
private void insertShortCut(List<BasicBeanPane<T>> extraPaneList, BasicBeanPane pane) { private static <T> void insertShortCut(List<BasicBeanPane<T>> extraPaneList, BasicBeanPane pane) {
extraPaneList.add(0, pane); extraPaneList.add(0, pane);
} }
private void acceptEditor(Class creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptEditor(Class creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() boolean accept = WidgetThemeDesignerUtils.isNewComboBoxTreeEditor(creator) || EDITOR_SET.contains(creator);
&& (WidgetThemeDesignerUtils.isNewComboBoxTreeEditor(creator) || editorSet.contains(creator));
if (accept) { if (accept) {
insertShortCut(extraPaneList, new EditorSettingPane<>()); insertShortCut(extraPaneList, new EditorSettingPane<>());
} }
} }
private void acceptRoot(Class creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptTree(Class creator, List<BasicBeanPane<T>> extraPaneList) {
//return false boolean accept = creator == TreeEditor.class;
}
private void acceptTree(Class creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() && creator == TreeEditor.class;
if (accept) { if (accept) {
insertShortCut(extraPaneList, new TreeEditorSettingPane<>()); insertShortCut(extraPaneList, new TreeEditorSettingPane<>());
} }
} }
private void acceptLabel(Class creator, List<BasicBeanPane<T>> extraPaneList) {
//return false
}
private void acceptNormal(Class creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptNormal(Class creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() && normalSet.contains(creator); boolean accept = NORMAL_SET.contains(creator);
if (accept) { if (accept) {
insertShortCut(extraPaneList, new NormalButtonSettingPane<>()); insertShortCut(extraPaneList, new NormalButtonSettingPane<>());
} }
} }
private void acceptButton(Class creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptButton(Class creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() boolean accept = creator == CheckBox.class || creator == RadioGroup.class || creator == CheckBoxGroup.class;
&& (creator == CheckBox.class
|| creator == RadioGroup.class
|| creator == CheckBoxGroup.class);
if (accept) { if (accept) {
insertShortCut(extraPaneList, new ButtonSettingPane<>()); insertShortCut(extraPaneList, new ButtonSettingPane<>());
} }

43
designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeParaCreatorPaneAcceptor.java

@ -32,10 +32,9 @@ import java.util.List;
* @since 11.0 * @since 11.0
* Created on 2023/11/13 * Created on 2023/11/13
*/ */
public class WidgetThemeParaCreatorPaneAcceptor<T> { public class WidgetThemeParaCreatorPaneAcceptor {
public WidgetThemeParaCreatorPaneAcceptor() { private WidgetThemeParaCreatorPaneAcceptor() {}
}
/** /**
* 处理对应的参数面板控件creator * 处理对应的参数面板控件creator
@ -44,7 +43,8 @@ public class WidgetThemeParaCreatorPaneAcceptor<T> {
* @param creator 控件creator * @param creator 控件creator
* @param extraPaneList 扩展paneList * @param extraPaneList 扩展paneList
*/ */
public void accept(XCreator creator, List<BasicBeanPane<T>> extraPaneList) { public static <T> void accept(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
if (WidgetThemeDesignerUtils.enableWidgetEnhance()) {
acceptEditor(creator, extraPaneList); acceptEditor(creator, extraPaneList);
acceptRoot(creator, extraPaneList); acceptRoot(creator, extraPaneList);
acceptTree(creator, extraPaneList); acceptTree(creator, extraPaneList);
@ -52,59 +52,54 @@ public class WidgetThemeParaCreatorPaneAcceptor<T> {
acceptNormal(creator, extraPaneList); acceptNormal(creator, extraPaneList);
acceptButton(creator, extraPaneList); acceptButton(creator, extraPaneList);
} }
}
private void insertShortCut(List<BasicBeanPane<T>> extraPaneList, BasicBeanPane pane) { private static <T> void insertShortCut(List<BasicBeanPane<T>> extraPaneList, BasicBeanPane pane) {
extraPaneList.add(0, pane); extraPaneList.add(0, pane);
} }
private void acceptEditor(XCreator creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptEditor(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() boolean accept = creator instanceof XWrapperedFieldEditor
&& (creator instanceof XWrapperedFieldEditor
|| creator instanceof XTextArea || creator instanceof XTextArea
|| creator instanceof XComboBox || creator instanceof XComboBox
|| creator instanceof XDateEditor || creator instanceof XDateEditor
|| creator instanceof XTreeComboBoxEditor) || creator instanceof XTreeComboBoxEditor
|| WidgetThemeDesignerUtils.isNewComboBoxTreeEditor(creator); || WidgetThemeDesignerUtils.isNewComboBoxTreeEditor(creator);
if (accept) { if (accept) {
insertShortCut(extraPaneList, new ParaEditorSettingPane<>()); insertShortCut(extraPaneList, new ParaEditorSettingPane<>());
} }
} }
private void acceptRoot(XCreator creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptRoot(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() && creator instanceof XWParameterLayout; boolean accept = creator instanceof XWParameterLayout;
if (accept) { if (accept) {
insertShortCut(extraPaneList, new ParameterBackgroundStyleSettingPane()); insertShortCut(extraPaneList, new ParameterBackgroundStyleSettingPane());
} }
} }
private void acceptTree(XCreator creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptTree(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() boolean accept = creator instanceof XTreeEditor && !(creator instanceof XTreeComboBoxEditor);
&& (creator instanceof XTreeEditor
&& !(creator instanceof XTreeComboBoxEditor));
if (accept) { if (accept) {
insertShortCut(extraPaneList, new ParaTreeEditorSettingPane<>()); insertShortCut(extraPaneList, new ParaTreeEditorSettingPane<>());
} }
} }
private void acceptLabel(XCreator creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptLabel(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() && creator instanceof XLabel; boolean accept = creator instanceof XLabel;
if (accept) { if (accept) {
insertShortCut(extraPaneList, new LabelSettingPane<>()); insertShortCut(extraPaneList, new LabelSettingPane<>());
} }
} }
private void acceptNormal(XCreator creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptNormal(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() && creator instanceof XButton; boolean accept = creator instanceof XButton;
if (accept) { if (accept) {
insertShortCut(extraPaneList, new NormalButtonSettingPane<>()); insertShortCut(extraPaneList, new NormalButtonSettingPane<>());
} }
} }
private void acceptButton(XCreator creator, List<BasicBeanPane<T>> extraPaneList) { private static <T> void acceptButton(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() boolean accept = creator instanceof XRadioGroup || creator instanceof XCheckBoxGroup || creator instanceof XCheckBox;
&& (creator instanceof XRadioGroup
|| creator instanceof XCheckBoxGroup
|| creator instanceof XCheckBox);
if (accept) { if (accept) {
insertShortCut(extraPaneList, new ParaButtonSettingPane<>()); insertShortCut(extraPaneList, new ParaButtonSettingPane<>());
} }

2
designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java

@ -69,7 +69,7 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
protected void refreshExtraAdvancedPane() { protected void refreshExtraAdvancedPane() {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeCreatorPaneAcceptor<CheckBox>().accept(CheckBox.class, extraPaneList); WidgetThemeCreatorPaneAcceptor.accept(CheckBox.class, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<CheckBox>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<CheckBox>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<CheckBox> provider : providers) { for (WidgetAdvancedPaneProvider<CheckBox> provider : providers) {

2
designer-realize/src/main/java/com/fr/design/widget/ui/FieldEditorDefinePane.java

@ -94,7 +94,7 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
protected void refreshExtraAdvancedPane(Class cls) { protected void refreshExtraAdvancedPane(Class cls) {
extraPaneList.clear(); extraPaneList.clear();
new WidgetThemeCreatorPaneAcceptor<T>().accept(cls, extraPaneList); WidgetThemeCreatorPaneAcceptor.accept(cls, extraPaneList);
boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList);
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<T> provider : providers) { for (WidgetAdvancedPaneProvider<T> provider : providers) {

Loading…
Cancel
Save