Browse Source

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

1、空字符串
2、判空
3、接口 xml
research/11.0
Harrison 5 years ago
parent
commit
f279194bba
  1. 28
      designer-base/src/main/java/com/fr/design/fun/ComponentLibraryPaneProcessor.java
  2. 5
      designer-base/src/main/java/com/fr/design/notification/SnapChatConfig.java
  3. 4
      designer-form/src/main/java/com/fr/design/mainframe/component/pane/ComponentLibraryPaneCreator.java

28
designer-base/src/main/java/com/fr/design/fun/ComponentLibraryPaneProcessor.java

@ -8,24 +8,50 @@ import com.fr.stable.fun.mark.Immutable;
import javax.swing.JPanel;
/**
* 组件库面板处理器
*
* created by Harrison on 2020/03/16
**/
public interface ComponentLibraryPaneProcessor extends Immutable {
String XML_TAG = "ParameterExpandablePaneUIProvider";
String XML_TAG = "ComponentLibraryPaneProcessor";
int CURRENT_LEVEL = 1;
/**
* 创建展示面板
*
* @param isEdit 是否可以编辑
* @return 展示面板
*/
UIScrollPane createShowPanel(boolean isEdit);
/**
* 创建菜单的上部面板
*
* @return 面板
*/
JPanel createMenuNorthPane();
/**
* 创建复选框
*
* @return 复选框
*/
UIComboBox createMenuComBox();
void parentView(DockingView dockingView);
/**
* 父面板
*
* @param panel 面板
*/
void parentPane(JPanel panel);
/**
* 创建完成
*/
void complete();
}

5
designer-base/src/main/java/com/fr/design/notification/SnapChatConfig.java

@ -1,5 +1,6 @@
package com.fr.design.notification;
import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLReadable;
import com.fr.stable.xml.XMLable;
@ -63,7 +64,7 @@ public class SnapChatConfig implements XMLable {
public void readXML(XMLableReader reader) {
String tmpVal = reader.getElementValue();
Boolean markRead = Boolean.valueOf(tmpVal);
markReadMap.put(reader.getAttrAsString("key", ""), markRead);
markReadMap.put(reader.getAttrAsString("key", StringUtils.EMPTY), markRead);
}
});
}
@ -83,6 +84,6 @@ public class SnapChatConfig implements XMLable {
@Override
public Object clone() throws CloneNotSupportedException {
return null;
return super.clone();
}
}

4
designer-form/src/main/java/com/fr/design/mainframe/component/pane/ComponentLibraryPaneCreator.java

@ -59,10 +59,14 @@ public class ComponentLibraryPaneCreator {
menuPanel.setBorder(BorderFactory.createEmptyBorder(3, 10, 10, 15));
JPanel menuPanelNorthPane = processor.createMenuNorthPane();
if (menuPanelNorthPane != null) {
menuPanel.add(menuPanelNorthPane, BorderLayout.NORTH);
}
UIComboBox menuPanelComboBox = processor.createMenuComBox();
if (menuPanelComboBox != null) {
menuPanel.add(menuPanelComboBox, BorderLayout.CENTER);
}
return menuPanel;
}
}

Loading…
Cancel
Save