|
|
@ -2,16 +2,18 @@ package com.fr.start.server; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.concurrent.NamedThreadFactory; |
|
|
|
import com.fr.concurrent.NamedThreadFactory; |
|
|
|
import com.fr.design.gui.iprogressbar.ProgressDialog; |
|
|
|
import com.fr.design.gui.iprogressbar.ProgressDialog; |
|
|
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
|
|
|
import com.fr.design.locale.impl.SupportLocaleImpl; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.event.Event; |
|
|
|
import com.fr.event.Event; |
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
import com.fr.event.Listener; |
|
|
|
import com.fr.event.Listener; |
|
|
|
import com.fr.event.Null; |
|
|
|
import com.fr.event.Null; |
|
|
|
import com.fr.general.FRFont; |
|
|
|
import com.fr.general.FRFont; |
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
import com.fr.general.locale.LocaleAction; |
|
|
|
|
|
|
|
import com.fr.general.locale.LocaleCenter; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.plaf.ColorUIResource; |
|
|
|
import javax.swing.plaf.ColorUIResource; |
|
|
|
import java.util.Locale; |
|
|
|
|
|
|
|
import java.util.concurrent.Executors; |
|
|
|
import java.util.concurrent.Executors; |
|
|
|
import java.util.concurrent.ScheduledExecutorService; |
|
|
|
import java.util.concurrent.ScheduledExecutorService; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
@ -31,6 +33,11 @@ public class FineEmbedServerMonitor { |
|
|
|
private static final int STEP_HEARTBEAT = 40; |
|
|
|
private static final int STEP_HEARTBEAT = 40; |
|
|
|
private static volatile FineEmbedServerMonitor monitor; |
|
|
|
private static volatile FineEmbedServerMonitor monitor; |
|
|
|
private static ProgressDialog progressBar = DesignerContext.getDesignerFrame().getProgressDialog(); |
|
|
|
private static ProgressDialog progressBar = DesignerContext.getDesignerFrame().getProgressDialog(); |
|
|
|
|
|
|
|
//由于默认值的字体不支持韩文,所以要对韩文单独生成字体
|
|
|
|
|
|
|
|
private FRFont font = null; |
|
|
|
|
|
|
|
private static final int FONT_RGB = 333334; |
|
|
|
|
|
|
|
private static final int FONT_SIZE = 14; |
|
|
|
|
|
|
|
private static final String FONT_NAME = "Dialog"; |
|
|
|
|
|
|
|
|
|
|
|
private FineEmbedServerMonitor() { |
|
|
|
private FineEmbedServerMonitor() { |
|
|
|
} |
|
|
|
} |
|
|
@ -90,14 +97,15 @@ public class FineEmbedServerMonitor { |
|
|
|
} |
|
|
|
} |
|
|
|
if (!DesignerContext.getDesignerFrame().getProgressDialog().isVisible()) { |
|
|
|
if (!DesignerContext.getDesignerFrame().getProgressDialog().isVisible()) { |
|
|
|
DesignerContext.getDesignerFrame().showProgressDialog(); |
|
|
|
DesignerContext.getDesignerFrame().showProgressDialog(); |
|
|
|
String text = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Loading_Embed_Server"); |
|
|
|
|
|
|
|
//如果为韩文则改变字体
|
|
|
|
//如果为韩文则改变字体
|
|
|
|
if (GeneralContext.getLocale().equals(Locale.KOREA)) { |
|
|
|
LocaleCenter.buildAction(new LocaleAction() { |
|
|
|
FRFont font = FRFont.getInstance().applySize(14).applyForeground(new ColorUIResource(333334)).applyName("Dialog"); |
|
|
|
@Override |
|
|
|
DesignerContext.getDesignerFrame().getProgressDialog().updateLoadingText(text, font); |
|
|
|
public void execute() { |
|
|
|
} else { |
|
|
|
font = FRFont.getInstance().applySize(FONT_SIZE).applyForeground(new ColorUIResource(FONT_RGB)).applyName(FONT_NAME); |
|
|
|
DesignerContext.getDesignerFrame().getProgressDialog().updateLoadingText(text); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, SupportLocaleImpl.SUPPORT_KOREA); |
|
|
|
|
|
|
|
String text = Toolkit.i18nText("Fine-Design_Basic_Loading_Embed_Server"); |
|
|
|
|
|
|
|
DesignerContext.getDesignerFrame().getProgressDialog().updateLoadingText(text, font); |
|
|
|
} |
|
|
|
} |
|
|
|
DesignerContext.getDesignerFrame().updateProgress(getProgress()); |
|
|
|
DesignerContext.getDesignerFrame().updateProgress(getProgress()); |
|
|
|
} |
|
|
|
} |
|
|
|