Merge in DESIGN/design from ~VITO/c-design:newui to newui * commit 'e286ef903dfa2908e2dfe63eab56288edbbb4e66': (21 commits) REPORT-111619 控件增强-更多的样式配置--报表支撑 主题预览界面支持控件及提升跟随tab切换 REPORT-114305 控件扩展样式—等分布局、自然布局效果都反了 REPORT-114164 控件扩展样式-图文按钮图标格添加至12个以上,显示异常 REPORT-111619 控件增强-更多的样式配置--报表支撑 自测问题修复3 REPORT-111619 控件基础面板的字体名面板初始化 REPORT-111619 控件增强-更多的样式配置--报表支撑 自测问题修复 REPORT-111619 控件增强-更多的样式配置--报表支撑 自测问题修复 REPORT-111619 控件增强-更多的样式配置--报表支撑 移动端部分代码之前在别的工程漏提了,补一下 REPORT-114161 控件扩展样式—图文按钮新增的图标格没有默认选中 REPORT-114070 控件扩展样式—布局方式固定列数,应该只支持正整数 REPORT-114115 控件扩展样式—新建模板,联排按钮、图文按钮排布方式默认要选"等分布局" 无JIRA,去除多余import,解决打包错误 消除静态引入 优化代码,补充一些代码 REPORT-111619 控件增强-更多的样式配置--报表支撑 REPORT-111299 控件扩展样式-复选框组扩展样式 feat:调整移动端单选框组样式;扩展复选框组样式 REPORT-112769 JxUIPane新增执行js方法 REPORT-111299 控件扩展样式-复选框组扩展样式 feat:调整移动端单选框组样式;扩展复选框组样式 REPORT-111299 控件扩展样式-复选框组扩展样式 feat:调整移动端单选框组样式;扩展复选框组样式 REPORT-112501 模板主题管理英文显示不全 ...newui
@ -0,0 +1,41 @@
|
||||
package com.fr.design.mainframe.mobile.provider.checkboxgroup; |
||||
|
||||
import com.fr.design.fun.impl.AbstractMobileWidgetStyleProvider; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.mainframe.mobile.ui.MobileStyleCustomDefinePane; |
||||
import com.fr.design.mainframe.mobile.ui.radiogroup.CapsuleCustomDefinePane; |
||||
import com.fr.form.ui.mobile.MobileStyle; |
||||
import com.fr.form.ui.mobile.radiogroup.CapsuleMobileStyle; |
||||
|
||||
/** |
||||
* 移动端复选框provider |
||||
* @author crawford.zhou |
||||
* @since 11.0 |
||||
* Created on 2024/1/25 |
||||
*/ |
||||
public class CapsuleCheckboxGroupStyleProvider extends AbstractMobileWidgetStyleProvider { |
||||
@Override |
||||
public Class<? extends MobileStyle> classForMobileStyle() { |
||||
return CapsuleMobileStyle.class; |
||||
} |
||||
|
||||
@Override |
||||
public Class<? extends MobileStyleCustomDefinePane> classForWidgetAppearance() { |
||||
return CapsuleCustomDefinePane.class; |
||||
} |
||||
|
||||
@Override |
||||
public String xTypeForWidget() { |
||||
return "checkboxgroup"; |
||||
} |
||||
|
||||
@Override |
||||
public String displayName() { |
||||
return Toolkit.i18nText("Fine-Plugin-RadioGroup_Capsule_Button"); |
||||
} |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
} |
@ -0,0 +1,40 @@
|
||||
package com.fr.design.mainframe.mobile.provider.checkboxgroup; |
||||
|
||||
import com.fr.design.fun.impl.AbstractMobileWidgetStyleProvider; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.mainframe.mobile.ui.MobileStyleCustomDefinePane; |
||||
import com.fr.design.mainframe.mobile.ui.radiogroup.ImageCustomDefinePane; |
||||
import com.fr.form.ui.mobile.MobileStyle; |
||||
import com.fr.form.ui.mobile.radiogroup.ImageMobileStyle; |
||||
/** |
||||
* 移动端复选框provider |
||||
* @author crawford.zhou |
||||
* @since 11.0 |
||||
* Created on 2024/1/25 |
||||
*/ |
||||
public class ImageCheckboxGroupStyleProvider extends AbstractMobileWidgetStyleProvider { |
||||
@Override |
||||
public Class<? extends MobileStyle> classForMobileStyle() { |
||||
return ImageMobileStyle.class; |
||||
} |
||||
|
||||
@Override |
||||
public Class<? extends MobileStyleCustomDefinePane> classForWidgetAppearance() { |
||||
return ImageCustomDefinePane.class; |
||||
} |
||||
|
||||
@Override |
||||
public String xTypeForWidget() { |
||||
return "checkboxgroup"; |
||||
} |
||||
|
||||
@Override |
||||
public String displayName() { |
||||
return Toolkit.i18nText("Fine-Plugin-RadioGroup_Graphic_Button"); |
||||
} |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
} |
@ -0,0 +1,40 @@
|
||||
package com.fr.design.mainframe.mobile.provider.checkboxgroup; |
||||
|
||||
import com.fr.design.fun.impl.AbstractMobileWidgetStyleProvider; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.mainframe.mobile.ui.MobileStyleCustomDefinePane; |
||||
import com.fr.design.mainframe.mobile.ui.radiogroup.UnitedCustomDefinePane; |
||||
import com.fr.form.ui.mobile.MobileStyle; |
||||
import com.fr.form.ui.mobile.radiogroup.UnitedMobileStyle; |
||||
/** |
||||
* 移动端复选框provider |
||||
* @author crawford.zhou |
||||
* @since 11.0 |
||||
* Created on 2024/1/25 |
||||
*/ |
||||
public class UnitedCheckboxGroupStyleProvider extends AbstractMobileWidgetStyleProvider { |
||||
@Override |
||||
public Class<? extends MobileStyle> classForMobileStyle() { |
||||
return UnitedMobileStyle.class; |
||||
} |
||||
|
||||
@Override |
||||
public Class<? extends MobileStyleCustomDefinePane> classForWidgetAppearance() { |
||||
return UnitedCustomDefinePane.class; |
||||
} |
||||
|
||||
@Override |
||||
public String xTypeForWidget() { |
||||
return "checkboxgroup"; |
||||
} |
||||
|
||||
@Override |
||||
public String displayName() { |
||||
return Toolkit.i18nText("Fine-Plugin-RadioGroup_Linkage_Button"); |
||||
} |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
} |
@ -0,0 +1,62 @@
|
||||
package com.fr.widgettheme; |
||||
|
||||
import com.fr.base.theme.TemplateTheme; |
||||
import com.fr.widgettheme.theme.widget.style.MobileThemedWidgetStyle; |
||||
import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle; |
||||
|
||||
/** |
||||
* 主题样式预览终端类型 |
||||
* |
||||
* @author obo |
||||
* @since 11.0 |
||||
* Created on 2024/2/2 |
||||
*/ |
||||
public enum ThemePreviewTerminal { |
||||
|
||||
/** |
||||
* 桌面端,为默认类型 |
||||
*/ |
||||
PC(0) { |
||||
@Override |
||||
public ThemedWidgetStyle getThemeWidgetStyle(TemplateTheme theme) { |
||||
return (ThemedWidgetStyle) theme.getWidgetStyle(); |
||||
} |
||||
}, |
||||
|
||||
/** |
||||
* 移动端 |
||||
*/ |
||||
MOBILE(1) { |
||||
@Override |
||||
public ThemedWidgetStyle getThemeWidgetStyle(TemplateTheme theme) { |
||||
return (MobileThemedWidgetStyle) theme.getMobileWidgetStyle(); |
||||
} |
||||
}; |
||||
|
||||
/** |
||||
* 类型码 |
||||
*/ |
||||
final int code; |
||||
|
||||
ThemePreviewTerminal(int code) { |
||||
this.code = code; |
||||
} |
||||
|
||||
public int getCode() { |
||||
return code; |
||||
} |
||||
|
||||
public abstract ThemedWidgetStyle getThemeWidgetStyle(TemplateTheme theme); |
||||
|
||||
/** |
||||
* 根据code获取对应的枚举 |
||||
*/ |
||||
public static ThemePreviewTerminal getTypeByCode(int code) { |
||||
for (ThemePreviewTerminal type : ThemePreviewTerminal.values()) { |
||||
if (type.code == code) { |
||||
return type; |
||||
} |
||||
} |
||||
throw new IllegalArgumentException("Invalid ThemePreviewTerminalType code :" + code); |
||||
} |
||||
} |
@ -1,40 +0,0 @@
|
||||
package com.fr.widgettheme.util; |
||||
|
||||
import com.fr.design.gui.frpane.FontSizeComboPane; |
||||
import com.fr.design.gui.ibutton.UIColorButton; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
|
||||
import javax.swing.Box; |
||||
import javax.swing.JPanel; |
||||
import java.awt.Component; |
||||
|
||||
/** |
||||
* 创建主题文本样式的工具类 |
||||
* |
||||
* @author obo |
||||
* @since 11.0 |
||||
* Created on 2023/12/21 |
||||
*/ |
||||
public class ThemeTextStylePaneCreator { |
||||
private ThemeTextStylePaneCreator() {} |
||||
|
||||
/** |
||||
* 创建主题文本样式配置面板 |
||||
* 包含字体大小下拉框和字体颜色按钮 |
||||
* 可以自适应布局 |
||||
* |
||||
* @param fontSizePane 字体大小配置 |
||||
* @param fontColorButton 字体颜色配置 |
||||
* @return 文本样式面板 |
||||
*/ |
||||
public static JPanel create(FontSizeComboPane fontSizePane, UIColorButton fontColorButton) { |
||||
Component[][] components = {{fontSizePane, Box.createHorizontalStrut(5), fontColorButton}}; |
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
double[] rowSize = {f}; |
||||
double[] columnSize = {f, p, p}; |
||||
int[][] rowCount = {{1, 1, 1}}; |
||||
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 0, 0); |
||||
} |
||||
} |
@ -0,0 +1,131 @@
|
||||
package com.fr.widgettheme.util; |
||||
|
||||
import com.fr.design.designer.IntervalConstants; |
||||
import com.fr.design.gui.frpane.FontSizeComboPane; |
||||
import com.fr.design.gui.frpane.UIPercentDragPane; |
||||
import com.fr.design.gui.ibutton.UIColorButton; |
||||
import com.fr.design.gui.ibutton.UIToggleButton; |
||||
import com.fr.design.gui.icombobox.LineComboBox; |
||||
import com.fr.design.gui.icombobox.UIComboBox; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.design.style.color.NewColorSelectBox; |
||||
import com.fr.design.widget.FRWidgetFactory; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.awt.Component; |
||||
|
||||
/** |
||||
* 创建控件样式组合配置面板的工具类 |
||||
* |
||||
* @author obo |
||||
* @since 11.0 |
||||
* Created on 2023/12/21 |
||||
*/ |
||||
public class WidgetStyleComponentCombiner { |
||||
|
||||
private static final double F = TableLayout.FILL; |
||||
private static final double P = TableLayout.PREFERRED; |
||||
|
||||
|
||||
private WidgetStyleComponentCombiner() { |
||||
} |
||||
|
||||
/** |
||||
* 组合主题文本样式配置面板 |
||||
* 包含字体大小下拉框和字体颜色按钮 |
||||
* |
||||
* @param fontSizePane 字体大小配置 |
||||
* @param fontColorButton 字体颜色配置 |
||||
* @param bold 粗体 |
||||
* @param italic 斜体 |
||||
* @return 文本样式面板 |
||||
*/ |
||||
public static JPanel combineTextStyleComponent(FontSizeComboPane fontSizePane, UIColorButton fontColorButton, UIToggleButton bold, UIToggleButton italic) { |
||||
Component[][] components = {{fontSizePane, fontColorButton, bold, italic}}; |
||||
double[] rowSize = {P}; |
||||
double[] columnSize = {F, P, P, P}; |
||||
int[][] rowCount = {{1, 1, 1, 1}}; |
||||
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 5, 5); |
||||
} |
||||
|
||||
/** |
||||
* 组合主题文本样式配置面板 |
||||
* 包含字体大小下拉框和字体颜色按钮 |
||||
* |
||||
* @param fontNameSelectBox 字体名配置 |
||||
* @param fontSizePane 字体大小配置 |
||||
* @param fontColorButton 字体颜色配置 |
||||
* @param bold 粗体 |
||||
* @param italic 斜体 |
||||
* @return 文本样式面板 |
||||
*/ |
||||
public static JPanel combineTextStyleComponent(UIComboBox fontNameSelectBox, FontSizeComboPane fontSizePane, UIColorButton fontColorButton, UIToggleButton bold, UIToggleButton italic) { |
||||
Component[][] components = { |
||||
{fontNameSelectBox, null, null, null}, |
||||
{fontSizePane, fontColorButton, bold, italic} |
||||
}; |
||||
double[] rowSize = {P, P}; |
||||
double[] columnSize = {F, P, P, P}; |
||||
int[][] rowCount = { |
||||
{1, 1, 1, 1}, |
||||
{1, 1, 1, 1} |
||||
}; |
||||
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 5, 5); |
||||
} |
||||
|
||||
/** |
||||
* 组合控件背景配置面板 |
||||
* |
||||
* @param colorSelectBox 颜色下拉框 |
||||
* @param alphaDragPane 透明度 |
||||
* @param columnWidth 列宽 |
||||
* @return 文本样式面板 |
||||
*/ |
||||
public static JPanel combineWidgetBackgroundComponent(NewColorSelectBox colorSelectBox, |
||||
UIPercentDragPane alphaDragPane, |
||||
double columnWidth) { |
||||
Component[][] components = { |
||||
{colorSelectBox}, |
||||
{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Form_Widget-Style_Alpha"))}, |
||||
{alphaDragPane} |
||||
}; |
||||
double[] rowSize = {P, P, P}; |
||||
double[] columnSize = {columnWidth}; |
||||
int[][] rowCount = {{1}, {1}, {1}}; |
||||
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1); |
||||
} |
||||
|
||||
/** |
||||
* 组合控件边框配置面板 |
||||
* |
||||
* @param lineComboBox 字体大小配置 |
||||
* @param lineComboColorSelectBox 字体颜色配置 |
||||
* @return 文本样式面板 |
||||
*/ |
||||
public static JPanel combineWidgetBorderComponent(LineComboBox lineComboBox, NewColorSelectBox lineComboColorSelectBox) { |
||||
return combineWidgetBorderComponent(lineComboBox, lineComboColorSelectBox, P); |
||||
} |
||||
|
||||
/** |
||||
* 组合控件边框配置面板 |
||||
* |
||||
* @param lineComboBox 字体大小配置 |
||||
* @param lineComboColorSelectBox 字体颜色配置 |
||||
* @param columnWidth 指定的列宽 |
||||
* @return 文本样式面板 |
||||
*/ |
||||
public static JPanel combineWidgetBorderComponent(LineComboBox lineComboBox, |
||||
NewColorSelectBox lineComboColorSelectBox, |
||||
double columnWidth) { |
||||
Component[][] components = { |
||||
{lineComboBox}, |
||||
{lineComboColorSelectBox} |
||||
}; |
||||
double[] rowSize = {P, P}; |
||||
double[] columnSize = {columnWidth}; |
||||
int[][] rowCount = {{1}, {1}}; |
||||
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1); |
||||
} |
||||
} |
@ -0,0 +1,36 @@
|
||||
package com.fr.widgettheme.widget.mobile.pane; |
||||
|
||||
import com.fr.design.mainframe.mobile.ui.MobileStyleCustomDefinePane; |
||||
import com.fr.form.ui.Widget; |
||||
import com.fr.form.ui.mobile.MobileStyle; |
||||
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; |
||||
|
||||
/** |
||||
* 带有图标颜色的移动端控件通用配置面板 |
||||
* |
||||
* @author obo |
||||
* @since 11.0 |
||||
* Created on 2024/1/25 |
||||
*/ |
||||
public class IconColorMobileStyleDefinePane extends DisplayEnhanceMobileStyleDefinePane{ |
||||
|
||||
public IconColorMobileStyleDefinePane(Widget widget, Class<? extends MobileStyleCustomDefinePane> customBeanPaneClass, Class<? extends MobileStyle> mobileStyleClazz) { |
||||
super(widget, customBeanPaneClass, mobileStyleClazz); |
||||
} |
||||
|
||||
@Override |
||||
protected void createUniversalPane() { |
||||
// 主题色
|
||||
createThemePane(); |
||||
// 组件背景
|
||||
createBackgroundPane(); |
||||
// 边框线型
|
||||
createBorderLinePane(); |
||||
// 圆角边框
|
||||
createBorderRadiusPane(); |
||||
//图标颜色
|
||||
createIconColorSelectBox(); |
||||
// 字体
|
||||
createFontPane(); |
||||
} |
||||
} |
@ -0,0 +1,33 @@
|
||||
package com.fr.widgettheme.widget.mobile.pane; |
||||
|
||||
import com.fr.design.mainframe.mobile.ui.MobileStyleCustomDefinePane; |
||||
import com.fr.form.ui.Widget; |
||||
import com.fr.form.ui.mobile.MobileStyle; |
||||
import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; |
||||
|
||||
/** |
||||
* 文本域控件移动端配置面板 |
||||
* |
||||
* @author obo |
||||
* @since 11.0 |
||||
* Created on 2024/1/25 |
||||
*/ |
||||
public class TextAreaMobileStyleDefinePane extends DisplayEnhanceMobileStyleDefinePane{ |
||||
public TextAreaMobileStyleDefinePane(Widget widget, Class<? extends MobileStyleCustomDefinePane> customBeanPaneClass, Class<? extends MobileStyle> mobileStyleClazz) { |
||||
super(widget, customBeanPaneClass, mobileStyleClazz); |
||||
} |
||||
|
||||
@Override |
||||
protected void createUniversalPane() { |
||||
// 主题色
|
||||
createThemePane(); |
||||
// 组件背景
|
||||
createBackgroundPane(); |
||||
// 边框线型
|
||||
createBorderLinePane(); |
||||
// 圆角边框
|
||||
createBorderRadiusPane(); |
||||
// 字体
|
||||
createFontPane(); |
||||
} |
||||
} |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 8.7 KiB |