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. 7
      designer-base/src/main/java/com/fr/design/notification/SnapChatConfig.java
  3. 8
      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; import javax.swing.JPanel;
/** /**
* 组件库面板处理器
*
* created by Harrison on 2020/03/16 * created by Harrison on 2020/03/16
**/ **/
public interface ComponentLibraryPaneProcessor extends Immutable { public interface ComponentLibraryPaneProcessor extends Immutable {
String XML_TAG = "ParameterExpandablePaneUIProvider"; String XML_TAG = "ComponentLibraryPaneProcessor";
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;
/**
* 创建展示面板
*
* @param isEdit 是否可以编辑
* @return 展示面板
*/
UIScrollPane createShowPanel(boolean isEdit); UIScrollPane createShowPanel(boolean isEdit);
/**
* 创建菜单的上部面板
*
* @return 面板
*/
JPanel createMenuNorthPane(); JPanel createMenuNorthPane();
/**
* 创建复选框
*
* @return 复选框
*/
UIComboBox createMenuComBox(); UIComboBox createMenuComBox();
void parentView(DockingView dockingView); void parentView(DockingView dockingView);
/**
* 父面板
*
* @param panel 面板
*/
void parentPane(JPanel panel); void parentPane(JPanel panel);
/**
* 创建完成
*/
void complete(); void complete();
} }

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

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

8
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)); menuPanel.setBorder(BorderFactory.createEmptyBorder(3, 10, 10, 15));
JPanel menuPanelNorthPane = processor.createMenuNorthPane(); JPanel menuPanelNorthPane = processor.createMenuNorthPane();
menuPanel.add(menuPanelNorthPane, BorderLayout.NORTH); if (menuPanelNorthPane != null) {
menuPanel.add(menuPanelNorthPane, BorderLayout.NORTH);
}
UIComboBox menuPanelComboBox = processor.createMenuComBox(); UIComboBox menuPanelComboBox = processor.createMenuComBox();
menuPanel.add(menuPanelComboBox, BorderLayout.CENTER); if (menuPanelComboBox != null) {
menuPanel.add(menuPanelComboBox, BorderLayout.CENTER);
}
return menuPanel; return menuPanel;
} }
} }

Loading…
Cancel
Save