Browse Source

根据插件提示修改一些备注和import语句-第二部分

feature/x
obo 12 months ago
parent
commit
8c01879053
  1. 10
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 1
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStylePane.java
  3. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java
  4. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java
  5. 2
      designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayAction.java
  6. 19
      designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayConfigPane.java
  7. 2
      designer-base/src/main/java/com/fr/widgettheme/theme/edit/ParamContainerStyleEditPane.java
  8. 15
      designer-base/src/main/java/com/fr/widgettheme/theme/panel/ControlPreviewCell.java
  9. 8
      designer-base/src/main/java/com/fr/widgettheme/util/WidgetThemeDesignerUtils.java
  10. 9
      designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/DisplayEnhanceMobileStyleDefinePane.java
  11. 12
      designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/MobileStyleFontConfigPane.java
  12. 9
      designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java
  13. 14
      designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java
  14. 14
      designer-form/src/main/java/com/fr/design/widget/ui/designer/NumberEditorDefinePane.java
  15. 19
      designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java
  16. 9
      designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java
  17. 4
      designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java
  18. 4
      designer-form/src/main/java/com/fr/design/widgettheme/ParaEditorSettingPane.java
  19. 8
      designer-form/src/main/java/com/fr/design/widgettheme/ParaNormalButtonSettingPane.java
  20. 4
      designer-form/src/main/java/com/fr/design/widgettheme/ParaTreeEditorSettingPane.java
  21. 29
      designer-form/src/main/java/com/fr/design/widgettheme/StyleSetting.java
  22. 8
      designer-form/src/main/java/com/fr/design/widgettheme/common/ButtonSettingPane.java
  23. 8
      designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java
  24. 8
      designer-form/src/main/java/com/fr/design/widgettheme/common/NormalButtonSettingPane.java
  25. 8
      designer-form/src/main/java/com/fr/design/widgettheme/common/TreeEditorSettingPane.java
  26. 12
      designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeCreatorPaneAcceptor.java
  27. 41
      designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeXCreaterPaneAcceptor.java
  28. 12
      designer-realize/src/main/java/com/fr/design/widget/ui/CheckBoxDefinePane.java
  29. 13
      designer-realize/src/main/java/com/fr/design/widget/ui/FieldEditorDefinePane.java

10
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -104,9 +104,15 @@ import com.fr.stable.core.UUID;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.lock.TplOperator;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.SwingConstants;
import javax.swing.undo.UndoManager;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.io.ByteArrayOutputStream;
import java.nio.file.Paths;
import java.util.Arrays;

1
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStylePane.java

