From 3f236acdc5c07470bafc63ae2e17b5a4e5de96df Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Wed, 19 Oct 2016 22:39:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/form/images/download.png | Bin 98 -> 186 bytes .../com/fr/design/form/images/showmenu.png | Bin 0 -> 98 bytes .../mainframe/FormWidgetDetailPane.java | 57 ++++++++++++++++-- 3 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 designer_form/src/com/fr/design/form/images/showmenu.png diff --git a/designer_form/src/com/fr/design/form/images/download.png b/designer_form/src/com/fr/design/form/images/download.png index fa7b09dea32a9cce0962b2da23a6cfa34bc59baf..57c328d73bdae515704173aac5c3c8e32480f4c9 100644 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^d_c^@!3HFQ8hUO4DaPU;cPEB*=VV?2IVGMhjv*SN z$q5G-wXW^?#ec|RiR6p|PXVFj``yH5*jqUrk>IrCSK$x#w_P5#w)QTAv1l5z2hR~V zHVLzBtlee?hDK(GL>g}>7)r>yZ9X7z!o)-Ig4hNDGhYSHHByd3J4_m$I5Y^}v=>l( hGks;7n^}<%ASW}?=44$rjF6*2UngAg%HYWf8 literal 98 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CF!3HE7boT!OQjEnx?oJHr&dIz4a%4PR977}| vlh;Iier3 jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (jt == null) { + return; + } + + UIPopupMenu menu = new UIPopupMenu(); + + UIMenuItem downloadItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); + menu.add(downloadItem); + downloadItem.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + BasicPane managerPane = new WebManagerPaneFactory().createReusePane(); + UIDialog dlg = new ShopDialog(DesignerContext.getDesignerFrame(), managerPane); + PluginWebBridge.getHelper().setDialogHandle(dlg); + dlg.setVisible(true); + } + }); + GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + 140, tabbedPane.getY() + 26); + + } + }); + } public String[] getCategories() { return ShareConstants.WIDGET_CATEGORIES; } From 1d67b72335988eaa8a4f91781ec2d1e47a6f9491 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Wed, 19 Oct 2016 22:41:30 +0800 Subject: [PATCH 2/4] rt --- .../com/fr/design/mainframe/FormWidgetDetailPane.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 1f5c170f9f..84600ecb49 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -101,7 +101,7 @@ public class FormWidgetDetailPane extends FormDockView{ } initReuWidgetPanel(); esp.add(reuWidgetPanel, BorderLayout.CENTER); - createDownButton(); + createDownloadButton(); JPanel widgetPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); widgetPane.setBorder(BorderFactory.createEmptyBorder(3, 10, 3, 3)); widgetPane.add(new UILabel(Inter.getLocText("FR-Designer_LocalWidget"), @@ -151,20 +151,14 @@ public class FormWidgetDetailPane extends FormDockView{ }); } - private void createDownButton() { + private void createDownloadButton() { downloadButton = new UIButton(); downloadButton.setIcon(BaseUtils.readIcon("/com/fr/design/form/images/showmenu.png")); downloadButton.set4ToolbarButton(); downloadButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - final JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (jt == null) { - return; - } - UIPopupMenu menu = new UIPopupMenu(); - UIMenuItem downloadItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); menu.add(downloadItem); downloadItem.addActionListener(new ActionListener() { From be824ed22ac3f9e79182666d384d431df7036360 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Wed, 19 Oct 2016 22:47:06 +0800 Subject: [PATCH 3/4] rt --- .../fr/design/mainframe/FormWidgetDetailPane.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 84600ecb49..62128240cc 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -126,7 +126,7 @@ public class FormWidgetDetailPane extends FormDockView{ downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList)); downPanel.setPreferredSize(new Dimension(236, rowCount * 82)); reuWidgetPanel = new JPanel(); - comboBox = new UIComboBox(getCategories()); + comboBox = new UIComboBox(getFormCategories()); comboBox.setPreferredSize(new Dimension(236, 30)); initComboBoxSelectedListener(); reuWidgetPanel.add(comboBox, BorderLayout.NORTH); @@ -151,6 +151,9 @@ public class FormWidgetDetailPane extends FormDockView{ }); } + /** + * 创建下载模板的按钮 + */ private void createDownloadButton() { downloadButton = new UIButton(); downloadButton.setIcon(BaseUtils.readIcon("/com/fr/design/form/images/showmenu.png")); @@ -175,10 +178,16 @@ public class FormWidgetDetailPane extends FormDockView{ } }); } - public String[] getCategories() { + + /** + * 获取报表块组件分类 + */ + public String[] getFormCategories() { return ShareConstants.WIDGET_CATEGORIES; } + + public void refreshDownPanel() { reuWidgetPanel.remove(downPanel); downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList)); From 5f0ead4b9a3505411cc0c04b8df510dc4361e93e Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 20 Oct 2016 00:32:24 +0800 Subject: [PATCH 4/4] RT --- .../src/com/fr/design/mainframe/FormWidgetDetailPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 62128240cc..372377077e 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -51,6 +51,8 @@ public class FormWidgetDetailPane extends FormDockView{ private UIComboBox comboBox; private ElCaseBindInfo[] elCaseBindInfoList; private UIButton downloadButton; + private static final int OFFSET_X = 140; + private static final int OFFSET_Y = 26; public static FormWidgetDetailPane getInstance() { if (HOLDER.singleton == null) { @@ -173,7 +175,7 @@ public class FormWidgetDetailPane extends FormDockView{ dlg.setVisible(true); } }); - GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + 140, tabbedPane.getY() + 26); + GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + OFFSET_X, tabbedPane.getY() + OFFSET_Y); } }); @@ -186,7 +188,7 @@ public class FormWidgetDetailPane extends FormDockView{ return ShareConstants.WIDGET_CATEGORIES; } - + public void refreshDownPanel() { reuWidgetPanel.remove(downPanel);