|
|
|
@ -11,6 +11,7 @@ import com.fr.design.gui.ibutton.UIButtonUI;
|
|
|
|
|
import com.fr.design.gui.icontainer.UIEastResizableContainer; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.layout.VerticalFlowLayout; |
|
|
|
|
import com.fr.design.ui.util.UIUtil; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUIPaintUtils; |
|
|
|
|
import com.fr.general.FRFont; |
|
|
|
@ -150,12 +151,18 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
PluginContext context = event.getContext(); |
|
|
|
|
PluginRuntime runtime = context.getRuntime(); |
|
|
|
|
Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
final Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
// UI相关的逻辑 用UI线程执行 不走FinePluginController线程 走FinePluginController线程有几率出问题
|
|
|
|
|
// 容易导致FinePluginController持有Swing内部的java.awt.Component$AWTTreeLock 这个锁不能被UI线程之外的线程持有 否则容易造成UI线程被Blocked住
|
|
|
|
|
UIUtil.invokeLaterIfNeeded(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
addPropertyItem(provider); |
|
|
|
|
} |
|
|
|
|
updateAllPropertyPane(); |
|
|
|
|
} |
|
|
|
|
}); } |
|
|
|
|
}, filter); |
|
|
|
|
PluginListenerRegistration.getInstance().listen( |
|
|
|
|
PluginEventType.BeforeStop, |
|
|
|
@ -164,13 +171,17 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
PluginContext context = event.getContext(); |
|
|
|
|
PluginRuntime runtime = context.getRuntime(); |
|
|
|
|
Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
final Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
UIUtil.invokeLaterIfNeeded(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
removePropertyItem(provider); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
updateAllPropertyPane(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, filter); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|