Browse Source

Merge branch 'release/11.0' into newui

newui
vito 9 months ago
parent
commit
aee26219b4
  1. 2
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 25
      designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java
  3. 17
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/radiogroup/ImageCustomDefinePane.java
  4. 2
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  5. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java
  6. 6
      designer-form/src/main/java/com/fr/design/widgettheme/common/ButtonSettingPane.java
  7. 2
      designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java
  8. 6
      designer-form/src/main/java/com/fr/design/widgettheme/common/NormalButtonSettingPane.java
  9. 6
      designer-form/src/main/java/com/fr/design/widgettheme/common/TreeEditorSettingPane.java
  10. 3
      designer-realize/src/main/java/com/fr/start/SplashContext.java
  11. 3
      designer-realize/src/main/java/com/fr/start/common/SplashPane.java
  12. 7
      designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java

2
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -431,7 +431,7 @@ public class EnvChangeEntrance {
Set<Class> 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));

25
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();

17
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);

2
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -228,7 +228,7 @@ public class VersionCheckUtils {
Set<Class> 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));

4
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();

6
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<T extends Widget> extends BaseStyleSettingPane<T>
} 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<T extends Widget> extends BaseStyleSettingPane<T>
protected void updateButtonStyleBean(ButtonTheme buttonTheme) {
buttonTheme.setThemeColor(colorSelectBox.getSelectObject());
buttonTheme.setWidgetBackground(ColorUtils.createColorBackgroundWithAlpha(widgetBgColorSelectBox.getSelectObject(), widgetBgAlphaDragPane.updateBean()));
assignFontSizeStyle(buttonTheme);
switchCard();
}

2
designer-form/src/main/java/com/fr/design/widgettheme/common/EditorSettingPane.java

@ -78,6 +78,7 @@ public class EditorSettingPane<T extends Widget> extends BaseStyleSettingPane<T>
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<T extends Widget> extends BaseStyleSettingPane<T>
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();
}

6
designer-form/src/main/java/com/fr/design/widgettheme/common/NormalButtonSettingPane.java

@ -61,8 +61,10 @@ public class NormalButtonSettingPane<T extends Widget> 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()));
}

6
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<T extends TreeEditor> 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<T extends TreeEditor> extends BaseStyleSettin
protected void updateTreeStyleBean(TreeTheme treeTheme) {
treeTheme.setThemeColor(colorSelectBox.getSelectObject());
treeTheme.setWidgetBackground(ColorUtils.createColorBackgroundWithAlpha(widgetBgColorSelectBox.getSelectObject(), widgetBgAlphaDragPane.updateBean()));
assignFontSizeStyle(treeTheme);
switchCard();
}

3
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());
}
}

3
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<Font> fontValue = new NotNullLazyValue<Font>() {

7
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) {

Loading…
Cancel
Save