|
|
|
@ -5,7 +5,6 @@ import com.fr.design.extra.Process;
|
|
|
|
|
import com.fr.design.login.DesignerLoginHelper; |
|
|
|
|
import com.fr.design.login.DesignerLoginSource; |
|
|
|
|
import com.fr.design.mainframe.share.collect.ComponentCollector; |
|
|
|
|
import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoUpdater; |
|
|
|
|
import com.fr.design.mainframe.share.ui.online.OnlineWidgetRepoPane; |
|
|
|
|
import com.fr.design.mainframe.share.util.DownloadUtils; |
|
|
|
|
import com.fr.design.mainframe.share.util.ShareComponentUtils; |
|
|
|
@ -24,7 +23,6 @@ import java.awt.Component;
|
|
|
|
|
import java.awt.Container; |
|
|
|
|
import java.io.File; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author Starryi |
|
|
|
@ -107,7 +105,7 @@ public class LocalWidgetUpdater implements Process<Double> {
|
|
|
|
|
boolean success = false; |
|
|
|
|
try { |
|
|
|
|
success = get(); |
|
|
|
|
} catch (InterruptedException | ExecutionException e) { |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
} |
|
|
|
|
if (success) { |
|
|
|
@ -138,10 +136,11 @@ public class LocalWidgetUpdater implements Process<Double> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void cancelUpdate() { |
|
|
|
|
if (worker.isDone() || worker.isCancelled()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (worker != null && !worker.isDone()) { |
|
|
|
|
worker.cancel(true); |
|
|
|
|
worker = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
process(-1.0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -152,7 +151,7 @@ public class LocalWidgetUpdater implements Process<Double> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void repaintBlockAndOverlay() { |
|
|
|
|
UIUtil.invokeAndWaitIfNeeded(new Runnable() { |
|
|
|
|
UIUtil.invokeLaterIfNeeded(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
Container absoluteLayoutParent = getAbsoluteLayoutAncestor(widgetBlock); |
|
|
|
|