|
|
|
@ -11,7 +11,6 @@ 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; |
|
|
|
@ -151,18 +150,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
PluginContext context = event.getContext(); |
|
|
|
|
PluginRuntime runtime = context.getRuntime(); |
|
|
|
|
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(); |
|
|
|
|
} |
|
|
|
|
}); } |
|
|
|
|
Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
addPropertyItem(provider); |
|
|
|
|
} |
|
|
|
|
updateAllPropertyPane(); |
|
|
|
|
} |
|
|
|
|
}, filter); |
|
|
|
|
PluginListenerRegistration.getInstance().listen( |
|
|
|
|
PluginEventType.BeforeStop, |
|
|
|
@ -171,16 +164,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
PluginContext context = event.getContext(); |
|
|
|
|
PluginRuntime runtime = context.getRuntime(); |
|
|
|
|
final Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
UIUtil.invokeLaterIfNeeded(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
removePropertyItem(provider); |
|
|
|
|
} |
|
|
|
|
updateAllPropertyPane(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
removePropertyItem(provider); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
updateAllPropertyPane(); |
|
|
|
|
} |
|
|
|
|
}, filter); |
|
|
|
|
} |
|
|
|
@ -251,7 +240,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
"floatelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, |
|
|
|
|
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT}); |
|
|
|
|
// 控件设置
|
|
|
|
|
PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings"), |
|
|
|
|
PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Settings"), |
|
|
|
|
"widgetsettings", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY}, |
|
|
|
|
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.FORM, PropertyMode.POLY_REPORT, PropertyMode.POLY_CHART}); |
|
|
|
|
// 条件属性
|
|
|
|
@ -494,15 +483,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
propertyItemMap.get(KEY_CONFIGURED_ROLES).replaceContentPane(pane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void replaceKeyPane(final String key, final JComponent pane) { |
|
|
|
|
public void replaceKeyPane(String key, JComponent pane) { |
|
|
|
|
|
|
|
|
|
//需要放到 ui 线程中处理
|
|
|
|
|
UIUtil.invokeLaterIfNeeded(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
propertyItemMap.get(key).replaceContentPane(pane); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
propertyItemMap.get(key).replaceContentPane(pane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JComponent getConfiguredRolesPane() { |
|
|
|
|