Browse Source

Merge remote-tracking branch 'origin/bugfix/11.0' into bugfix/11.0

bugfix/11.0
obo 1 year ago
parent
commit
1cca82e930
  1. 8
      build.gradle
  2. 2
      designer-base/src/main/java/com/fr/design/jxbrowser/JxUIPane.java
  3. 4
      designer-base/src/main/java/com/fr/design/jxbrowser/MimeType.java
  4. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java
  5. 2
      designer-base/src/main/java/com/fr/design/upm/UpmUtils.java
  6. 29
      designer-base/src/test/java/com/fr/base/ClassHelperTest.java
  7. 6
      designer-realize/src/test/java/com/fr/nx/app/designer/CptxAppTest.java

8
build.gradle

@ -94,7 +94,13 @@ allprojects {
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
} }
if (OperatingSystem.current().isMacOsX()) { // mac_x64, mac_aarch64, windows_x64
if (OperatingSystem.current().isMacOsX() && "aarch64".equals(System.getProperty("os.arch"))) {
dependencies {
// jxbrowser 6.23M16.23jar还是需要留着
implementation "com.fr.third:jxbrowser-mac-arm-v7:${jxBrowserVersion}"
}
} else if (OperatingSystem.current().isMacOsX()) {
dependencies { dependencies {
implementation 'com.fr.third:jxbrowser-mac:6.23' implementation 'com.fr.third:jxbrowser-mac:6.23'
implementation "com.fr.third:jxbrowser-mac-v7:${jxBrowserVersion}" implementation "com.fr.third:jxbrowser-mac-v7:${jxBrowserVersion}"

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

@ -262,6 +262,8 @@ public class JxUIPane<T> extends ModernUIPane<T> {
private String html; private String html;
public Builder() { public Builder() {
// 为了兼容继承关系,但又不允许创建,用这个方式先处理一下
super((ModernUIPane<T>) null);
this.namespace = DEFAULT_NAMESPACE; this.namespace = DEFAULT_NAMESPACE;
this.variable = DEFAULT_VARIABLE; this.variable = DEFAULT_VARIABLE;
this.expression = DEFAULT_EXPRESSION; this.expression = DEFAULT_EXPRESSION;

4
designer-base/src/main/java/com/fr/design/jxbrowser/MimeType.java

@ -28,11 +28,11 @@ public enum MimeType {
/** /**
* js 格式 * js 格式
*/ */
JS(".js", "text/css"), JS(".js", "text/javascript"),
/** /**
* svg 格式 * svg 格式
*/ */
SVG(".svg", "text/javascript"), SVG(".svg", "image/svg+xml"),
/** /**
* png 格式 * png 格式
*/ */

4
designer-base/src/main/java/com/fr/design/style/color/ColorSelectDialog.java

@ -79,6 +79,7 @@ public class ColorSelectDialog extends MiddleChartDialog{
this.seletePane = seletePane; this.seletePane = seletePane;
initComponent(); initComponent();
this.pane.populate(initialColor); this.pane.populate(initialColor);
this.setLocationRelativeTo(null);
} }
private void initComponent() { private void initComponent() {
@ -87,7 +88,8 @@ public class ColorSelectDialog extends MiddleChartDialog{
this.setBasicDialogSize(545,500); this.setBasicDialogSize(545,500);
this.setResizable(false); this.setResizable(false);
this.applyClosingAction();
this.applyEscapeAction();
JPanel buttonPane = new JPanel(); JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));

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

@ -4,6 +4,7 @@ import com.fr.common.annotations.Negative;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.util.ArrayList; import java.util.ArrayList;
@ -32,6 +33,7 @@ public class UpmUtils {
Map<String, String> map4Tpl = new HashMap<>(); Map<String, String> map4Tpl = new HashMap<>();
map4Tpl.put("version", ServerPreferenceConfig.getInstance().getOptimizedUPMVersion()); map4Tpl.put("version", ServerPreferenceConfig.getInstance().getOptimizedUPMVersion());
map4Tpl.put("new_version", fetchLatestVersion()); map4Tpl.put("new_version", fetchLatestVersion());
map4Tpl.put("designer_version", GeneralUtils.getVersion());
map4Tpl.put("language", GeneralContext.getLocale().toString()); map4Tpl.put("language", GeneralContext.getLocale().toString());
return map4Tpl; return map4Tpl;
} }

29
designer-base/src/test/java/com/fr/base/ClassHelperTest.java

@ -1,29 +0,0 @@
package com.fr.base;
import com.fr.form.main.Form;
import com.fr.invoke.ClassHelper;
import com.fr.main.impl.WorkBook;
import java.util.Set;
import junit.framework.TestCase;
import org.junit.Assert;
/**
* @author hades
* @version 10.0
* Created by hades on 2020/12/28
*/
public class ClassHelperTest extends TestCase {
public void testGetClassLoaders() {
WorkBook workBook = new WorkBook();
Set<ClassLoader> set = ClassHelper.getClassLoaders(workBook);
Assert.assertFalse(set.isEmpty());
Form form = new Form();
Set<ClassLoader> set1 = ClassHelper.getClassLoaders(form);
Assert.assertFalse(set1.isEmpty());
}
}

6
designer-realize/src/test/java/com/fr/nx/app/designer/CptxAppTest.java

@ -4,7 +4,6 @@ import com.fr.file.AbstractFILE;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
import com.fr.nx.cptx.utils.CptxFileUtils; import com.fr.nx.cptx.utils.CptxFileUtils;
import org.easymock.EasyMock;
import org.junit.Assert; import org.junit.Assert;
import org.junit.FixMethodOrder; import org.junit.FixMethodOrder;
import org.junit.Test; import org.junit.Test;
@ -42,12 +41,9 @@ public class CptxAppTest {
} }
}; };
WorkBook workBook = new WorkBook(); WorkBook workBook = new WorkBook();
EasyMock.expect(CptxFileUtils.getWorkBook(file.getPath()))
.andReturn(workBook).once()
.andReturn(null).once();
PowerMock.replay(CptxFileUtils.class); PowerMock.replay(CptxFileUtils.class);
Assert.assertSame(workBook, new CptxApp().asIOFile(file)); Assert.assertTrue(workBook.equals(new CptxApp().asIOFile(file)));
Assert.assertNotNull(new CptxApp().asIOFile(file)); Assert.assertNotNull(new CptxApp().asIOFile(file));

Loading…
Cancel
Save