Browse Source

REPORT-91591 单元格控件的自定义样式设置--代码格式调整

feature/x
John.Ying-应志浩 2 years ago
parent
commit
991fbb1418
  1. 5
      designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java
  2. 26
      designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java
  3. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/ComboBoxDefinePane.java
  4. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java
  5. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java
  6. 19
      designer-realize/src/main/java/com/fr/design/widget/ui/FieldEditorDefinePane.java
  7. 26
      designer-realize/src/main/java/com/fr/design/widget/ui/NumberEditorDefinePane.java
  8. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/PasswordDefinePane.java
  9. 26
      designer-realize/src/main/java/com/fr/design/widget/ui/RadioGroupDefinePane.java
  10. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/TextAreaDefinePane.java
  11. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/TextFieldEditorDefinePane.java
  12. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java
  13. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/TreeEditorDefinePane.java

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

@ -16,8 +16,9 @@ import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

26
designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java

@ -68,31 +68,9 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<CheckBoxGroup>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<CheckBoxGroup> provider : providers) {
if (!provider.accept(CheckBoxGroup.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<CheckBoxGroup> pane : extraPaneList) {
extraPane.add(pane);
}
} else {
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font_Size"), SwingConstants.LEFT)}
};
double[] rowSize = {P};
double[] columnSize = {P, F};
int[][] rowCount = {{1, 1}};
extraPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
}
refreshExtraAdvancedPane(CheckBoxGroup.class);
}
@Override

18
designer-realize/src/main/java/com/fr/design/widget/ui/ComboBoxDefinePane.java

@ -38,23 +38,9 @@ public class ComboBoxDefinePane extends CustomWritableRepeatEditorPane<ComboBox>
return jPanel;
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<ComboBox>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<ComboBox> provider : providers) {
if (!provider.accept(ComboBox.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<ComboBox> pane : extraPaneList) {
extraPane.add(pane);
}
}
refreshExtraAdvancedPane(ComboBox.class);
}
protected void populateSubCustomWritableRepeatEditorBean(ComboBox e) {

18
designer-realize/src/main/java/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java

@ -53,23 +53,9 @@ public class ComboCheckBoxDefinePane extends CustomWritableRepeatEditorPane<Comb
return advancePane;
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<ComboCheckBox>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<ComboCheckBox> provider : providers) {
if (!provider.accept(ComboCheckBox.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<ComboCheckBox> pane : extraPaneList) {
extraPane.add(pane);
}
}
refreshExtraAdvancedPane(ComboCheckBox.class);
}
@Override

18
designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java

@ -84,23 +84,9 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
return panel;
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<DateEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<DateEditor> provider : providers) {
if (!provider.accept(DateEditor.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<DateEditor> pane : extraPaneList) {
extraPane.add(pane);
}
}
refreshExtraAdvancedPane(DateEditor.class);
}
private JPanel createFormatPane(UIComboBox formatComboBox, UILabel sampleLabel){

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

@ -28,6 +28,7 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public abstract class FieldEditorDefinePane<T extends FieldEditor> extends AbstractDataModify<T> {
protected UICheckBox allowBlankCheckBox;
@ -82,6 +83,24 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
// do nothing
}
protected void refreshExtraAdvancedPane(Class cls) {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<T> provider : providers) {
if (!provider.accept(cls)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<T> pane : extraPaneList) {
extraPane.add(pane);
}
}
}
@Override
public void populateBean(T ob) {

26
designer-realize/src/main/java/com/fr/design/widget/ui/NumberEditorDefinePane.java

@ -50,31 +50,9 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
return content;
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<NumberEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<NumberEditor> provider : providers) {
if (!provider.accept(NumberEditor.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<NumberEditor> pane : extraPaneList) {
extraPane.add(pane);
}
} else {
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font_Size"), SwingConstants.LEFT)}
};
double[] rowSize = {P};
double[] columnSize = {P, F};
int[][] rowCount = {{1, 1}};
extraPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
}
refreshExtraAdvancedPane(NumberEditor.class);
}
public JPanel setValidatePane() {

18
designer-realize/src/main/java/com/fr/design/widget/ui/PasswordDefinePane.java

@ -23,22 +23,8 @@ public class PasswordDefinePane extends TextFieldEditorDefinePane {
return new RegFieldPane(RegPane.PASSWORD_REG_TYPE);
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<TextEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<TextEditor> provider : providers) {
if (!provider.accept(Password.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<TextEditor> pane : extraPaneList) {
extraPane.add(pane);
}
}
refreshExtraAdvancedPane(Password.class);
}
}

26
designer-realize/src/main/java/com/fr/design/widget/ui/RadioGroupDefinePane.java

@ -47,31 +47,9 @@ public class RadioGroupDefinePane extends FieldEditorDefinePane<RadioGroup> {
return content;
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<RadioGroup>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<RadioGroup> provider : providers) {
if (!provider.accept(RadioGroup.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<RadioGroup> pane : extraPaneList) {
extraPane.add(pane);
}
} else {
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font_Size"), SwingConstants.LEFT)}
};
double[] rowSize = {P};
double[] columnSize = {P, F};
int[][] rowCount = {{1, 1}};
extraPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
}
refreshExtraAdvancedPane(RadioGroup.class);
}
@Override

18
designer-realize/src/main/java/com/fr/design/widget/ui/TextAreaDefinePane.java

@ -24,22 +24,8 @@ public class TextAreaDefinePane extends TextFieldEditorDefinePane {
return new RegFieldPane(RegPane.TEXTAREA_REG_TYPE);
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<TextEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<TextEditor> provider : providers) {
if (!provider.accept(TextArea.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<TextEditor> pane : extraPaneList) {
extraPane.add(pane);
}
}
refreshExtraAdvancedPane(TextArea.class);
}
}

18
designer-realize/src/main/java/com/fr/design/widget/ui/TextFieldEditorDefinePane.java

@ -74,23 +74,9 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor>
return regPane;
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<TextEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<TextEditor> provider : providers) {
if (!provider.accept(TextEditor.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<TextEditor> pane : extraPaneList) {
extraPane.add(pane);
}
}
refreshExtraAdvancedPane(TextEditor.class);
}
protected RegFieldPane createRegPane() {

18
designer-realize/src/main/java/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java

@ -64,23 +64,9 @@ public class TreeComboBoxEditorDefinePane extends CustomWritableRepeatEditorPane
return jPanel;
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<TreeEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<TreeEditor> provider : providers) {
if (!provider.accept(TreeComboBoxEditor.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<TreeEditor> pane : extraPaneList) {
extraPane.add(pane);
}
}
refreshExtraAdvancedPane(TreeComboBoxEditor.class);
}

18
designer-realize/src/main/java/com/fr/design/widget/ui/TreeEditorDefinePane.java

@ -90,23 +90,9 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane<TreeEditor> {
return contentPane;
}
@Override
protected void refreshExtraAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<TreeEditor>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<TreeEditor> provider : providers) {
if (!provider.accept(TreeEditor.class)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<TreeEditor> pane : extraPaneList) {
extraPane.add(pane);
}
}
refreshExtraAdvancedPane(TreeEditor.class);
}
protected JPanel setThirdContentPane() {

Loading…
Cancel
Save