@ -130,7 +130,6 @@ public class MobileStylePane extends BasicPane {
listModel.addElement(displayName);
try {
//MobileStyleDefinePaneCreator processor = ExtraDesignClassManager.getInstance().getSingle(MobileStyleDefinePaneCreator.XML_TAG);
BasicBeanPane<MobileStyle> mobileStyleBasicBeanPane = new MobileStyleDefinePane(widget, appearanceClazz, mobileStyleClazz);
if (checkFlag && WidgetThemeMobileStyleDefinePaneCreator.createBaseBeanPane(widget, appearanceClazz, mobileStyleClazz) != null) {
mobileStyleBasicBeanPane = WidgetThemeMobileStyleDefinePaneCreator.createBaseBeanPane(widget, appearanceClazz, mobileStyleClazz);

6
designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java

@ -10,8 +10,12 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.theme.edit.ChartStyleFormEditPane;
import com.fr.design.mainframe.theme.edit.ComponentStyleEditPane;
import com.fr.design.mainframe.theme.edit.FormBodyStyleEditPane;
import com.fr.design.mainframe.theme.preview.FormThemePreviewPane;
import com.fr.design.mainframe.theme.preview.ReportThemePreviewPane;
import com.fr.design.mainframe.theme.processor.ThemePreviewPaneProcessor;
import com.fr.widgettheme.theme.panel.WidgetDisplayFormThemePreviewPane;
import com.fr.widgettheme.theme.panel.WidgetDisplayReportThemePreviewPane;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import javax.swing.JPanel;
@ -38,7 +42,7 @@ public class FormThemeProfilePane extends TemplateThemeProfilePane<FormTheme> {
if (processor != null) {
return processor.createFormThemePreviewPane();
}
return new WidgetDisplayFormThemePreviewPane();
return WidgetThemeDesignerUtils.enableWidgetEnhance() ? new WidgetDisplayFormThemePreviewPane() : new FormThemePreviewPane();
}
@Override

5
designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java

@ -5,8 +5,10 @@ import com.fr.base.theme.TemplateThemeConfig;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.theme.edit.ReportBodyStyleEditPane;
import com.fr.design.mainframe.theme.preview.ReportThemePreviewPane;
import com.fr.design.mainframe.theme.processor.ThemePreviewPaneProcessor;
import com.fr.widgettheme.theme.panel.WidgetDisplayReportThemePreviewPane;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
/**
* @author Starryi
@ -26,8 +28,7 @@ public class ReportThemeProfilePane extends TemplateThemeProfilePane<ReportTheme
if (processor != null) {
return processor.createReportThemePreviewPane();
}
//return WidgetUtils.enableWidgetEnhance() ? new StrongestControlReportThemePreviewPane() : new ReportThemePreviewPane();
return new WidgetDisplayReportThemePreviewPane();
return WidgetThemeDesignerUtils.enableWidgetEnhance() ? new WidgetDisplayReportThemePreviewPane() : new ReportThemePreviewPane();
}
@Override

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

@ -16,7 +16,7 @@ import java.awt.event.ActionEvent;
/**
* @author Bruce.Deng
* @since 11.0
* Created 2022/11/28
* Created on 2022/11/28
*/
public class WidgetThemeDisplayAction<T extends JTemplate<?, ?>> extends JTemplateAction<T> {

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

@ -8,13 +8,13 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.widgettheme.control.attr.WidgetDisplayEnhanceMarkAttr;
import javax.swing.*;
import java.awt.*;
import javax.swing.JPanel;
import java.awt.Color;
/**
* @author Bruce.Deng
* @version 11.0
* Created by Bruce.Deng on 2022/11/28
* @since 11.0
* Created on 2022/11/28
*/
public class WidgetThemeDisplayConfigPane extends BasicPane {
@ -46,6 +46,11 @@ public class WidgetThemeDisplayConfigPane extends BasicPane {
return Toolkit.i18nText("Fine-Design_Widget_Display_Enhance");
}
/**
* 根据属性填充pane选项
*
* @param widgetDisplayEnhanceMarkAttr 控件显示增强属性
*/
public void populate(WidgetDisplayEnhanceMarkAttr widgetDisplayEnhanceMarkAttr) {
if (widgetDisplayEnhanceMarkAttr == null) {
widgetDisplayEnhanceMarkAttr = new WidgetDisplayEnhanceMarkAttr();
@ -53,12 +58,14 @@ public class WidgetThemeDisplayConfigPane extends BasicPane {
widgetEnhance.setSelected(widgetDisplayEnhanceMarkAttr.isWidgetEnhance());
}
/**
* 更新
*/
public WidgetDisplayEnhanceMarkAttr update() {
WidgetDisplayEnhanceMarkAttr attr = new WidgetDisplayEnhanceMarkAttr();
attr.setWidgetEnhance(widgetEnhance.isSelected());
if (widgetEnhance.isSelected()) {
// SCDesignRecord record = new SCDesignRecord(DesignKit.getCurrentEditingTemplateId());
// DesignRecorderProvider.getRecorder().record(record);
//埋点信息
}
return attr;
}

2
designer-base/src/main/java/com/fr/widgettheme/theme/edit/ParamContainerStyleEditPane.java

@ -16,6 +16,8 @@ import java.awt.BorderLayout;
import java.awt.Component;
/**
* 参数面板样式编辑pane
*
* @author Bruce.Deng
* @since 11.0
* Created on 2022/12/16

15
designer-base/src/main/java/com/fr/widgettheme/theme/panel/ControlPreviewCell.java

@ -9,16 +9,23 @@ import com.fr.general.FRFont;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import com.fr.stable.Constants;
import javax.swing.*;
import java.awt.*;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.LayoutManager;
import java.awt.image.BufferedImage;
/**
* 主题界面预览单元格子
*
* @author John.Ying
* @version 11.0
* Created by John.Ying on 2023/3/18
* @since 11.0
* Created on 2023/3/18
*/
public class ControlPreviewCell extends JPanel {
protected static final LayoutManager DEFAULT = FRGUIPaneFactory.createRightFlowLayout();

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

@ -8,9 +8,11 @@ import com.fr.stable.StringUtils;
import com.fr.widgettheme.control.attr.WidgetDisplayEnhanceMarkAttr;
/**
* @author Bruce.Deng
* @version 11.0
* Created by Bruce.Deng on 2022/12/1
* 控件主题设计器部分工具类
*
* @author obo
* @since 11.0
* Created on 2023/11/13
*/
public class WidgetThemeDesignerUtils {

9
designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/DisplayEnhanceMobileStyleDefinePane.java

@ -28,10 +28,15 @@ import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.border.TitledBorder;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

12
designer-base/src/main/java/com/fr/widgettheme/widget/mobile/pane/MobileStyleFontConfigPane.java

@ -13,9 +13,17 @@ import com.fr.general.FRFont;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.util.Vector;
/**

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

@ -15,8 +15,13 @@ import com.fr.design.widget.ui.designer.component.FormWidgetValuePane;
import com.fr.form.ui.DirectWriteEditor;
import com.fr.stable.collections.CollectionUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.util.Set;
//richer:需要提供能否直接编辑的控件设置面板——下拉框、复选框、时间、日期、下拉树

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

@ -25,15 +25,23 @@ import com.fr.plugin.observer.PluginEventListener;
import com.fr.stable.Constants;
import com.fr.stable.collections.CollectionUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
/**
* Created by ibm on 2017/8/3.
* 标签控件pane
*
* @author obo
* @version 11.0
* Created on 2023/11/13
*/
public class LabelDefinePane extends AbstractDataModify<Label> {
private static final int WIDGET_VALUE_PANE_WIDTH = 150;

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

@ -16,10 +16,20 @@ import com.fr.design.widget.ui.designer.component.FormWidgetValuePane;
import com.fr.form.ui.NumberEditor;
import com.fr.stable.collections.CollectionUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.JComponent;
import javax.swing.JFormattedTextField;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.Component;
import java.util.Set;
/**
* 数字编辑控件pane
*
* @author obo
* @version 11.0
* Created on 2023/11/13
*/
public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor> {
public NumberEditorDefinePane(XCreator xCreator){
super(xCreator);

19
designer-form/src/main/java/com/fr/design/widgettheme/StyleSettingPane.java → designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java

@ -26,14 +26,21 @@ import com.fr.general.FRFont;
import com.fr.widgettheme.theme.panel.ButtonStyleDefinedPane;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.List;
/**
* Created by johntsai(mailto://johntsai@fanruan.com) on 2/3/23.
**/
public abstract class StyleSettingPane<T extends Widget> extends BasicBeanPane<T> {
* 样式设置pane抽象类
*
* @author obo
* @since 11.0
* Created on 2023/11/13
*/
public abstract class BaseStyleSettingPane<T extends Widget> extends BasicBeanPane<T> {
protected List<StyleSetting> styleSettingList;
//样式切换标题头部
@ -58,7 +65,7 @@ public abstract class StyleSettingPane<T extends Widget> extends BasicBeanPane<T
protected ButtonStyleDefinedPane buttonStyleDefinedPane;
public StyleSettingPane(List<StyleSetting> styleSettingList) {
public BaseStyleSettingPane(List<StyleSetting> styleSettingList) {
this.styleSettingList = styleSettingList;
initStyleEditor();

9
designer-form/src/main/java/com/fr/design/widgettheme/LabelSettingPane.java

@ -9,10 +9,13 @@ import com.fr.widgettheme.theme.widget.theme.LabelTheme;
import java.util.Collections;
/**
* Created by johntsai(mailto://johntsai@fanruan.com) on 2/3/23.
* 设计器控件属性的高级设置增加主题样式设置项用于标签控件
**/
public class LabelSettingPane<T extends Widget> extends StyleSettingPane<T> {
*
* @author obo
* @version 11.0
* Created on 2023/11/13
*/
public class LabelSettingPane<T extends Widget> extends BaseStyleSettingPane<T> {
public LabelSettingPane() {
super(Collections.singletonList(StyleSetting.FONT));

4
designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java

@ -13,8 +13,8 @@ import java.util.Arrays;
* 单选按钮组控件/复选按钮组控件/复选按钮控件
*
* @author Bruce.Deng
* @version 11.0
* Created by Bruce.Deng on 2023/2/27
* @since 11.0
* Created on 2023/2/27
*/
public class ParaButtonSettingPane<T extends Widget> extends ButtonSettingPane<T> {

4
designer-form/src/main/java/com/fr/design/widgettheme/ParaEditorSettingPane.java

@ -14,8 +14,8 @@ import java.util.Arrays;
* 文本控件/数字控件/密码控件/文本域控件/下拉框控件/下拉复选框控件/下拉树控件/日期控件
*
* @author Bruce.Deng
* @version 11.0
* Created by Bruce.Deng on 2023/2/2
* @since 11.0
* Created on 2023/2/2
*/
public class ParaEditorSettingPane<T extends Widget> extends EditorSettingPane<T> {

8
designer-form/src/main/java/com/fr/design/widgettheme/ParaNormalButtonSettingPane.java

@ -11,8 +11,12 @@ import com.fr.widgettheme.theme.widget.theme.cell.NormalButtonTheme;
import java.util.Arrays;
/**
* Created by johntsai(mailto://johntsai@fanruan.com) on 2/3/23.
**/
* 参数面板常规按钮设置窗口
*
* @author obo
* @since 11.0
* Created on 2023/11/13
*/
public class ParaNormalButtonSettingPane<T extends Widget> extends NormalButtonSettingPane<T> {
public ParaNormalButtonSettingPane() {

4
designer-form/src/main/java/com/fr/design/widgettheme/ParaTreeEditorSettingPane.java

@ -13,8 +13,8 @@ import java.util.Arrays;
* 视图树
*
* @author Bruce.Deng
* @version 11.0
* Created by Bruce.Deng on 2023/2/28
* @since 11.0
* Created on 2023/2/28
*/
public class ParaTreeEditorSettingPane<T extends TreeEditor> extends TreeEditorSettingPane<T> {

29
designer-form/src/main/java/com/fr/design/widgettheme/StyleSetting.java

@ -1,16 +1,41 @@
package com.fr.design.widgettheme;
/**
* Created by johntsai(mailto://johntsai@fanruan.com) on 2/3/23.
**/
* 控件样式附加选项类型
*
* @author obo
* @since 11.0
* Created on 2023/11/13
*/
public enum StyleSetting {
/**
* 主题颜色
*/
THEME_COLOR,
/**
* 风格
*/
STYLE_TYPE,
/**
* 线型
*/
LINE_TYPE,
/**
* 边框圆角
*/
BORDER_RADIUS,
/**
* 字体大小
*/
FONT_SIZE,
/**
* 字体
*/
FONT,
/**
* 按钮背景
*/
BTN_BACKGROUND
}

8
designer-form/src/main/java/com/fr/design/widgettheme/common/ButtonSettingPane.java

@ -1,7 +1,7 @@
package com.fr.design.widgettheme.common;
import com.fr.design.widgettheme.StyleSetting;
import com.fr.design.widgettheme.StyleSettingPane;
import com.fr.design.widgettheme.BaseStyleSettingPane;
import com.fr.form.ui.Widget;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import com.fr.widgettheme.theme.widget.theme.cell.ButtonTheme;
@ -15,10 +15,10 @@ import java.util.List;
* 单选按钮组控件/复选按钮组控件/复选按钮控件
*
* @author John.Ying
* @version 11.0
* Created by John.Ying on 2023/4/18
* @since 11.0
* Created on 2023/4/18
*/
public class ButtonSettingPane<T extends Widget> extends StyleSettingPane<T> {
public class ButtonSettingPane<T extends Widget> extends BaseStyleSettingPane<T> {
public ButtonSettingPane() {
super(Arrays.asList(

8
designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java

@ -2,7 +2,7 @@ package com.fr.design.widgettheme.common;
import com.fr.widgettheme.theme.widget.style.BorderStyle;
import com.fr.design.widgettheme.StyleSettingPane;
import com.fr.design.widgettheme.BaseStyleSettingPane;
import com.fr.form.ui.Widget;
import com.fr.design.widgettheme.StyleSetting;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
@ -17,10 +17,10 @@ import java.util.List;
* 文本控件/数字控件/密码控件/文本域控件/下拉框控件/下拉复选框控件/下拉树控件/日期控件
*
* @author John.Ying
* @version 11.0
* Created by John.Ying on 2023/4/18
* @since 11.0
* Created on 2023/4/18
*/
public class EditorSettingPane<T extends Widget> extends StyleSettingPane<T> {
public class EditorSettingPane<T extends Widget> extends BaseStyleSettingPane<T> {
public EditorSettingPane() {
super(Arrays.asList(

8
designer-form/src/main/java/com/fr/design/widgettheme/common/NormalButtonSettingPane.java

@ -3,7 +3,7 @@ package com.fr.design.widgettheme.common;
import com.fr.widgettheme.theme.widget.style.BorderStyle;
import com.fr.widgettheme.theme.widget.style.ButtonBackgroundStyle;
import com.fr.widgettheme.theme.bean.ButtonBackground;
import com.fr.design.widgettheme.StyleSettingPane;
import com.fr.design.widgettheme.BaseStyleSettingPane;
import com.fr.form.ui.FreeButton;
import com.fr.form.ui.Widget;
import com.fr.design.widgettheme.StyleSetting;
@ -18,10 +18,10 @@ import java.util.List;
* 按钮组件
*
* @author John.Ying
* @version 11.0
* Created by John.Ying on 2023/4/27
* @since 11.0
* Created on 2023/4/27
*/
public class NormalButtonSettingPane<T extends Widget> extends StyleSettingPane<T> {
public class NormalButtonSettingPane<T extends Widget> extends BaseStyleSettingPane<T> {
public NormalButtonSettingPane() {
super(Arrays.asList(

8
designer-form/src/main/java/com/fr/design/widgettheme/common/TreeEditorSettingPane.java

@ -1,7 +1,7 @@
package com.fr.design.widgettheme.common;
import com.fr.design.widgettheme.StyleSetting;
import com.fr.design.widgettheme.StyleSettingPane;
import com.fr.design.widgettheme.BaseStyleSettingPane;
import com.fr.form.ui.TreeEditor;
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants;
import com.fr.widgettheme.theme.widget.theme.cell.TreeTheme;
@ -15,10 +15,10 @@ import java.util.List;
* 视图树
*
* @author John.Ying
* @version 11.0
* Created by John.Ying on 2023/4/18
* @since 11.0
* Created on 2023/4/18
*/
public class TreeEditorSettingPane<T extends TreeEditor> extends StyleSettingPane<T> {
public class TreeEditorSettingPane<T extends TreeEditor> extends BaseStyleSettingPane<T> {
public TreeEditorSettingPane() {
super(Arrays.asList(

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

@ -28,12 +28,12 @@ import com.fr.design.widgettheme.common.TreeEditorSettingPane;
import java.util.List;
/**
* 控件主题窗口创建接受
* 控件主题窗口创建处理
* 当前类型被接受时添加对应pane到extraPaneList
*
* @author Coral.Chen
* @author obo
* @since 11.0
* Created on 2023/4/28
* Created on 2023/11/13
*/
public class WidgetThemeCreatorPaneAcceptor<T> {
@ -44,6 +44,12 @@ public class WidgetThemeCreatorPaneAcceptor<T> {
//
}
/**
* 遍历判断当前控件creator类型将符合条件的窗口添加到extraPaneList中
*
* @param creator 控件creator
* @param extraPaneList 列表
*/
public void accept(Class creator, List<BasicBeanPane<T>> extraPaneList) {
acceptEditor(creator, extraPaneList);
acceptRoot(creator, extraPaneList);

41
designer-form/src/main/java/com/fr/design/widgettheme/processor/WidgetThemeXCreaterPaneAcceptor.java

@ -24,10 +24,26 @@ import com.fr.design.widgettheme.common.NormalButtonSettingPane;
import java.util.List;
/**
* 参数面板控件主题窗口创建处理类
* 当前类型被接受时添加对应pane到extraPaneList
*
* @author obo
* @since 11.0
* Created on 2023/11/13
*/
public class WidgetThemeXCreaterPaneAcceptor<T> {
public WidgetThemeXCreaterPaneAcceptor(){}
public WidgetThemeXCreaterPaneAcceptor() {
}
/**
* 处理对应的参数面板控件creator
* 当类型判断符合时,将扩展的pane添加到list
*
* @param creator 控件creator
* @param extraPaneList 扩展paneList
*/
public void accept(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
acceptEditor(creator, extraPaneList);
acceptRoot(creator, extraPaneList);
@ -41,7 +57,7 @@ public class WidgetThemeXCreaterPaneAcceptor<T> {
extraPaneList.add(0, pane);
}
private void acceptEditor(XCreator creator, List<BasicBeanPane<T>> extraPaneList){
private void acceptEditor(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance()
&& (creator instanceof XWrapperedFieldEditor
|| creator instanceof XTextArea
@ -53,13 +69,15 @@ public class WidgetThemeXCreaterPaneAcceptor<T> {
insertShortCut(extraPaneList, new ParaEditorSettingPane<>());
}
}
private void acceptRoot(XCreator creator, List<BasicBeanPane<T>> extraPaneList){
private void acceptRoot(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() && creator instanceof XWParameterLayout;
if(accept) {
if (accept) {
insertShortCut(extraPaneList, new ParameterBackgroundStyleSettingPane());
}
}
private void acceptTree(XCreator creator, List<BasicBeanPane<T>> extraPaneList){
private void acceptTree(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance()
&& (creator instanceof XTreeEditor
&& !(creator instanceof XTreeComboBoxEditor));
@ -67,19 +85,22 @@ public class WidgetThemeXCreaterPaneAcceptor<T> {
insertShortCut(extraPaneList, new ParaTreeEditorSettingPane<>());
}
}
private void acceptLabel(XCreator creator, List<BasicBeanPane<T>> extraPaneList){
private void acceptLabel(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() && creator instanceof XLabel;
if(accept) {
if (accept) {
insertShortCut(extraPaneList, new LabelSettingPane<>());
}
}
private void acceptNormal(XCreator creator, List<BasicBeanPane<T>> extraPaneList){
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() && creator instanceof XButton;
private void acceptNormal(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance() && creator instanceof XButton;
if (accept) {
insertShortCut(extraPaneList, new NormalButtonSettingPane<>());
}
}
private void acceptButton(XCreator creator, List<BasicBeanPane<T>> extraPaneList){
private void acceptButton(XCreator creator, List<BasicBeanPane<T>> extraPaneList) {
boolean accept = WidgetThemeDesignerUtils.enableWidgetEnhance()
&& (creator instanceof XRadioGroup
|| creator instanceof XCheckBoxGroup

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

@ -17,12 +17,20 @@ import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.stable.collections.CollectionUtils;
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;
/**
* 复选框pane
*
* @author obo
* @version 11.0
* Created on 2023/11/13
*/
public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
private UITextField text;
protected final List<BasicBeanPane<CheckBox>> extraPaneList = new ArrayList<>();

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

@ -22,14 +22,23 @@ import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.stable.collections.CollectionUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
/**
* 字段编辑pane
*
* @author obo
* @version 11.0
* Created on 2023/11/13
*/
public abstract class FieldEditorDefinePane<T extends FieldEditor> extends AbstractDataModify<T> {
protected UICheckBox allowBlankCheckBox;
// richer:错误信息,是所有控件共有的属性,所以放到这里来

Loading…
Cancel
Save