Browse Source

REPORT-27647 模板组件的安装下载-模板组件复用插件

删掉多余的设计
research/11.0
Harrison 5 years ago
parent
commit
f89a5d3171
  1. 21
      designer-base/src/main/java/com/fr/design/fun/PropertyItemPaneProvider.java
  2. 25
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractComponentLibraryPaneProcessor.java
  3. 6
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

21
designer-base/src/main/java/com/fr/design/fun/PropertyItemPaneProvider.java

@ -14,12 +14,33 @@ public interface PropertyItemPaneProvider<T> extends Mutable {
String XML_TAG = "PropertyItemPaneProvider"; String XML_TAG = "PropertyItemPaneProvider";
/**
* 独一无二的标志
*
* @return 标志
*/
String key(); String key();
/**
* 配置属性
*
* @return 熟悉
*/
PropertyItemBean getItem(); PropertyItemBean getItem();
/**
* 面板持有者
*
* @param clazz 类型
* @return 持有者
*/
@Nullable @Nullable
PaneHolder<T> getPaneHolder(Class<?> clazz); PaneHolder<T> getPaneHolder(Class<?> clazz);
/**
* 想要替代的类型
*
* @return 替代类型
*/
String replaceKey(); String replaceKey();
} }

25
designer-base/src/main/java/com/fr/design/fun/impl/AbstractComponentLibraryPaneProcessor.java

@ -1,25 +0,0 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.ComponentLibraryPaneProcessor;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
import com.fr.stable.fun.mark.Layer;
/**
* created by Harrison on 2020/03/16
**/
@API(level = ComponentLibraryPaneProcessor.CURRENT_LEVEL)
public abstract class AbstractComponentLibraryPaneProcessor extends AbstractProvider implements ComponentLibraryPaneProcessor {
@Override
public int currentAPILevel() {
return ComponentLibraryPaneProcessor.CURRENT_LEVEL;
}
@Override
public int layerIndex() {
return Layer.DEFAULT_LAYER_INDEX;
}
}

6
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -178,6 +178,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
propertyItemMap.remove(provider.key()); propertyItemMap.remove(provider.key());
String replaceKey = provider.replaceKey(); String replaceKey = provider.replaceKey();
if (replaceKey == null) {
return;
}
PropertyItem replaceItem = propertyItemMap.get(replaceKey); PropertyItem replaceItem = propertyItemMap.get(replaceKey);
if (replaceItem != null) { if (replaceItem != null) {
replaceItem.setReplace(false); replaceItem.setReplace(false);
@ -210,6 +213,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
propertyItemMap.put(key, propertyItem); propertyItemMap.put(key, propertyItem);
String replaceKey = provider.replaceKey(); String replaceKey = provider.replaceKey();
if (replaceKey == null) {
return;
}
PropertyItem replaceItem = propertyItemMap.get(replaceKey); PropertyItem replaceItem = propertyItemMap.get(replaceKey);
if (replaceItem != null) { if (replaceItem != null) {
replaceItem.setReplace(true); replaceItem.setReplace(true);

Loading…
Cancel
Save