Browse Source

无JIRA任务, 冲突修复

master
neil 7 years ago
parent
commit
aa2cf2b459
  1. 40
      designer_base/src/com/fr/design/extra/LoginWebBridge.java
  2. 39
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  3. 1
      designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java

40
designer_base/src/com/fr/design/extra/LoginWebBridge.java

@ -110,9 +110,6 @@ public class LoginWebBridge {
if (StringUtils.isEmpty(userName)) { if (StringUtils.isEmpty(userName)) {
return; return;
} }
if (StringUtils.isNotEmpty(this.userName)) {
updateMessageCount();
}
this.userName = userName; this.userName = userName;
} }
@ -126,43 +123,6 @@ public class LoginWebBridge {
return client.isServerAlive(); 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<String, String> 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();
}
/** /**
* 设置获取的消息长度并设置显示 * 设置获取的消息长度并设置显示
* *

39
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.core.WidgetOption;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane; 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.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; 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.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener; import com.fr.plugin.observer.PluginEventListener;
import com.fr.plugin.solution.closeable.CloseableContainedMap;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import com.fr.plugin.solution.closeable.CloseableContainedMap;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import javax.swing.*; 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; 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);
}
} }

1
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(NameWidget.class, XNameWidget.class);
objectMap.put(CardSwitchButton.class, XCardSwitchButton.class); objectMap.put(CardSwitchButton.class, XCardSwitchButton.class);
objectMap.put(CardAddButton.class, XCardAddButton.class); objectMap.put(CardAddButton.class, XCardAddButton.class);
objectMap.put(ErrorMarker.class, ErrorCreator.class);
} }
private static void reInitExtra() { private static void reInitExtra() {

Loading…
Cancel
Save