|
|
|
@ -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); |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
addPropertyItem(provider); |
|
|
|
|
} |
|
|
|
|
updateAllPropertyPane(); |
|
|
|
|
} |
|
|
|
|
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,12 +171,16 @@ 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); |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
removePropertyItem(provider); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
updateAllPropertyPane(); |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
@ -240,7 +251,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_Widget_Settings"), |
|
|
|
|
PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_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}); |
|
|
|
|
// 条件属性
|
|
|
|
@ -483,9 +494,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
propertyItemMap.get(KEY_CONFIGURED_ROLES).replaceContentPane(pane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void replaceKeyPane(String key, JComponent pane) { |
|
|
|
|
public void replaceKeyPane(final String key, final JComponent pane) { |
|
|
|
|
|
|
|
|
|
propertyItemMap.get(key).replaceContentPane(pane); |
|
|
|
|
//需要放到 ui 线程中处理
|
|
|
|
|
UIUtil.invokeLaterIfNeeded(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
propertyItemMap.get(key).replaceContentPane(pane); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JComponent getConfiguredRolesPane() { |
|
|
|
|