diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index dba3141b7..66a516554 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -164,6 +164,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { private static List mapWorkerList = new ArrayList(); private boolean imageCompress = false;//图片压缩 + // 开启内嵌web页面的调试窗口 + private boolean openDebug = false; /** * DesignerEnvManager. @@ -175,6 +177,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { public static DesignerEnvManager getEnvManager(boolean needCheckEnv) { if (designerEnvManager == null) { designerEnvManager = new DesignerEnvManager(); + //REPORT-15332有一个国际化调用比较早,需要在这边就设置好locale,由于后台GeneralContext默认是China + GeneralContext.setLocale(designerEnvManager.getLanguage()); try { XMLTools.readFileXML(designerEnvManager, designerEnvManager.getDesignerEnvFile()); } catch (Exception e) { @@ -1383,6 +1387,13 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { reader.readXMLObject(this.configManager); } + private void readOpenDebug(XMLableReader reader) { + String tmpVal; + if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { + this.openDebug = Boolean.parseBoolean(tmpVal); + } + } + public String getUUID() { return StringUtils.isEmpty(uuid) ? UUID.randomUUID().toString() : uuid; } @@ -1411,6 +1422,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { this.imageCompress = imageCompress; } + public boolean isOpenDebug() { + return openDebug; + } + + public void setOpenDebug(boolean openDebug) { + this.openDebug = openDebug; + } + /** * Read XML.
* The method will be invoked when read data from XML file.
@@ -1458,12 +1477,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { readUUID(reader); } else if ("status".equals(name)) { readActiveStatus(reader); - } else if (ComparatorUtils.equals(CAS_PARAS, name)) { + } else if (CAS_PARAS.equals(name)) { readHttpsParas(reader); - } else if (name.equals("AlphaFineConfigManager")) { + } else if ("AlphaFineConfigManager".equals(name)) { readAlphaFineAttr(reader); - } else if (name.equals("RecentColors")) { + } else if ("RecentColors".equals(name)) { readRecentColor(reader); + } else if ("OpenDebug".equals(name)) { + readOpenDebug(reader); } else { readLayout(reader, name); } @@ -1668,6 +1689,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { writeHttpsParas(writer); writeAlphaFineAttr(writer); writeRecentColor(writer); + writeOpenDebug(writer); writer.end(); } @@ -1683,6 +1705,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } } + private void writeOpenDebug(XMLPrintWriter writer) { + if (this.openDebug) { + writer.startTAG("OpenDebug"); + writer.textNode(String.valueOf(openDebug)); + writer.end(); + } + } + //写入uuid private void writeUUID(XMLPrintWriter writer) { diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 9e4b7c2c0..4edf71c3b 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -18,6 +18,7 @@ import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -131,6 +132,7 @@ public class PreferencePane extends BasicPane { private UITextField jdkHomeTextField; private UICheckBox oracleSpace; private UISpinner cachingTemplateSpinner; + private UICheckBox openDebugComboBox; private UICheckBox joinProductImprove; public PreferencePane() { @@ -171,6 +173,12 @@ public class PreferencePane extends BasicPane { oracleSpace = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Show_All_Oracle_Tables")); oraclePane.add(oracleSpace); + JPanel debuggerPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Basic_Develop_Tools")); + openDebugComboBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Open_Debug_Window")); + debuggerPane.add(openDebugComboBox, BorderLayout.CENTER); + advancePane.add(debuggerPane); + + JPanel improvePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Product_Improve")); joinProductImprove = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Join_Product_Improve")); improvePane.add(joinProductImprove); @@ -550,6 +558,8 @@ public class PreferencePane extends BasicPane { this.portEditor.setValue(new Integer(designerEnvManager.getEmbedServerPort())); + openDebugComboBox.setSelected(designerEnvManager.isOpenDebug()); + this.oracleSpace.setSelected(designerEnvManager.isOracleSystemSpace()); this.cachingTemplateSpinner.setValue(designerEnvManager.getCachingTemplateLimit()); this.joinProductImprove.setSelected(designerEnvManager.isJoinProductImprove()); @@ -609,6 +619,8 @@ public class PreferencePane extends BasicPane { designerEnvManager.setJettyServerPort(portEditor.getValue().intValue()); + designerEnvManager.setOpenDebug(openDebugComboBox.isSelected()); + designerEnvManager.setOracleSystemSpace(this.oracleSpace.isSelected()); designerEnvManager.setCachingTemplateLimit((int) this.cachingTemplateSpinner.getValue()); designerEnvManager.setJoinProductImprove(this.joinProductImprove.isSelected()); diff --git a/designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java b/designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java new file mode 100644 index 000000000..4b09de856 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java @@ -0,0 +1,67 @@ +package com.fr.design.actions.help; + +import com.fr.design.actions.UpdateAction; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.ui.ModernUIPane; +import com.fr.locale.InterProviderFactory; +import com.fr.web.struct.AssembleComponent; +import com.fr.web.struct.Atom; +import com.fr.web.struct.browser.RequestClient; +import com.fr.web.struct.category.ScriptPath; +import com.fr.web.struct.impl.FineUI; + +import java.awt.event.ActionEvent; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-03-08 + */ +public class FineUIAction extends UpdateAction { + + public FineUIAction() { + setName("FineUI"); + } + + @Override + public void actionPerformed(final ActionEvent e) { + ModernUIPane pane = new ModernUIPane.Builder<>() +// .prepare(new ScriptContextAdapter() { +// @Override +// public void onScriptContextCreated(ScriptContextEvent event) { +// JSValue pool = event.getBrowser().executeJavaScriptAndReturnValue("window.Pool"); +// pool.asObject().setProperty("i18n", new I18n()); +// } +// }) + .withComponent(new AssembleComponent() { + + @Override + public ScriptPath script(RequestClient req) { + return ScriptPath.build("/com/fr/design/ui/help/demo.js"); + } + + @Override + public Atom[] refer() { + return new Atom[] {FineUI.KEY}; + } + }) + .build(); + BasicDialog dialog = pane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { + @Override + public void doOk() { + + } + }); + dialog.setVisible(true); + + } + + public static class I18n { + + public String i18nText(String key) { + return InterProviderFactory.getProvider().getLocText(key); + } + } +} diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java index c51aeaaec..4bb286dbc 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java @@ -60,7 +60,8 @@ class JControlUpdatePane extends JPanel { elEditing = el; NameableCreator[] creators = listControlPane.creators(); - for (int i = 0, len = updatePanes.length; i < len; i++) { + //倒序的原因是为了让一些继承内置连接类的插件实现能够生效REPORT-15409 + for (int i = updatePanes.length - 1; i > -1; i--) { Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper); if (ob2Populate != null) { if (updatePanes[i] == null) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignAuthorityEventType.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignAuthorityEventType.java new file mode 100644 index 000000000..fc1d0ab5a --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignAuthorityEventType.java @@ -0,0 +1,11 @@ +package com.fr.design.mainframe; + +import com.fr.event.Event; + +public enum DesignAuthorityEventType implements Event { + + // 退出权限编辑 + StartEdit, + // 进入权限编辑 + StopEdit; +} diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 2cc83543c..55e07cc1c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -39,6 +39,7 @@ import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.menu.MenuManager; import com.fr.design.menu.ShortCut; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.event.EventDispatcher; import com.fr.exception.DecryptTemplateException; import com.fr.file.FILE; import com.fr.file.FILEFactory; @@ -333,6 +334,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta needToAddAuhtorityPaint(); refreshDottedLine(); fireAuthorityStateToNomal(); + EventDispatcher.fire(DesignAuthorityEventType.StopEdit, DesignerFrame.this); } /** diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index cef5c86a0..7b9db81ed 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -370,6 +370,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt } selectedOperation.deleteFile(); stateChange(); + DesignerContext.getDesignerFrame().setTitle(); } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 415ff948c..35f7d3391 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -599,7 +599,11 @@ public abstract class JTemplate> editingFILE = fileChooser.getSelectedFILE(); } - boolean lockedTarget = WorkContext.getCurrent().get(TplOperator.class).saveAs(editingFILE.getPath()); + boolean lockedTarget = + // 目标本地文件 + !editingFILE.isEnvFile() || + // 目标远程文件 + WorkContext.getCurrent().get(TplOperator.class).saveAs(editingFILE.getPath()); if (lockedTarget) { boolean saved = saveNewFile(editingFILE, oldName); // 目标文件保存成功并且源文件不一致的情况下,把源文件锁释放掉 diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 3885ff71d..ff31f0156 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -6,6 +6,7 @@ package com.fr.design.mainframe.toolbar; import com.fr.base.FRContext; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignState; +import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; import com.fr.design.actions.community.BBSAction; @@ -24,6 +25,7 @@ import com.fr.design.actions.file.OpenTemplateAction; import com.fr.design.actions.file.PreferenceAction; import com.fr.design.actions.file.SwitchExistEnv; import com.fr.design.actions.help.AboutAction; +import com.fr.design.actions.help.FineUIAction; import com.fr.design.actions.help.TutorialAction; import com.fr.design.actions.help.WebDemoAction; import com.fr.design.actions.help.alphafine.AlphaFineAction; @@ -499,9 +501,14 @@ public abstract class ToolBarMenuDock { if (AlphaFineConfigManager.isALPHALicAvailable()) { shortCuts.add(new AlphaFineAction()); } + shortCuts.add(SeparatorDef.DEFAULT); + if (DesignerEnvManager.getEnvManager().isOpenDebug()) { + shortCuts.add(new FineUIAction()); + } shortCuts.add(new AboutAction()); - return shortCuts.toArray(new ShortCut[shortCuts.size()]); + + return shortCuts.toArray(new ShortCut[0]); } /** diff --git a/designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java b/designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java index a412e0a8a..d839461dd 100644 --- a/designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java +++ b/designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java @@ -11,18 +11,29 @@ import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.DesignAuthorityEventType; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DockingView; import com.fr.design.menu.ToolBarDef; - - -import javax.swing.*; +import com.fr.event.Event; +import com.fr.event.EventDispatcher; +import com.fr.event.Listener; + +import javax.swing.BorderFactory; +import javax.swing.Icon; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTree; +import javax.swing.ScrollPaneConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.TreeSelectionEvent; +import javax.swing.tree.DefaultTreeSelectionModel; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -40,6 +51,15 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo private static ReportAndFSManagePane singleton = new ReportAndFSManagePane(); private static RoleTree roleTree; + static { + EventDispatcher.listen(DesignAuthorityEventType.StopEdit, new Listener() { + + public void on(Event event, DesignerFrame param) { + DefaultTreeSelectionModel model = roleTree.getCheckBoxTreeSelectionModel(); + model.removeSelectionPaths(model.getSelectionPaths()); + } + }); + } private RefreshAction refreshAction = new RefreshAction(); private UIHeadGroup buttonGroup; private RoleSourceOP op; diff --git a/designer-base/src/main/java/com/fr/design/ui/Assistant.java b/designer-base/src/main/java/com/fr/design/ui/Assistant.java new file mode 100644 index 000000000..601f0ac36 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/ui/Assistant.java @@ -0,0 +1,53 @@ +package com.fr.design.ui; + +import com.fr.stable.StringUtils; +import com.teamdev.jxbrowser.chromium.Browser; +import com.teamdev.jxbrowser.chromium.BrowserContext; +import com.teamdev.jxbrowser.chromium.ProtocolService; +import com.teamdev.jxbrowser.chromium.URLResponse; + +import java.io.DataInputStream; +import java.io.InputStream; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-03-07 + */ +public class Assistant { + + public static URLResponse inputStream2Response(InputStream inputStream, String filePath) throws Exception { + URLResponse response = new URLResponse(); + DataInputStream stream = new DataInputStream(inputStream); + byte[] data = new byte[stream.available()]; + stream.readFully(data); + response.setData(data); + String mimeType = getMimeType(filePath); + response.getHeaders().setHeader("Content-Type", mimeType); + return response; + } + + + private static String getMimeType(String path) { + if (StringUtils.isBlank(path)) { + return "text/html"; + } + if (path.endsWith(".html")) { + return "text/html"; + } + if (path.endsWith(".css")) { + return "text/css"; + } + if (path.endsWith(".js")) { + return "text/javascript"; + } + return "text/html"; + } + + public static void setEmbProtocolHandler(Browser browser, EmbProtocolHandler handler) { + BrowserContext browserContext = browser.getContext(); + ProtocolService protocolService = browserContext.getProtocolService(); + // 支持读取jar包中文件的自定义协议————emb:/com/fr/design/images/bbs.png + protocolService.setProtocolHandler("emb", handler); + } +} diff --git a/designer-base/src/main/java/com/fr/design/ui/EmbProtocolHandler.java b/designer-base/src/main/java/com/fr/design/ui/EmbProtocolHandler.java new file mode 100644 index 000000000..6636e2874 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/ui/EmbProtocolHandler.java @@ -0,0 +1,83 @@ +package com.fr.design.ui; + +import com.fr.general.IOUtils; +import com.fr.stable.StringUtils; +import com.fr.web.struct.AssembleComponent; +import com.fr.web.struct.AtomBuilder; +import com.fr.web.struct.PathGroup; +import com.fr.web.struct.category.ScriptPath; +import com.fr.web.struct.category.StylePath; +import com.teamdev.jxbrowser.chromium.ProtocolHandler; +import com.teamdev.jxbrowser.chromium.URLRequest; +import com.teamdev.jxbrowser.chromium.URLResponse; + +import java.io.InputStream; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-03-07 + */ +public class EmbProtocolHandler implements ProtocolHandler { + + private AssembleComponent component; + + public EmbProtocolHandler() { + + } + + public EmbProtocolHandler(AssembleComponent component) { + this.component = component; + } + + + @Override + public URLResponse onRequest(URLRequest req) { + try { + String path = req.getURL(); + if (path.startsWith("emb:dynamic")) { + URLResponse response = new URLResponse(); + response.setData(htmlText().getBytes()); + response.getHeaders().setHeader("Content-Type", "text/html"); + return response; + } else { + int index = path.indexOf("="); + if (index > 0) { + path = path.substring(index + 1); + } else { + path = path.substring(4); + } + InputStream inputStream = IOUtils.readResource(path); + return Assistant.inputStream2Response(inputStream, path); + } + } catch (Exception ignore) { + + } + return null; + } + + private String htmlText() { + PathGroup pathGroup = AtomBuilder.create().buildAssembleFilePath(ModernRequestClient.KEY, component); + StylePath[] stylePaths = pathGroup.toStylePathGroup(); + StringBuilder styleText = new StringBuilder(); + for (StylePath path : stylePaths) { + if (StringUtils.isNotBlank(path.toFilePath())) { + styleText.append(""); + } + } + String result = ModernUIConstants.HTML_TPL.replaceAll("##style##", styleText.toString()); + ScriptPath[] scriptPaths = pathGroup.toScriptPathGroup(); + StringBuilder scriptText = new StringBuilder(); + for (ScriptPath path : scriptPaths) { + if (StringUtils.isNotBlank(path.toFilePath())) { + scriptText.append(""); + } + } + result = result.replaceAll("##script##", scriptText.toString()); + return result; + } +} diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernRequestClient.java b/designer-base/src/main/java/com/fr/design/ui/ModernRequestClient.java new file mode 100644 index 000000000..8a19c84c8 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/ui/ModernRequestClient.java @@ -0,0 +1,22 @@ +package com.fr.design.ui; + +import com.fr.web.struct.browser.RequestClient; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-03-07 + */ +public enum ModernRequestClient implements RequestClient { + + KEY; + + @Override + public boolean isIE() { + return false; + } + + @Override + public boolean isLowIEVersion() { + return false; + }} diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIConstants.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIConstants.java new file mode 100644 index 000000000..ed6fb542e --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIConstants.java @@ -0,0 +1,15 @@ +package com.fr.design.ui; + +import com.fr.general.IOUtils; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-03-05 + */ +class ModernUIConstants { + + static final String SCRIPT_INIT_NAME_SPACE = IOUtils.readResourceAsString("/com/fr/design/ui/InitNameSpace.js"); + + static final String HTML_TPL = IOUtils.readResourceAsString("/com/fr/design/ui/tpl.html"); +} diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java new file mode 100644 index 000000000..7d5566662 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -0,0 +1,212 @@ +package com.fr.design.ui; + +import com.fr.design.DesignerEnvManager; +import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.itoolbar.UIToolbar; +import com.fr.design.i18n.Toolkit; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.web.struct.AssembleComponent; +import com.teamdev.jxbrowser.chromium.Browser; +import com.teamdev.jxbrowser.chromium.BrowserPreferences; +import com.teamdev.jxbrowser.chromium.JSValue; +import com.teamdev.jxbrowser.chromium.events.FinishLoadingEvent; +import com.teamdev.jxbrowser.chromium.events.LoadAdapter; +import com.teamdev.jxbrowser.chromium.events.LoadListener; +import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; +import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; +import com.teamdev.jxbrowser.chromium.events.ScriptContextListener; +import com.teamdev.jxbrowser.chromium.swing.BrowserView; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-03-04 + * 用于加载html5的Swing容器,可以在设计选项设置中打开调试窗口,示例可查看:com.fr.design.ui.ModernUIPaneTest + */ +public class ModernUIPane extends BasicPane { + + private Browser browser; + private String namespace = "Pool"; + private String variable = "data"; + private String expression = "update()"; + + private ModernUIPane() { + initialize(); + } + + private void initialize() { + if (browser == null) { + setLayout(new BorderLayout()); + BrowserPreferences.setChromiumSwitches("--disable-google-traffic"); + if (DesignerEnvManager.getEnvManager().isOpenDebug()) { + UIToolbar toolbar = new UIToolbar(); + add(toolbar, BorderLayout.NORTH); + UIButton openDebugButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Open_Debug_Window")); + toolbar.add(openDebugButton); + UIButton reloadButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Reload")); + toolbar.add(reloadButton); + + openDebugButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + showDebuggerDialog(); + } + }); + + reloadButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + browser.reloadIgnoringCache(); + } + }); + BrowserPreferences.setChromiumSwitches("--remote-debugging-port=9222"); + initializeBrowser(); + add(new BrowserView(browser), BorderLayout.CENTER); + } else { + initializeBrowser(); + add(new BrowserView(browser), BorderLayout.CENTER); + } + } + } + + private void showDebuggerDialog() { + JDialog dialog = new JDialog(SwingUtilities.getWindowAncestor(this)); + Browser debugger = new Browser(); + BrowserView debuggerView = new BrowserView(debugger); + dialog.add(debuggerView, BorderLayout.CENTER); + dialog.setSize(new Dimension(800, 400)); + GUICoreUtils.centerWindow(dialog); + dialog.setVisible(true); + dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); + debugger.loadURL(browser.getRemoteDebuggingURL()); + } + + private void initializeBrowser() { + browser = new Browser(); + // 初始化的时候,就把命名空间对象初始化好,确保window.a.b.c("a.b.c"为命名空间)对象都是初始化过的 + browser.addScriptContextListener(new ScriptContextAdapter() { + @Override + public void onScriptContextCreated(ScriptContextEvent event) { + event.getBrowser().executeJavaScript(String.format(ModernUIConstants.SCRIPT_INIT_NAME_SPACE, namespace)); + } + }); + } + + @Override + protected String title4PopupWindow() { + return "Modern"; + } + + + public void populate(final T t) { + browser.addLoadListener(new LoadAdapter() { + @Override + public void onFinishLoadingFrame(FinishLoadingEvent event) { + if (event.isMainFrame()) { + JSValue ns = event.getBrowser().executeJavaScriptAndReturnValue("window." + namespace); + ns.asObject().setProperty(variable, t); + } + } + }); + } + + public T update() { + JSValue jsValue = browser.executeJavaScriptAndReturnValue("window." + namespace + "." + expression); + if (jsValue.isObject()) { + return (T)jsValue.asJavaObject(); + } + return null; + } + + public static class Builder { + + private ModernUIPane pane = new ModernUIPane<>(); + + public Builder prepare(ScriptContextListener contextListener) { + pane.browser.addScriptContextListener(contextListener); + return this; + } + + public Builder prepare(LoadListener loadListener) { + pane.browser.addLoadListener(loadListener); + return this; + } + + /** + * 加载jar包中的资源 + * @param path 资源路径 + */ + public Builder withEMB(final String path) { + Assistant.setEmbProtocolHandler(pane.browser, new EmbProtocolHandler()); + pane.browser.loadURL("emb:" + path); + return this; + } + + /** + * 加载url指向的资源 + * @param url 文件的地址 + */ + public Builder withURL(final String url) { + Assistant.setEmbProtocolHandler(pane.browser, new EmbProtocolHandler()); + pane.browser.loadURL(url); + return this; + } + + /** + * 加载Atom组件 + * @param component Atom组件 + */ + public Builder withComponent(AssembleComponent component) { + Assistant.setEmbProtocolHandler(pane.browser, new EmbProtocolHandler(component)); + pane.browser.loadURL("emb:dynamic"); + return this; + } + + /** + * 加载html文本内容 + * @param html 要加载html文本内容 + */ + public Builder withHTML(String html) { + Assistant.setEmbProtocolHandler(pane.browser, new EmbProtocolHandler()); + pane.browser.loadHTML(html); + return this; + } + + /** + * 设置该前端页面做数据交换所使用的对象 + * @param namespace 对象名 + */ + public Builder namespace(String namespace) { + pane.namespace = namespace; + return this; + } + + /** + * java端往js端传数据时使用的变量名字 + * @param name 变量的名字 + */ + public Builder variable(String name) { + pane.variable = name; + return this; + } + + /** + * js端往java端传数据时执行的函数表达式 + * @param expression 函数表达式 + */ + public Builder expression(String expression) { + pane.expression = expression; + return this; + } + + public ModernUIPane build() { + return pane; + } + } +} diff --git a/designer-base/src/main/java/com/fr/file/FileNodeFILE.java b/designer-base/src/main/java/com/fr/file/FileNodeFILE.java index 7f73fc708..dce2c38e0 100644 --- a/designer-base/src/main/java/com/fr/file/FileNodeFILE.java +++ b/designer-base/src/main/java/com/fr/file/FileNodeFILE.java @@ -7,6 +7,9 @@ import com.fr.design.file.NodeAuthProcessor; import com.fr.design.gui.itree.filetree.FileNodeComparator; import com.fr.design.gui.itree.filetree.FileTreeIcon; import com.fr.design.i18n.Toolkit; +import com.fr.event.Event; +import com.fr.event.EventDispatcher; +import com.fr.event.Listener; import com.fr.file.filetree.FileNode; import com.fr.general.ComparatorUtils; import com.fr.io.EncryptUtils; @@ -15,6 +18,8 @@ import com.fr.stable.CoreConstants; import com.fr.stable.StableUtils; import com.fr.stable.project.ProjectConstants; import com.fr.workspace.WorkContext; +import com.fr.workspace.Workspace; +import com.fr.workspace.WorkspaceEvent; import com.fr.workspace.resource.WorkResourceTempRenameStream; import com.fr.workspace.server.lock.TplOperator; @@ -26,6 +31,21 @@ import java.util.Arrays; public class FileNodeFILE implements FILE { + + private static String webRootPath = FRContext.getCommonOperator().getWebRootPath(); + private static String[] supportTypes = FRContext.getFileNodes().getSupportedTypes(); + + static { + EventDispatcher.listen(WorkspaceEvent.AfterSwitch, new Listener() { + @Override + public void on(Event event, Workspace workspace) { + webRootPath = FRContext.getCommonOperator().getWebRootPath(); + supportTypes = FRContext.getFileNodes().getSupportedTypes(); + } + }); + } + + private FileNode node; //记录下FILE对应的运行环境,每次创建都设置下当前的运行环境 @@ -95,7 +115,7 @@ public class FileNodeFILE implements FILE { @Override public String prefix() { - if (ComparatorUtils.equals(getEnvPath(), FRContext.getCommonOperator().getWebRootPath())) { + if (ComparatorUtils.equals(getEnvPath(), webRootPath)) { return FILEFactory.WEBREPORT_PREFIX; } return FILEFactory.ENV_PREFIX; @@ -212,7 +232,7 @@ public class FileNodeFILE implements FILE { try { FileNode[] nodeArray; nodeArray = listFile(node.getEnvPath()); - Arrays.sort(nodeArray, new FileNodeComparator(FRContext.getFileNodes().getSupportedTypes())); + Arrays.sort(nodeArray, new FileNodeComparator(supportTypes)); return fileNodeArray2FILEArray(nodeArray, envPath); } catch (Exception e) { @@ -235,7 +255,7 @@ public class FileNodeFILE implements FILE { private FileNode[] listFile(String rootFilePath) { try { - if (ComparatorUtils.equals(envPath, FRContext.getCommonOperator().getWebRootPath())) { + if (ComparatorUtils.equals(envPath, webRootPath)) { return FRContext.getFileNodes().listWebRootFile(rootFilePath); } else { return FRContext.getFileNodes().list(rootFilePath); diff --git a/designer-base/src/main/resources/com/fr/design/ui/InitNameSpace.js b/designer-base/src/main/resources/com/fr/design/ui/InitNameSpace.js new file mode 100644 index 000000000..0274d5fa5 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/ui/InitNameSpace.js @@ -0,0 +1,12 @@ +var arr ="%s".split(".").reverse(); +var create = function (obj, names) { + var name = names.pop(); + if (!name) { + return; + } + if (!obj[name]) { + obj[name] = {}; + } + create(obj[name], names); +}; +create(window, arr); \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/ui/InsertScript.js b/designer-base/src/main/resources/com/fr/design/ui/InsertScript.js new file mode 100644 index 000000000..8ad60313e --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/ui/InsertScript.js @@ -0,0 +1,8 @@ +var arr = "%s".split(","); +var header = document.getElementsByTagName("head")[0]; +arr.forEach(function(el) { + var script = document.createElement("script") + script.type = "text/javascript"; + script.src = "emb:" + el; + header.appendChild(script); +}); \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/ui/InsertStyle.js b/designer-base/src/main/resources/com/fr/design/ui/InsertStyle.js new file mode 100644 index 000000000..18ccb7e41 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/ui/InsertStyle.js @@ -0,0 +1,9 @@ +var arr = "%s".split(","); +var header = document.getElementsByTagName("head")[0]; +arr.forEach(function(el) { + var css = document.createElement("link"); + css.type = "text/css"; + css.rel = "stylesheet"; + css.href = "emb:" + el; + header.appendChild(css); +}); \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/ui/help/demo.js b/designer-base/src/main/resources/com/fr/design/ui/help/demo.js new file mode 100644 index 000000000..fd4694d1a --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/ui/help/demo.js @@ -0,0 +1,220 @@ +window.addEventListener("load", function (ev) { + window.BI.i18nText = function(key) {return window.Pool.i18n.i18nText(key);} + var combo1 = BI.createWidget({ + type: "bi.vertical", + items: [ + { + type: "bi.text_value_combo", + text: "选项1", + width: 300, + items: [ + { + el: { + type: "bi.single_select_radio_item", + width: 290, + text: "选项1", + value: 1 + }, + text: "选项1", + value: 1, + lgap: 10 + }, + { + el: { + type: "bi.single_select_radio_item", + width: 290, + text: "选项2", + value: 2 + }, + lgap: 10, + text: "选项2", + value: 2 + }, + { + el: { + type: "bi.single_select_radio_item", + width: 290, + text: "选项3", + value: 3 + }, + lgap: 10, + text: "选项3", + value: 3 + } + ] + } + ] + }); + + var date = BI.createWidget({ + type: "bi.left", + items: [{ + el: { + type: "bi.date_time_combo", + value: { + year: 2018, + month: 9, + day: 28, + hour: 13, + minute: 31, + second: 1 + } + } + }] + }); + + var comboTree = BI.createWidget({ + type: "bi.vertical", + items: [ + { + type: "bi.tree_value_chooser_combo", + width: 300, + itemsCreator: function(op, callback) { + callback([ + { + id: 1, + text: "第1项", + value: "1" + }, + { + id: 2, + text: "第2项", + value: "2" + }, + { + id: 3, + text: "第3项", + value: "3", + open: true + }, + { + id: 11, + pId: 1, + text: "子项1", + value: "11" + }, + { + id: 12, + pId: 1, + text: "子项2", + value: "12" + }, + { + id: 13, + pId: 1, + text: "子项3", + value: "13" + }, + { + id: 31, + pId: 3, + text: "子项1", + value: "31" + }, + { + id: 32, + pId: 3, + text: "子项2", + value: "32" + }, + { + id: 33, + pId: 3, + text: "子项3", + value: "33" + } + ]); + } + } + ] + }); + + var color = BI.createWidget({ + type: "bi.left", + items: [{ + type: "bi.simple_color_chooser", + width: 24, + height: 24 + }, { + el: { + type: "bi.color_chooser", + width: 230, + height: 24 + }, + lgap: 10 + }] + }); + + var Slider = BI.inherit(BI.Widget, { + props: { + width: 300, + height: 50, + min: 0, + max: 100 + }, + + mounted: function() { + var o = this.options; + this.singleSliderInterval.setMinAndMax({ + min: o.min, + max: o.max + }); + + this.singleSliderInterval.setValue({ + min: 10, + max: 80 + }); + this.singleSliderInterval.populate(); + }, + + render: function() { + var self = this, + o = this.options; + return { + type: "bi.vertical", + element: this, + items: [ + { + type: "bi.interval_slider", + digit: 0, + width: o.width, + height: o.height, + ref: function(_ref) { + self.singleSliderInterval = _ref; + } + } + ] + }; + } + }); + BI.shortcut("demo.slider_interval", Slider); + var slider = BI.createWidget({ + type: "demo.slider_interval" + }); + + BI.createWidget({ + type:"bi.absolute", + element: "body", + items: [{ + el: combo1, + left: 100, + top: 100 + }, { + el : date, + left: 100, + top : 150 + }, { + el : comboTree, + left : 100, + top : 200 + }, { + el : color, + left : 100, + top : 250 + }, { + el : slider, + left : 400, + top : 100 + }] + }); +}); \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/ui/tpl.html b/designer-base/src/main/resources/com/fr/design/ui/tpl.html new file mode 100644 index 000000000..92df75539 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/ui/tpl.html @@ -0,0 +1,12 @@ + + + + + Title + ##style## + ##script## + + + + + \ No newline at end of file diff --git a/designer-base/src/test/java/com/fr/design/ui/FineUIDemo.java b/designer-base/src/test/java/com/fr/design/ui/FineUIDemo.java new file mode 100644 index 000000000..c7dd4b682 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/ui/FineUIDemo.java @@ -0,0 +1,28 @@ +package com.fr.design.ui; + +import com.fr.design.DesignerEnvManager; + +import javax.swing.*; +import java.awt.*; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-03-07 + */ +public class FineUIDemo { + + public static void main(String... args) { + final JFrame frame = new JFrame(); + frame.setSize(1200, 800); + JPanel contentPane = (JPanel) frame.getContentPane(); + // 是否需要开启调试窗口 + DesignerEnvManager.getEnvManager().setOpenDebug(true); + + final ModernUIPane pane = new ModernUIPane.Builder() + .withComponent(StartComponent.KEY).build(); + contentPane.add(pane, BorderLayout.CENTER); + frame.setVisible(true); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + } +} diff --git a/designer-base/src/test/java/com/fr/design/ui/ModernUIPaneTest.java b/designer-base/src/test/java/com/fr/design/ui/ModernUIPaneTest.java new file mode 100644 index 000000000..9676ee998 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/ui/ModernUIPaneTest.java @@ -0,0 +1,75 @@ +package com.fr.design.ui; + +import com.fr.design.DesignerEnvManager; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-03-05 + */ +public class ModernUIPaneTest { + + public static void main(String... args) { + final JFrame frame = new JFrame(); + frame.setSize(1200, 800); + JPanel contentPane = (JPanel) frame.getContentPane(); + // 是否需要开启调试窗口 + DesignerEnvManager.getEnvManager().setOpenDebug(true); + final ModernUIPane pane = new ModernUIPane.Builder() + .withEMB("/com/fr/design/ui/demo.html").namespace("Pool").build(); + contentPane.add(pane, BorderLayout.CENTER); + + Model model = new Model(); + model.setAge(20); + model.setName("Pick"); + pane.populate(model); + + JPanel panel = new JPanel(new FlowLayout()); + contentPane.add(panel, BorderLayout.SOUTH); + JButton button = new JButton("点击我可以看到Swing的弹框,输出填写的信息"); + panel.add(button); + button.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + Model returnValue = pane.update(); + if (returnValue != null) { + JOptionPane.showMessageDialog(frame, String.format("姓名为:%s,年龄为:%d", returnValue.getName(), returnValue.getAge())); + } + } + }); + frame.setVisible(true); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + } + + public static class Model { + private String name; + private int age; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + public void print(String message) { + System.out.println(message); + } + + } + +} \ No newline at end of file diff --git a/designer-base/src/test/java/com/fr/design/ui/StartComponent.java b/designer-base/src/test/java/com/fr/design/ui/StartComponent.java new file mode 100644 index 000000000..7811142f0 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/ui/StartComponent.java @@ -0,0 +1,32 @@ +package com.fr.design.ui; + +import com.fr.web.struct.AssembleComponent; +import com.fr.web.struct.Atom; +import com.fr.web.struct.browser.RequestClient; +import com.fr.web.struct.category.ScriptPath; +import com.fr.web.struct.impl.FineUI; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-03-08 + */ +public class StartComponent extends AssembleComponent { + + public static final StartComponent KEY = new StartComponent(); + + private StartComponent() { + + } + + @Override + public ScriptPath script(RequestClient req) { + return ScriptPath.build("/com/fr/design/ui/script/start.js"); + } + + @Override + public Atom[] refer() { + return new Atom[] {FineUI.KEY}; + } + +} diff --git a/designer-base/src/test/java/com/fr/design/ui/report/ReportServerParamComponent.java b/designer-base/src/test/java/com/fr/design/ui/report/ReportServerParamComponent.java new file mode 100644 index 000000000..6299fb860 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/ui/report/ReportServerParamComponent.java @@ -0,0 +1,40 @@ +package com.fr.design.ui.report; + +import com.fr.web.struct.AssembleComponent; +import com.fr.web.struct.Atom; +import com.fr.web.struct.browser.RequestClient; +import com.fr.web.struct.category.ParserType; +import com.fr.web.struct.category.ScriptPath; +import com.fr.web.struct.category.StylePath; +import com.fr.web.struct.impl.FineUI; + +/** + * Created by windy on 2019/3/25. + * 报表服务器参数demo使用 + */ +public class ReportServerParamComponent extends AssembleComponent { + + public static final ReportServerParamComponent KEY = new ReportServerParamComponent(); + + private ReportServerParamComponent() { + + } + + @Override + public Atom[] refer() { + return new Atom[] { + FineUI.KEY + }; + } + + @Override + public ScriptPath script(RequestClient req) { + return ScriptPath.build("/com/fr/design/ui/script/report.js"); + } + + @Override + public StylePath style() { + + return StylePath.build("/com/fr/design/ui/script/report.css", ParserType.DYNAMIC); + } +} diff --git a/designer-base/src/test/java/com/fr/design/ui/report/ReportServerParamDemo.java b/designer-base/src/test/java/com/fr/design/ui/report/ReportServerParamDemo.java new file mode 100644 index 000000000..42199134d --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/ui/report/ReportServerParamDemo.java @@ -0,0 +1,29 @@ +package com.fr.design.ui.report; + +import com.fr.design.DesignerEnvManager; +import com.fr.design.ui.ModernUIPane; +import com.fr.design.ui.ModernUIPaneTest; + +import javax.swing.*; +import java.awt.*; + +/** + * Created by windy on 2019/3/25. + * 报表服务器参数demo + */ +public class ReportServerParamDemo { + + public static void main(String... args) { + final JFrame frame = new JFrame(); + frame.setSize(660, 600); + JPanel contentPane = (JPanel) frame.getContentPane(); + // 是否需要开启调试窗口 + DesignerEnvManager.getEnvManager().setOpenDebug(true); + + final ModernUIPane pane = new ModernUIPane.Builder() + .withComponent(ReportServerParamComponent.KEY).build(); + contentPane.add(pane, BorderLayout.CENTER); + frame.setVisible(true); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + } +} diff --git a/designer-base/src/test/java/com/fr/design/ui/report/TemplateWebSettingComponent.java b/designer-base/src/test/java/com/fr/design/ui/report/TemplateWebSettingComponent.java new file mode 100644 index 000000000..333c6ab10 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/ui/report/TemplateWebSettingComponent.java @@ -0,0 +1,40 @@ +package com.fr.design.ui.report; + +import com.fr.web.struct.AssembleComponent; +import com.fr.web.struct.Atom; +import com.fr.web.struct.browser.RequestClient; +import com.fr.web.struct.category.ParserType; +import com.fr.web.struct.category.ScriptPath; +import com.fr.web.struct.category.StylePath; +import com.fr.web.struct.impl.FineUI; + +/** + * Created by windy on 2019/3/26. + * 模板Web属性demo使用 + */ +public class TemplateWebSettingComponent extends AssembleComponent { + + public static final TemplateWebSettingComponent KEY = new TemplateWebSettingComponent(); + + private TemplateWebSettingComponent() { + + } + + @Override + public Atom[] refer() { + return new Atom[] { + FineUI.KEY + }; + } + + @Override + public ScriptPath script(RequestClient req) { + return ScriptPath.build("/com/fr/design/ui/script/template.js"); + } + + @Override + public StylePath style() { + + return StylePath.build("/com/fr/design/ui/script/template.css", ParserType.DYNAMIC); + } +} diff --git a/designer-base/src/test/java/com/fr/design/ui/report/TemplateWebSettingDemo.java b/designer-base/src/test/java/com/fr/design/ui/report/TemplateWebSettingDemo.java new file mode 100644 index 000000000..b267b1346 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/ui/report/TemplateWebSettingDemo.java @@ -0,0 +1,28 @@ +package com.fr.design.ui.report; + +import com.fr.design.DesignerEnvManager; +import com.fr.design.ui.ModernUIPane; +import com.fr.design.ui.ModernUIPaneTest; + +import javax.swing.*; +import java.awt.*; + +/** + * Created by windy on 2019/3/26. + * 模板Web属性demo + */ +public class TemplateWebSettingDemo { + public static void main(String... args) { + final JFrame frame = new JFrame(); + frame.setSize(660, 600); + JPanel contentPane = (JPanel) frame.getContentPane(); + // 是否需要开启调试窗口 + DesignerEnvManager.getEnvManager().setOpenDebug(true); + + final ModernUIPane pane = new ModernUIPane.Builder() + .withComponent(TemplateWebSettingComponent.KEY).build(); + contentPane.add(pane, BorderLayout.CENTER); + frame.setVisible(true); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + } +} diff --git a/designer-base/src/test/resources/com/fr/design/ui/demo.html b/designer-base/src/test/resources/com/fr/design/ui/demo.html new file mode 100644 index 000000000..2beae25a7 --- /dev/null +++ b/designer-base/src/test/resources/com/fr/design/ui/demo.html @@ -0,0 +1,20 @@ + + + + + Title + + + +
测试页面,请点击最下面的按钮
+ + + + + \ No newline at end of file diff --git a/designer-base/src/test/resources/com/fr/design/ui/fineui.html b/designer-base/src/test/resources/com/fr/design/ui/fineui.html new file mode 100644 index 000000000..a02004a35 --- /dev/null +++ b/designer-base/src/test/resources/com/fr/design/ui/fineui.html @@ -0,0 +1,11 @@ + + + + + Title + +