From aa2cf2b459ff2300ac85a5e6fa2c3f146347f5fe Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Wed, 5 Jul 2017 16:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8C=20?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/extra/LoginWebBridge.java | 40 ------------------- .../fr/design/ChartTypeInterfaceManager.java | 39 +++++++++++++++++- .../designer/creator/XCreatorUtils.java | 1 + 3 files changed, 39 insertions(+), 41 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/LoginWebBridge.java b/designer_base/src/com/fr/design/extra/LoginWebBridge.java index 2990ad133..079a393e5 100644 --- a/designer_base/src/com/fr/design/extra/LoginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/LoginWebBridge.java @@ -110,9 +110,6 @@ public class LoginWebBridge { if (StringUtils.isEmpty(userName)) { return; } - if (StringUtils.isNotEmpty(this.userName)) { - updateMessageCount(); - } this.userName = userName; } @@ -126,43 +123,6 @@ public class LoginWebBridge { return client.isServerAlive(); } - /** - * 定时取后台论坛消息 - */ - public void updateMessageCount() { - //启动获取消息更新的线程 - //登陆状态, 根据存起来的用户名密码, 每1分钟发起一次请求, 更新消息条数. - Thread updateMessageThread = new Thread(new Runnable() { - @Override - public void run() { - sleep(CHECK_MESSAGE_TIME); - while (StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getBBSName())) { - HashMap para = new HashMap<>(); - int uid = DesignerEnvManager.getEnvManager().getBbsUid(); - para.put("uid", String.valueOf(uid)); - HttpClient getMessage = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.message"), para); - getMessage.asGet(); - if (getMessage.isServerAlive()) { - try { - String res = getMessage.getResponseText(); - if (res.equals(FAILED_MESSAGE_STATUS)) { - } else { - JSONObject jo = new JSONObject(res); - if (jo.optString("status").equals(SUCCESS_MESSAGE_STATUS)) { - setMessageCount(Integer.parseInt(jo.getString("message"))); - } - } - } catch (Exception e) { - FRContext.getLogger().info(e.getMessage()); - } - } - sleep(CHECK_MESSAGE_TIME); - } - } - }); - updateMessageThread.start(); - } - /** * 设置获取的消息长度,并设置显示 * diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index ad5466ef6..06cfc242a 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -14,6 +14,8 @@ import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.ChartsConfigPane; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; @@ -29,10 +31,10 @@ import com.fr.plugin.injectable.PluginSingleInjection; import com.fr.plugin.manage.PluginFilter; import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEventListener; +import com.fr.plugin.solution.closeable.CloseableContainedMap; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; import com.fr.stable.bridge.StableFactory; -import com.fr.plugin.solution.closeable.CloseableContainedMap; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import javax.swing.*; @@ -507,4 +509,39 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return !(injection == null || injection.getObject() == null) && IndependentChartUIProvider.XML_TAG.equals(injection.getName()) && injection.getObject() instanceof IndependentChartUIProvider; } + + + //获取指定图表的编辑面板 + public ChartEditPane getChartEditPane(String plotID) { + Iterator iterator = chartTypeInterfaces.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = (Map.Entry) iterator.next(); + String priority = (String) entry.getKey(); + if (plotInChart(plotID, priority)) { + return getChartEditPane(priority, plotID); + } + } + return getChartEditPane(ChartTypeManager.CHART_PRIORITY, plotID); + } + + private ChartEditPane getChartEditPane(String priority, String plotID) { + return chartTypeInterfaces.get(priority).get(plotID).getChartEditPane(plotID); + } + + public ChartsConfigPane getChartConfigPane(String plotID) { + Iterator iterator = chartTypeInterfaces.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = (Map.Entry) iterator.next(); + String priority = (String) entry.getKey(); + if (plotInChart(plotID, priority)) { + return getChartConfigPane(priority, plotID); + } + } + return getChartConfigPane(ChartTypeManager.CHART_PRIORITY, plotID); + } + + private ChartsConfigPane getChartConfigPane(String priority, String plotID) { + return chartTypeInterfaces.get(priority).get(plotID).getChartConfigPane(plotID); + } + } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java b/designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java index 4b6b4240a..7a041ef4f 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java @@ -130,6 +130,7 @@ public class XCreatorUtils { objectMap.put(NameWidget.class, XNameWidget.class); objectMap.put(CardSwitchButton.class, XCardSwitchButton.class); objectMap.put(CardAddButton.class, XCardAddButton.class); + objectMap.put(ErrorMarker.class, ErrorCreator.class); } private static void reInitExtra() {