Browse Source

REPORT-107652 控件增强判断只有自定义按钮在用,还是放到它的实现里,做一些注释说明

release/11.0
obo 1 year ago
parent
commit
6d1a79813f
  1. 4
      designer-base/src/main/java/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java
  2. 2
      designer-form/src/main/java/com/fr/design/widget/ui/btn/FormSubmitButtonDetailPane.java
  3. 2
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/AppendRowButtonDefinePane.java
  4. 2
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/DefaultButtonDetailPane.java
  5. 2
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/DeleteRowButtonDefinePane.java
  6. 12
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java
  7. 2
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/TreeNodeToogleButtonDefinePane.java

4
designer-base/src/main/java/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java

@ -44,7 +44,7 @@ public abstract class ButtonWithHotkeysDetailPane<T extends Button> extends Butt
JPanel labelPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
iconPane = new AccessibleIconEditor();
labelPane.add(iconPane);
Component comp = createCenterPane(WidgetThemeDesignerUtils.enableWidgetEnhance());
Component comp = createCenterPane();
Component[][] n_components = {
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Button_Type")), createCustomButtonTypeComboBox()},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name")), buttonNameTextField = new UITextField()},
@ -63,7 +63,7 @@ public abstract class ButtonWithHotkeysDetailPane<T extends Button> extends Butt
}
protected abstract Component createCenterPane(boolean needWidgetDisplayEnhance);
protected abstract Component createCenterPane();
/**
* 判断是按钮控件下拉框的种类1.有自定义按钮 2.无自定义按钮

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

@ -14,7 +14,7 @@ import java.awt.*;
public class FormSubmitButtonDetailPane extends AbstractExtraButtonPane<FormSubmitButton> {
@Override
protected Component createCenterPane(boolean needWidgetDisplayEnhance) {
protected Component createCenterPane() {
return createExtraPane(null);
}

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

@ -29,7 +29,7 @@ public class AppendRowButtonDefinePane<T extends AppendRowButton> extends Abstra
// }
@Override
protected Component createCenterPane(boolean needWidgetDisplayEnhance) {
protected Component createCenterPane() {
defineColumnRowPane = new DefineAppendColumnRowPane();
return createExtraPane(defineColumnRowPane);
}

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

@ -18,7 +18,7 @@ import java.awt.*;
public class DefaultButtonDetailPane extends AbstractExtraButtonPane<Button> {
@Override
protected Component createCenterPane(boolean needWidgetDisplayEnhance) {
protected Component createCenterPane() {
return createExtraPane(null);
}

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

@ -17,7 +17,7 @@ public class DeleteRowButtonDefinePane<T extends DeleteRowButton> extends Abstra
private DefineDeleteColumnRowPane ddcp;
@Override
protected Component createCenterPane(boolean needWidgetDisplayEnhance) {
protected Component createCenterPane() {
ddcp = new DefineDeleteColumnRowPane();
return createExtraPane(ddcp);
}

12
designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java

@ -16,8 +16,8 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane<FreeButton> {
private ButtonSytleDefinedPane buttonSytleDefinedPane;
@Override
protected Component createCenterPane(boolean needWidgetDisplayEnhance) {
buttonSytleDefinedPane = needWidgetDisplayEnhance ? null : new ButtonSytleDefinedPane();
protected Component createCenterPane() {
buttonSytleDefinedPane = creatButtonSytleDefinedPane();
return createExtraPane(buttonSytleDefinedPane);
}
@ -47,4 +47,12 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane<FreeButton> {
return FreeButton.class;
}
/**
* 自定义按钮控件开启控件显示增强时原有的buttonSytleDefinedPane会被保留
* 内容和控件增强的pane重复且不生效其他控件目前不存在这种情况因此要在实现这里做个判断
* 如果开启控件增强原有的ButtonSytleDefinedPane不展示创建时返回null
*/
private ButtonSytleDefinedPane creatButtonSytleDefinedPane() {
return WidgetThemeDesignerUtils.enableWidgetEnhance() ? null : new ButtonSytleDefinedPane();
}
}

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

@ -46,7 +46,7 @@ public class TreeNodeToogleButtonDefinePane<T extends TreeNodeToggleButton> exte
}
@Override
protected Component createCenterPane(boolean needWidgetDisplayEnhance) {
protected Component createCenterPane() {
return null;
}

Loading…
Cancel
Save