From 6cba2e4318ac81fb3d0024187d5b37eb7e0daec7 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 10:10:11 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B7=B2=E7=BB=8F=E7=A6=81=E7=94=A8=E4=BA=86?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E8=A1=A8=E6=8F=92=E4=BB=B6=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 85 +++++++++++-------- 1 file changed, 51 insertions(+), 34 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 12cbef841..adb35b3e3 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -22,9 +22,8 @@ import com.fr.design.module.DesignModuleFactory; import com.fr.file.XMLFileManager; import com.fr.form.ui.ChartEditor; import com.fr.general.*; -import com.fr.plugin.PluginCollector; -import com.fr.plugin.PluginLicenseManager; -import com.fr.plugin.PluginMessage; +import com.fr.plugin.*; +import com.fr.plugin.proxy.PluginInstanceProxyFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; @@ -43,9 +42,6 @@ import java.util.*; */ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraChartDesignClassManagerProvider { - - - private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); private static ChartTypeInterfaceManager classManager = null; @@ -173,13 +169,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } private String getIconPath(String priority, String plotID) { - if (chartTypeInterfaces.get(priority) != null && chartTypeInterfaces.get(priority).get(plotID) != null) { + + if (containsPlot(priority, plotID)) { return chartTypeInterfaces.get(priority).get(plotID).getIconPath(); }else { return StringUtils.EMPTY; } } + private boolean containsPlot(String priority, String plotID) { + + return chartTypeInterfaces.get(priority) != null && chartTypeInterfaces.get(priority).get(plotID) != null + && !CloseableUtils.isClosed(chartTypeInterfaces.get(priority).get(plotID)); + } + public static void addChartTypeInterface(IndependentChartUIProvider provider, String priority, String plotID) { if (chartTypeInterfaces != null){ if (!chartTypeInterfaces.containsKey(priority)){ @@ -210,8 +213,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if (authorize != null) { PluginLicenseManager.getInstance().registerPaid(authorize, simplify); } - IndependentChartUIProvider provider = (IndependentChartUIProvider) clazz.newInstance(); - if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName()) || !containsChart(plotID)) { + IndependentChartUIProvider provider = (IndependentChartUIProvider) new PluginInstanceProxyFactory(clazz, simplify).addProxy(Closeable.MASK).getProxyObj(); + if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName())) { PluginMessage.remindUpdate(className); } else { ChartTypeInterfaceManager.getInstance().addChartTypeInterface(provider, priority, plotID); @@ -224,10 +227,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } } - //UI对应的chart如果没有加载,UI也不必加进去了 - private boolean containsChart(String plotID) { - return ChartTypeManager.getInstance().containsPlot(plotID); - } +// //UI对应的chart如果没有加载,UI也不必加进去了 +// private boolean containsChart(String plotID) { +// return ChartTypeManager.getInstance().containsPlot(plotID); +// } /** @@ -243,7 +246,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (chartUIIterator.hasNext()) { Map.Entry chartUIEntry = (Map.Entry) chartUIIterator.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue(); - paneList.add(provider.getPlotTypePane()); + if (!CloseableUtils.isClosed(provider)) { + paneList.add(provider.getPlotTypePane()); + } } } } @@ -253,27 +258,42 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh return getTitle4PopupWindow(); } String[] names = new String[getChartSize(priority)]; - if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)){ + if (containsPriority(priority)) { HashMap chartUIList = chartTypeInterfaces.get(priority); Iterator iterator = chartUIList.entrySet().iterator(); int i = 0; while (iterator.hasNext()){ Map.Entry entry = (Map.Entry) iterator.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) entry.getValue(); - names[i++] = provider.getPlotTypeTitle4PopupWindow(); + if (!CloseableUtils.isClosed(provider)) { + names[i++] = provider.getPlotTypeTitle4PopupWindow(); + } } return names; } return new String[0]; } + /** + * 判断是否包含某种优先级的图表provider--包含该级别的map并且map里面存在没有关闭的实例 + * + * @param priority 优先级 + * @return 是否包含 + */ + private boolean containsPriority(String priority) { + + return chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) + && !CloseableUtils.allClosed(chartTypeInterfaces.get(priority)); + } + /** * 获取指定图表的标题 * @param priority * @return */ public String getTitle4PopupWindow(String priority, String plotID){ - if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)){ + + if (containsPlot(priority, plotID)) { IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); return provider.getPlotTypeTitle4PopupWindow(); } @@ -284,12 +304,12 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String defaultPriority = (String) entry.getKey(); - if (chartTypeInterfaces.get(defaultPriority).containsKey(plotID)) { + if (containsPlot(defaultPriority, plotID)) { return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypeTitle4PopupWindow(); } } } - return new String(); + return StringUtils.EMPTY; } private String[] getTitle4PopupWindow(){ @@ -323,7 +343,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); - priorityList.add(Integer.valueOf(priority)); + //包含该优先级时 + if (containsPriority(priority)) { + priorityList.add(Integer.valueOf(priority)); + } } } return ChartTypeManager.orderInPriority(priorityList); @@ -333,7 +356,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (chartUI.hasNext()) { Map.Entry chartUIEntry = (Map.Entry) chartUI.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue(); - names[index++] = provider.getPlotTypeTitle4PopupWindow(); + if (CloseableUtils.isClosed(provider)) { + names[index++] = provider.getPlotTypeTitle4PopupWindow(); + } } return index; } @@ -361,7 +386,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh */ private int getChartSize(String key){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(key)){ - return chartTypeInterfaces.get(key).size(); + return CloseableUtils.openingSize(chartTypeInterfaces.get(key)); } return 0; } @@ -415,7 +440,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private boolean plotInChart(String plotID, String priority) { return chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) - && chartTypeInterfaces.get(priority).containsKey(plotID); + && chartTypeInterfaces.get(priority).containsKey(plotID) + && !CloseableUtils.isClosed(chartTypeInterfaces.get(priority).get(plotID)); } private AbstractReportDataContentPane getReportDataSourcePane(String priority, Plot plot, ChartDataPane parent) { @@ -467,23 +493,14 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()){ Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); - if (chartTypeInterfaces.get(priority).containsKey(plotID)){ - return isUseDefaultPane(priority, plotID); + if (containsPlot(priority, plotID)) { + return chartTypeInterfaces.get(priority).get(plotID).isUseDefaultPane(); } } return true; } - private boolean isUseDefaultPane(String priority, String plotID){ - - if (chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) { - return chartTypeInterfaces.get(priority).get(plotID).isUseDefaultPane(); - } - - return true; - } - public void readXML(XMLableReader reader) { readXML(reader, null, PluginSimplify.NULL); } From ea087d4845bb0e5d3345186131d7e29b1d4af0a4 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 14:23:08 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B7=B2=E7=BB=8F=E7=A6=81=E7=94=A8=E4=BA=86?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E8=A1=A8=E6=8F=92=E4=BB=B6=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 96 ++++++++----------- 1 file changed, 42 insertions(+), 54 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index adb35b3e3..4bfc6aed6 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -22,11 +22,13 @@ import com.fr.design.module.DesignModuleFactory; import com.fr.file.XMLFileManager; import com.fr.form.ui.ChartEditor; import com.fr.general.*; -import com.fr.plugin.*; -import com.fr.plugin.proxy.PluginInstanceProxyFactory; +import com.fr.plugin.PluginCollector; +import com.fr.plugin.PluginLicenseManager; +import com.fr.plugin.PluginMessage; import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; +import com.fr.stable.collections.map.CloseableContainedMap; import com.fr.stable.fun.Authorize; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; @@ -45,7 +47,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); private static ChartTypeInterfaceManager classManager = null; - private static LinkedHashMap> chartTypeInterfaces = new LinkedHashMap>(); + + private static LinkedHashMap> chartTypeInterfaces = + new LinkedHashMap<>(); public synchronized static ChartTypeInterfaceManager getInstance() { if (classManager == null) { @@ -131,7 +135,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if (chartTypeInterfaces.containsKey(ChartTypeManager.CHART_PRIORITY)){ return; } - LinkedHashMap chartUIList = new LinkedHashMap(); + CloseableContainedMap chartUIList = + new CloseableContainedMap<>(LinkedHashMap.class); chartUIList.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); chartUIList.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); chartUIList.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); @@ -170,28 +175,23 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private String getIconPath(String priority, String plotID) { - if (containsPlot(priority, plotID)) { + if (chartTypeInterfaces.get(priority) != null && chartTypeInterfaces.get(priority).get(plotID) != null) { return chartTypeInterfaces.get(priority).get(plotID).getIconPath(); }else { return StringUtils.EMPTY; } } - private boolean containsPlot(String priority, String plotID) { - - return chartTypeInterfaces.get(priority) != null && chartTypeInterfaces.get(priority).get(plotID) != null - && !CloseableUtils.isClosed(chartTypeInterfaces.get(priority).get(plotID)); - } - public static void addChartTypeInterface(IndependentChartUIProvider provider, String priority, String plotID) { if (chartTypeInterfaces != null){ if (!chartTypeInterfaces.containsKey(priority)){ //新建一个具体图表列表 - LinkedHashMap chartUIList = new LinkedHashMap(); + CloseableContainedMap chartUIList + = new CloseableContainedMap<>(LinkedHashMap.class); chartUIList.put(plotID, provider); chartTypeInterfaces.put(priority, chartUIList); }else { - LinkedHashMap chartUIList = chartTypeInterfaces.get(priority); + CloseableContainedMap chartUIList = chartTypeInterfaces.get(priority); if (!chartUIList.containsKey(plotID)) { chartUIList.put(plotID, provider); } @@ -213,8 +213,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if (authorize != null) { PluginLicenseManager.getInstance().registerPaid(authorize, simplify); } - IndependentChartUIProvider provider = (IndependentChartUIProvider) new PluginInstanceProxyFactory(clazz, simplify).addProxy(Closeable.MASK).getProxyObj(); - if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName())) { + IndependentChartUIProvider provider = (IndependentChartUIProvider) clazz.newInstance(); + if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName()) || !containsChart(plotID)) { PluginMessage.remindUpdate(className); } else { ChartTypeInterfaceManager.getInstance().addChartTypeInterface(provider, priority, plotID); @@ -227,10 +227,11 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } } -// //UI对应的chart如果没有加载,UI也不必加进去了 -// private boolean containsChart(String plotID) { -// return ChartTypeManager.getInstance().containsPlot(plotID); -// } + //UI对应的chart如果没有加载,UI也不必加进去了 + private boolean containsChart(String plotID) { + + return ChartTypeManager.getInstance().containsPlot(plotID); + } /** @@ -246,9 +247,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (chartUIIterator.hasNext()) { Map.Entry chartUIEntry = (Map.Entry) chartUIIterator.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue(); - if (!CloseableUtils.isClosed(provider)) { - paneList.add(provider.getPlotTypePane()); - } + paneList.add(provider.getPlotTypePane()); } } } @@ -258,34 +257,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh return getTitle4PopupWindow(); } String[] names = new String[getChartSize(priority)]; - if (containsPriority(priority)) { - HashMap chartUIList = chartTypeInterfaces.get(priority); + if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)) { + CloseableContainedMap chartUIList = chartTypeInterfaces.get(priority); Iterator iterator = chartUIList.entrySet().iterator(); int i = 0; while (iterator.hasNext()){ Map.Entry entry = (Map.Entry) iterator.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) entry.getValue(); - if (!CloseableUtils.isClosed(provider)) { - names[i++] = provider.getPlotTypeTitle4PopupWindow(); - } + names[i++] = provider.getPlotTypeTitle4PopupWindow(); } return names; } return new String[0]; } - /** - * 判断是否包含某种优先级的图表provider--包含该级别的map并且map里面存在没有关闭的实例 - * - * @param priority 优先级 - * @return 是否包含 - */ - private boolean containsPriority(String priority) { - - return chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) - && !CloseableUtils.allClosed(chartTypeInterfaces.get(priority)); - } - /** * 获取指定图表的标题 * @param priority @@ -293,7 +278,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh */ public String getTitle4PopupWindow(String priority, String plotID){ - if (containsPlot(priority, plotID)) { + if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) { IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); return provider.getPlotTypeTitle4PopupWindow(); } @@ -304,12 +289,12 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String defaultPriority = (String) entry.getKey(); - if (containsPlot(defaultPriority, plotID)) { + if (chartTypeInterfaces.get(defaultPriority).containsKey(plotID)) { return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypeTitle4PopupWindow(); } } } - return StringUtils.EMPTY; + return new String(); } private String[] getTitle4PopupWindow(){ @@ -343,10 +328,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); - //包含该优先级时 - if (containsPriority(priority)) { - priorityList.add(Integer.valueOf(priority)); - } + priorityList.add(Integer.valueOf(priority)); } } return ChartTypeManager.orderInPriority(priorityList); @@ -356,9 +338,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (chartUI.hasNext()) { Map.Entry chartUIEntry = (Map.Entry) chartUI.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue(); - if (CloseableUtils.isClosed(provider)) { - names[index++] = provider.getPlotTypeTitle4PopupWindow(); - } + names[index++] = provider.getPlotTypeTitle4PopupWindow(); } return index; } @@ -386,7 +366,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh */ private int getChartSize(String key){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(key)){ - return CloseableUtils.openingSize(chartTypeInterfaces.get(key)); + return chartTypeInterfaces.get(key).size(); } return 0; } @@ -440,8 +420,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private boolean plotInChart(String plotID, String priority) { return chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) - && chartTypeInterfaces.get(priority).containsKey(plotID) - && !CloseableUtils.isClosed(chartTypeInterfaces.get(priority).get(plotID)); + && chartTypeInterfaces.get(priority).containsKey(plotID); } private AbstractReportDataContentPane getReportDataSourcePane(String priority, Plot plot, ChartDataPane parent) { @@ -493,14 +472,23 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()){ Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); - if (containsPlot(priority, plotID)) { - return chartTypeInterfaces.get(priority).get(plotID).isUseDefaultPane(); + if (chartTypeInterfaces.get(priority).containsKey(plotID)) { + return isUseDefaultPane(priority, plotID); } } return true; } + private boolean isUseDefaultPane(String priority, String plotID) { + + if (chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) { + return chartTypeInterfaces.get(priority).get(plotID).isUseDefaultPane(); + } + + return true; + } + public void readXML(XMLableReader reader) { readXML(reader, null, PluginSimplify.NULL); } From c805bc341069b90326fc9313d085e18bccb8d33e Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 27 Dec 2016 14:30:33 +0800 Subject: [PATCH 3/9] =?UTF-8?q?REPORT-1138=20=E6=A8=A1=E6=9D=BF=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/javascript/ListenerEditPane.java | 82 +++++++++---------- .../fr/design/widget/CellWidgetCardPane.java | 1 + .../design/gui/frpane/ListenerUpdatePane.java | 5 ++ .../fr/design/gui/frpane/UIComboBoxPane.java | 6 ++ .../javascript/JavaScriptActionPane.java | 15 +--- 5 files changed, 53 insertions(+), 56 deletions(-) diff --git a/designer/src/com/fr/design/javascript/ListenerEditPane.java b/designer/src/com/fr/design/javascript/ListenerEditPane.java index 8c76497af..6f24a4ba9 100644 --- a/designer/src/com/fr/design/javascript/ListenerEditPane.java +++ b/designer/src/com/fr/design/javascript/ListenerEditPane.java @@ -6,13 +6,15 @@ import java.awt.Component; import java.awt.FlowLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import javax.swing.BorderFactory; import javax.swing.JPanel; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.fun.JavaScriptActionProvider; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; @@ -22,19 +24,14 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.write.submit.DBManipulationPane; import com.fr.form.event.Listener; -import com.fr.general.ComparatorUtils; import com.fr.general.Inter; -import com.fr.js.Commit2DBJavaScript; -import com.fr.js.CustomActionJavaScript; -import com.fr.js.EmailJavaScript; -import com.fr.js.FormSubmitJavaScript; import com.fr.js.JavaScript; -import com.fr.js.JavaScriptImpl; public class ListenerEditPane extends BasicBeanPane { private UITextField nameText; private UIComboBox styleBox; private CardLayout card; + private List> cards; private JPanel hyperlinkPane; private JavaScriptImplPane javaScriptPane; @@ -66,6 +63,7 @@ public class ListenerEditPane extends BasicBeanPane { * @param defaultArgs 初始化参数 */ public void initComponents(String[] defaultArgs) { + cards = new ArrayList>(); this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel namePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); nameText = new UITextField(8); @@ -100,10 +98,25 @@ public class ListenerEditPane extends BasicBeanPane { // 发送邮件 emailPane = new EmailPane(); hyperlinkPane.add(EMAIL,emailPane); - + cards.add(javaScriptPane); + cards.add(commit2DBJavaScriptPane); + cards.add(customActionPane); + cards.add(emailPane); + + Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); + if (javaScriptActionProviders != null) { + for (JavaScriptActionProvider jsp : javaScriptActionProviders) { + FurtherBasicBeanPane pane = jsp.getJavaScriptActionPane(); + String title = pane.title4PopupWindow(); + styleBox.addItem(title); + hyperlinkPane.add(title, pane); + cards.add(pane); + } + } + hyperlinkPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("JavaScript_Set"))); this.add(hyperlinkPane); - + styleBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { card.show(hyperlinkPane, styleBox.getSelectedItem().toString()); @@ -131,47 +144,28 @@ public class ListenerEditPane extends BasicBeanPane { if (this.listener == null) { this.listener = new Listener(); } - this.nameText.setText(listener.getEventName()); - JavaScript js = listener.getAction(); - if (js instanceof JavaScriptImpl) { - styleBox.setSelectedItem(JS); - card.show(hyperlinkPane, JS); - javaScriptPane.populateBean((JavaScriptImpl)js); - } else if (js instanceof FormSubmitJavaScript){ - styleBox.setSelectedItem(FORMSUBMIT); - card.show(hyperlinkPane, FORMSUBMIT); - formSubmitScriptPane.populateBean((FormSubmitJavaScript)js); - } else if (js instanceof Commit2DBJavaScript) { - styleBox.setSelectedItem(DBCOMMIT); - card.show(hyperlinkPane, DBCOMMIT); - commit2DBJavaScriptPane.populateBean((Commit2DBJavaScript)js); - } else if (js instanceof EmailJavaScript){ - styleBox.setSelectedItem(EMAIL); - card.show(hyperlinkPane, EMAIL); - emailPane.populateBean((EmailJavaScript)js); - } else if (js instanceof CustomActionJavaScript){ - styleBox.setSelectedItem(CUSTOMACTION); - card.show(hyperlinkPane, CUSTOMACTION); - customActionPane.populateBean((CustomActionJavaScript) js); + for (int i = 0; i < this.cards.size(); i++) { + FurtherBasicBeanPane pane = cards.get(i); + if (pane.accept(js)) { + styleBox.setSelectedItem(pane.title4PopupWindow()); + card.show(hyperlinkPane, pane.title4PopupWindow()); + pane.populateBean(js); + return; + } } } - + + public void checkValid() throws Exception{ + this.cards.get(this.styleBox.getSelectedIndex()).checkValid(); + } + @Override public Listener updateBean(){ this.listener.setEventName(this.nameText.getText()); - if (ComparatorUtils.equals(styleBox.getSelectedItem(), JS)) { - this.listener.setAction(javaScriptPane.updateBean()); - } else if (ComparatorUtils.equals(styleBox.getSelectedItem(), FORMSUBMIT)) { - this.listener.setAction(formSubmitScriptPane.updateBean()); - } else if (ComparatorUtils.equals(styleBox.getSelectedItem(), DBCOMMIT)) { - this.listener.setAction(commit2DBJavaScriptPane.updateBean()); - } else if (ComparatorUtils.equals(styleBox.getSelectedItem(),EMAIL)){ - this.listener.setAction(emailPane.updateBean()); - } else if (ComparatorUtils.equals(styleBox.getSelectedItem(), CUSTOMACTION)){ - this.listener.setAction(customActionPane.updateBean()); - } + FurtherBasicBeanPane pane = this.cards.get(this.styleBox.getSelectedIndex()); + this.listener.setAction(pane.updateBean()); return this.listener; } } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/CellWidgetCardPane.java b/designer/src/com/fr/design/widget/CellWidgetCardPane.java index d1c81d53a..02c04a303 100644 --- a/designer/src/com/fr/design/widget/CellWidgetCardPane.java +++ b/designer/src/com/fr/design/widget/CellWidgetCardPane.java @@ -155,6 +155,7 @@ public class CellWidgetCardPane extends BasicPane { */ public void checkValid() throws Exception { currentEditorDefinePane.checkValid(); + eventTabPane.checkValid(); } //:jackie 如果选择的项有形态,则将形态面板加入tab面板 diff --git a/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java b/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java index 6ade755f0..6af817032 100644 --- a/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java +++ b/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java @@ -45,4 +45,9 @@ public abstract class ListenerUpdatePane extends BasicBeanPane { return editing; } + + @Override + public void checkValid() throws Exception{ + actionPane.checkValid(); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java b/designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java index 99a126e12..f24ce8a71 100644 --- a/designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java @@ -133,6 +133,12 @@ public abstract class UIComboBoxPane extends BasicBeanPane { return cards.get(jcb.getSelectedIndex()).updateBean(); } + @Override + public void checkValid() throws Exception { + cards.get(jcb.getSelectedIndex()).checkValid(); + + } + public int getSelectedIndex() { return jcb.getSelectedIndex(); } diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java index 52648e444..52baa72ed 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java @@ -43,15 +43,6 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { contentDBManiPane = new ArrayList(); contentDBManiPane.add(createDBManipulationPane()); paneList.add(new Commit2DBJavaScriptPane(this, contentDBManiPane)); - paneList.add(new ProcessJSImplPane() { - private static final long serialVersionUID = 1; - - @Override - protected Editor[] getCorrespondEditors() { - return isForm() ? ValueEditorPaneFactory.formEditors() : ValueEditorPaneFactory.extendedEditors(); - } - } - ); paneList.add(initEmaiPane()); Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { @@ -179,10 +170,10 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { * 生成界面默认的组建 * * @return 返回生成的面板 - */ - public static JavaScriptActionPane createDefault() { - return new JavaScriptActionPane() { + */ + public static JavaScriptActionPane createDefault() { + return new JavaScriptActionPane() { @Override public DBManipulationPane createDBManipulationPane() { return new DBManipulationPane(); From d9b634132b40f8906ca7d2665a0ab2d1bd0b7387 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 14:45:10 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B7=B2=E7=BB=8F=E7=A6=81=E7=94=A8=E4=BA=86?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E8=A1=A8=E6=8F=92=E4=BB=B6=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 19 +++++++---- .../ChartTypeInterfaceCloseableHandler.java | 32 +++++++++++++++++++ 2 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 4bfc6aed6..f7b5c2a49 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -25,6 +25,9 @@ import com.fr.general.*; import com.fr.plugin.PluginCollector; import com.fr.plugin.PluginLicenseManager; import com.fr.plugin.PluginMessage; +import com.fr.design.extra.ChartTypeInterfaceCloseableHandler; +import com.fr.plugin.proxy.PluginInstanceProxyFactory; +import com.fr.plugin.proxy.PluginInvocationHandler; import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; @@ -33,6 +36,7 @@ import com.fr.stable.fun.Authorize; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import com.fr.stable.plugin.PluginSimplify; +import com.fr.stable.plugin.closeable.Closeable; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; @@ -213,24 +217,27 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if (authorize != null) { PluginLicenseManager.getInstance().registerPaid(authorize, simplify); } - IndependentChartUIProvider provider = (IndependentChartUIProvider) clazz.newInstance(); - if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName()) || !containsChart(plotID)) { + IndependentChartUIProvider provider = getProxyObj(plotID, simplify, clazz); + if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName())) { PluginMessage.remindUpdate(className); } else { - ChartTypeInterfaceManager.getInstance().addChartTypeInterface(provider, priority, plotID); + addChartTypeInterface(provider, priority, plotID); } } catch (ClassNotFoundException e) { FRLogger.getLogger().error("class not found:" + e.getMessage()); } catch (IllegalAccessException | InstantiationException e) { FRLogger.getLogger().error("object create error:" + e.getMessage()); + } catch (NoSuchMethodException e) { + FRLogger.getLogger().error(e.getMessage()); } } } - //UI对应的chart如果没有加载,UI也不必加进去了 - private boolean containsChart(String plotID) { + private IndependentChartUIProvider getProxyObj(String plotID, PluginSimplify simplify, Class clazz) throws IllegalAccessException, InstantiationException, NoSuchMethodException { - return ChartTypeManager.getInstance().containsPlot(plotID); + PluginInstanceProxyFactory factory = new PluginInstanceProxyFactory(clazz, simplify); + PluginInvocationHandler handler = new ChartTypeInterfaceCloseableHandler(plotID); + return (IndependentChartUIProvider) factory.addProxy(Closeable.class, handler).getProxyObj(); } diff --git a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java new file mode 100644 index 000000000..6dd65ff38 --- /dev/null +++ b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java @@ -0,0 +1,32 @@ +package com.fr.design.extra; + +import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.plugin.proxy.CloseableInvocationHandler; + +/** + * Created by juhaoyu on 2016/12/27. + */ +public class ChartTypeInterfaceCloseableHandler extends CloseableInvocationHandler { + + + private final String plotID; + + public ChartTypeInterfaceCloseableHandler(String plotID) throws NoSuchMethodException { + + super(); + this.plotID = plotID; + } + + @Override + protected boolean invokeIsClosed() { + + //找不到Plugin对象时,默认是关闭的 + return super.invokeIsClosed() && containsChart(); + } + + //UI对应的chart如果没有关闭或者不存在,则UI关闭 + private boolean containsChart() { + + return ChartTypeManager.getInstance().containsPlot(plotID); + } +} From d9829553981fdec3b299c13eb5fa85d2cb3ff974 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 14:47:47 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B7=B2=E7=BB=8F=E7=A6=81=E7=94=A8=E4=BA=86?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E8=A1=A8=E6=8F=92=E4=BB=B6=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java index 6dd65ff38..a6440c5f8 100644 --- a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java +++ b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java @@ -20,7 +20,6 @@ public class ChartTypeInterfaceCloseableHandler extends CloseableInvocationHandl @Override protected boolean invokeIsClosed() { - //找不到Plugin对象时,默认是关闭的 return super.invokeIsClosed() && containsChart(); } From 993abf5ab5a543cf47338c2249559af0dba17b19 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 27 Dec 2016 15:38:50 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9PMD=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/javascript/ListenerEditPane.java | 44 +++++++++---------- .../fr/design/widget/CellWidgetCardPane.java | 10 ++--- .../design/gui/frpane/ListenerUpdatePane.java | 2 +- .../javascript/JavaScriptActionPane.java | 8 ++-- .../com/fr/design/locale/designer.properties | 15 +++++++ .../design/locale/designer_en_US.properties | 16 +++++++ .../design/locale/designer_ja_JP.properties | 17 ++++++- .../design/locale/designer_ko_KR.properties | 17 ++++++- .../design/locale/designer_zh_CN.properties | 15 +++++++ .../design/locale/designer_zh_TW.properties | 17 ++++++- 10 files changed, 124 insertions(+), 37 deletions(-) diff --git a/designer/src/com/fr/design/javascript/ListenerEditPane.java b/designer/src/com/fr/design/javascript/ListenerEditPane.java index 6f24a4ba9..864ac28aa 100644 --- a/designer/src/com/fr/design/javascript/ListenerEditPane.java +++ b/designer/src/com/fr/design/javascript/ListenerEditPane.java @@ -42,11 +42,11 @@ public class ListenerEditPane extends BasicBeanPane { // 发送邮件 private EmailPane emailPane; - private static final String JS = Inter.getLocText("JavaScript"); - private static final String FORMSUBMIT = Inter.getLocText("JavaScript-Form_Submit"); - private static final String DBCOMMIT = Inter.getLocText("JavaScript-Commit_to_Database"); - private static final String CUSTOMACTION= Inter.getLocText(new String[]{"Custom", "RWA-Submit"}); - private static final String EMAIL = Inter.getLocText("Email_sentEmail"); + private static final String JS = Inter.getLocText("FR-Designer_JavaScript"); + private static final String FORMSUBMIT = Inter.getLocText("FR-Designer_JavaScript_Form_Submit"); + private static final String DBCOMMIT = Inter.getLocText("FR-Designer_JavaScript_Commit_to_Database"); + private static final String CUSTOMACTION= Inter.getLocText(new String[]{"FR-Designer_JavaScript_Custom", "FR-Designer_RWA_Submit"}); + private static final String EMAIL = Inter.getLocText("FR-Designer_Email_sentEmail"); private Listener listener; @@ -72,19 +72,14 @@ public class ListenerEditPane extends BasicBeanPane { String[] style = {JS, DBCOMMIT, CUSTOMACTION,EMAIL}; styleBox = new UIComboBox(style); namePane.add(styleBox); - namePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(" " + Inter.getLocText("Event_Name") + ":"), nameText, new UILabel(" " + Inter.getLocText("Event_Type") + ":"), styleBox}, FlowLayout.LEFT); - namePane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("Event_Name_Type"))); + namePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(" " + Inter.getLocText("FR-Designer_Event_Name") + ":"), nameText, new UILabel(" " + Inter.getLocText("FR-Designer_Event_Type") + ":"), styleBox}, FlowLayout.LEFT); + namePane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_Event_Name_Type"))); this.add(namePane, BorderLayout.NORTH); - card = new CardLayout(); hyperlinkPane = FRGUIPaneFactory.createCardLayout_S_Pane(); hyperlinkPane.setLayout(card); - // js javaScriptPane = new JavaScriptImplPane(defaultArgs); hyperlinkPane.add(JS, javaScriptPane); -// formSubmitScriptPane = new FormSubmitJavaScriptPane(JavaScriptActionPane.defaultJavaScriptActionPane -// .createCallButton()); -// hyperlinkPane.add(FORMSUBMIT, formSubmitScriptPane); // 提交入库 List dbmaniList = new ArrayList(); dbmaniList.add(autoCreateDBManipulationPane()); @@ -94,7 +89,6 @@ public class ListenerEditPane extends BasicBeanPane { // 自定义事件 customActionPane = new CustomActionPane(); hyperlinkPane.add(CUSTOMACTION, customActionPane); - // 发送邮件 emailPane = new EmailPane(); hyperlinkPane.add(EMAIL,emailPane); @@ -102,7 +96,18 @@ public class ListenerEditPane extends BasicBeanPane { cards.add(commit2DBJavaScriptPane); cards.add(customActionPane); cards.add(emailPane); + //其他事件 + addOtherEvent(); + hyperlinkPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_JavaScript_Set"))); + this.add(hyperlinkPane); + styleBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + card.show(hyperlinkPane, styleBox.getSelectedItem().toString()); + } + }); + } + private void addOtherEvent(){ Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { for (JavaScriptActionProvider jsp : javaScriptActionProviders) { @@ -113,17 +118,8 @@ public class ListenerEditPane extends BasicBeanPane { cards.add(pane); } } - - hyperlinkPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("JavaScript_Set"))); - this.add(hyperlinkPane); - - styleBox.addItemListener(new ItemListener() { - public void itemStateChanged(ItemEvent e) { - card.show(hyperlinkPane, styleBox.getSelectedItem().toString()); - } - }); } - + /** * 根据有无单元格创建 DBManipulationPane * @return 有单元格。有智能添加单元格等按钮,返回 SmartInsertDBManipulationPane @@ -135,7 +131,7 @@ public class ListenerEditPane extends BasicBeanPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("Event_Set"); + return Inter.getLocText("FR-Designer_Event_Set"); } @Override diff --git a/designer/src/com/fr/design/widget/CellWidgetCardPane.java b/designer/src/com/fr/design/widget/CellWidgetCardPane.java index 02c04a303..5d4cf74a5 100644 --- a/designer/src/com/fr/design/widget/CellWidgetCardPane.java +++ b/designer/src/com/fr/design/widget/CellWidgetCardPane.java @@ -51,8 +51,8 @@ public class CellWidgetCardPane extends BasicPane { formPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); eventTabPane = new WidgetEventPane(pane); formPane.add(eventTabPane, BorderLayout.CENTER); - tabbedPane.add(Inter.getLocText("Attribute"), attriPane); - tabbedPane.add(Inter.getLocText("Form-Editing_Listeners"), formPane); + tabbedPane.add(Inter.getLocText("FR-Designer_Attribute"), attriPane); + tabbedPane.add(Inter.getLocText("FR-Designer_Form_Editing_Listeners"), formPane); presPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); cardPaneForPresent = FRGUIPaneFactory.createCardLayout_S_Pane(); @@ -88,7 +88,7 @@ public class CellWidgetCardPane extends BasicPane { widgetPropertyPane = new BasicWidgetPropertySettingPane(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); northPane.setBorder(BorderFactory.createEmptyBorder(5, 8, 0, 8)); - JPanel basic = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Form-Basic_Properties")); + JPanel basic = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Form_Basic_Properties")); northPane.add(basic); basic.add(widgetPropertyPane); attriPane.add(northPane, BorderLayout.NORTH); @@ -162,7 +162,7 @@ public class CellWidgetCardPane extends BasicPane { private void addPresPane(boolean add) { if (add) { tabbedPane.add(this.presPane, 1); - tabbedPane.setTitleAt(1, Inter.getLocText("DS-Dictionary")); + tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_DS_Dictionary")); } else { tabbedPane.remove(presPane); } @@ -171,7 +171,7 @@ public class CellWidgetCardPane extends BasicPane { private void addTreeSettingPane(boolean add) { if (add) { tabbedPane.add(this.cardPaneForTreeSetting, 1); - tabbedPane.setTitleAt(1, Inter.getLocText("Create_Tree")); + tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_Create_Tree")); } else { tabbedPane.remove(this.cardPaneForTreeSetting); } diff --git a/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java b/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java index 6af817032..3d96a8e71 100644 --- a/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java +++ b/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java @@ -29,7 +29,7 @@ public abstract class ListenerUpdatePane extends BasicBeanPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("Event"); + return Inter.getLocText("FR-Designer_Event"); } @Override diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java index 52baa72ed..85c77c65e 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java @@ -75,14 +75,14 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { * @return 返回按钮对象 */ public UIButton createCallButton() { - UIButton callButton = new UIButton(Inter.getLocText("Set_Callback_Function")); + UIButton callButton = new UIButton(Inter.getLocText("FR-Designer_Set_Callback_Function")); callButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaScriptActionPane callPane = new JavaScriptActionPane() { @Override protected String title4PopupWindow() { - return Inter.getLocText("Set_Callback_Function"); + return Inter.getLocText("FR-Designer_Set_Callback_Function"); } @Override @@ -153,7 +153,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("Set_Callback_Function"); + return Inter.getLocText("FR-Designer_Set_Callback_Function"); } @Override @@ -181,7 +181,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("Set_Callback_Function"); + return Inter.getLocText("FR-Designer_Set_Callback_Function"); } @Override diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 925ea0f7a..3850dd665 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -493,3 +493,18 @@ FR-Designer_Exporting=Exporting FR-Designer_Export-PDF=PDF FR-Designer_Button_OK=OK FR-Designer_Button_Cancel=Cancel +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index e55a5ef8b..2df8886a6 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -493,3 +493,19 @@ FR-Designer_Export-PDF=PDF FR-Designer_Properties_Mobile=MobileProperties FR-Designer_Button_OK=OK FR-Designer_Button_Cancel=Cancel +FR-Designer_JavaScript=JavaScript +FR-Designer_JavaScript_Form_Submit=Form Submit +FR-Designer_JavaScript_Commit_to_Database=Commit to DB +FR-Designer_JavaScript_Custom=Custom +FR-Designer_RWA_Submit=Submit +FR-Designer_Event_Name=Event Name +FR-Designer_Event_Type=Event Type +FR-Designer_Event_Name_Type=Event Name and Type +FR-Designer_JavaScript_Set=JavaScript Set +FR-Designer_Attribute=Attribute +FR-Designer_Form_Editing_Listeners=Event editing +FR-Designer_Form_Basic_Properties=Basic Property +FR-Designer_DS_Dictionary=Data Dictionary +FR-Designer_Create_Tree=Build Tree +FR-Designer_Set_Callback_Function=Set Callback Function + diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 4575dfddc..c59d0a758 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -471,4 +471,19 @@ FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8FR-Designer_Button_OK=FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -\ \ No newline at end of file +\uFFFD +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index a84ff40a6..866d2d597 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -466,4 +466,19 @@ FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 FR-Designer_Export-PDF=PDF\uC11C\uC2DDFR-Designer_Properties=\uFFFD FR-Designer_Button_OK=\uD655\uC778FR-Designer_Button_Cancel=\uCDE8\uC18C -\ \ No newline at end of file +\uFFFD +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index fba7560ee..3b543ee17 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -497,3 +497,18 @@ FR-Designer_Export-PDF=PDF\u683C\u5F0F FR-Designer_Properties_Mobile=\u624B\u673A\u5C5E\u6027 FR-Designer_Button_OK=\u786E\u5B9A FR-Designer_Button_Cancel=\u53D6\u6D88 +FR-Designer_JavaScript=JavaScript\u811A\u672C +FR-Designer_JavaScript_Form_Submit=\u8868\u5355\u63D0\u4EA4 +FR-Designer_JavaScript_Commit_to_Database=\u63D0\u4EA4\u5165\u5E93 +FR-Designer_JavaScript_Custom=\u81EA\u5B9A\u4E49 +FR-Designer_RWA_Submit=\u63D0\u4EA4 +FR-Designer_Event_Name=\u4E8B\u4EF6\u540D +FR-Designer_Event_Type=\u4E8B\u4EF6\u7C7B\u578B +FR-Designer_Event_Name_Type=\u4E8B\u4EF6\u540D\u5B57\u548C\u7C7B\u578B +FR-Designer_JavaScript_Set=JS\u8BBE\u7F6E +FR-Designer_Attribute=\u5C5E\u6027 +FR-Designer_Form_Editing_Listeners=\u4E8B\u4EF6\u7F16\u8F91 +FR-Designer_Form_Basic_Properties=\u57FA\u672C\u5C5E\u6027 +FR-Designer_DS_Dictionary=\u6570\u636E\u5B57\u5178 +FR-Designer_Create_Tree=\u6784\u5EFA\u6811 +FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570 diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index e96461d79..09511f05f 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -484,4 +484,19 @@ FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... FR-Designer_Export-PDF=PDF\u683C\u5F0F FR-Designer_Properties_Mobile=\u624B\u6A5F\u5C6C\u6027 FR-Designer_Button_OK=\u78BA\u5B9A -FR-Designer_Button_Cancel=\u53D6\u6D88 \ No newline at end of file +FR-Designer_Button_Cancel=\u53D6\u6D88 +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= \ No newline at end of file From 3a948e4f9adfa5f1442f24353582c86b96e98dc5 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 15:41:09 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E5=B0=86Closeable=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=AD=89=E4=BA=8B=E6=83=85=E6=94=BE=E5=88=B0=E4=B8=93?= =?UTF-8?q?=E9=97=A8=E7=9A=84=E5=AE=B9=E5=99=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index f7b5c2a49..c091c54b9 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -195,7 +195,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh chartUIList.put(plotID, provider); chartTypeInterfaces.put(priority, chartUIList); }else { - CloseableContainedMap chartUIList = chartTypeInterfaces.get(priority); + Map chartUIList = chartTypeInterfaces.get(priority); if (!chartUIList.containsKey(plotID)) { chartUIList.put(plotID, provider); } @@ -265,7 +265,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } String[] names = new String[getChartSize(priority)]; if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)) { - CloseableContainedMap chartUIList = chartTypeInterfaces.get(priority); + Map chartUIList = chartTypeInterfaces.get(priority); Iterator iterator = chartUIList.entrySet().iterator(); int i = 0; while (iterator.hasNext()){ From be6f8a80d66aae09147b5de8fadd70df9c374f56 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 16:02:09 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E5=B0=86Closeable=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=AD=89=E4=BA=8B=E6=83=85=E6=94=BE=E5=88=B0=E4=B8=93?= =?UTF-8?q?=E9=97=A8=E7=9A=84=E5=AE=B9=E5=99=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java index a6440c5f8..bb8a029d7 100644 --- a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java +++ b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java @@ -23,7 +23,7 @@ public class ChartTypeInterfaceCloseableHandler extends CloseableInvocationHandl return super.invokeIsClosed() && containsChart(); } - //UI对应的chart如果没有关闭或者不存在,则UI关闭 + //UI对应的chart如果关闭或者不存在,则UI关闭 private boolean containsChart() { return ChartTypeManager.getInstance().containsPlot(plotID); From 35782fcac18c1e3f7e19067447ee6a3fe0ff70c7 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 16:15:17 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/extra/ChartTypeInterfaceCloseableHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java index bb8a029d7..8e9715574 100644 --- a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java +++ b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java @@ -20,10 +20,10 @@ public class ChartTypeInterfaceCloseableHandler extends CloseableInvocationHandl @Override protected boolean invokeIsClosed() { - return super.invokeIsClosed() && containsChart(); + //UI对应的chart如果关闭或者不存在,则UI关闭 + return super.invokeIsClosed() || !containsChart(); } - //UI对应的chart如果关闭或者不存在,则UI关闭 private boolean containsChart() { return ChartTypeManager.getInstance().containsPlot(plotID);