|
|
|
@ -130,13 +130,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
defaultAuthorityPane = getDefaultPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Not_Support_Authority_Edit")); |
|
|
|
|
switchMode(PropertyMode.REPORT); |
|
|
|
|
setContainerWidth(CONTAINER_WIDTH); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initPluginPane(); |
|
|
|
|
listenPlugin(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void listenPlugin() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PluginFilter filter = new PluginFilter() { |
|
|
|
|
@Override |
|
|
|
|
public boolean accept(PluginContext context) { |
|
|
|
@ -167,15 +167,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
removePropertyItem(provider); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
updateAllPropertyPane(); |
|
|
|
|
} |
|
|
|
|
}, filter); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void removePropertyItem(PropertyItemPaneProvider provider) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
propertyItemMap.remove(provider.key()); |
|
|
|
|
String replaceKey = provider.replaceKey(); |
|
|
|
|
if (replaceKey == null) { |
|
|
|
@ -186,18 +186,18 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
replaceItem.setReplace(false); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initPluginPane() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExtraDesignClassManager classManager = PluginModule.getAgent(PluginModule.ExtraDesign); |
|
|
|
|
Set<PropertyItemPaneProvider> providers = classManager.getArray(PropertyItemPaneProvider.XML_TAG); |
|
|
|
|
for (PropertyItemPaneProvider provider : providers) { |
|
|
|
|
addPropertyItem(provider); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void addPropertyItem(PropertyItemPaneProvider provider) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String key = provider.key(); |
|
|
|
|
PropertyItemBean itemBean = provider.getItem(); |
|
|
|
|
PropertyItem propertyItem = new PropertyItem(itemBean.getName(), |
|
|
|
@ -212,7 +212,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
button.addActionListener(buttonListener); |
|
|
|
|
} |
|
|
|
|
propertyItemMap.put(key, propertyItem); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String replaceKey = provider.replaceKey(); |
|
|
|
|
if (replaceKey == null) { |
|
|
|
|
return; |
|
|
|
@ -221,11 +221,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
if (replaceItem != null) { |
|
|
|
|
replaceItem.setReplace(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initPropertyItemList() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
propertyItemMap = new LinkedHashMap<>(); // 有序map
|
|
|
|
|
// 单元格元素
|
|
|
|
|
PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell_Element"), |
|
|
|
@ -240,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_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}); |
|
|
|
|
// 条件属性
|
|
|
|
@ -482,9 +482,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
public void replaceConfiguredRolesPane(JComponent pane) { |
|
|
|
|
propertyItemMap.get(KEY_CONFIGURED_ROLES).replaceContentPane(pane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void replaceKeyPane(String key, JComponent pane) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
propertyItemMap.get(key).replaceContentPane(pane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -653,8 +653,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
private String iconSuffix = ICON_SUFFIX_NORMAL; // normal, diabled, selected, 三者之一
|
|
|
|
|
private final Color selectedBtnBackground = new Color(0xF5F5F7); |
|
|
|
|
private Color originBtnBackground; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public PropertyItem(String name, String title, String btnIconName, PropertyMode[] visibleModes, PropertyMode[] enableModes) { |
|
|
|
|
this(name, title, btnIconName, ICON_BASE_DIR, visibleModes, enableModes); |
|
|
|
|
} |
|
|
|
@ -705,12 +705,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
public void setVisible(boolean isVisible) { |
|
|
|
|
this.isVisible = isVisible; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setReplace(boolean replace) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.replace = replace; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isEnabled() { |
|
|
|
|
return isEnabled; |
|
|
|
|
} |
|
|
|
@ -720,16 +720,16 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
this.isEnabled = isEnabled; |
|
|
|
|
button.setEnabled(isEnabled); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setIconBaseDir(String iconBaseDir) { |
|
|
|
|
this.iconBaseDir = iconBaseDir; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String getIconBaseDir() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return StringUtils.isEmpty(iconBaseDir) ? ICON_BASE_DIR : iconBaseDir; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initPropertyPanel() { |
|
|
|
|
propertyPanel = new JPanel(); |
|
|
|
|
propertyPanel.setBackground(Color.pink); |
|
|
|
@ -810,7 +810,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String getBtnIconUrl() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return getIconBaseDir() + btnIconName + iconSuffix; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|