diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index 8eb4a9afb7..22244b6cd7 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -431,7 +431,7 @@ public class EnvChangeEntrance { Set localServiceSet = FineObjectPool.getInstance().getServerPool().keySet(); try { - JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList(); + JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList(info); for (int i = 0; i < serviceArray.size(); i++) { try { Class clazz = Class.forName((String) serviceArray.get(i)); diff --git a/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java b/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java index 0fb3706afb..dee7364ff3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java @@ -46,10 +46,10 @@ import javax.swing.event.ChangeListener; import javax.swing.plaf.basic.BasicButtonUI; import java.awt.BorderLayout; import java.awt.Color; +import java.awt.Component; import java.awt.Cursor; import java.awt.Desktop; import java.awt.Dimension; -import java.awt.FlowLayout; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Graphics2D; @@ -137,7 +137,9 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple } }); - tweakNinePointButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Border_Image_Config_Nine_Point_Fill")); + String buttonText = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Border_Image_Config_Nine_Point_Fill"); + tweakNinePointButton = new UIButton(buttonText); + tweakNinePointButton.setToolTipText(buttonText); borderImageOpacityPane = new UIPercentDragPane(); } @@ -174,23 +176,28 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple borderedImagePreviewPane.setPreferredSize(new Dimension(145, 145)); borderedImagePreviewPane.add(imagePreviewPane, BorderLayout.CENTER); - JPanel tweakNinePointComposedPane = new JPanel(); - tweakNinePointComposedPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); - tweakNinePointButton.setPreferredSize(new Dimension(145, 16)); - tweakNinePointComposedPane.add(tweakNinePointHelpButton); - tweakNinePointComposedPane.add(tweakNinePointButton); - return TableLayoutHelper.createGapTableLayoutPane( new JComponent[][]{ {null, borderedImagePreviewPane}, {null, chooseImageButton}, - {tweakNinePointComposedPane, null}, + {null, createTweakNinePointComposedPane()}, {null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget-Style_Alpha"))}, {null, this.borderImageOpacityPane} }, rowSize, columnSize, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1); } + private JPanel createTweakNinePointComposedPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + return TableLayoutHelper.createGapTableLayoutPane( + new Component[][]{ + {tweakNinePointHelpButton, tweakNinePointButton} + }, + new double[]{p}, + new double[]{p, f}, + new int[][]{{1, 1}}, 0, 0); + } private void initImageFileChooserIfNotExist() { if (imageFileChooser == null) { imageFileChooser = new ImageFileChooser(); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/radiogroup/ImageCustomDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/radiogroup/ImageCustomDefinePane.java index 30fbe2d4a9..c517e03571 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/radiogroup/ImageCustomDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/radiogroup/ImageCustomDefinePane.java @@ -24,6 +24,7 @@ import com.fr.form.ui.mobile.radiogroup.ImageMobileStyle; import com.fr.general.FRFont; import javax.swing.*; +import javax.swing.border.EmptyBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.*; @@ -281,18 +282,22 @@ public class ImageCustomDefinePane extends MobileStyleCustomDefinePane { UILabel initialLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Icon_Init")); UILabel selectedLabel = DesignerUtils.createConfigLabel(Toolkit.i18nText("Fine-Plugin-RadioGroup_Icon_Select")); + initialLabel.setVerticalAlignment(SwingConstants.TOP); + initialLabel.setBorder(new EmptyBorder(5, 0, 0, 0)); + selectedLabel.setVerticalAlignment(SwingConstants.TOP); + selectedLabel.setBorder(new EmptyBorder(5, 0, 0, 0)); initInitialIconConfigPane(); initSelectedIconConfigPane(); JPanel container = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); - JPanel initialPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - initialPane.add(initialLabel); - initialPane.add(initialIconConfigPane); + JPanel initialPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + initialPane.add(initialLabel, BorderLayout.WEST); + initialPane.add(initialIconConfigPane, BorderLayout.CENTER); container.add(initialPane); - JPanel selectedPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - selectedPane.add(selectedLabel); - selectedPane.add(selectedIconConfigPane); + JPanel selectedPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + selectedPane.add(selectedLabel, BorderLayout.WEST); + selectedPane.add(selectedIconConfigPane, BorderLayout.CENTER); container.add(selectedPane); centerPane.add(container); diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index a6a2d7896a..1ad44eef0d 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -228,7 +228,7 @@ public class VersionCheckUtils { Set localServiceSet = FineObjectPool.getInstance().getServerPool().keySet(); try { - JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList(); + JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList(info); for (int i = 0; i < serviceArray.size(); i++) { try { Class clazz = Class.forName((String) serviceArray.get(i)); diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java index 8dfb3ac484..5b17494da9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java @@ -6,6 +6,7 @@ import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateFloatLink; import com.fr.design.ExtraDesignClassManager; +import com.fr.design.base.mode.DesignModeContext; import com.fr.design.beans.BasicBeanPane; import com.fr.design.chart.javascript.ChartEmailPane; import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; @@ -24,7 +25,6 @@ import com.fr.design.javascript.JavaScriptImplPane; import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.JTemplate; -import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.module.DesignModuleFactory; import com.fr.general.ComparatorUtils; import com.fr.general.NameObject; @@ -149,7 +149,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { } private void refreshNameableCreator() { - if (ChartEditContext.duchampMode()) { + if (DesignModeContext.isDuchampMode()) { return; } HashMap paneMap = getHyperlinkMap(); diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/common/ButtonSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/common/ButtonSettingPane.java index acdebeb964..f6b1403454 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/common/ButtonSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/common/ButtonSettingPane.java @@ -3,9 +3,11 @@ package com.fr.design.widgettheme.common; import com.fr.design.widgettheme.StyleSetting; import com.fr.design.widgettheme.BaseStyleSettingPane; import com.fr.form.ui.Widget; +import com.fr.util.ColorUtils; import com.fr.widgettheme.theme.widget.theme.cell.ButtonTheme; import org.jetbrains.annotations.Nullable; +import java.awt.Color; import java.util.Arrays; import java.util.List; @@ -64,6 +66,9 @@ public class ButtonSettingPane extends BaseStyleSettingPane } else { styleSettingHead.setSelectedIndex(1); colorSelectBox.setSelectObject(buttonTheme.getThemeColor()); + Color widgetBgColor = buttonTheme.getWidgetBackground().getColor(); + widgetBgColorSelectBox.setSelectObject(ColorUtils.ignoreColorAlpha(widgetBgColor)); + widgetBgAlphaDragPane.populateBean(ColorUtils.roundColorAlphaDouble(widgetBgColor)); assignFontSizePane(buttonTheme); } switchCard(); @@ -83,6 +88,7 @@ public class ButtonSettingPane extends BaseStyleSettingPane protected void updateButtonStyleBean(ButtonTheme buttonTheme) { buttonTheme.setThemeColor(colorSelectBox.getSelectObject()); + buttonTheme.setWidgetBackground(ColorUtils.createColorBackgroundWithAlpha(widgetBgColorSelectBox.getSelectObject(), widgetBgAlphaDragPane.updateBean())); assignFontSizeStyle(buttonTheme); switchCard(); } diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java index ea547eb674..17bbbe2c12 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java @@ -78,6 +78,7 @@ public class EditorSettingPane extends BaseStyleSettingPane colorSelectBox.setSelectObject(editorTheme.getThemeColor()); lineComboBox.setSelectedLineStyle(editorTheme.getBorderStyle().getLineType()); borderRadiusSpinner.setValue(editorTheme.getBorderStyle().getRadius()); + borderColorSelectBox.setSelectObject(editorTheme.getBorderStyle().getBorderColor()); widgetBgColorSelectBox.setSelectObject(ColorUtils.ignoreColorAlpha(editorTheme.getWidgetBackground().getColor())); widgetBgAlphaDragPane.populateBean(ColorUtils.roundColorAlphaDouble(editorTheme.getWidgetBackground().getColor())); iconColorSelectBox.setSelectObject(editorTheme.getIconColor()); @@ -110,6 +111,7 @@ public class EditorSettingPane extends BaseStyleSettingPane editorTheme.setSelectBoxBgColor(selectBgColorBox.getSelectObject()); editorTheme.setBorderStyle(new BorderStyle((int) borderRadiusSpinner.getValue(), lineComboBox.getSelectedLineStyle(), borderColorSelectBox.getSelectObject())); editorTheme.setWidgetBackground(ColorUtils.createColorBackgroundWithAlpha(widgetBgColorSelectBox.getSelectObject(), widgetBgAlphaDragPane.updateBean())); + editorTheme.setIconColor(iconColorSelectBox.getSelectObject()); assignFontSizeStyle(editorTheme); switchCard(); } diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/common/NormalButtonSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/common/NormalButtonSettingPane.java index 2cfc721e5c..7fa1efbe80 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/common/NormalButtonSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/common/NormalButtonSettingPane.java @@ -61,8 +61,10 @@ public class NormalButtonSettingPane extends BaseStyleSettingP styleSettingHead.setSelectedIndex(0); } else { styleSettingHead.setSelectedIndex(1); - lineComboBox.setSelectedLineStyle(widgetTheme.getBorderStyle().getLineType()); - borderRadiusSpinner.setValue(widgetTheme.getBorderStyle().getRadius()); + BorderStyle borderStyle = widgetTheme.getBorderStyle(); + lineComboBox.setSelectedLineStyle(borderStyle.getLineType()); + borderRadiusSpinner.setValue(borderStyle.getRadius()); + borderColorSelectBox.setSelectObject(borderStyle.getBorderColor()); assignFontPane(widgetTheme); buttonStyleDefinedPane.populate(ButtonBackground.create(widgetTheme.getButtonBackgroundStyle())); } diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/common/TreeEditorSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/common/TreeEditorSettingPane.java index 6f6676071c..a2e570dfed 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/common/TreeEditorSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/common/TreeEditorSettingPane.java @@ -3,9 +3,11 @@ package com.fr.design.widgettheme.common; import com.fr.design.widgettheme.StyleSetting; import com.fr.design.widgettheme.BaseStyleSettingPane; import com.fr.form.ui.TreeEditor; +import com.fr.util.ColorUtils; import com.fr.widgettheme.theme.widget.theme.cell.TreeTheme; import org.jetbrains.annotations.Nullable; +import java.awt.Color; import java.util.Arrays; import java.util.List; @@ -56,6 +58,9 @@ public class TreeEditorSettingPane extends BaseStyleSettin } else { styleSettingHead.setSelectedIndex(1); colorSelectBox.setSelectObject(treeTheme.getThemeColor()); + Color widgetBgColor = treeTheme.getWidgetBackground().getColor(); + widgetBgColorSelectBox.setSelectObject(ColorUtils.ignoreColorAlpha(widgetBgColor)); + widgetBgAlphaDragPane.populateBean(ColorUtils.roundColorAlphaDouble(widgetBgColor)); assignFontSizePane(treeTheme); } switchCard(); @@ -83,6 +88,7 @@ public class TreeEditorSettingPane extends BaseStyleSettin protected void updateTreeStyleBean(TreeTheme treeTheme) { treeTheme.setThemeColor(colorSelectBox.getSelectObject()); + treeTheme.setWidgetBackground(ColorUtils.createColorBackgroundWithAlpha(widgetBgColorSelectBox.getSelectObject(), widgetBgAlphaDragPane.updateBean())); assignFontSizeStyle(treeTheme); switchCard(); } diff --git a/designer-realize/src/main/java/com/fr/start/SplashContext.java b/designer-realize/src/main/java/com/fr/start/SplashContext.java index 172e9b7cd5..6d2895503b 100644 --- a/designer-realize/src/main/java/com/fr/start/SplashContext.java +++ b/designer-realize/src/main/java/com/fr/start/SplashContext.java @@ -1,6 +1,7 @@ package com.fr.start; import com.fr.concurrent.NamedThreadFactory; +import com.fr.design.DesignerEnvManager; import com.fr.design.constants.DesignerLaunchStatus; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.bbs.BBSConstants; @@ -186,6 +187,6 @@ public class SplashContext { } private static String getSplashPath() { - return I18nImage.getImagePath(SPLASH_IMAGE_PATH); + return I18nImage.getImagePath(SPLASH_IMAGE_PATH, DesignerEnvManager.getEnvManager().getLanguage()); } } \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/start/common/SplashPane.java b/designer-realize/src/main/java/com/fr/start/common/SplashPane.java index a6c6c92bc3..535ace2d24 100644 --- a/designer-realize/src/main/java/com/fr/start/common/SplashPane.java +++ b/designer-realize/src/main/java/com/fr/start/common/SplashPane.java @@ -3,6 +3,7 @@ package com.fr.start.common; import com.bulenkov.iconloader.IconLoader; import com.bulenkov.iconloader.util.JBUI; import com.fr.base.GraphHelper; +import com.fr.design.DesignerEnvManager; import com.fr.general.locale.image.I18nImage; import com.fr.stable.GraphDrawHelper; import com.fr.stable.GraphicsConfig; @@ -59,7 +60,7 @@ public class SplashPane extends JPanel { } private static String getSplashPath() { - return I18nImage.getImagePath(SPLASH_PATH); + return I18nImage.getImagePath(SPLASH_PATH, DesignerEnvManager.getEnvManager().getLanguage()); } private NotNullLazyValue fontValue = new NotNullLazyValue() { diff --git a/designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java b/designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java index 45aa334713..4d692067ad 100644 --- a/designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java +++ b/designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java @@ -2,6 +2,7 @@ package com.fr.start.common; import com.bulenkov.iconloader.IconLoader; import com.fr.base.BaseUtils; +import com.fr.design.DesignerEnvManager; import com.fr.general.IOUtils; import com.fr.general.locale.image.I18nImage; @@ -11,6 +12,7 @@ import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage; +import java.util.Locale; /** * @author Yvan @@ -43,8 +45,9 @@ public class SplashPane4WinAndJDK11 extends SplashPane{ } private String getSplashPath4WinAndJdk11() { - String path = I18nImage.getImagePath(SPLASH_PATH); - String pathOfDouble = I18nImage.getImagePath(DOUBLE_SPLASH_PATH); + Locale locale = DesignerEnvManager.getEnvManager().getLanguage(); + String path = I18nImage.getImagePath(SPLASH_PATH, locale); + String pathOfDouble = I18nImage.getImagePath(DOUBLE_SPLASH_PATH, locale); // 为图片加上"@2x" // 某些定制jar里面没有两倍图,判断一下,如果文件不存在,就返回一倍图的path if (IOUtils.readResource(pathOfDouble) != null) {