Browse Source

fix mac下不用awt的库读写

feature/big-screen
hades 5 years ago
parent
commit
3b042ad1d8
  1. 12
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  2. 8
      designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java

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

@ -60,7 +60,6 @@ import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.image4j.codec.ico.ICODecoder;
import com.fr.stable.os.OperatingSystem;
@ -73,7 +72,6 @@ import com.fr.workspace.Workspace;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
import org.jetbrains.annotations.Nullable;
import javax.imageio.ImageIO;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JFrame;
@ -178,16 +176,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
private int contentHeight = (int) (java.awt.Toolkit.getDefaultToolkit().getScreenSize().getHeight());
static {
if (SupportOSImpl.DOCK_ICON.support()) {
try {
ImageIO.write(IOUtils.readImage("com/fr/design/icon/logo.png"), "png", new File(
StableUtils.pathJoin(StableUtils.getInstallHome(), "bin", "logo.png")));
} catch (IOException ignore) {
}
}
}
private WindowAdapter windowAdapter = new WindowAdapter() {
@Override

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

@ -9,7 +9,6 @@ import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.os.OperatingSystem;
import javax.imageio.ImageIO;
import java.io.File;
import java.io.IOException;
@ -35,6 +34,13 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime {
private static final String DOCK_NAME_OPTIONS = "-Xdock:name=" + FineDesigner.class.getSimpleName();
private static final String[] DEBUG_OPTIONS = new String[]{"-Dfile.encoding=UTF-8", "-Xmx2048m"};
static {
try {
IOUtils.copy(DesignerJavaRuntime.class.getResourceAsStream("/com/fr/design/icon/logo.png"), "logo.png", new File(BIN_HOME));
} catch (IOException ignore) {
}
}
private static final DesignerJavaRuntime INSTANCE = new DesignerJavaRuntime();
public static DesignerJavaRuntime getInstance() {

Loading…
Cancel
Save