Browse Source

REPORT-10535 验收bug修复

research/10.0
kerry 6 years ago
parent
commit
32174c596c
  1. 11
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java
  2. 12
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DownMenuStyleDefinePane.java
  3. 1
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/LinePane.java
  4. 19
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java
  5. 5
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SliderStyleDefinePane.java
  6. 9
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/StyleDefinePaneWithSelectConf.java
  7. 32
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/TabIconConfigPane.java
  8. 1
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/TemplateStyleDefinePaneFactory.java
  9. 23
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java
  10. 7
      designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

11
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.FRFont;
import com.fr.general.cardtag.mobile.DefaultMobileTemplateStyle; import com.fr.general.cardtag.mobile.DefaultMobileTemplateStyle;
import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import java.awt.BasicStroke; import java.awt.BasicStroke;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.FontMetrics; import java.awt.FontMetrics;
@ -44,11 +43,21 @@ public class DefaultMobileStyleDefinePane extends MobileTemplateStyleDefinePane
return new DefaultMobileTemplateStyle(); return new DefaultMobileTemplateStyle();
} }
public MobileTemplateStyle updateConfig(){
return new DefaultMobileTemplateStyle();
}
@Override @Override
protected MobileTemplateStyle getDefaultTemplateStyle() { protected MobileTemplateStyle getDefaultTemplateStyle() {
return new DefaultMobileTemplateStyle(); return new DefaultMobileTemplateStyle();
} }
@Override
public void populateSubStyle(MobileTemplateStyle ob) {
}
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return null; return null;

12
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DownMenuStyleDefinePane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.mobile.ui; package com.fr.design.mainframe.mobile.ui;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.Icon;
import com.fr.base.IconManager; import com.fr.base.IconManager;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.IntervalConstants; 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.DownMenuStyle;
import com.fr.general.cardtag.mobile.LineDescription; import com.fr.general.cardtag.mobile.LineDescription;
import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
@ -89,8 +89,8 @@ public class DownMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
@Override @Override
public void populateBean(MobileTemplateStyle ob) { public void populateSubStyle(MobileTemplateStyle ob) {
super.populateBean(ob); super.populateSubStyle(ob);
DownMenuStyle downMenuStyle = (DownMenuStyle) ob; DownMenuStyle downMenuStyle = (DownMenuStyle) ob;
splitLinePane.populate(downMenuStyle.getSplitLine()); splitLinePane.populate(downMenuStyle.getSplitLine());
ArrayList<String> initialIconNames = new ArrayList<String>(); ArrayList<String> initialIconNames = new ArrayList<String>();
@ -132,6 +132,7 @@ public class DownMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
private static final int ICON_OFFSET = 16; private static final int ICON_OFFSET = 16;
private static final int GAP = 6; private static final int GAP = 6;
private static final String PAINT_ICON = "fund_white"; private static final String PAINT_ICON = "fund_white";
private static final String ICON_PATH = "/com/fr/web/images/fund_white.png";
private LineDescription splitLine; private LineDescription splitLine;
public DownMenuStylePreviewPane() { public DownMenuStylePreviewPane() {
@ -158,7 +159,6 @@ public class DownMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
int fontHeight = fm.getHeight(); int fontHeight = fm.getHeight();
int ascent = fm.getAscent(); int ascent = fm.getAscent();
for (int i = 0; i < cardTagLayout.getWidgetCount(); i++) { for (int i = 0; i < cardTagLayout.getWidgetCount(); i++) {
g2d.setColor(i == 0 ? selectFontColor : frFont.getForeground()); g2d.setColor(i == 0 ? selectFontColor : frFont.getForeground());
CardSwitchButton cardSwitchButton = cardTagLayout.getSwitchButton(i); CardSwitchButton cardSwitchButton = cardTagLayout.getSwitchButton(i);
String widgetName = cardSwitchButton.getText(); String widgetName = cardSwitchButton.getText();
@ -169,8 +169,8 @@ public class DownMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
g2d.fillRect(0, 0 ,eachWidth, panelHeight); g2d.fillRect(0, 0 ,eachWidth, panelHeight);
g2d.setColor(oldColor); g2d.setColor(oldColor);
} }
String iconName = PAINT_ICON; Icon icon = new Icon(PAINT_ICON, ICON_PATH);
g2d.drawImage(IconManager.getIconManager().getIconImage(iconName), (eachWidth - ICON_OFFSET) / 2, (panelHeight - ICON_OFFSET - GAP - fontHeight) / 2, null); 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); g2d.drawString(widgetName, (eachWidth - width) / 2, (panelHeight + ICON_OFFSET + GAP - fontHeight) / 2 + ascent);
Stroke oldStroke = g2d.getStroke(); Stroke oldStroke = g2d.getStroke();
if (splitLine.getLineStyle() != 0) { if (splitLine.getLineStyle() != 0) {

1
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.design.style.color.NewColorSelectBox;
import com.fr.general.cardtag.mobile.LineDescription; import com.fr.general.cardtag.mobile.LineDescription;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;

19
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.mainframe.widget.preview.MobileTemplatePreviewPane;
import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import com.fr.general.cardtag.mobile.TabFontConfig; import com.fr.general.cardtag.mobile.TabFontConfig;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -34,7 +36,7 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<MobileTemplateStyle> { public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<MobileTemplateStyle> {
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")}; com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Custom")};
private UIComboBox custom; private UIComboBox custom;
protected NewColorSelectBox initialColorBox; protected NewColorSelectBox initialColorBox;
@ -179,6 +181,7 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
@Override @Override
public void populateBean(MobileTemplateStyle ob) { public void populateBean(MobileTemplateStyle ob) {
centerPane.setVisible(ob.isCustom()); centerPane.setVisible(ob.isCustom());
populateSubStyle(ob);
custom.setSelectedItem(!ob.isCustom() ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default") : custom.setSelectedItem(!ob.isCustom() ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default") :
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Custom")); com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Custom"));
initialColorBox.setSelectObject(ob.getInitialColor()); initialColorBox.setSelectObject(ob.getInitialColor());
@ -189,6 +192,16 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
@Override @Override
public MobileTemplateStyle updateBean() { public MobileTemplateStyle updateBean() {
//保存之前需要先将cardSwitchBtn的icon设置清空
for (int i = 0; i < getTagLayout().getWidgetCount(); i++) {
CardSwitchButton cardSwitchButton = (CardSwitchButton) getTagLayout().getWidget(i);
cardSwitchButton.setInitIconName(StringUtils.EMPTY);
cardSwitchButton.setSelectIconName(StringUtils.EMPTY);
}
return updateConfig();
}
public MobileTemplateStyle updateConfig(){
if (custom.getSelectedIndex() == 0) { if (custom.getSelectedIndex() == 0) {
return getDefaultTemplateStyle(); return getDefaultTemplateStyle();
} }
@ -203,11 +216,13 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
protected abstract MobileTemplateStyle getDefaultTemplateStyle(); protected abstract MobileTemplateStyle getDefaultTemplateStyle();
public void updatePreviewPane() { public void updatePreviewPane() {
previewPane.populateConfig(updateBean()); previewPane.populateConfig(updateConfig());
previewPane.setBackground(previewPane.getInitialColor()); previewPane.setBackground(previewPane.getInitialColor());
previewPane.repaint(); previewPane.repaint();
} }
public abstract void populateSubStyle(MobileTemplateStyle ob);
public abstract MobileTemplateStyle updateSubStyle(); public abstract MobileTemplateStyle updateSubStyle();

5
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SliderStyleDefinePane.java

@ -13,7 +13,6 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import com.fr.general.cardtag.mobile.SliderStyle; import com.fr.general.cardtag.mobile.SliderStyle;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
@ -36,8 +35,7 @@ public class SliderStyleDefinePane extends MobileTemplateStyleDefinePane {
} }
@Override @Override
public void populateBean(MobileTemplateStyle ob) { public void populateSubStyle(MobileTemplateStyle ob) {
super.populateBean(ob);
SliderStyle sliderStyle = (SliderStyle) ob; SliderStyle sliderStyle = (SliderStyle) ob;
initDotColor.setSelectObject(sliderStyle.getInitDotColor()); initDotColor.setSelectObject(sliderStyle.getInitDotColor());
selectDotColor.setSelectObject(sliderStyle.getSelectDotColor()); selectDotColor.setSelectObject(sliderStyle.getSelectDotColor());
@ -48,6 +46,7 @@ public class SliderStyleDefinePane extends MobileTemplateStyleDefinePane {
return new SliderStyle(); return new SliderStyle();
} }
@Override @Override
public MobileTemplateStyle updateSubStyle() { public MobileTemplateStyle updateSubStyle() {
SliderStyle sliderStyle = new SliderStyle(); SliderStyle sliderStyle = new SliderStyle();

9
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/StyleDefinePaneWithSelectConf.java

@ -10,7 +10,6 @@ import com.fr.design.mainframe.widget.MobileTabFontConfPane;
import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.style.color.NewColorSelectBox;
import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
@ -104,10 +103,8 @@ public abstract class StyleDefinePaneWithSelectConf extends MobileTemplateStyleD
protected abstract MobileTemplateStyle updateStyleWithSelectConf(); protected abstract MobileTemplateStyle updateStyleWithSelectConf();
@Override public void populateSubStyle(MobileTemplateStyle ob) {
public void populateBean(MobileTemplateStyle mobileTemplateStyle) { selectColorBox.setSelectObject(ob.getSelectColor());
super.populateBean(mobileTemplateStyle); selectFontColor.setColor(ob.getTabFontConfig().getSelectColor());
selectColorBox.setSelectObject(mobileTemplateStyle.getSelectColor());
selectFontColor.setColor(mobileTemplateStyle.getTabFontConfig().getSelectColor());
} }
} }

32
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/TabIconConfigPane.java

@ -1,17 +1,16 @@
package com.fr.design.mainframe.mobile.ui; package com.fr.design.mainframe.mobile.ui;
import com.fr.base.GraphHelper;
import com.fr.base.IconManager; import com.fr.base.IconManager;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.DrawRoutines;
import com.fr.design.web.CustomIconPane; import com.fr.design.web.CustomIconPane;
import com.fr.form.ui.WidgetInfoConfig; import com.fr.form.ui.WidgetInfoConfig;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.stable.Constants; import com.fr.general.FRFont;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -24,12 +23,12 @@ import java.awt.Color;
import java.awt.Cursor; import java.awt.Cursor;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.FlowLayout; import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Image; import java.awt.Image;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.geom.Rectangle2D;
import java.util.ArrayList; import java.util.ArrayList;
public class TabIconConfigPane extends JPanel { public class TabIconConfigPane extends JPanel {
@ -47,11 +46,16 @@ public class TabIconConfigPane extends JPanel {
JPanel panel = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); JPanel panel = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
editIconButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); editIconButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editIconButton.setFont(FRFont.getInstance("Helvetica", Font.PLAIN, 12, Color.decode("#3A383A")));
editIconButton.setPreferredSize(new Dimension(62, 20)); editIconButton.setPreferredSize(new Dimension(62, 20));
panel.add(editIconButton); panel.add(editIconButton);
editIconButton.addActionListener(new ActionListener() { editIconButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
final CustomIconPane cip = new CustomIconPane(); final CustomIconPane cip = new CustomIconPane(){
protected String createDescriptionText(){
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Custom_Icon_Message");
}
};
BasicDialog editDialog = cip.showWindow(DesignerContext.getDesignerFrame()); BasicDialog editDialog = cip.showWindow(DesignerContext.getDesignerFrame());
editDialog.addDialogActionListener(new DialogActionAdapter() { editDialog.addDialogActionListener(new DialogActionAdapter() {
@Override @Override
@ -120,6 +124,18 @@ public class TabIconConfigPane extends JPanel {
}); });
} }
protected void paintBorder(Graphics g) {
super.paintBorder(g);
if (ComparatorUtils.equals(this, selectIconButton)) {
DrawRoutines.drawRoundedBorder(
g, Color.decode("#419BF9"), 0, 0, 20, 20);
} else {
DrawRoutines.drawRoundedBorder(
g, Color.decode("#D9DADD"), 0, 0, 20, 20);
}
}
public String getIconName() { public String getIconName() {
return iconName; return iconName;
} }
@ -137,12 +153,6 @@ public class TabIconConfigPane extends JPanel {
if (iconImage != null) { if (iconImage != null) {
g2d.drawImage(iconImage, ICON_X, ICON_Y, IconManager.DEFAULT_ICONWIDTH, IconManager.DEFAULT_ICONHEIGHT, null); g2d.drawImage(iconImage, ICON_X, ICON_Y, IconManager.DEFAULT_ICONWIDTH, IconManager.DEFAULT_ICONHEIGHT, null);
} }
if (this.iconName != null && ComparatorUtils.equals(this, selectIconButton)) {
g2d.setPaint(Color.decode("#419BF9"));
} else {
g2d.setPaint(Color.decode("#D9DADD"));
}
GraphHelper.draw(g2d, new Rectangle2D.Double(0, 0, 20, 20), Constants.LINE_MEDIUM);
} }
@Override @Override

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

@ -9,7 +9,6 @@ import com.fr.general.cardtag.mobile.SliderStyle;
import com.fr.general.cardtag.mobile.UpMenuStyle; import com.fr.general.cardtag.mobile.UpMenuStyle;
import com.fr.invoke.Reflect; import com.fr.invoke.Reflect;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

23
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java

@ -15,7 +15,6 @@ import com.fr.general.FRFont;
import com.fr.general.cardtag.mobile.LineDescription; import com.fr.general.cardtag.mobile.LineDescription;
import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import com.fr.general.cardtag.mobile.UpMenuStyle; import com.fr.general.cardtag.mobile.UpMenuStyle;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.ButtonGroup; import javax.swing.ButtonGroup;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -94,7 +93,7 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
updatePreviewPane(); updatePreviewPane();
} }
}); });
UITitleSplitLine titleSplitLine = new UITitleSplitLine(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Spit_Line"), 520); UITitleSplitLine titleSplitLine = new UITitleSplitLine(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Bottom_Border"), 520);
titleSplitLine.setPreferredSize(new Dimension(520, 20)); titleSplitLine.setPreferredSize(new Dimension(520, 20));
centerPane.add(titleSplitLine); centerPane.add(titleSplitLine);
centerPane.add(bottomBorderPane); centerPane.add(bottomBorderPane);
@ -120,8 +119,8 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
} }
@Override @Override
public void populateBean(MobileTemplateStyle ob) { public void populateSubStyle(MobileTemplateStyle ob) {
super.populateBean(ob); super.populateSubStyle(ob);
UpMenuStyle style = (UpMenuStyle) ob; UpMenuStyle style = (UpMenuStyle) ob;
gapFix.setSelected(style.isGapFix()); gapFix.setSelected(style.isGapFix());
titleWidthFix.setSelected(style.isTitleWidthFix()); titleWidthFix.setSelected(style.isTitleWidthFix());
@ -179,6 +178,11 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
g2d.setFont(frFont); g2d.setFont(frFont);
int fontHeight = fm.getHeight(); int fontHeight = fm.getHeight();
int ascentHeight = fm.getAscent(); int ascentHeight = fm.getAscent();
if (bottomBorder.getLineStyle() != 0) {
g2d.setColor(bottomBorder.getColor());
g2d.setStroke(GraphHelper.getStroke(bottomBorder.getLineStyle()));
g2d.drawLine(0, panelHeight - 1, panelWidth, panelHeight - 1);
}
for (int i = 0; i < cardTagLayout.getWidgetCount(); i++) { for (int i = 0; i < cardTagLayout.getWidgetCount(); i++) {
g2d.setColor(i == 0 ? selectFontColor : frFont.getForeground()); g2d.setColor(i == 0 ? selectFontColor : frFont.getForeground());
CardSwitchButton cardSwitchButton = cardTagLayout.getSwitchButton(i); CardSwitchButton cardSwitchButton = cardTagLayout.getSwitchButton(i);
@ -187,7 +191,7 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
if(i == 0){ if(i == 0){
Color oldColor = g2d.getColor(); Color oldColor = g2d.getColor();
g2d.setColor(this.getSelectColor()); g2d.setColor(this.getSelectColor());
g2d.fillRect(0, 0 ,eachWidth, panelHeight); g2d.fillRect(0, 0 ,eachWidth, panelHeight - 2);
g2d.setColor(oldColor); g2d.setColor(oldColor);
} }
g2d.drawString(widgetName, (eachWidth - width) / 2, (panelHeight - fontHeight) / 2 + ascentHeight); g2d.drawString(widgetName, (eachWidth - width) / 2, (panelHeight - fontHeight) / 2 + ascentHeight);
@ -197,18 +201,11 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
g2d.setStroke(GraphHelper.getStroke(underLine.getLineStyle())); g2d.setStroke(GraphHelper.getStroke(underLine.getLineStyle()));
int underLineX = this.isGapFix ? (eachWidth - width) / 2 : 0; int underLineX = this.isGapFix ? (eachWidth - width) / 2 : 0;
int underLineWidth = this.isGapFix ? width : eachWidth; int underLineWidth = this.isGapFix ? width : eachWidth;
g2d.drawLine(underLineX, panelHeight - 1, underLineX + underLineWidth, panelHeight - 1); g2d.drawLine(underLineX, panelHeight - 2, underLineX + underLineWidth, panelHeight - 2);
}
if (bottomBorder.getLineStyle() != 0) {
g2d.setColor(bottomBorder.getColor());
g2d.setStroke(GraphHelper.getStroke(bottomBorder.getLineStyle()));
g2d.drawLine(eachWidth, 0, eachWidth, panelHeight);
} }
g2d.setStroke(oldStroke); g2d.setStroke(oldStroke);
g2d.translate(eachWidth, 0); g2d.translate(eachWidth, 0);
} }
} }
public void populateConfig(MobileTemplateStyle templateStyle) { public void populateConfig(MobileTemplateStyle templateStyle) {

7
designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

@ -84,7 +84,7 @@ public class CustomIconPane extends BasicPane {
noNamePane.add(jsPane); noNamePane.add(jsPane);
DescriptionTextArea des = new DescriptionTextArea(2); DescriptionTextArea des = new DescriptionTextArea(2);
des.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_Message1")); des.setText(createDescriptionText());
centerPane.add(des, BorderLayout.SOUTH); centerPane.add(des, BorderLayout.SOUTH);
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
@ -102,6 +102,11 @@ public class CustomIconPane extends BasicPane {
} }
protected String createDescriptionText(){
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Icon_Message1");
}
private void initIcons() { private void initIcons() {
iconButtonMap = new ListMap(); iconButtonMap = new ListMap();
iconManager = WidgetInfoConfig.getInstance().getIconManager(); iconManager = WidgetInfoConfig.getInstance().getIconManager();

Loading…
Cancel
Save