From 32174c596cb08c962e7bdbd6853872a648247f4f Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 4 Dec 2018 13:47:28 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-10535=20=E9=AA=8C=E6=94=B6bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/DefaultMobileStyleDefinePane.java | 11 ++++++- .../mobile/ui/DownMenuStyleDefinePane.java | 12 +++---- .../design/mainframe/mobile/ui/LinePane.java | 1 - .../ui/MobileTemplateStyleDefinePane.java | 19 +++++++++-- .../mobile/ui/SliderStyleDefinePane.java | 5 ++- .../ui/StyleDefinePaneWithSelectConf.java | 9 ++---- .../mobile/ui/TabIconConfigPane.java | 32 ++++++++++++------- .../ui/TemplateStyleDefinePaneFactory.java | 1 - .../mobile/ui/UpMenuStyleDefinePane.java | 23 ++++++------- .../com/fr/design/web/CustomIconPane.java | 7 +++- 10 files changed, 75 insertions(+), 45 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java index d397c8d52..6b2ecec66 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java @@ -7,7 +7,6 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.general.FRFont; import com.fr.general.cardtag.mobile.DefaultMobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle; - import java.awt.BasicStroke; import java.awt.Dimension; import java.awt.FontMetrics; @@ -44,11 +43,21 @@ public class DefaultMobileStyleDefinePane extends MobileTemplateStyleDefinePane return new DefaultMobileTemplateStyle(); } + public MobileTemplateStyle updateConfig(){ + return new DefaultMobileTemplateStyle(); + } + + @Override protected MobileTemplateStyle getDefaultTemplateStyle() { return new DefaultMobileTemplateStyle(); } + @Override + public void populateSubStyle(MobileTemplateStyle ob) { + + } + @Override protected String title4PopupWindow() { return null; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DownMenuStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DownMenuStyleDefinePane.java index a0184c9a8..1a0472cbb 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DownMenuStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DownMenuStyleDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.mainframe.mobile.ui; import com.fr.base.GraphHelper; +import com.fr.base.Icon; import com.fr.base.IconManager; import com.fr.design.constants.LayoutConstants; import com.fr.design.designer.IntervalConstants; @@ -15,7 +16,6 @@ import com.fr.general.FRFont; import com.fr.general.cardtag.mobile.DownMenuStyle; import com.fr.general.cardtag.mobile.LineDescription; import com.fr.general.cardtag.mobile.MobileTemplateStyle; - import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.event.ChangeEvent; @@ -89,8 +89,8 @@ public class DownMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { @Override - public void populateBean(MobileTemplateStyle ob) { - super.populateBean(ob); + public void populateSubStyle(MobileTemplateStyle ob) { + super.populateSubStyle(ob); DownMenuStyle downMenuStyle = (DownMenuStyle) ob; splitLinePane.populate(downMenuStyle.getSplitLine()); ArrayList initialIconNames = new ArrayList(); @@ -132,6 +132,7 @@ public class DownMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { private static final int ICON_OFFSET = 16; private static final int GAP = 6; private static final String PAINT_ICON = "fund_white"; + private static final String ICON_PATH = "/com/fr/web/images/fund_white.png"; private LineDescription splitLine; public DownMenuStylePreviewPane() { @@ -158,7 +159,6 @@ public class DownMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { int fontHeight = fm.getHeight(); int ascent = fm.getAscent(); for (int i = 0; i < cardTagLayout.getWidgetCount(); i++) { - g2d.setColor(i == 0 ? selectFontColor : frFont.getForeground()); CardSwitchButton cardSwitchButton = cardTagLayout.getSwitchButton(i); String widgetName = cardSwitchButton.getText(); @@ -169,8 +169,8 @@ public class DownMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { g2d.fillRect(0, 0 ,eachWidth, panelHeight); g2d.setColor(oldColor); } - String iconName = PAINT_ICON; - g2d.drawImage(IconManager.getIconManager().getIconImage(iconName), (eachWidth - ICON_OFFSET) / 2, (panelHeight - ICON_OFFSET - GAP - fontHeight) / 2, null); + Icon icon = new Icon(PAINT_ICON, ICON_PATH); + g2d.drawImage(IconManager.getIconManager().getDefaultIconImage(icon), (eachWidth - ICON_OFFSET) / 2, (panelHeight - ICON_OFFSET - GAP - fontHeight) / 2, null); g2d.drawString(widgetName, (eachWidth - width) / 2, (panelHeight + ICON_OFFSET + GAP - fontHeight) / 2 + ascent); Stroke oldStroke = g2d.getStroke(); if (splitLine.getLineStyle() != 0) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/LinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/LinePane.java index fabc7ca5b..57dc87e18 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/LinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/LinePane.java @@ -9,7 +9,6 @@ import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.style.color.NewColorSelectBox; import com.fr.general.cardtag.mobile.LineDescription; import com.fr.stable.CoreConstants; - import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.event.ChangeEvent; 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 9f5809f92..b499e18d7 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 @@ -14,10 +14,12 @@ import com.fr.design.mainframe.widget.UITitleSplitLine; import com.fr.design.mainframe.widget.preview.MobileTemplatePreviewPane; import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.general.FRFont; import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.TabFontConfig; +import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -34,7 +36,7 @@ import java.awt.event.ItemEvent; import java.awt.event.ItemListener; public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane { - private static final String[] TAB_STYLES = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default"), + private static final String[] TAB_STYLES = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Standard"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Custom")}; private UIComboBox custom; protected NewColorSelectBox initialColorBox; @@ -179,6 +181,7 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane