Browse Source

Merge branch 'release/10.0' of https://code.fineres.com/scm/~qinghui.liu/design into release/10.0

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
76f3423349
  1. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java
  2. 6
      designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
  3. 6
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  4. 12
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java
  5. 14
      designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java
  6. 2
      designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java
  7. 5
      designer-base/src/main/java/com/fr/file/RenameExportFILE.java
  8. BIN
      designer-base/src/main/resources/com/fr/design/icon/logo.png
  9. 2
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  10. 4
      designer-realize/src/main/java/com/fr/start/Designer.java
  11. 26
      designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java
  12. 1
      designer-realize/src/main/java/com/fr/start/DesignerLauncher.java
  13. 14
      designer-realize/src/main/java/com/fr/start/FineDesigner.java

2
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java

@ -54,7 +54,7 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper {
if(ArrayUtils.isNotEmpty(colNames)){
return toColumnNameList(colNames);
} else if (ArrayUtils.isNotEmpty(colNamesInCache)) {
return toColumnNameList(colNames);
return toColumnNameList(colNamesInCache);
}
EmbeddedTableData embeddedTableData = null;

6
designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java

@ -142,8 +142,10 @@ public class FunctionManagerPane extends BasicPane {
editorButton.setPreferredSize(new Dimension(editorButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));
reportletNamePane.add(editorButton);
editorButton.addActionListener(createEditorButtonActionListener());
northPane.add(GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name") + ":"),
reportletNamePane}, FlowLayout.LEFT));
JPanel classNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
classNamePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name") + ":"), BorderLayout.NORTH);
classNamePane.add(reportletNamePane, BorderLayout.CENTER);
northPane.add(classNamePane);
DescriptionTextArea descriptionArea = new DescriptionTextArea();
descriptionArea.setWrapStyleWord(true);
descriptionArea.setLineWrap(true);

6
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -1141,8 +1141,10 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
Thread.currentThread().interrupt();
}
DesignerEnvManager.getEnvManager().setLastOpenFile(
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath());
JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (jt != null) {
DesignerEnvManager.getEnvManager().setLastOpenFile(jt.getEditingFILE().getPath());
}
DesignerEnvManager.getEnvManager().setLastWestRegionToolPaneY(
WestRegionContainerPane.getInstance().getToolPaneY());

12
designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java

@ -53,6 +53,12 @@ public class DesignerLogHandler {
private static final int SERVER_GAP_Y = -20;
private static final String ERROR_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert") + ":";
private static final String WARN_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Seriously") + ":";
private static final String NORMAL_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Normal") + ":";
public static DesignerLogHandler getInstance() {
return HOLDER.singleton;
@ -310,11 +316,11 @@ public class DesignerLogHandler {
private String appendLocaleMark(String str, int style) {
if (style == DesignerLogger.ERROR_INT) {
str = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert") + ":" + str + "\n";
str = ERROR_MARK + str + "\n";
} else if (style == DesignerLogger.WARN_INT) {
str = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Seriously") + ":" + str + "\n";
str = WARN_MARK + str + "\n";
} else {
str = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Normal") + ":" + str + "\n";
str = NORMAL_MARK + str + "\n";
}
return str;
}

14
designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java

@ -83,6 +83,20 @@ public enum SupportOSImpl implements SupportOS {
public boolean support() {
return OperatingSystem.isMacos();
}
},
NON_GUARDIAN_START {
@Override
public boolean support() {
return OperatingSystem.isLinux() || Arch.getArch() == Arch.ARM;
}
},
DOCK_ICON {
@Override
public boolean support() {
return OperatingSystem.isMacos();
}
}
}

2
designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java

@ -29,7 +29,7 @@ import java.awt.event.ActionListener;
public abstract class CustomJobPane extends BasicBeanPane {
protected UITextField classNameTextField;
protected ObjectProperiesPane objectProperiesPane;
public static final int DEFAULT_LENGTH = 30;
private static final int DEFAULT_LENGTH = 25;
public CustomJobPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());

5
designer-base/src/main/java/com/fr/file/RenameExportFILE.java

@ -99,4 +99,9 @@ public class RenameExportFILE extends AbstractFILE {
}
return out;
}
@Override
public void closeTemplate() throws Exception {
//do nothing
}
}

BIN
designer-base/src/main/resources/com/fr/design/icon/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

2
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -818,6 +818,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
* @param index 切换位置
*/
public void tabChanged(int index) {
this.index = index;
if (index == ELEMENTCASE_TAB) {
formDesign.setReportBlockEditing(true);
ecTabAction();
@ -825,7 +826,6 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
formDesign.setReportBlockEditing(false);
formTabAction();
}
this.index = index;
refreshToolArea();
this.cardLayout.show(tabCenterPane, CARDNAME[index]);
if (elementCaseDesign != null && index == ELEMENTCASE_TAB) {

4
designer-realize/src/main/java/com/fr/start/Designer.java

@ -1,5 +1,6 @@
package com.fr.start;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.log.FineLoggerFactory;
/**
@ -14,7 +15,8 @@ public class Designer {
public static void main(String[] args) {
try {
if (DesignerJavaRuntime.getInstance().isInValidVmOptions()) {
if (DesignerJavaRuntime.getInstance().isInValidVmOptions()
|| SupportOSImpl.NON_GUARDIAN_START.support()) {
runNonGuardianDesigner(args);
} else {
// 创建进程

26
designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java

@ -1,12 +1,18 @@
package com.fr.start;
import com.fr.design.os.impl.SupportOSImpl;
import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.process.engine.core.AbstractJavaRuntime;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.os.OperatingSystem;
import java.util.Set;
import javax.imageio.ImageIO;
import java.io.File;
import java.io.IOException;
/**
* 设计器Java运行环境
@ -23,8 +29,20 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime {
private static final String JAVA_EXEC = "java";
private static final String WIN_JRE_BIN = StableUtils.pathJoin("jre", "bin");
private static final String MAC_JRE_BIN = StableUtils.pathJoin("jre.bundle", "Contents", "Home", "jre", "bin");
private static final String BIN_HOME = StableUtils.pathJoin(StableUtils.getInstallHome(), "bin");
private static final String LOGO_PATH = StableUtils.pathJoin(BIN_HOME, "logo.png");
private static final String DOCK_OPTIONS = "-Xdock:icon=" + LOGO_PATH;
private static final String[] DEBUG_OPTIONS = new String[]{"-Dfile.encoding=UTF-8", "-Xmx2048m"};
static {
if (SupportOSImpl.DOCK_ICON.support()) {
try {
ImageIO.write(IOUtils.readImage("com/fr/design/icon/logo.png"), "png", new File(LOGO_PATH));
} catch (IOException ignore) {
}
}
}
private static final DesignerJavaRuntime INSTANCE = new DesignerJavaRuntime();
public static DesignerJavaRuntime getInstance() {
@ -79,7 +97,11 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime {
@Override
public String[] getJvmOptions() {
if (isInstallVersion()) {
return super.getJvmOptions();
String[] options = super.getJvmOptions();
if (SupportOSImpl.DOCK_ICON.support()) {
options = ArrayUtils.add(options, DOCK_OPTIONS);
}
return options;
} else {
return DEBUG_OPTIONS;
}

1
designer-realize/src/main/java/com/fr/start/DesignerLauncher.java

@ -46,6 +46,7 @@ public class DesignerLauncher {
jvmSettings(DesignerJavaRuntime.getInstance().getJvmOptions()).
arguments(args).
directory(BIN_HOME).
entryPackage(FineDesigner.class).
startProcess(DesignerProcessType.INSTANCE);
DesignerSuperListener.getInstance().start();
}

14
designer-realize/src/main/java/com/fr/start/FineDesigner.java

@ -0,0 +1,14 @@
package com.fr.start;
import com.fr.process.engine.core.FineProcessEntry;
/**
* 包装类 改变子进程的进程名
*
* @author hades
* @version 10.0
* Created by hades on 2020/3/24
*/
public class FineDesigner extends FineProcessEntry {
}
Loading…
Cancel
Save