From 576efd67492386b76443fe8fecbf6473dcf5b422 Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 10 Jun 2020 18:01:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?MOBILE-27254=20=E8=81=94=E6=8E=92=E6=8C=89?= =?UTF-8?q?=E9=92=AETab=E6=A0=B7=E5=BC=8F=E6=94=AF=E6=8C=81=E4=B8=8A?= =?UTF-8?q?=E4=B8=8B=E8=BE=B9=E8=B7=9D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tab组件联排按钮标题栏样式配置面板添加关于上下边距的配置项 --- .../ui/MobileTemplateStyleDefinePane.java | 2 +- .../mobile/ui/UniteStyleDefinePane.java | 26 ++++++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java index 7c07aee6fc..6dc2da5e92 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java @@ -109,7 +109,7 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane Date: Fri, 12 Jun 2020 10:49:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?MOBILE-27254=20=E8=81=94=E6=8E=92=E6=8C=89?= =?UTF-8?q?=E9=92=AETab=E6=A0=B7=E5=BC=8F=E6=94=AF=E6=8C=81=E4=B8=8A?= =?UTF-8?q?=E4=B8=8B=E8=BE=B9=E8=B7=9D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补充移动端Tab组件联排按钮标题栏样式配置面板控件单元测试 --- .../mobile/ui/UniteStyleDefinePaneTest.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 designer-base/src/test/java/com/fr/design/mainframe/mobile/ui/UniteStyleDefinePaneTest.java diff --git a/designer-base/src/test/java/com/fr/design/mainframe/mobile/ui/UniteStyleDefinePaneTest.java b/designer-base/src/test/java/com/fr/design/mainframe/mobile/ui/UniteStyleDefinePaneTest.java new file mode 100644 index 0000000000..857a367d21 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/mainframe/mobile/ui/UniteStyleDefinePaneTest.java @@ -0,0 +1,39 @@ +package com.fr.design.mainframe.mobile.ui; + +import com.fr.form.ui.container.cardlayout.WCardTagLayout; +import com.fr.general.cardtag.mobile.UniteStyle; +import com.fr.invoke.Reflect; +import junit.framework.TestCase; +import org.junit.Test; + +import java.awt.*; + +public class UniteStyleDefinePaneTest extends TestCase { + + @Test + public void testDefaultConfig() { + UniteStyleDefinePane definePane = new UniteStyleDefinePane(new WCardTagLayout()); + Reflect.on(definePane).call("initDefaultConfig"); + + double paddingTop = Reflect.on(definePane).field("paddingTopSpinner").call("getValue").get(); + assertEquals((int)paddingTop, UniteStyle.DEFAULT_PADDING_TOP); + double paddingBottom = Reflect.on(definePane).field("paddingBottomSpinner").call("getValue").get(); + assertEquals((int)paddingBottom, UniteStyle.DEFAULT_PADDING_BOTTOM); + double paddingLeft = Reflect.on(definePane).field("paddingLeftSpinner").call("getValue").get(); + assertEquals((int)paddingLeft, UniteStyle.DEFAULT_PADDING_LEFT); + double paddingRight = Reflect.on(definePane).field("paddingRightSpinner").call("getValue").get(); + assertEquals((int)paddingRight, UniteStyle.DEFAULT_PADDING_RIGHT); + + Color initialBackgroundColor = Reflect.on(definePane).field("initialBackgroundColorBox").call("getSelectObject").get(); + assertEquals(initialBackgroundColor, UniteStyle.DEFAULT_INITIAL_BACKGROUND_COLOR); + Color selectedBackgroundColor = Reflect.on(definePane).field("selectedBackgroundColorBox").call("getSelectObject").get(); + assertEquals(selectedBackgroundColor, UniteStyle.DEFAULT_SELECTED_BACKGROUND_COLOR); + + int lineStyle = Reflect.on(definePane).field("borderWidthComboBox").call("getSelectedLineStyle").get(); + assertEquals(lineStyle, UniteStyle.DEFAULT_BORDER_LINE.lineStyle); + Color borderColor = Reflect.on(definePane).field("borderColorBox").call("getSelectObject").get(); + assertEquals(borderColor, UniteStyle.DEFAULT_BORDER_LINE.color); + double borderRadius = Reflect.on(definePane).field("borderRadiusSpinner").call("getValue").get(); + assertEquals((int)borderRadius, UniteStyle.DEFAULT_BORDER_RADIUS); + } +} \ No newline at end of file