Browse Source

Merge pull request #8572 in DESIGN/design from release/11.0 to feature/x

* commit '4171b54b27c0caef3f369c71e97f4311f212abbe':
  REPORT-69776 切换在线组件的排序,会加载很久
  REPORT-69575 设计器在线组件刷不出来
  REPORT-69776 切换在线组件的排序,会加载很久
feature/x
superman 3 years ago
parent
commit
2e382eb9bc
  1. 10
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/resource/OnlineResourceManager.java

10
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/resource/OnlineResourceManager.java

@ -1,8 +1,8 @@
package com.fr.design.mainframe.share.ui.online.resource;
import javax.swing.SwingWorker;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.function.Predicate;
/**
@ -24,7 +24,7 @@ public class OnlineResourceManager {
private SwingWorker<Boolean, Void> swingWorker;
private final BlockingQueue<ResourceLoader> loaderBlockingQueue = new ArrayBlockingQueue<ResourceLoader>(100);
private final BlockingQueue<ResourceLoader> loaderBlockingQueue = new LinkedBlockingQueue<>();
public void cancelLoad(Object key) {
if (swingWorker != null) {
@ -39,11 +39,7 @@ public class OnlineResourceManager {
}
public void addLoader(ResourceLoader loader) {
try {
this.loaderBlockingQueue.put(loader);
} catch (InterruptedException e) {
e.printStackTrace();
}
this.loaderBlockingQueue.add(loader);
}
public void loadImage() {

Loading…
Cancel
Save