Browse Source

Merging in latest from upstream (ST/design:refs/heads/release/9.0)

* commit '438156865cc71103c32a5f813ea658e2e745802a':
  9.0新图表设置面板修改 特效面板修改,其中超链和条件显示的代码需要再整理整理
  REPORT-2354 将原来存在finereportEnv中的登录信息移到config.xml中
  tmp
  表格样式和图标
  1
  1
  REPORT-3721 加个功能点检测.
  9.0新图表设置面板修改 数据配置面板修改
master
MoMeak 7 years ago
parent
commit
7a43fce9ae
  1. 5
      designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java
  2. 5
      designer/src/com/fr/design/mainframe/InformationCollector.java
  3. 3
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  4. 8
      designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java
  5. 6
      designer/src/com/fr/design/mainframe/bbs/ExitLabel.java
  6. 26
      designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java
  7. 12
      designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java
  8. 3
      designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java
  9. 10
      designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java
  10. 70
      designer_base/src/com/fr/design/DesignerEnvManager.java
  11. 31
      designer_base/src/com/fr/design/bbs/BBSLoginUtils.java
  12. 36
      designer_base/src/com/fr/design/extra/LoginWebBridge.java
  13. 8
      designer_base/src/com/fr/design/extra/PluginFromStorePane.java
  14. 7
      designer_base/src/com/fr/design/extra/PluginOperateUtils.java
  15. 7
      designer_base/src/com/fr/design/extra/PluginUpdatePane.java
  16. 20
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  17. 10
      designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java
  18. 4
      designer_base/src/com/fr/design/gui/UIDefaultTheme.java
  19. 12
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  20. 17
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  21. 4
      designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java
  22. BIN
      designer_base/src/com/fr/design/images/buttonicon/minus.png
  23. BIN
      designer_base/src/com/fr/design/images/buttonicon/plus.png
  24. 3
      designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java
  25. 172
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  26. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java
  27. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  28. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java
  29. 1
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java
  30. 9
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java
  31. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java
  32. 15
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
  33. 15
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java
  34. 18
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java
  35. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  36. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java
  37. 14
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java
  38. 17
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  39. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java
  40. 18
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java
  41. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java
  42. 6
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java
  43. 17
      designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java
  44. 130
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  45. 2
      designer_chart/src/com/fr/plugin/chart/custom/other/VanChartCustomInteractivePane.java
  46. 4
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  47. 6
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  48. 37
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java
  49. 1
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPaneWithoutTooltip.java
  50. 84
      designer_chart/src/com/fr/plugin/chart/designer/other/ChartConditionNameObjectCreator.java
  51. 84
      designer_chart/src/com/fr/plugin/chart/designer/other/ChartHyperlinkNameObjectCreartor.java
  52. 46
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java
  53. 8
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrPane.java
  54. 74
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java
  55. 102
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartListControlPane.java
  56. 44
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java
  57. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java
  58. 5
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java
  59. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java
  60. 8
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
  61. 26
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java
  62. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java
  63. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java
  64. 7
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
  65. 18
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java
  66. 2
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java
  67. 6
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java
  68. 8
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java
  69. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java
  70. 6
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java
  71. 8
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java
  72. 3
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java
  73. 19
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java
  74. 29
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java
  75. 17
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java
  76. 14
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrContentPane.java
  77. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrPane.java
  78. 5
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapInteractivePane.java
  79. 67
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java
  80. 18
      designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java
  81. 20
      designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java
  82. 13
      designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotReportDataContentPane.java
  83. 27
      designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java
  84. 10
      designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java
  85. 21
      designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java

5
designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.ConfigManager;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.bbs.BBSConstants;
import com.fr.general.SiteCenter; import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
@ -102,7 +101,7 @@ public class ActiveKeyGenerator {
HashMap<String, String> para = new HashMap<String, String>(); HashMap<String, String> para = new HashMap<String, String>();
para.put("uuid", envManager.getUUID()); para.put("uuid", envManager.getUUID());
para.put("key", key); para.put("key", key);
para.put("username", envManager.getBBSName()); para.put("username", ConfigManager.getProviderInstance().getBbsUsername());
HttpClient hc = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("verify.code"), para); HttpClient hc = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("verify.code"), para);
if (timeout != -1) { if (timeout != -1) {
hc.setTimeout(timeout); hc.setTimeout(timeout);

5
designer/src/com/fr/design/mainframe/InformationCollector.java

@ -3,6 +3,7 @@
*/ */
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.data.core.db.DBUtils; import com.fr.data.core.db.DBUtils;
import com.fr.data.core.db.dialect.DialectFactory; import com.fr.data.core.db.dialect.DialectFactory;
@ -134,7 +135,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
content.put(XML_UUID, envManager.getUUID()); content.put(XML_UUID, envManager.getUUID());
content.put(XML_JAR, GeneralUtils.readBuildNO()); content.put(XML_JAR, GeneralUtils.readBuildNO());
content.put(XML_VERSION, ProductConstants.RELEASE_VERSION); content.put(XML_VERSION, ProductConstants.RELEASE_VERSION);
content.put(XML_USERNAME, envManager.getBBSName()); content.put(XML_USERNAME, ConfigManager.getProviderInstance().getBbsUsername());
content.put(XML_KEY, envManager.getActivationKey()); content.put(XML_KEY, envManager.getActivationKey());
content.put(XML_OS, System.getProperty("os.name")); content.put(XML_OS, System.getProperty("os.name"));
@ -254,7 +255,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
} }
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); DesignerEnvManager envManager = DesignerEnvManager.getEnvManager();
content.put("username", envManager.getBBSName()); content.put("username", ConfigManager.getProviderInstance().getBbsUsername());
content.put("uuid", envManager.getUUID()); content.put("uuid", envManager.getUUID());
content.put("functions", functionArray); content.put("functions", functionArray);

3
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.alphafine.component; package com.fr.design.mainframe.alphafine.component;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
@ -776,7 +777,7 @@ public class AlphaFineDialog extends UIDialog {
*/ */
private void sendToServer(String searchKey, AlphaCellModel cellModel) { private void sendToServer(String searchKey, AlphaCellModel cellModel) {
if (cellModel.isNeedToSendToServer()) { if (cellModel.isNeedToSendToServer()) {
String username = DesignerEnvManager.getEnvManager().getBBSName(); String username = ConfigManager.getProviderInstance().getBbsUsername();
String uuid = DesignerEnvManager.getEnvManager().getUUID(); String uuid = DesignerEnvManager.getEnvManager().getUUID();
String activityKey = DesignerEnvManager.getEnvManager().getActivationKey(); String activityKey = DesignerEnvManager.getEnvManager().getActivationKey();
String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime()); String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime());

8
designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java

@ -1,6 +1,8 @@
package com.fr.design.mainframe.bbs; package com.fr.design.mainframe.bbs;
import com.fr.design.DesignerEnvManager; import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.ActionLabel;
@ -207,8 +209,8 @@ public class BBSLoginDialog extends UIDialog {
// 登录成功 // 登录成功
private void loginSuccess() { private void loginSuccess() {
DesignerEnvManager.getEnvManager().setBBSPassword(String.valueOf(passField.getPassword())); String password = String.valueOf(passField.getPassword());
userInfoLabel.setUserName(nameField.getText()); BBSLoginUtils.bbsLogin(nameField.getText(), password);
userInfoLabel.getUserInfoPane().markSignIn(nameField.getText()); userInfoLabel.getUserInfoPane().markSignIn(nameField.getText());
BBSLoginDialog.this.setVisible(false); BBSLoginDialog.this.setVisible(false);
} }

6
designer/src/com/fr/design/mainframe/bbs/ExitLabel.java

@ -9,14 +9,13 @@ import java.awt.event.MouseEvent;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.DesignerEnvManager; import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.StringUtils;
/** /**
* @author neil * @author neil
@ -61,8 +60,7 @@ public class ExitLabel extends UILabel{
} }
private void clearLoingInformation(){ private void clearLoingInformation(){
DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY); BBSLoginUtils.bbsLogout();
DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY);
} }
private void updateInfoPane(){ private void updateInfoPane(){

26
designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -3,8 +3,10 @@
*/ */
package com.fr.design.mainframe.bbs; package com.fr.design.mainframe.bbs;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.extra.*; import com.fr.design.extra.*;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIMenuItem;
@ -16,12 +18,7 @@ import com.fr.general.DateUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.SiteCenter; import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.plugin.manage.bbs.BBSPluginLogin; import com.fr.stable.*;
import com.fr.plugin.manage.bbs.BBSUserInfo;
import com.fr.stable.EncodeConstants;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -77,7 +74,7 @@ public class UserInfoLabel extends UILabel {
public UserInfoLabel(UserInfoPane userInfoPane) { public UserInfoLabel(UserInfoPane userInfoPane) {
this.userInfoPane = userInfoPane; this.userInfoPane = userInfoPane;
String userName = DesignerEnvManager.getEnvManager().getBBSName(); String userName = ConfigManager.getProviderInstance().getBbsUsername();
this.addMouseListener(userInfoAdapter); this.addMouseListener(userInfoAdapter);
this.setHorizontalAlignment(SwingConstants.CENTER); this.setHorizontalAlignment(SwingConstants.CENTER);
this.setText(userName); this.setText(userName);
@ -117,10 +114,9 @@ public class UserInfoLabel extends UILabel {
} }
private void clearLoginInformation() { private void clearLoginInformation() {
DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY); ConfigManager.getProviderInstance().setInShowBBsName(StringUtils.EMPTY);
DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY); ConfigManager.getProviderInstance().setBbsUid(DEFAULT_BBS_UID);
DesignerEnvManager.getEnvManager().setInShowBBsName(StringUtils.EMPTY); BBSLoginUtils.bbsLogout();
DesignerEnvManager.getEnvManager().setBbsUid(DEFAULT_BBS_UID);
} }
private void updateInfoPane() { private void updateInfoPane() {
@ -192,8 +188,6 @@ public class UserInfoLabel extends UILabel {
return; return;
} }
//往designerenvmanger里写一下
DesignerEnvManager.getEnvManager().setBBSName(userName);
this.userName = userName; this.userName = userName;
} }
@ -238,8 +232,7 @@ public class UserInfoLabel extends UILabel {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
BBSUserInfo bbsUserInfo = BBSPluginLogin.getInstance().getUserInfo(); userName = ConfigManager.getProviderInstance().getBbsUsername();
userName = bbsUserInfo == null ? "" : bbsUserInfo.getUserName();
if (StringUtils.isNotEmpty(userName)) { if (StringUtils.isNotEmpty(userName)) {
UIPopupMenu menu = new UIPopupMenu(); UIPopupMenu menu = new UIPopupMenu();
menu.setOnlyText(true); menu.setOnlyText(true);
@ -265,10 +258,9 @@ public class UserInfoLabel extends UILabel {
UIMenuItem closeOther = new UIMenuItem(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account")); UIMenuItem closeOther = new UIMenuItem(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account"));
closeOther.addMouseListener(new MouseAdapter() { closeOther.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
BBSPluginLogin.getInstance().logOut(); BBSLoginUtils.bbsLogout();
UserLoginContext.fireLoginContextListener(); UserLoginContext.fireLoginContextListener();
} }
}); });
menu.add(priviteMessage); menu.add(priviteMessage);
menu.add(closeOther); menu.add(closeOther);

12
designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -11,6 +11,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
@ -18,8 +19,6 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.general.DateUtils; import com.fr.general.DateUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.manage.bbs.BBSPluginLogin;
import com.fr.plugin.manage.bbs.BBSUserInfo;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -77,9 +76,8 @@ public class UserInfoPane extends BasicPane{
@Override @Override
public void run() { public void run() {
String username = DesignerEnvManager.getEnvManager().getBBSName(); String username = ConfigManager.getProviderInstance().getBbsUsername();
String inShowUsername = DesignerEnvManager.getEnvManager().getInShowBBsName(); if (StringUtils.isEmpty(username)){
if (StringUtils.isEmpty(username) && StringUtils.isEmpty(inShowUsername)){
markUnSignIn(); markUnSignIn();
} else { } else {
markSignIn(username); markSignIn(username);
@ -133,7 +131,7 @@ public class UserInfoPane extends BasicPane{
FRContext.getLogger().error(e.getMessage()); FRContext.getLogger().error(e.getMessage());
} }
String userName = DesignerEnvManager.getEnvManager().getBBSName(); String userName = ConfigManager.getProviderInstance().getBbsUsername();
if(StringUtils.isNotEmpty(userName)){ if(StringUtils.isNotEmpty(userName)){
return; return;
} }
@ -169,8 +167,6 @@ public class UserInfoPane extends BasicPane{
* *
*/ */
public void markSignIn(String userName){ public void markSignIn(String userName){
String password = DesignerEnvManager.getEnvManager().getBBSPassword();
BBSPluginLogin.getInstance().login(new BBSUserInfo(userName, password));
this.userInfoLabel.setText(userName); this.userInfoLabel.setText(userName);
this.userInfoLabel.setUserName(userName); this.userInfoLabel.setUserName(userName);
this.userInfoLabel.setOpaque(true); this.userInfoLabel.setOpaque(true);

3
designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.errorinfo; package com.fr.design.mainframe.errorinfo;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.io.IOFile; import com.fr.base.io.IOFile;
import com.fr.base.io.XMLReadHelper; import com.fr.base.io.XMLReadHelper;
@ -38,7 +39,7 @@ public class ErrorInfoLogAppender extends AppenderSkeleton {
this.layout = new org.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n"); this.layout = new org.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n");
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); DesignerEnvManager envManager = DesignerEnvManager.getEnvManager();
this.username = envManager.getBBSName(); this.username = ConfigManager.getProviderInstance().getBbsUsername();
this.uuid = envManager.getUUID(); this.uuid = envManager.getUUID();
this.activekey = envManager.getActivationKey(); this.activekey = envManager.getActivationKey();
} }

10
designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.errorinfo; package com.fr.design.mainframe.errorinfo;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.FRCoreContext;
import com.fr.general.*; import com.fr.general.*;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.json.JSONException; import com.fr.json.JSONException;
@ -27,6 +28,7 @@ public class ErrorInfoUploader {
public static final String FOLDER_NAME = "errorInfo"; public static final String FOLDER_NAME = "errorInfo";
private static ErrorInfoUploader collector; private static ErrorInfoUploader collector;
private static boolean licSupport = true;
static { static {
GeneralContext.addEnvChangedListener(new EnvChangedListener() { GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@ -35,6 +37,9 @@ public class ErrorInfoUploader {
FRLogger.getLogger().addLogAppender(new ErrorInfoLogAppender()); FRLogger.getLogger().addLogAppender(new ErrorInfoLogAppender());
} }
}); });
// 这个控制没啥意义, 主要在于宣传功能.
licSupport = VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support();
} }
private ErrorInfoUploader() { private ErrorInfoUploader() {
@ -51,6 +56,11 @@ public class ErrorInfoUploader {
// 从云中心更新最新的解决方案文件 // 从云中心更新最新的解决方案文件
private void checkUpdateSolution(){ private void checkUpdateSolution(){
if (!licSupport) {
return;
}
Thread updateThread = new Thread(new Runnable() { Thread updateThread = new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {

70
designer_base/src/com/fr/design/DesignerEnvManager.java

@ -89,14 +89,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
private int westRegionContainerWidth = 240; private int westRegionContainerWidth = 240;
private String encryptionKey; private String encryptionKey;
private String jdkHome; private String jdkHome;
//当前设计器用户的论坛昵称
private String bbsName;
//当前设计器用户的论坛密码
private String bbsPassword;
//当前设计器用户的论坛ID
private int bbsUid;
//当前设计器用户的昵称显示(带消息)
private String inShowBBsName;
//上一次登录弹窗的时间, 为了控制一天只弹一次窗口 //上一次登录弹窗的时间, 为了控制一天只弹一次窗口
private String lastShowBBSTime; private String lastShowBBSTime;
//上一次资讯弹窗时间, 为了控制一天只弹一次 //上一次资讯弹窗时间, 为了控制一天只弹一次
@ -1145,37 +1138,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
this.jdkHome = home; this.jdkHome = home;
} }
public String getBBSName() {
return bbsName;
}
public void setBBSName(String bbsName) {
this.bbsName = bbsName;
}
public String getBBSPassword() {
return bbsPassword;
}
public void setBBSPassword(String bbsPassword) {
this.bbsPassword = bbsPassword;
}
public int getBbsUid() {
return bbsUid;
}
public void setBbsUid(int bbsUid) {
this.bbsUid = bbsUid;
}
public void setInShowBBsName(String inShowBBsName) {
this.inShowBBsName = inShowBBsName;
}
public String getInShowBBsName() {
return inShowBBsName;
}
public String getLastShowBBSTime() { public String getLastShowBBSTime() {
return lastShowBBSTime; return lastShowBBSTime;
@ -1256,19 +1218,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
} }
} }
private void readBBSName(XMLableReader reader){
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.bbsName = tmpVal;
}
}
private void readBBSPassword(XMLableReader reader){
String tmpVal;
if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) {
this.bbsPassword = CodeUtils.passwordDecode(tmpVal);
}
}
private void readLastBBSTime(XMLableReader reader){ private void readLastBBSTime(XMLableReader reader){
String tmpVal; String tmpVal;
@ -1325,11 +1275,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
readEncrytionKey(reader); readEncrytionKey(reader);
} else if ("jdkHome".equals(name)) { } else if ("jdkHome".equals(name)) {
this.jdkHome = reader.getElementValue(); this.jdkHome = reader.getElementValue();
} else if ("bbsName".equals(name)){ }else if ("lastBBSTime".equals(name)){
readBBSName(reader);
} else if ("bbsPassword".equals(name)){
readBBSPassword(reader);
} else if ("lastBBSTime".equals(name)){
readLastBBSTime(reader); readLastBBSTime(reader);
} else if ("lastBBSNewsTime".equals(name)){ } else if ("lastBBSNewsTime".equals(name)){
readLastBBSNewsTime(reader); readLastBBSNewsTime(reader);
@ -1736,18 +1682,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
//写论坛相关的两个属性 //写论坛相关的两个属性
private void writeBBSRelated(XMLPrintWriter writer){ private void writeBBSRelated(XMLPrintWriter writer){
if (StringUtils.isNotBlank(bbsName)) {
writer.startTAG("bbsName");
writer.textNode(bbsName);
writer.end();
}
if (StringUtils.isNotBlank(bbsPassword)){
writer.startTAG("bbsPassword");
writer.textNode(CodeUtils.passwordEncode(bbsPassword));
writer.end();
}
if (StringUtils.isNotEmpty(this.lastShowBBSTime)){ if (StringUtils.isNotEmpty(this.lastShowBBSTime)){
writer.startTAG("lastBBSTime"); writer.startTAG("lastBBSTime");
writer.textNode(lastShowBBSTime); writer.textNode(lastShowBBSTime);

31
designer_base/src/com/fr/design/bbs/BBSLoginUtils.java

@ -0,0 +1,31 @@
package com.fr.design.bbs;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.stable.StringUtils;
/**
* Created by ibm on 2017/8/21.
*/
public class BBSLoginUtils {
public static void bbsLogin(String username, String password){
try{
ConfigManager.getProviderInstance().setBbsUsername(username);
ConfigManager.getProviderInstance().setBbsPassword(password);
FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance());
}catch (Exception e){
FRContext.getLogger().error(e.getMessage());
}
}
public static void bbsLogout(){
try{
ConfigManager.getProviderInstance().setBbsUsername(StringUtils.EMPTY);
ConfigManager.getProviderInstance().setBbsPassword(StringUtils.EMPTY);
FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance());
}catch (Exception e){
FRContext.getLogger().error(e.getMessage());
}
}
}

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

@ -1,16 +1,15 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.ucenter.Client; import com.fr.design.extra.ucenter.Client;
import com.fr.design.extra.ucenter.XMLHelper; import com.fr.design.extra.ucenter.XMLHelper;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.general.SiteCenter; import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.json.JSONObject;
import com.fr.plugin.manage.bbs.BBSPluginLogin;
import com.fr.plugin.manage.bbs.BBSUserInfo;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javafx.scene.web.WebEngine; import javafx.scene.web.WebEngine;
@ -20,7 +19,6 @@ import java.awt.*;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URI; import java.net.URI;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;
public class LoginWebBridge { public class LoginWebBridge {
@ -59,7 +57,7 @@ public class LoginWebBridge {
private String userName; private String userName;
public LoginWebBridge() { public LoginWebBridge() {
String username = DesignerEnvManager.getEnvManager().getBBSName(); String username = ConfigManager.getProviderInstance().getBbsUsername();
setUserName(username, uiLabel); setUserName(username, uiLabel);
} }
@ -130,16 +128,16 @@ public class LoginWebBridge {
*/ */
public void setMessageCount(int count) { public void setMessageCount(int count) {
if (count == MIN_MESSAGE_COUNT) { if (count == MIN_MESSAGE_COUNT) {
uiLabel.setText(DesignerEnvManager.getEnvManager().getBBSName()); uiLabel.setText(ConfigManager.getProviderInstance().getBbsUsername());
DesignerEnvManager.getEnvManager().setInShowBBsName(DesignerEnvManager.getEnvManager().getBBSName()); ConfigManager.getProviderInstance().setInShowBBsName(ConfigManager.getProviderInstance().getBbsUsername());
return; return;
} }
this.messageCount = count; this.messageCount = count;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(StringUtils.BLANK).append(DesignerEnvManager.getEnvManager().getBBSName()) sb.append(StringUtils.BLANK).append(ConfigManager.getProviderInstance().getBbsUsername())
.append("(").append(this.messageCount) .append("(").append(this.messageCount)
.append(")").append(StringUtils.BLANK); .append(")").append(StringUtils.BLANK);
DesignerEnvManager.getEnvManager().setInShowBBsName(sb.toString()); ConfigManager.getProviderInstance().setInShowBBsName(sb.toString());
uiLabel.setText(sb.toString()); uiLabel.setText(sb.toString());
} }
@ -278,11 +276,9 @@ public class LoginWebBridge {
if (list.size() > 0) { if (list.size() > 0) {
int $uid = Integer.parseInt(list.get(0)); int $uid = Integer.parseInt(list.get(0));
if ($uid > 0) { if ($uid > 0) {
DesignerEnvManager.getEnvManager().setBbsUid($uid); ConfigManager.getProviderInstance().setBbsUid($uid);
DesignerEnvManager.getEnvManager().setBBSName(username); ConfigManager.getProviderInstance().setInShowBBsName(username);
DesignerEnvManager.getEnvManager().setInShowBBsName(username); BBSLoginUtils.bbsLogin(username, password);
DesignerEnvManager.getEnvManager().setBBSPassword(password);
BBSPluginLogin.getInstance().login(new BBSUserInfo(username, password));
return LOGININ;//登录成功,0 return LOGININ;//登录成功,0
} else if ($uid == -1) { } else if ($uid == -1) {
return USERNAME_NOT_EXSIT;//用户名不存在,-1 return USERNAME_NOT_EXSIT;//用户名不存在,-1
@ -318,16 +314,16 @@ public class LoginWebBridge {
public void getLoginInfo(String userInfo) { public void getLoginInfo(String userInfo) {
org.json.JSONObject jo = new org.json.JSONObject(userInfo); org.json.JSONObject jo = new org.json.JSONObject(userInfo);
String status = jo.get("status").toString(); String status = jo.get("status").toString();
try{
if (status.equals(LOGIN_SUCCESS)) { if (status.equals(LOGIN_SUCCESS)) {
String username = jo.get("username").toString(); String username = jo.get("username").toString();
int uid = Integer.parseInt(jo.get("uid") == null ? "" : jo.get("uid").toString()); int uid = Integer.parseInt(jo.get("uid") == null ? "" : jo.get("uid").toString());
closeWindow(); closeWindow();
closeQQWindow(); closeQQWindow();
pluginuiLabel.setText(username); pluginuiLabel.setText(username);
DesignerEnvManager.getEnvManager().setBBSName(username); ConfigManager.getProviderInstance().setBbsUid(uid);
DesignerEnvManager.getEnvManager().setBbsUid(uid); ConfigManager.getProviderInstance().setInShowBBsName(username);
DesignerEnvManager.getEnvManager().setInShowBBsName(username); BBSLoginUtils.bbsLogin(username, "");
BBSPluginLogin.getInstance().login(new BBSUserInfo(username, ""));
} else if (status.equals(LOGIN_FAILED)) { } else if (status.equals(LOGIN_FAILED)) {
//账号没有QQ授权 //账号没有QQ授权
closeQQWindow(); closeQQWindow();
@ -336,6 +332,10 @@ public class LoginWebBridge {
} catch (Exception exp) { } catch (Exception exp) {
} }
} }
}catch (Exception e){
FRContext.getLogger().error(e.getMessage());
}
} }
public void openUrlAtLocalWebBrowser(WebEngine eng, String url) { public void openUrlAtLocalWebBrowser(WebEngine eng, String url) {

8
designer_base/src/com/fr/design/extra/PluginFromStorePane.java

@ -1,5 +1,6 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.extra.tradition.callback.UpdateOnlineCallback; import com.fr.design.extra.tradition.callback.UpdateOnlineCallback;
import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.frpane.UITabbedPane;
@ -9,11 +10,10 @@ import com.fr.general.Inter;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.plugin.context.PluginMarker; import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.manage.PluginManager; import com.fr.plugin.manage.PluginManager;
import com.fr.plugin.manage.bbs.BBSPluginLogin;
import com.fr.plugin.manage.control.PluginTaskResult; import com.fr.plugin.manage.control.PluginTaskResult;
import com.fr.plugin.manage.control.ProgressCallback; import com.fr.plugin.manage.control.ProgressCallback;
import com.fr.plugin.view.PluginView; import com.fr.plugin.view.PluginView;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.filechooser.FileNameExtensionFilter;
import java.io.File; import java.io.File;
@ -188,10 +188,10 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane<List<Plug
} }
private void doUpdateOnline(final PluginStatusCheckCompletePane pane) { private void doUpdateOnline(final PluginStatusCheckCompletePane pane) {
if (!BBSPluginLogin.getInstance().hasLogin()) { if (!StringUtils.isNotEmpty(ConfigManager.getProviderInstance().getBbsUsername())) {
LoginCheckContext.fireLoginCheckListener(); LoginCheckContext.fireLoginCheckListener();
} }
if (BBSPluginLogin.getInstance().hasLogin()) { if (StringUtils.isNotEmpty(ConfigManager.getProviderInstance().getBbsUsername())) {
PluginView plugin = controlPane.getSelectedPlugin(); PluginView plugin = controlPane.getSelectedPlugin();
String id = null; String id = null;
if (plugin != null) { if (plugin != null) {

7
designer_base/src/com/fr/design/extra/PluginOperateUtils.java

@ -1,5 +1,6 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.extra.exe.callback.*; import com.fr.design.extra.exe.callback.*;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -12,8 +13,6 @@ import com.fr.json.JSONObject;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginMarker; import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.manage.PluginManager; import com.fr.plugin.manage.PluginManager;
import com.fr.plugin.manage.bbs.BBSPluginLogin;
import com.fr.plugin.manage.bbs.BBSUserInfo;
import com.fr.plugin.manage.control.PluginControllerHelper; import com.fr.plugin.manage.control.PluginControllerHelper;
import com.fr.plugin.manage.control.PluginTask; import com.fr.plugin.manage.control.PluginTask;
import com.fr.plugin.manage.control.PluginTaskCallback; import com.fr.plugin.manage.control.PluginTaskCallback;
@ -260,9 +259,7 @@ public class PluginOperateUtils {
} }
public static void getLoginInfo(JSCallback jsCallback, UILabel uiLabel) { public static void getLoginInfo(JSCallback jsCallback, UILabel uiLabel) {
BBSUserInfo bbsUserInfo = BBSPluginLogin.getInstance().getUserInfo(); String username = ConfigManager.getProviderInstance().getBbsUsername();
String username = bbsUserInfo == null ? "" : bbsUserInfo.getUserName();
if (StringUtils.isEmpty(username)) { if (StringUtils.isEmpty(username)) {
jsCallback.execute(""); jsCallback.execute("");
uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn")); uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn"));

7
designer_base/src/com/fr/design/extra/PluginUpdatePane.java

@ -1,5 +1,6 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.base.ConfigManager;
import com.fr.design.extra.tradition.callback.UpdateOnlineCallback; import com.fr.design.extra.tradition.callback.UpdateOnlineCallback;
import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -8,10 +9,10 @@ import com.fr.general.Inter;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.plugin.context.PluginMarker; import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.manage.PluginManager; import com.fr.plugin.manage.PluginManager;
import com.fr.plugin.manage.bbs.BBSPluginLogin;
import com.fr.plugin.manage.control.PluginTaskResult; import com.fr.plugin.manage.control.PluginTaskResult;
import com.fr.plugin.manage.control.ProgressCallback; import com.fr.plugin.manage.control.ProgressCallback;
import com.fr.plugin.view.PluginView; import com.fr.plugin.view.PluginView;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.filechooser.FileNameExtensionFilter;
@ -170,10 +171,10 @@ public class PluginUpdatePane extends PluginAbstractLoadingViewPane<List<PluginV
} }
private void doUpdateOnline(final PluginStatusCheckCompletePane pane) { private void doUpdateOnline(final PluginStatusCheckCompletePane pane) {
if (!BBSPluginLogin.getInstance().hasLogin()) { if (!StringUtils.isNotEmpty(ConfigManager.getProviderInstance().getBbsUsername())) {
LoginCheckContext.fireLoginCheckListener(); LoginCheckContext.fireLoginCheckListener();
} }
if (BBSPluginLogin.getInstance().hasLogin()) { if (StringUtils.isNotEmpty(ConfigManager.getProviderInstance().getBbsUsername())) {
try{ try{
PluginView plugin = controlPane.getSelectedPlugin(); PluginView plugin = controlPane.getSelectedPlugin();
PluginMarker pluginMarker = PluginMarker.create(plugin.getID(), plugin.getVersion()); PluginMarker pluginMarker = PluginMarker.create(plugin.getID(), plugin.getVersion());

20
designer_base/src/com/fr/design/extra/PluginWebBridge.java

@ -1,8 +1,9 @@
package com.fr.design.extra; package com.fr.design.extra;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper; import com.fr.design.RestartHelper;
import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.exe.callback.JSCallback; import com.fr.design.extra.exe.callback.JSCallback;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -12,8 +13,6 @@ import com.fr.general.SiteCenter;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginMarker; import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.manage.PluginManager; import com.fr.plugin.manage.PluginManager;
import com.fr.plugin.manage.bbs.BBSPluginLogin;
import com.fr.plugin.manage.bbs.BBSUserInfo;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javafx.scene.web.WebEngine; import javafx.scene.web.WebEngine;
@ -382,8 +381,7 @@ public class PluginWebBridge {
*/ */
public String getLoginInfo(final JSObject callback) { public String getLoginInfo(final JSObject callback) {
registerLoginInfo(callback); registerLoginInfo(callback);
BBSUserInfo bbsUserInfo = BBSPluginLogin.getInstance().getUserInfo(); return ConfigManager.getProviderInstance().getBbsUsername();
return bbsUserInfo == null ? "" : bbsUserInfo.getUserName();
} }
/** /**
@ -511,8 +509,11 @@ public class PluginWebBridge {
//通过QQ登录后通知登录 //通过QQ登录后通知登录
public void ucsynLogin(long uid, String username, String password, final JSONObject callback) { public void ucsynLogin(long uid, String username, String password, final JSONObject callback) {
BBSUserInfo bbsUserInfo = new BBSUserInfo(username, password); try{
BBSPluginLogin.getInstance().login(bbsUserInfo); FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance());
}catch (Exception e){
FRContext.getLogger().error(e.getMessage());
}
uiLabel.setText(username); uiLabel.setText(username);
} }
@ -520,9 +521,8 @@ public class PluginWebBridge {
* 清除用户信息 * 清除用户信息
*/ */
public void clearUserInfo() { public void clearUserInfo() {
DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY); ConfigManager.getProviderInstance().setInShowBBsName(StringUtils.EMPTY);
DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY); BBSLoginUtils.bbsLogout();
DesignerEnvManager.getEnvManager().setInShowBBsName(StringUtils.EMPTY);
uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn")); uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn"));
} }

10
designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java

@ -20,6 +20,9 @@ public class UIExpandablePane extends JPanel {
private int headWidth; private int headWidth;
private int headHeight; private int headHeight;
public JPanel getContentPanel() {
return contentPanel;
}
public UIExpandablePane(String title, int headWidth, int headHeight, JPanel contentPanel) { public UIExpandablePane(String title, int headWidth, int headHeight, JPanel contentPanel) {
super(); super();
@ -43,12 +46,17 @@ public class UIExpandablePane extends JPanel {
headerPanel = new HeaderPane(color, title, headHeight); headerPanel = new HeaderPane(color, title, headHeight);
headerPanel.addMouseListener(new PanelAction()); headerPanel.addMouseListener(new PanelAction());
contentPanel.setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, 0)); setcontentPanelontentPanelBorder ();
this.add(headerPanel, BorderLayout.NORTH); this.add(headerPanel, BorderLayout.NORTH);
this.add(contentPanel, BorderLayout.CENTER); this.add(contentPanel, BorderLayout.CENTER);
setOpaque(false); setOpaque(false);
} }
protected void setcontentPanelontentPanelBorder (){
contentPanel.setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, 0));
}
class PanelAction extends MouseAdapter { class PanelAction extends MouseAdapter {
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
HeaderPane hp = (HeaderPane) e.getSource(); HeaderPane hp = (HeaderPane) e.getSource();

4
designer_base/src/com/fr/design/gui/UIDefaultTheme.java

@ -170,8 +170,8 @@ public class UIDefaultTheme extends DefaultMetalTheme {
table.put("Tree.textForeground", ThemeUtils.NORMAL_FOREGROUND); table.put("Tree.textForeground", ThemeUtils.NORMAL_FOREGROUND);
table.put("Tree.selectionBackground", ThemeUtils.TEXT_SELECTED_BG_COLOR); table.put("Tree.selectionBackground", ThemeUtils.TEXT_SELECTED_BG_COLOR);
table.put("Tree.selectionForeground", ThemeUtils.TEXT_SELECTED_TEXT_COLOR); table.put("Tree.selectionForeground", ThemeUtils.TEXT_SELECTED_TEXT_COLOR);
table.put("Tree.hash", new ColorUIResource(208, 205, 190)); table.put("Tree.hash", new ColorUIResource(240, 240,243));
table.put("Tree.line", new ColorUIResource(208, 205, 190)); table.put("Tree.line", new ColorUIResource(240, 240,243));
} }

12
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.controlpane; package com.fr.design.gui.controlpane;
import com.fr.base.chart.BasePlot;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -16,7 +17,8 @@ import com.fr.stable.Nameable;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
/** /**
* Created by plough on 2017/7/21. * Created by plough on 2017/7/21.
@ -37,10 +39,18 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected JPanel cardPane; protected JPanel cardPane;
protected BasePlot plot;
public UIControlPane() { public UIControlPane() {
this.initComponentPane(); this.initComponentPane();
} }
public UIControlPane(BasePlot plot) {
this.plot =plot;
this.initComponentPane();
}
/** /**
* 生成添加按钮的NameableCreator * 生成添加按钮的NameableCreator
* *

17
designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java

@ -2,6 +2,7 @@ package com.fr.design.gui.controlpane;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.chart.BasePlot;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
@ -12,9 +13,9 @@ import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilist.UINameEdList;
import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.ilist.ModNameActionListener; import com.fr.design.gui.ilist.ModNameActionListener;
import com.fr.design.gui.ilist.UINameEdList;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
@ -40,8 +41,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.Arrays; import java.util.Arrays;
@ -61,10 +60,15 @@ public abstract class UIListControlPane extends UIControlPane {
private boolean isNameRepeated = false; private boolean isNameRepeated = false;
protected boolean isPopulating = false; protected boolean isPopulating = false;
public UIListControlPane() { public UIListControlPane() {
this.initComponentPane(); this.initComponentPane();
} }
public UIListControlPane(BasePlot plot) {
super(plot);
}
@Override @Override
protected JPanel createControlUpdatePane() { protected JPanel createControlUpdatePane() {
return new JControlUpdatePane(); return new JControlUpdatePane();
@ -890,6 +894,11 @@ public abstract class UIListControlPane extends UIControlPane {
} }
protected Object getob2Populate (Object ob2Populate) {
return ob2Populate;
}
private class JControlUpdatePane extends JPanel { private class JControlUpdatePane extends JPanel {
private CardLayout card; private CardLayout card;
private JPanel cardPane; private JPanel cardPane;
@ -926,6 +935,7 @@ public abstract class UIListControlPane extends UIControlPane {
for (int i = 0, len = updatePanes.length; i < len; i++) { for (int i = 0, len = updatePanes.length; i < len; i++) {
Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper); Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper);
ob2Populate = getob2Populate(ob2Populate);
if (ob2Populate != null) { if (ob2Populate != null) {
if (updatePanes[i] == null) { if (updatePanes[i] == null) {
if (isMulti(creators[i].getUpdatePane()) || isTree(creators[i].getUpdatePane())) { if (isMulti(creators[i].getUpdatePane()) || isTree(creators[i].getUpdatePane())) {
@ -944,6 +954,7 @@ public abstract class UIListControlPane extends UIControlPane {
} }
} }
public boolean isMulti(Class _class) { public boolean isMulti(Class _class) {
return ComparatorUtils.equals(_class, GlobalMultiTDTableDataPane.class) || ComparatorUtils.equals(_class, MultiTDTableDataPane.class); return ComparatorUtils.equals(_class, GlobalMultiTDTableDataPane.class) || ComparatorUtils.equals(_class, MultiTDTableDataPane.class);
} }

4
designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java

@ -34,6 +34,10 @@ public class UIMenuNameableCreator implements Nameable{
this.obj = obj; this.obj = obj;
} }
public Class<? extends BasicBeanPane> getPaneClazz() {
return paneClazz;
}
/** /**
* 覆盖的clone方法 * 覆盖的clone方法
*/ */

BIN
designer_base/src/com/fr/design/images/buttonicon/minus.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 177 B

BIN
designer_base/src/com/fr/design/images/buttonicon/plus.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 165 B

3
designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.templateinfo; package com.fr.design.mainframe.templateinfo;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.io.IOFile; import com.fr.base.io.IOFile;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -236,7 +237,7 @@ public class TemplateInfoCollector<T extends IOFile> implements Serializable, XM
private HashMap<String, Object> getNewConsumingMap(String templateID, long openTime, long timeConsume) { private HashMap<String, Object> getNewConsumingMap(String templateID, long openTime, long timeConsume) {
HashMap<String, Object> consumingMap = new HashMap<>(); HashMap<String, Object> consumingMap = new HashMap<>();
String username = DesignerEnvManager.getEnvManager().getBBSName(); String username = ConfigManager.getProviderInstance().getBbsUsername();
String uuid = DesignerEnvManager.getEnvManager().getUUID(); String uuid = DesignerEnvManager.getEnvManager().getUUID();
String activitykey = DesignerEnvManager.getEnvManager().getActivationKey(); String activitykey = DesignerEnvManager.getEnvManager().getActivationKey();
String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime()); String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime());

172
designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java

@ -2,18 +2,20 @@ package com.fr.design.mainframe.chart.gui.data;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane; import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane;
import com.fr.design.mainframe.chart.gui.style.ThirdTabPane; import com.fr.design.mainframe.chart.gui.style.ThirdTabPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -31,8 +33,8 @@ import java.util.List;
*/ */
public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> { public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private static final long serialVersionUID = 3650522989381790194L; private static final long serialVersionUID = 3650522989381790194L;
private static final int PAN_WIDTH = 210; private static final int PAN_WIDTH = 234;
private static final int FIL_HEIGHT = 130; private static final int FIL_HEIGHT = 150;
private CategoryFilterPane categoryPane; private CategoryFilterPane categoryPane;
private SeriesFilterPane seriesPane; private SeriesFilterPane seriesPane;
@ -45,6 +47,18 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
this.isNeedPresent = true; this.isNeedPresent = true;
} }
protected void initTabPane() {
if (!paneList.isEmpty()) {
tabPane = new UIHeadGroup(nameArray) {
@Override
public void tabChanged(int index) {
cardLayout.show(centerPane, nameArray[index]);
}
};
tabPane.setPreferredSize(new Dimension(200, 20));
}
}
protected List<NamePane> initPaneList(Plot plot, AbstractAttrNoScrollPane parent) { protected List<NamePane> initPaneList(Plot plot, AbstractAttrNoScrollPane parent) {
plot4Pane = plot; plot4Pane = plot;
@ -99,6 +113,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
this.removeAll(); this.removeAll();
paneList = initPaneList4NoPresent(plot4Pane, parentPane); paneList = initPaneList4NoPresent(plot4Pane, parentPane);
initAllPane(); initAllPane();
tabPane.setPreferredSize(new Dimension(200, 20));
centerPane.setPreferredSize(new Dimension(getContentPaneWidth(), 200));
this.validate(); this.validate();
} }
@ -160,6 +176,10 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private PresentComboBox present; private PresentComboBox present;
private AbstractAttrNoScrollPane parent; private AbstractAttrNoScrollPane parent;
private JPanel preDataNumPane;
private JPanel presentPane;
public CategoryFilterPane(AbstractAttrNoScrollPane parent) { public CategoryFilterPane(AbstractAttrNoScrollPane parent) {
super(true); super(true);
this.parent = parent; this.parent = parent;
@ -175,59 +195,59 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
JPanel pane = new JPanel(); JPanel pane = initOtherPane();
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(pane);
initPresentPane(pane);
return pane; return pane;
} }
protected void initOtherPane(JPanel pane) { protected JPanel initOtherPane() {
JPanel prePane = new JPanel(); onlyPreData = new UICheckBox(Inter.getLocText("Plugin-ChartF_OnlyUseBeforeRecords"));
prePane.setLayout(new FlowLayout(FlowLayout.LEFT)); JPanel panel1 = new JPanel(new BorderLayout());
prePane.setPreferredSize(new Dimension(200, 20)); JPanel panel2 = new JPanel(new BorderLayout());
pane.add(prePane); panel1.add(onlyPreData, BorderLayout.NORTH);
onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore"));
preDataNum = new UITextField(); preDataNum = new UITextField();
preDataNum.setPreferredSize(new Dimension(50, 20)); UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_RecordsNum"));
prePane.add(onlyPreData);
prePane.add(preDataNum);
prePane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Records")));
JPanel otherPane = new JPanel();
otherPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
pane.add(otherPane);
combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther")); combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther"));
combineOther.setSelected(true); combineOther.setSelected(true);
otherPane.add(combineOther); double p = TableLayout.PREFERRED;
JPanel catePane = new JPanel(); double f = TableLayout.FILL;
pane.add(catePane); double[] columnSize = {p,f};
catePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{label,preDataNum},
new Component[]{combineOther,null}
};
preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
panel1.add(preDataNumPane, BorderLayout.CENTER);
notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate")); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate"));
catePane.add(notShowNull); panel2.add(notShowNull, BorderLayout.NORTH);
onlyPreData.addChangeListener(new ChangeListener() { onlyPreData.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
checkBoxUse(); checkBoxUse();
} }
}); });
}
private void initPresentPane(JPanel pane) {
JPanel presentPane = new JPanel();
presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0));
pane.add(presentPane);
present = new PresentComboBox() { present = new PresentComboBox() {
protected void fireChange() { protected void fireChange() {
fire(); fire();
} }
}; };
present.setPreferredSize(new Dimension(70, 20)); presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("FR-Chart-Style_Present") ,present);
presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":")); panel2.add(presentPane, BorderLayout.SOUTH);
presentPane.add(present);
double[] column = {f};
double[] row = {p, p};
Component[][] coms = new Component[][]{
new Component[]{panel1},
new Component[]{panel2}
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(coms, row,column);
} }
private void fire() { private void fire() {
if (this.parent != null) { if (this.parent != null) {
this.parent.attributeChanged(); this.parent.attributeChanged();
@ -245,9 +265,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
* 检查分类过滤界面 Box是否可用. * 检查分类过滤界面 Box是否可用.
*/ */
public void checkBoxUse() { public void checkBoxUse() {
preDataNum.setEnabled(onlyPreData.isSelected()); preDataNumPane.setVisible(onlyPreData.isSelected());
combineOther.setEnabled(onlyPreData.isSelected());
;
} }
/** /**
@ -320,6 +338,9 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private AbstractAttrNoScrollPane parent; private AbstractAttrNoScrollPane parent;
private JPanel preDataNumPane;
private JPanel presentPane;
public SeriesFilterPane(AbstractAttrNoScrollPane parent) { public SeriesFilterPane(AbstractAttrNoScrollPane parent) {
super(true); super(true);
this.parent = parent; this.parent = parent;
@ -335,62 +356,60 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
JPanel pane = new JPanel(); JPanel pane = initOtherPane();
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(pane);
initPresentPane(pane);
return pane; return pane;
} }
protected void initOtherPane(JPanel pane) { protected JPanel initOtherPane() {
JPanel prePane = new JPanel(); onlyPreData = new UICheckBox(Inter.getLocText("Plugin-ChartF_OnlyUseBeforeRecords"));
prePane.setLayout(new FlowLayout(FlowLayout.LEFT)); JPanel panel1 = new JPanel(new BorderLayout());
prePane.setPreferredSize(new Dimension(200, 20)); JPanel panel2 = new JPanel(new BorderLayout());
pane.add(prePane); panel1.add(onlyPreData, BorderLayout.NORTH);
onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore"));
preDataNum = new UITextField(); preDataNum = new UITextField();
preDataNum.setPreferredSize(new Dimension(50, 20)); UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_RecordsNum"));
prePane.add(onlyPreData);
prePane.add(preDataNum);
prePane.add(new UILabel(Inter.getLocText("FR-Chart-Data_Records")));
JPanel otherPane = new JPanel();
otherPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
pane.add(otherPane);
combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther")); combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther"));
combineOther.setSelected(true); combineOther.setSelected(true);
otherPane.add(combineOther); double p = TableLayout.PREFERRED;
JPanel catePane = new JPanel(); double f = TableLayout.FILL;
pane.add(catePane); double[] columnSize = {p,f};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{label,preDataNum},
new Component[]{combineOther,null}
};
catePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
panel1.add(preDataNumPane, BorderLayout.CENTER);
notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries")); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries"));
catePane.add(notShowNull); panel2.add(notShowNull, BorderLayout.NORTH);
onlyPreData.addChangeListener(new ChangeListener() { onlyPreData.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
checkBoxUse(); checkBoxUse();
} }
}); });
}
private void initPresentPane(JPanel pane) {
JPanel presentPane = new JPanel();
presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0));
pane.add(presentPane);
present = new PresentComboBox() { present = new PresentComboBox() {
protected void fireChange() { protected void fireChange() {
fire(); fire();
} }
}; };
present.setPreferredSize(new Dimension(70, 20)); presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("FR-Chart-Style_Present") ,present);
presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":")); panel2.add(presentPane, BorderLayout.SOUTH);
presentPane.add(present);
double[] column = {f};
double[] row = {p, p};
Component[][] coms = new Component[][]{
new Component[]{panel1},
new Component[]{panel2}
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(coms, row,column);
} }
private void fire() { private void fire() {
if (this.parent != null) { if (this.parent != null) {
parent.attributeChanged(); parent.attributeChanged();
@ -409,8 +428,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
* 检查Box是否可用 * 检查Box是否可用
*/ */
public void checkBoxUse() { public void checkBoxUse() {
preDataNum.setEnabled(onlyPreData.isSelected()); preDataNumPane.setVisible(onlyPreData.isSelected());
combineOther.setEnabled(onlyPreData.isSelected());
} }
/** /**
@ -480,11 +498,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
JPanel pane = new JPanel(); JPanel pane = new JPanel(new BorderLayout());
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(pane);
return pane; return pane;
} }
@ -516,11 +531,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
JPanel pane = new JPanel(); JPanel pane = initOtherPane();
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(pane);
return pane; return pane;
} }

2
designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java

@ -41,6 +41,8 @@ public class DatabaseTableDataPane extends BasicPane{
pane.add(reviewButton,BorderLayout.EAST); pane.add(reviewButton,BorderLayout.EAST);
this.add(pane,BorderLayout.CENTER); this.add(pane,BorderLayout.CENTER);
this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
} }
/** /**

12
designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java

@ -3,13 +3,13 @@ package com.fr.design.mainframe.chart.gui.data;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -46,7 +46,12 @@ public class NormalChartDataPane extends DataContentsPane {
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
return new BasicScrollPane<ChartCollection>() { return new AbstractVanChartScrollPane<ChartCollection>() {
protected void layoutContentPane() {
leftcontentPane = createContentPane();
this.add(leftcontentPane);
}
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
@ -56,9 +61,10 @@ public class NormalChartDataPane extends DataContentsPane {
this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6));
JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0));
northPane.add(jcb, BorderLayout.CENTER); northPane.add(jcb, BorderLayout.CENTER);
UILabel label1 = new UILabel(Inter.getLocText("Chart-Data_Resource") + ":", SwingConstants.RIGHT); UILabel label1 = new UILabel(Inter.getLocText("Chart-Data_Resource"));
label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT));
northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null}));
northPane.setBorder(BorderFactory.createEmptyBorder(0,10,0,15));
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);

11
designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

@ -1,7 +1,8 @@
package com.fr.design.mainframe.chart.gui.data; package com.fr.design.mainframe.chart.gui.data;
import com.fr.base.TableData; import com.fr.base.TableData;
import com.fr.chart.chartattr.*; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.TableDataDefinition; import com.fr.chart.chartdata.TableDataDefinition;
import com.fr.chart.chartdata.TopDefinition; import com.fr.chart.chartdata.TopDefinition;
import com.fr.data.impl.NameTableData; import com.fr.data.impl.NameTableData;
@ -11,7 +12,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.*; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
@ -35,7 +36,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
} }
private void initDataPane() { private void initDataPane() {
UILabel label = new BoldFontTextLabel(Inter.getLocText("Chart-DS_TableData") + ":", SwingConstants.RIGHT) ; UILabel label = new BoldFontTextLabel(Inter.getLocText("Chart-DS_TableData")) ;
label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT));
tableDataPane = new DatabaseTableDataPane(label) { tableDataPane = new DatabaseTableDataPane(label) {
@Override @Override
@ -45,9 +46,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
} }
}; };
tableDataPane.setBorder(BorderFactory.createMatteBorder(0,6,0, 0, getBackground())); tableDataPane.setPreferredSize(new Dimension(246 , 20));
tableDataPane.setBorder(BorderFactory.createEmptyBorder(0,1,0,1));
tableDataPane.setPreferredSize(new Dimension(205 , 20));
this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0)); this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0));
this.add(tableDataPane, BorderLayout.NORTH); this.add(tableDataPane, BorderLayout.NORTH);
} }

1
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java

@ -45,6 +45,7 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane<ChartC
initSeriesPane(); initSeriesPane();
this.add(seriesPane, "0,2,2,2"); this.add(seriesPane, "0,2,2,2");
seriesPane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
} }
//kunsnat: 用于重载, 甘特图, 股价图 第一列 默认应该不可编辑. //kunsnat: 用于重载, 甘特图, 股价图 第一列 默认应该不可编辑.

9
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java

@ -5,11 +5,12 @@ import com.fr.chart.chartattr.BubblePlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.BubbleReportDefinition; import com.fr.chart.chartdata.BubbleReportDefinition;
import com.fr.chart.chartdata.BubbleSeriesValue; import com.fr.chart.chartdata.BubbleSeriesValue;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -24,9 +25,9 @@ public class BubblePlotReportDataContentPane extends AbstractReportDataContentPa
public BubblePlotReportDataContentPane(ChartDataPane parent) { public BubblePlotReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
filterPane = new ChartDataFilterPane(new BubblePlot(), parent);
this.add(new BoldFontTextLabel(Inter.getLocText("Data_Filter")), "0,4,2,4"); JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
this.add(filterPane = new ChartDataFilterPane(new BubblePlot(), parent), "0,6,2,4"); this.add(panel, "0,6,2,4");
} }
@Override @Override

12
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java

@ -10,10 +10,10 @@ import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -43,7 +43,7 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
public CategoryPlotMoreCateReportDataContentPane(ChartDataPane parent) { public CategoryPlotMoreCateReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name") + ":"); categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name"));
JPanel catePane = new JPanel(); JPanel catePane = new JPanel();
catePane.setLayout(new BorderLayout(2, 2)); catePane.setLayout(new BorderLayout(2, 2));
@ -61,9 +61,13 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
catePane.add(boxPane, BorderLayout.SOUTH); catePane.add(boxPane, BorderLayout.SOUTH);
catePane.setPreferredSize(new Dimension(246,30));
catePane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
this.add(catePane, "0,0,2,0"); this.add(catePane, "0,0,2,0");
this.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter")), "0,4,2,4"); filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent);
this.add(filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent), "0,6,2,4"); JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
this.add(panel, "0,6,2,4");
addButton.addActionListener(new ActionListener() { addButton.addActionListener(new ActionListener() {
@Override @Override

15
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java

@ -7,11 +7,11 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.NormalReportDataDefinition; import com.fr.chart.chartdata.NormalReportDataDefinition;
import com.fr.chart.chartdata.SeriesDefinition; import com.fr.chart.chartdata.SeriesDefinition;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -32,12 +32,13 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
public CategoryPlotReportDataContentPane(ChartDataPane parent) { public CategoryPlotReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name") + ":"); categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name"));
categoryName.setPreferredSize(new Dimension(246,30));
categoryName.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(categoryName, "0,0,2,0"); this.add(categoryName, "0,0,2,0");
this.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter")), "0,4,2,4"); filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent);
this.add(filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent), "0,6,2,4"); JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
} this.add(panel, "0,6,2,4"); }
protected TinyFormulaPane initCategoryBox(final String leftLabel) { protected TinyFormulaPane initCategoryBox(final String leftLabel) {
TinyFormulaPane categoryName = new TinyFormulaPane() { TinyFormulaPane categoryName = new TinyFormulaPane() {
@ -46,7 +47,7 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
if(StringUtils.isNotEmpty(leftLabel)) { if(StringUtils.isNotEmpty(leftLabel)) {
UILabel label1 = new UILabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT); UILabel label1 = new UILabel(Inter.getLocText("FR-Chart-Category_Name"));
label1.setPreferredSize(new Dimension(75, 20)); label1.setPreferredSize(new Dimension(75, 20));
this.add(label1, BorderLayout.WEST); this.add(label1, BorderLayout.WEST);
} }

15
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java

@ -5,13 +5,13 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot; import com.fr.chart.chartattr.MeterPlot;
import com.fr.chart.chartdata.MeterReportDefinition; import com.fr.chart.chartdata.MeterReportDefinition;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -46,21 +46,22 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan
double[] rowSize = { p, p, p}; double[] rowSize = { p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(getCateNameString(), SwingConstants.RIGHT), getSingCatePane()}, new Component[]{new UILabel(getCateNameString()), getSingCatePane()},
new Component[]{new UILabel(getNValueString(), SwingConstants.RIGHT), singValuePane = new TinyFormulaPane()}, new Component[]{new UILabel(getNValueString()), singValuePane = new TinyFormulaPane()},
new Component[]{null, null} new Component[]{null, null}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.NORTH); this.add(panel, BorderLayout.NORTH);
filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
double[] cs = {p}; double[] cs = {p};
components = new Component[][]{ components = new Component[][]{
new Component[]{new JSeparator()}, new Component[]{panel1},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Designer_Data_Filter"))},
new Component[]{filterPane = new ChartDataFilterPane(new MeterPlot(), parent)},
}; };
JPanel pane = TableLayoutHelper.createTableLayoutPane(components, rowSize, cs); JPanel pane = TableLayoutHelper.createTableLayoutPane(components, rowSize, cs);

18
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java

@ -1,14 +1,16 @@
package com.fr.design.mainframe.chart.gui.data.table; package com.fr.design.mainframe.chart.gui.data.table;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
public abstract class AbstractTableDataContentPane extends BasicBeanPane<ChartCollection>{ public abstract class AbstractTableDataContentPane extends BasicBeanPane<ChartCollection>{
private boolean isNeedSummaryCaculateMethod = true; private boolean isNeedSummaryCaculateMethod = true;
@ -134,4 +136,10 @@ public abstract class AbstractTableDataContentPane extends BasicBeanPane<ChartCo
public boolean isNeedSummaryCaculateMethod(){ public boolean isNeedSummaryCaculateMethod(){
return this.isNeedSummaryCaculateMethod; return this.isNeedSummaryCaculateMethod;
} }
protected JSeparator getJSeparator() {
JSeparator jSeparator = new JSeparator();
jSeparator.setPreferredSize(new Dimension(246, 2));
return jSeparator;
}
} }

10
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java

@ -48,17 +48,20 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
public CategoryPlotMoreCateTableDataContentPane(ChartDataPane parent) { public CategoryPlotMoreCateTableDataContentPane(ChartDataPane parent) {
categoryCombox = new UIComboBox(); categoryCombox = new UIComboBox();
categoryCombox.setPreferredSize(new Dimension(100,20)); categoryCombox.setPreferredSize(new Dimension(120,20));
JPanel categoryPane = new JPanel(new BorderLayout(4,0)); JPanel categoryPane = new JPanel(new BorderLayout(4,0));
categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground()));
UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT) ; UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name")) ;
categoryLabel.setPreferredSize(new Dimension(75,20)); categoryLabel.setPreferredSize(new Dimension(85,20));
addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
addButton.setPreferredSize(new Dimension(20, 20)); addButton.setPreferredSize(new Dimension(20, 20));
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton,null,categoryLabel,null})); categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton,null,categoryLabel,null}));
categoryPane.setPreferredSize(new Dimension(246,30));
categoryPane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
boxPane = new JPanel(); boxPane = new JPanel();
boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS)); boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS));
@ -67,6 +70,7 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(categoryPane, BorderLayout.NORTH); this.add(categoryPane, BorderLayout.NORTH);
this.add(new JSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot()); seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
this.add(seriesTypeComboxPane, BorderLayout.SOUTH); this.add(seriesTypeComboxPane, BorderLayout.SOUTH);

10
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java

@ -1,19 +1,19 @@
package com.fr.design.mainframe.chart.gui.data.table; package com.fr.design.mainframe.chart.gui.data.table;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.chart.base.ChartConstants; import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.NormalTableDataDefinition; import com.fr.chart.chartdata.NormalTableDataDefinition;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -41,17 +41,19 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa
categoryCombox = new UIComboBox(); categoryCombox = new UIComboBox();
JPanel categoryPane = new JPanel(new BorderLayout(4,0)); JPanel categoryPane = new JPanel(new BorderLayout(4,0));
categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground()));
UILabel label1 = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT) ; UILabel label1 = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name")) ;
label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT));
categoryCombox.setPreferredSize(new Dimension(100,20)); categoryCombox.setPreferredSize(new Dimension(100,20));
categoryCombox.addItem(Inter.getLocText("Chart-Use_None")); categoryCombox.addItem(Inter.getLocText("Chart-Use_None"));
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox,null,null,label1,null})); categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox,null,null,label1,null}));
categoryPane.setPreferredSize(new Dimension(246,30));
categoryPane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(categoryPane, BorderLayout.NORTH); this.add(categoryPane, BorderLayout.NORTH);
this.add(getJSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot()); seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
this.add(seriesTypeComboxPane, BorderLayout.SOUTH); this.add(seriesTypeComboxPane, BorderLayout.SOUTH);

14
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java

@ -50,13 +50,13 @@ public class GanttPlotTableDataContentPane extends AbstractTableDataContentPane{
double[] rowSize = { p,p,p,p,p,p,p,p,p,p}; double[] rowSize = { p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Step_Name") + ":", SwingConstants.RIGHT),step}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Step_Name")),step},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_Start") + ":", SwingConstants.RIGHT),planStart}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_Start")),planStart},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_End") + ":", SwingConstants.RIGHT),planEnd}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_End")),planEnd},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_Start") + ":", SwingConstants.RIGHT),finalStart}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_Start")),finalStart},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_End") + ":", SwingConstants.RIGHT),finalEnd}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_End")),finalEnd},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Percent") + ":", SwingConstants.RIGHT),percent}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Percent")),percent},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Items") + ":", SwingConstants.RIGHT),project}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Items")),project},
} ; } ;
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());

17
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java

@ -1,14 +1,5 @@
package com.fr.design.mainframe.chart.gui.data.table; package com.fr.design.mainframe.chart.gui.data.table;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.List;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot; import com.fr.chart.chartattr.MeterPlot;
@ -21,14 +12,18 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
import java.util.List;
/** /**
* 仪表盘, 属性表, 数据集数据界面. * 仪表盘, 属性表, 数据集数据界面.
* @author kunsnat E-mail:kunsnat@gmail.com * @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2012-12-21 下午04:51:50 * @version 创建时间2012-12-21 下午04:51:50
*/ */
public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane { public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane {
private static final String METER_NAME = Inter.getLocText("Chart-Category_Use_Name") + ":"; private static final String METER_NAME = Inter.getLocText("Chart-Category_Use_Name");
private static final String METER_VALUE = Inter.getLocText("Chart-Pointer_Value") + ":"; private static final String METER_VALUE = Inter.getLocText("Chart-Pointer_Value");
private UIComboBox nameBox; private UIComboBox nameBox;
private UIComboBox valueBox; private UIComboBox valueBox;

2
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java

@ -12,7 +12,6 @@ import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.frpane.UICorrelationPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.itable.UITable; import com.fr.design.gui.itable.UITable;
import com.fr.design.gui.itable.UITableEditor; import com.fr.design.gui.itable.UITableEditor;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
@ -98,7 +97,6 @@ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane<ChartCollec
protected Component[][] getUseComponent() { protected Component[][] getUseComponent() {
return new Component[][]{ return new Component[][]{
new Component[]{seriesDataPane}, new Component[]{seriesDataPane},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter"))},
}; };
} }

18
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java

@ -7,7 +7,6 @@ import com.fr.data.util.function.AbstractDataFunction;
import com.fr.data.util.function.NoneFunction; import com.fr.data.util.function.NoneFunction;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -77,11 +76,11 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p, p, p, p, p}; double[] rowSize = {p, p, p, p, p};
UILabel Label1 = new UILabel(Inter.getLocText("FR-Chart-Series_Name") + ":", SwingConstants.RIGHT); UILabel Label1 = new UILabel(Inter.getLocText("FR-Chart-Series_Name"));
Label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); Label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value") + ":", SwingConstants.RIGHT); UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value"));
Label2.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); Label2.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method") + ":", SwingConstants.RIGHT); UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method"));
Label3.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); Label3.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
Component[][] components = getUseComponent(Label1, Label2, Label3); Component[][] components = getUseComponent(Label1, Label2, Label3);
@ -96,11 +95,11 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p, p, p, p}; double[] rowSize = {p, p, p, p};
UILabel Label1 = new UILabel(Inter.getLocText("Chart-Series_Name") + ":", SwingConstants.RIGHT); UILabel Label1 = new UILabel(Inter.getLocText("Chart-Series_Name"));
Label1.setPreferredSize(new Dimension(75, 20)); Label1.setPreferredSize(new Dimension(75, 20));
UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value") + ":", SwingConstants.RIGHT); UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value"));
Label2.setPreferredSize(new Dimension(75, 20)); Label2.setPreferredSize(new Dimension(75, 20));
UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method") + ":", SwingConstants.RIGHT); UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method"));
Label3.setPreferredSize(new Dimension(75, 20)); Label3.setPreferredSize(new Dimension(75, 20));
Component[][] components = getUseComponentWithOutSummary(Label1, Label2, Label3); Component[][] components = getUseComponentWithOutSummary(Label1, Label2, Label3);
@ -115,8 +114,6 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})},
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})},
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{calculateCombox, null, null, Label3, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{calculateCombox, null, null, Label3, null})},
new Component[]{new JSeparator()},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))},
}; };
} }
@ -132,8 +129,7 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
return new Component[][]{ return new Component[][]{
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})},
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})}, new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})},
new Component[]{new JSeparator()},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))},
}; };
} }

10
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java

@ -7,6 +7,7 @@ import com.fr.chart.chartdata.MoreNameCDDefinition;
import com.fr.chart.chartdata.OneValueCDDefinition; import com.fr.chart.chartdata.OneValueCDDefinition;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -47,13 +48,16 @@ public class SeriesTypeUseComboxPane extends UIComboBoxPane<ChartCollection> {
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM)); this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM));
JPanel northPane = new JPanel(new BorderLayout(4, 0)); JPanel northPane = new JPanel(new BorderLayout(4, 0));
UILabel label1 = new UILabel(Inter.getLocText("ChartF-Series_Name_From") + ":", SwingConstants.RIGHT); UILabel label1 = new UILabel(Inter.getLocText("ChartF-Series_Name_From"));
label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null}));
northPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); northPane.setBorder(BorderFactory.createEmptyBorder(10, 24, 0, 15));
cardPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);
this.add(dataScreeningPane = new ChartDataFilterPane(this.initplot, parent), BorderLayout.SOUTH); dataScreeningPane = new ChartDataFilterPane(this.initplot, parent);
JPanel panel = new UIExpandablePane(Inter.getLocText("FR-Chart-Data_Filter"), 290, 24, dataScreeningPane);
this.add(panel, BorderLayout.SOUTH);
} }
/** /**

6
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java

@ -39,6 +39,11 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
nameArray[i] = np.name; nameArray[i] = np.name;
centerPane.add(np.pane, nameArray[i]); centerPane.add(np.pane, nameArray[i]);
} }
initTabPane();
initLayout();
}
protected void initTabPane() {
if (!paneList.isEmpty()) { if (!paneList.isEmpty()) {
tabPane = new UIHeadGroup(nameArray) { tabPane = new UIHeadGroup(nameArray) {
@Override @Override
@ -48,7 +53,6 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
}; };
centerPane.setBorder(myBorder); centerPane.setBorder(myBorder);
} }
initLayout();
} }
@Override @Override

17
designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java

@ -6,7 +6,6 @@ import com.fr.chart.chartattr.BubblePlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.BubbleTableDefinition; import com.fr.chart.chartdata.BubbleTableDefinition;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -15,6 +14,7 @@ import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -56,20 +56,19 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon
double[] rowSize_north = {p, p, p, p}; double[] rowSize_north = {p, p, p, p};
Component[][] components_north = new Component[][]{ Component[][] components_north = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")+":", SwingConstants.RIGHT), seriesName}, new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")), seriesName},
new Component[]{new UILabel("x :", SwingConstants.RIGHT), xCombox}, new Component[]{new UILabel("x" ), xCombox},
new Component[]{new UILabel("y :", SwingConstants.RIGHT), yCombox}, new Component[]{new UILabel("y"), yCombox},
new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), bubbleSize}, new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), bubbleSize},
}; };
JPanel north = TableLayoutHelper.createTableLayoutPane(components_north,rowSize_north,columnSize_north); JPanel north = TableLayoutHelper.createTableLayoutPane(components_north,rowSize_north,columnSize_north);
north.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); north.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
JPanel filterPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),dataScreeningPane);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{north}, new Component[]{north},
new Component[]{new JSeparator()}, new Component[]{filterPane}
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))},
new Component[]{dataScreeningPane}
}; };

130
designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java

@ -7,29 +7,117 @@ import com.fr.chart.web.ChartHyperRelateFloatLink;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chart.javascript.ChartEmailPane; import com.fr.design.chart.javascript.ChartEmailPane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.fun.HyperlinkProvider; import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.frpane.UICorrelationComboBoxPane; import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.imenutable.UIMenuNameableCreator; import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.design.module.DesignModuleFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.js.*; import com.fr.general.NameObject;
import com.fr.js.EmailJavaScript;
import com.fr.js.FormHyperlinkProvider;
import com.fr.js.JavaScript;
import com.fr.js.JavaScriptImpl;
import com.fr.js.NameJavaScript;
import com.fr.js.NameJavaScriptGroup;
import com.fr.js.ParameterJavaScript;
import com.fr.js.ReportletHyperlink;
import com.fr.js.WebHyperlink;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.other.ChartHyperlinkNameObjectCreartor;
import com.fr.plugin.chart.designer.other.HyperlinkMapFactory; import com.fr.plugin.chart.designer.other.HyperlinkMapFactory;
import com.fr.stable.ListMap;
import com.fr.stable.Nameable;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
* Created by Fangjie on 2016/4/28. * Created by Fangjie on 2016/4/28.
*/ */
public class VanChartHyperLinkPane extends UICorrelationComboBoxPane { public class VanChartHyperLinkPane extends UIListControlPane {
public VanChartHyperLinkPane() { public VanChartHyperLinkPane() {
super(); super();
} }
@Override
public NameableCreator[] createNameableCreators() {
//面板初始化,需要在populate的时候更新
Map<String, NameableCreator> nameCreators = new ListMap<>();
NameableCreator[] creators = DesignModuleFactory.getHyperlinkGroupType().getHyperlinkCreators();
for (NameableCreator creator : creators) {
nameCreators.put(creator.menuName(), creator);
}
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator nc = provider.createHyperlinkCreator();
nameCreators.put(nc.menuName(), nc);
}
return nameCreators.values().toArray(new NameableCreator[nameCreators.size()]);
}
/**
* 弹出列表的标题.
*
* @return 返回标题字符串.
*/
public String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Hyperlink");
}
@Override
protected String getAddItemText() {
return Inter.getLocText("FR-Designer_Add_Hyperlink");
}
public void populate(NameJavaScriptGroup nameHyperlink_array) {
java.util.List<NameObject> list = new ArrayList<NameObject>();
if (nameHyperlink_array != null) {
for (int i = 0; i < nameHyperlink_array.size(); i++) {
list.add(new NameObject(nameHyperlink_array.getNameHyperlink(i).getName(), nameHyperlink_array.getNameHyperlink(i).getJavaScript()));
}
}
this.populate(list.toArray(new NameObject[list.size()]));
}
public void populate(TargetComponent elementCasePane) {
// hyperlinkGroupPaneActionProvider.populate(this, elementCasePane);
}
/**
* updateJs的Group
*
* @return 返回NameJavaScriptGroup
*/
public NameJavaScriptGroup updateJSGroup() {
Nameable[] res = this.update();
NameJavaScript[] res_array = new NameJavaScript[res.length];
for (int i = 0; i < res.length; i++) {
NameObject no = (NameObject) res[i];
res_array[i] = new NameJavaScript(no.getName(), (JavaScript) no.getObject());
}
return new NameJavaScriptGroup(res_array);
}
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
update((VanChartPlot)plot);
}
public void populate(Plot plot) { public void populate(Plot plot) {
this.plot = plot;
HashMap paneMap = getHyperlinkMap(plot); HashMap paneMap = getHyperlinkMap(plot);
//安装平台内打开插件时,添加相应按钮 //安装平台内打开插件时,添加相应按钮
@ -40,20 +128,31 @@ public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
// paneMap.put(nc.getHyperlink(), nc.getUpdatePane()); // paneMap.put(nc.getHyperlink(), nc.getUpdatePane());
} }
//todo@mengao 去掉UIMenuNameableCreator
java.util.List<UIMenuNameableCreator> list = refreshList(paneMap); java.util.List<UIMenuNameableCreator> list = refreshList(paneMap);
refreshMenuAndAddMenuAction(list); ChartHyperlinkNameObjectCreartor[] creators= new ChartHyperlinkNameObjectCreartor[list.size()];
for(int i = 0; list != null && i < list.size(); i++) {
UIMenuNameableCreator uiMenuNameableCreator = list.get(i);
creators[i] = new ChartHyperlinkNameObjectCreartor(uiMenuNameableCreator.getObj(),uiMenuNameableCreator.getName(), uiMenuNameableCreator.getClass(), uiMenuNameableCreator.getPaneClazz());
}
refreshNameableCreator(creators);
java.util.List<NameObject> nameObjects = new ArrayList<NameObject>();
java.util.List<UIMenuNameableCreator> hyperList = new ArrayList<UIMenuNameableCreator>();
NameJavaScriptGroup nameGroup = populateHotHyperLink(plot); NameJavaScriptGroup nameGroup = populateHotHyperLink(plot);
for(int i = 0; nameGroup != null && i < nameGroup.size(); i++) { for(int i = 0; nameGroup != null && i < nameGroup.size(); i++) {
NameJavaScript javaScript = nameGroup.getNameHyperlink(i); NameJavaScript javaScript = nameGroup.getNameHyperlink(i);
if(javaScript != null && javaScript.getJavaScript() != null) { if(javaScript != null && javaScript.getJavaScript() != null) {
JavaScript script = javaScript.getJavaScript(); JavaScript script = javaScript.getJavaScript();
hyperList.add(new UIMenuNameableCreator(javaScript.getName(), script, getUseMap(paneMap, script.getClass()))); UIMenuNameableCreator uiMenuNameableCreator= new UIMenuNameableCreator(javaScript.getName(), script, getUseMap(paneMap, script.getClass()));
nameObjects.add(new NameObject(uiMenuNameableCreator.getName(), uiMenuNameableCreator));
} }
} }
populateBean(hyperList); this.populate(nameObjects.toArray(new NameObject[nameObjects.size()]));
doLayout(); doLayout();
} }
@ -77,14 +176,15 @@ public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
} }
private NameJavaScriptGroup updateNameGroup() { private NameJavaScriptGroup updateNameGroup() {
Nameable[] nameables = update();
NameJavaScriptGroup nameGroup = new NameJavaScriptGroup(); NameJavaScriptGroup nameGroup = new NameJavaScriptGroup();
nameGroup.clear(); nameGroup.clear();
resetItemName(); for(int i = 0; i < nameables.length; i++) {
java.util.List list = updateBean(); UIMenuNameableCreator menu = (UIMenuNameableCreator)((NameObject)nameables[i]).getObject();
for(int i = 0; i < list.size(); i++) {
UIMenuNameableCreator menu = (UIMenuNameableCreator)list.get(i);
NameJavaScript nameJava = new NameJavaScript(menu.getName(), (JavaScript)menu.getObj()); NameJavaScript nameJava = new NameJavaScript(menu.getName(), (JavaScript)menu.getObj());
nameJava.setName(nameables[i].getName());
nameGroup.addNameHyperlink(nameJava); nameGroup.addNameHyperlink(nameJava);
} }
@ -130,4 +230,12 @@ public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
} }
return null; return null;
} }
protected Object getob2Populate (Object ob2Populate) {
if (ob2Populate == null) {
return ob2Populate;
}
return ((UIMenuNameableCreator)ob2Populate).getObj();
}
} }

2
designer_chart/src/com/fr/plugin/chart/custom/other/VanChartCustomInteractivePane.java

@ -32,7 +32,7 @@ public class VanChartCustomInteractivePane extends VanChartInteractivePane {
protected JPanel createHyperlinkPane() { protected JPanel createHyperlinkPane() {
hyperlinkPane = new VanChartCustomPlotHyperlinkPane(); hyperlinkPane = new VanChartCustomPlotHyperlinkPane();
return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane, 0); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane);
} }
@Override @Override

4
designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java

@ -27,4 +27,8 @@ public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
leftcontentPane.setBounds(0, 0, width, height); leftcontentPane.setBounds(0, 0, width, height);
} }
} }
public void reloaPane(JPanel pane){
super.reloaPane(pane);
leftcontentPane.setBorder(BorderFactory.createEmptyBorder());
}
} }

6
designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java

@ -21,7 +21,11 @@ public class TableLayout4VanChartHelper {
public static JPanel createExpandablePaneWithTitle(String title, JPanel panel) { public static JPanel createExpandablePaneWithTitle(String title, JPanel panel) {
return new UIExpandablePane(title, EXPANDABLE_PANE_WIDTH, EXPANDABLE_PANE_HIGHT, panel); return new UIExpandablePane(title, EXPANDABLE_PANE_WIDTH, EXPANDABLE_PANE_HIGHT, panel){
protected void setcontentPanelontentPanelBorder (){
getContentPanel().setBorder(BorderFactory.createEmptyBorder(0 ,10, 0, 15));
}
};
} }
public static JPanel createGapTableLayoutPane(String title, Component component) { public static JPanel createGapTableLayoutPane(String title, Component component) {

37
designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java

@ -6,14 +6,16 @@ import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.style.tooltip.VanChartPlotTooltipPane; import com.fr.plugin.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
@ -35,15 +37,12 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
private VanChart chart; private VanChart chart;
private UIButtonGroup moreLabel; private UIButtonGroup moreLabel;
private UISpinner autoRefreshTime; private UISpinner autoRefreshTime;
private UIButtonGroup autoTooltip; private UICheckBox autoTooltip;
private UIButton tooltipSet; private UIButton tooltipSet;
private JPanel contentPane;
private boolean isLargeModel; private boolean isLargeModel;
public UIButtonGroup getMoreLabel() {
return moreLabel;
}
public UISpinner getAutoRefreshTime() { public UISpinner getAutoRefreshTime() {
return autoRefreshTime; return autoRefreshTime;
} }
@ -66,7 +65,7 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
autoRefreshTime = new UISpinner(0, Integer.MAX_VALUE, 1, 0); autoRefreshTime = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
autoTooltip = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); autoTooltip = new UICheckBox(Inter.getLocText("Plugin-ChartF_Auto_Tooltip"));
autoTooltip.addChangeListener(new ChangeListener() { autoTooltip.addChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
@ -80,24 +79,26 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
jPanel.add(autoTooltip, BorderLayout.CENTER); jPanel.add(autoTooltip, BorderLayout.CENTER);
jPanel.add(tooltipSet, BorderLayout.EAST); jPanel.add(tooltipSet, BorderLayout.EAST);
JPanel moreLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_More_Label"), moreLabel);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p};
Component[][] components = initComponent(jPanel); Component[][] components = initComponent(jPanel);
JPanel temp = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
content.add(temp, BorderLayout.CENTER); content.add(moreLabelPane, BorderLayout.NORTH);
content.add(contentPane, BorderLayout.CENTER);
return content; return content;
} }
protected Component[][] initComponent(JPanel autoTooltipPane){ protected Component[][] initComponent(JPanel autoTooltipPane){
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_More_Label")), moreLabel},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), autoRefreshTime}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), autoRefreshTime},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Auto_Tooltip")), autoTooltipPane}, new Component[]{autoTooltip, tooltipSet},
}; };
} }
@ -131,19 +132,19 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
protected void layoutContentPane() { protected void layoutContentPane() {
leftcontentPane = createContentPane(); leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0));
this.add(leftcontentPane); this.add(leftcontentPane);
} }
public void checkRefreshEnable() { public void checkRefreshEnable() {
Boolean enable = moreLabel.getSelectedIndex() == 0; Boolean enable = moreLabel.getSelectedIndex() == 0;
autoRefreshTime.setEnabled(enable); contentPane.setVisible(enable);
autoTooltip.setEnabled(enable && !isLargeModel); autoTooltip.setEnabled(enable && !isLargeModel);
checkTooltipEnable(); checkTooltipEnable();
} }
public void checkTooltipEnable() { public void checkTooltipEnable() {
Boolean enable = moreLabel.getSelectedIndex() == 0 && autoTooltip.getSelectedIndex() == 0; Boolean enable = moreLabel.getSelectedIndex() == 0 && autoTooltip.isSelected();
tooltipSet.setEnabled(enable && !isLargeModel); tooltipSet.setEnabled(enable && !isLargeModel);
} }
@ -152,7 +153,7 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
public void populateBean(RefreshMoreLabel refreshMoreLabel) { public void populateBean(RefreshMoreLabel refreshMoreLabel) {
moreLabel.setSelectedIndex(refreshMoreLabel.isMoreLabel() ? 0 : 1); moreLabel.setSelectedIndex(refreshMoreLabel.isMoreLabel() ? 0 : 1);
populateAutoRefreshTime(); populateAutoRefreshTime();
autoTooltip.setSelectedIndex(refreshMoreLabel.isAutoTooltip() ? 0 : 1); autoTooltip.setSelected(refreshMoreLabel.isAutoTooltip());
checkRefreshEnable(); checkRefreshEnable();
@ -173,7 +174,7 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
} }
protected void updateAutoTooltip(RefreshMoreLabel refreshMoreLabel) { protected void updateAutoTooltip(RefreshMoreLabel refreshMoreLabel) {
refreshMoreLabel.setAutoTooltip(autoTooltip.getSelectedIndex() == 0); refreshMoreLabel.setAutoTooltip(autoTooltip.isSelected());
} }

1
designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPaneWithoutTooltip.java

@ -19,7 +19,6 @@ public class AutoRefreshPaneWithoutTooltip extends AutoRefreshPane {
protected Component[][] initComponent(JPanel autoTooltipPane){ protected Component[][] initComponent(JPanel autoTooltipPane){
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_More_Label")), getMoreLabel()},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), getAutoRefreshTime()} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), getAutoRefreshTime()}
}; };
} }

84
designer_chart/src/com/fr/plugin/chart/designer/other/ChartConditionNameObjectCreator.java

@ -0,0 +1,84 @@
package com.fr.plugin.chart.designer.other;
import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.UnrepeatedNameHelper;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.designer.component.ConditionUIMenuNameableCreator;
import com.fr.stable.Nameable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
/**
* Created by mengao on 2017/8/18.
*/
public class ChartConditionNameObjectCreator extends NameObjectCreator {
private BasePlot plot;
private ConditionUIMenuNameableCreator conditionUIMenuNameableCreator;
public ChartConditionNameObjectCreator(BasePlot plot, String menuName, Class clazz, Class<? extends BasicBeanPane> updatePane) {
super(menuName, clazz, updatePane);
this.plot = plot;
}
/**
* create Nameable
*
* @param helper
* @return
*/
public Nameable createNameable(UnrepeatedNameHelper helper) {
Constructor<? extends ConditionUIMenuNameableCreator> constructor = null;
try {
constructor = clazzOfInitCase.getConstructor(Plot.class, String.class, Object.class, Class.class);
ConditionUIMenuNameableCreator conditionUIMenuNameableCreator = constructor.newInstance(plot, Inter.getLocText("Chart-Condition_Attributes"), new ConditionAttr(), getUpdatePane());
return new NameObject(helper.createUnrepeatedName(this.menuName()), conditionUIMenuNameableCreator);
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
/**
* @param ob
* @return
*/
public Object acceptObject2Populate(Object ob) {
if (ob instanceof NameObject) {
ob = ((NameObject) ob).getObject();
}
if (clazzOfObject != null && clazzOfObject.isInstance(ob)) {
doSthChanged4Icon(ob);
conditionUIMenuNameableCreator = (ConditionUIMenuNameableCreator) ((ConditionUIMenuNameableCreator) ob).clone();
return ob;
}
return null;
}
/**
* save update bean
*
* @param wrapper
* @param bean
*/
public void saveUpdatedBean(ListModelElement wrapper, Object bean) {
conditionUIMenuNameableCreator.setObj(bean);
((NameObject) wrapper.wrapper).setObject(conditionUIMenuNameableCreator);
}
}

84
designer_chart/src/com/fr/plugin/chart/designer/other/ChartHyperlinkNameObjectCreartor.java

@ -0,0 +1,84 @@
package com.fr.plugin.chart.designer.other;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.UnrepeatedNameHelper;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.general.NameObject;
import com.fr.stable.Nameable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
/**
* Created by mengao on 2017/8/21.
*/
public class ChartHyperlinkNameObjectCreartor extends NameObjectCreator {
private Object object;
private UIMenuNameableCreator uIMenuNameableCreator;
public ChartHyperlinkNameObjectCreartor(Object object, String menuName, Class clazz, Class<? extends BasicBeanPane> updatePane) {
super(menuName, clazz, updatePane);
this.object = object;
}
/**
* create Nameable
*
* @param helper
* @return
*/
public Nameable createNameable(UnrepeatedNameHelper helper) {
Constructor<? extends UIMenuNameableCreator> constructor = null;
try {
constructor = clazzOfInitCase.getConstructor(String.class, Object.class, Class.class);
UIMenuNameableCreator uIMenuNameableCreator = constructor.newInstance(menuName, object, getUpdatePane());
return new NameObject(helper.createUnrepeatedName(this.menuName()), uIMenuNameableCreator);
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
/**
* @param ob
* @return
*/
public Object acceptObject2Populate(Object ob) {
if (ob instanceof NameObject) {
ob = ((NameObject) ob).getObject();
}
if (clazzOfObject != null && clazzOfObject.isInstance(ob)) {
doSthChanged4Icon(ob);
uIMenuNameableCreator = ((UIMenuNameableCreator) ob).clone();
if (uIMenuNameableCreator.getObj() != null && object.getClass().isInstance(uIMenuNameableCreator.getObj())) {
return ob;
}
}
return null;
}
/**
* save update bean
*
* @param wrapper
* @param bean
*/
public void saveUpdatedBean(ListModelElement wrapper, Object bean) {
uIMenuNameableCreator.setObj(bean);
((NameObject) wrapper.wrapper).setObject(uIMenuNameableCreator);
}
}

46
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java

@ -4,10 +4,12 @@ import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.UICorrelationComboBoxPane; import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.imenutable.UIMenuNameableCreator; import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.designer.component.ConditionUIMenuNameableCreator; import com.fr.plugin.chart.designer.component.ConditionUIMenuNameableCreator;
import com.fr.stable.Nameable;
import java.awt.*; import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
@ -20,18 +22,8 @@ import java.util.List;
public class VanChartConditionAttrContentPane extends AbstractConditionAttrContentPane{ public class VanChartConditionAttrContentPane extends AbstractConditionAttrContentPane{
private static final Dimension DIALOG_SIZE = new Dimension(500, 600); private static final Dimension DIALOG_SIZE = new Dimension(500, 600);
private UICorrelationComboBoxPane conditionPane; private UIListControlPane conditionPane;
public VanChartConditionAttrContentPane() { public VanChartConditionAttrContentPane() {
if (conditionPane == null) {
conditionPane = new UICorrelationComboBoxPane(){
protected Dimension getDialogSize() {
return DIALOG_SIZE;
}
};
}
this.setLayout(new BorderLayout());
this.add(conditionPane, BorderLayout.CENTER);
} }
public void populateBean(Plot plot, Class<? extends ConditionAttributesPane> showPane) { public void populateBean(Plot plot, Class<? extends ConditionAttributesPane> showPane) {
@ -41,19 +33,28 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
} }
public void populateBean(Plot plot, ConditionCollection collection, Class<? extends ConditionAttributesPane> showPane){ public void populateBean(Plot plot, ConditionCollection collection, Class<? extends ConditionAttributesPane> showPane){
if (conditionPane == null) {
conditionPane = new VanChartListControlPane(plot);
}
this.setLayout(new BorderLayout());
this.add(conditionPane, BorderLayout.CENTER);
//todo@mango
List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>(); List<UIMenuNameableCreator> list = new ArrayList<UIMenuNameableCreator>();
list.add(new ConditionUIMenuNameableCreator(plot, Inter.getLocText("Chart-Condition_Attributes"), new ConditionAttr(), showPane)); list.add(new ConditionUIMenuNameableCreator(plot, Inter.getLocText("Chart-Condition_Attributes"), new ConditionAttr(), showPane));
conditionPane.refreshMenuAndAddMenuAction(list);
List<UIMenuNameableCreator> valueList = new ArrayList<UIMenuNameableCreator>(); NameObject[] nameables = new NameObject[collection.getConditionAttrSize()];
for(int i = 0; i < collection.getConditionAttrSize(); i++) { for(int i = 0; i < collection.getConditionAttrSize(); i++) {
valueList.add(new ConditionUIMenuNameableCreator(plot, collection.getConditionAttr(i).getName(), collection.getConditionAttr(i), showPane)); ConditionUIMenuNameableCreator c =new ConditionUIMenuNameableCreator(plot, collection.getConditionAttr(i).getName(), collection.getConditionAttr(i), showPane);
nameables[i]=(new NameObject(c.getName(),c));
} }
conditionPane.populateBean(valueList); conditionPane.populate(nameables);
conditionPane.doLayout(); conditionPane.doLayout();
} }
@ -62,14 +63,17 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
update(cc); update(cc);
} }
public void update(ConditionCollection cc){
List<UIMenuNameableCreator> list = conditionPane.updateBean();
public void update(ConditionCollection cc) {
Nameable[] nameables = conditionPane.update();
cc.clearConditionAttr(); cc.clearConditionAttr();
for(UIMenuNameableCreator creator : list){ for (int i = 0; i < nameables.length; i++) {
ConditionAttr ca = (ConditionAttr)creator.getObj(); if (nameables[i] instanceof UIMenuNameableCreator) {
ca.setName(creator.getName()); UIMenuNameableCreator uiMenuNameableCreator = (UIMenuNameableCreator) nameables[i];
ConditionAttr ca = (ConditionAttr) uiMenuNameableCreator.getObj();
ca.setName(uiMenuNameableCreator.getName());
cc.addConditionAttr(ca); cc.addConditionAttr(ca);
} }
} }
}
} }

8
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrPane.java

@ -4,15 +4,15 @@ import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import javax.swing.*; import javax.swing.*;
//条件属性 //条件属性
public class VanChartConditionAttrPane extends BasicScrollPane<Chart> { public class VanChartConditionAttrPane extends AbstractVanChartScrollPane<Chart> {
private static final long serialVersionUID = 5725969986029470291L; private static final long serialVersionUID = 5725969986029470291L;
private AbstractConditionAttrContentPane conditionAttrContentPane; private VanChartConditionAttrContentPane conditionAttrContentPane;
public VanChartConditionAttrPane() { public VanChartConditionAttrPane() {
super(); super();
@ -27,7 +27,7 @@ public class VanChartConditionAttrPane extends BasicScrollPane<Chart> {
return conditionAttrContentPane; return conditionAttrContentPane;
} }
protected AbstractConditionAttrContentPane createConditionAttrContentPane() { protected VanChartConditionAttrContentPane createConditionAttrContentPane() {
return new VanChartConditionAttrContentPane(); return new VanChartConditionAttrContentPane();
} }

74
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java

@ -4,7 +4,6 @@ import com.fr.base.Formula;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
@ -12,7 +11,6 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
@ -23,6 +21,7 @@ import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.base.VanChartZoom; import com.fr.plugin.chart.base.VanChartZoom;
import com.fr.plugin.chart.custom.component.VanChartHyperLinkPane; import com.fr.plugin.chart.custom.component.VanChartHyperLinkPane;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
@ -33,7 +32,7 @@ import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
public class VanChartInteractivePane extends BasicScrollPane<Chart> { public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
private static final long serialVersionUID = 8135452818502145597L; private static final long serialVersionUID = 8135452818502145597L;
private static final int AUTO_REFRESH_LEFT_GAP = 18; private static final int AUTO_REFRESH_LEFT_GAP = 18;
@ -43,7 +42,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
protected UICheckBox fullScreenDisplay; protected UICheckBox fullScreenDisplay;
protected UIToggleButton collapse; protected UIToggleButton collapse;
protected UIToggleButton isChartAnimation; protected UIButtonGroup isChartAnimation;
//坐标轴翻转属性 //坐标轴翻转属性
private UIButtonGroup<Integer> axisRotation; private UIButtonGroup<Integer> axisRotation;
@ -56,6 +55,8 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
private TinyFormulaPane from; private TinyFormulaPane from;
private TinyFormulaPane to; private TinyFormulaPane to;
private UIButtonGroup<String> zoomType; private UIButtonGroup<String> zoomType;
private JPanel changeEnablePane;
private JPanel zoomTypePane;
protected VanChartHyperLinkPane superLink; protected VanChartHyperLinkPane superLink;
@ -89,22 +90,15 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p};
JSeparator jSeparator4Zoom = plot.isSupportZoomDirection() ? new JSeparator() : null;
JSeparator jSeparator4AxisRotation = plot.getAxisPlotType() == AxisPlotType.RECTANGLE ? new JSeparator() : null;
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createToolBarPane(new double[]{p,p,p,p,p}, columnSize),null}, new Component[]{createToolBarPane(new double[]{p,p,p,p,p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAnimationPane(),null}, new Component[]{createAnimationPane(),null},
new Component[]{new JSeparator(),null}, new Component[]{createAxisRotationPane(new double[]{p,p}, columnSize, plot),null},
new Component[]{createAxisRotationPane(new double[]{p}, columnSize, plot),null},
new Component[]{jSeparator4AxisRotation,null},
new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null},
new Component[]{jSeparator4Zoom,null},
new Component[]{createAutoRefreshPane(plot),null}, new Component[]{createAutoRefreshPane(plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createHyperlinkPane(),null} new Component[]{createHyperlinkPane(),null}
}; };
@ -122,18 +116,18 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
zoomType = new UIButtonGroup(getNameArray(), getValueArray()); zoomType = new UIButtonGroup(getNameArray(), getValueArray());
zoomGesture = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); zoomGesture = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
JPanel zoomWidgetPane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_ZoomWidget"), zoomWidget); JPanel zoomWidgetPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomWidget"), zoomWidget);
JPanel zoomGesturePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_ZoomGesture"), zoomGesture); JPanel zoomGesturePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomGesture"), zoomGesture);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Change")), zoomResize}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_WidgetBoundary")), zoomResize},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_From")), from}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_From")), from},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_To")), to}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_To")), to},
}; };
JPanel temp = TableLayoutHelper.createTableLayoutPane(components, row, col); changeEnablePane = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel changeEnablePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_WidgetBoundary"), temp); changeEnablePane.setBorder(BorderFactory.createEmptyBorder(10,15,0,0));
zoomTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType);
JPanel zoomTypePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); zoomTypePane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot); JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot);
zoomWidget.addActionListener(new ActionListener() { zoomWidget.addActionListener(new ActionListener() {
@Override @Override
@ -141,7 +135,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
checkZoomPane(); checkZoomPane();
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Use_Zoom"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Use_Zoom"), panel);
} }
protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) { protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) {
@ -161,10 +155,11 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"), axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"),
Inter.getLocText("Plugin-ChartF_Close")}); Inter.getLocText("Plugin-ChartF_Close")});
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel("", SwingConstants.RIGHT),axisRotation} new Component[]{null,null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Reversal")),axisRotation}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis_Rotation") + ":", panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis"), panel);
} }
protected String[] getNameArray() { protected String[] getNameArray() {
@ -186,16 +181,16 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
Component[][] components = createToolBarComponents(); Component[][] components = createToolBarComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ToolBar"), panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ToolBar"), panel);
} }
protected Component[][] createToolBarComponents() { protected Component[][] createToolBarComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{isSort, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),isSort},
new Component[]{exportImages, null}, new Component[]{null, exportImages},
new Component[]{fullScreenDisplay, null}, new Component[]{null, fullScreenDisplay},
new Component[]{collapse, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_layout")),collapse},
}; };
} }
@ -209,15 +204,16 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
protected JPanel createAnimationPane(){ protected JPanel createAnimationPane(){
isChartAnimation = new UIToggleButton(Inter.getLocText("Plugin-ChartF_OpenAnimation")); isChartAnimation = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Animation"), isChartAnimation); JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Animation_Effects"), isChartAnimation);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Animation"), panel);
} }
protected JPanel createAutoRefreshPane(VanChartPlot plot){ protected JPanel createAutoRefreshPane(VanChartPlot plot){
autoRefreshPane = getMoreLabelPane(plot); autoRefreshPane = getMoreLabelPane(plot);
return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Moniter_refresh"), autoRefreshPane, AUTO_REFRESH_LEFT_GAP); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Moniter_refresh"), autoRefreshPane);
} }
protected AutoRefreshPane getMoreLabelPane(VanChartPlot plot) { protected AutoRefreshPane getMoreLabelPane(VanChartPlot plot) {
@ -227,16 +223,14 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
protected JPanel createHyperlinkPane() { protected JPanel createHyperlinkPane() {
superLink = new VanChartHyperLinkPane(); superLink = new VanChartHyperLinkPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), superLink); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), superLink);
} }
private void checkZoomPane() { private void checkZoomPane() {
boolean zoomWidgetEnabled = zoomWidget.getSelectedIndex() == 0; boolean zoomWidgetEnabled = zoomWidget.getSelectedIndex() == 0;
zoomResize.setEnabled(zoomWidgetEnabled); changeEnablePane.setVisible(zoomWidgetEnabled);
GUICoreUtils.setEnabled(from, zoomWidgetEnabled); zoomTypePane.setVisible(!zoomWidgetEnabled);
GUICoreUtils.setEnabled(to, zoomWidgetEnabled);
zoomType.setEnabled(!zoomWidgetEnabled);
} }
@Override @Override
@ -307,7 +301,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
private void populateChartAnimate(Chart chart, Plot plot) { private void populateChartAnimate(Chart chart, Plot plot) {
if(plot.isSupportAnimate()) { if(plot.isSupportAnimate()) {
isChartAnimation.setSelected(chart.isJSDraw()); isChartAnimation.setSelectedIndex(chart.isJSDraw() ? 0 : 1);
isChartAnimation.setEnabled(!largeModel(plot)); isChartAnimation.setEnabled(!largeModel(plot));
} }
} }
@ -410,7 +404,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
private void updateChartAnimate(Chart chart, Plot plot) { private void updateChartAnimate(Chart chart, Plot plot) {
if(plot.isSupportAnimate()) { if(plot.isSupportAnimate()) {
chart.setJSDraw(isChartAnimation.isSelected()); chart.setJSDraw(isChartAnimation.getSelectedIndex()==0);
} }
} }

102
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartListControlPane.java

@ -0,0 +1,102 @@
package com.fr.plugin.chart.designer.other;
import com.fr.base.chart.BasePlot;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.design.mainframe.DesignerContext;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.component.ConditionUIMenuNameableCreator;
import com.fr.stable.Nameable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
/**
* Created by mengao on 2017/8/18.
*/
public class VanChartListControlPane extends UIListControlPane {
public VanChartListControlPane(BasePlot plot) {
super(plot);
}
@Override
public void populate(Nameable[] nameableArray) {
initComponentPane();
super.populate(nameableArray);
}
@Override
public NameableCreator[] createNameableCreators() {
return new ChartConditionNameObjectCreator[]{new ChartConditionNameObjectCreator(this.plot, Inter.getLocText("Condition_Attributes"), ConditionUIMenuNameableCreator.class, ChartTypeInterfaceManager.getInstance().getPlotConditionPane((Plot) plot).getClass())};
}
protected BasicBeanPane createPaneByCreators(NameableCreator creator) {
Constructor<? extends BasicBeanPane> constructor = null;
try {
constructor = creator.getUpdatePane().getConstructor(Plot.class);
return constructor.newInstance(plot);
} catch (InstantiationException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
return null;
}
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
updateConditionCollection(((VanChartPlot) plot).getConditionCollection());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
@Override
public String getAddItemText() {
return Inter.getLocText("FR-Designer_Add_Condition");
}
@Override
public String title4PopupWindow() {
return Inter.getLocText("Condition_Attributes");
}
protected Object getob2Populate(Object ob2Populate) {
return ((ConditionUIMenuNameableCreator) ob2Populate).getObj();
}
/**
* Update.
*/
public void updateConditionCollection(ConditionCollection cc) {
Nameable[] nameables = this.update();
cc.clearConditionAttr();
for (int i = 0; i < nameables.length; i++) {
UIMenuNameableCreator uiMenuNameableCreator = (UIMenuNameableCreator) ((NameObject) nameables[i]).getObject();
ConditionAttr ca = (ConditionAttr) uiMenuNameableCreator.getObj();
ca.setName(nameables[i].getName());
cc.addConditionAttr(ca);
}
}
}

44
designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java

@ -1,5 +1,6 @@
package com.fr.plugin.chart.drillmap.designer.other; package com.fr.plugin.chart.drillmap.designer.other;
import com.fr.chart.base.DrillMapTools;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -11,7 +12,6 @@ import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.background.VanChartBackgroundPaneWithOutImageAndShadow; import com.fr.plugin.chart.designer.component.background.VanChartBackgroundPaneWithOutImageAndShadow;
import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom;
import com.fr.chart.base.DrillMapTools;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import javax.swing.*; import javax.swing.*;
@ -36,16 +36,11 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{createToolBarPane(rowSize, columnSize),null}, new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAnimationPane(),null}, new Component[]{createAnimationPane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createDrillToolsPane(), null}, new Component[]{createDrillToolsPane(), null},
new Component[]{new JSeparator(), null},
new Component[]{createAutoRefreshPane(plot),null}, new Component[]{createAutoRefreshPane(plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createHyperlinkPane(),null} new Component[]{createHyperlinkPane(),null}
}; };
@ -54,18 +49,27 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
private JPanel createDrillToolsPane() { private JPanel createDrillToolsPane() {
openOrClose = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); openOrClose = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
textAttrPane = new ChartTextAttrPane(); textAttrPane = new ChartTextAttrPane(){
backgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow(); protected Component[][] getComponents(JPanel buttonPane) {
selectBackgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow(); return new Component[][]{
new Component[]{null},
new Component[]{fontNameComboBox},
new Component[]{buttonPane}
};
}
};
backgroundPane = new VanChartBackgroundPane4DrillMap();
selectBackgroundPane = new VanChartBackgroundPane4DrillMap();
catalogSuperLink = new VanChartCatalogHyperLinkPane(); catalogSuperLink = new VanChartCatalogHyperLinkPane();
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {f}; double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{openOrClose}, new Component[]{openOrClose},
new Component[]{createTitlePane(Inter.getLocText("FR-Designer-Widget_Style"), textAttrPane)}, new Component[]{createTitlePane(Inter.getLocText("Plugin-Chart_Character"), textAttrPane)},
new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane)}, new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane)},
new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Select_Color"), selectBackgroundPane)}, new Component[]{createTitlePane(Inter.getLocText("Plugin-ChartF_Select_Color"), selectBackgroundPane)},
new Component[]{createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), catalogSuperLink)} new Component[]{createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), catalogSuperLink)}
@ -79,11 +83,11 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill_Dir"), drillPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Drill_Dir"), drillPane);
} }
private JPanel createTitlePane(String title, Component component) { private JPanel createTitlePane(String title, Component component) {
return TableLayout4VanChartHelper.createTitlePane(title, component, 20); return TableLayout4VanChartHelper.createGapTableLayoutPane(title, component);
} }
private void checkEnable() { private void checkEnable() {
@ -133,4 +137,16 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
catalogSuperLink.update(plot); catalogSuperLink.update(plot);
} }
} }
public class VanChartBackgroundPane4DrillMap extends VanChartBackgroundPaneWithOutImageAndShadow{
@Override
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{null},
new Component[]{typeComboBox},
new Component[]{centerPane},
new Component[]{transparent},
};
}
}
} }

2
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java

@ -5,6 +5,7 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa
import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataContentPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataContentPane;
import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataProjectPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataProjectPane;
import javax.swing.*;
import java.awt.*; import java.awt.*;
/** /**
@ -18,6 +19,7 @@ public class GanttPlotReportDataContentPane extends AbstractReportDataContentPan
public GanttPlotReportDataContentPane() { public GanttPlotReportDataContentPane() {
initComponent(); initComponent();
this.setLayout(new BorderLayout(0, V_GAP)); this.setLayout(new BorderLayout(0, V_GAP));
projectPane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(projectPane, BorderLayout.NORTH); this.add(projectPane, BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER); this.add(contentPane, BorderLayout.CENTER);
} }

5
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java

@ -5,6 +5,7 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane
import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataContentPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataContentPane;
import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataProjectPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataProjectPane;
import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.util.List; import java.util.List;
@ -19,8 +20,10 @@ public class GanttPlotTableDataContentPane extends AbstractTableDataContentPane
public GanttPlotTableDataContentPane() { public GanttPlotTableDataContentPane() {
initComponent(); initComponent();
this.setLayout(new BorderLayout(0, V_GAP)); this.setLayout(new BorderLayout(0, V_GAP));
projectPane.setBorder(BorderFactory.createEmptyBorder(0,17,0,15));
this.add(projectPane, BorderLayout.NORTH); this.add(projectPane, BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER); this.add(new JSeparator(), BorderLayout.CENTER);
this.add(contentPane, BorderLayout.SOUTH);
} }
private void initComponent() { private void initComponent() {

2
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java

@ -33,7 +33,7 @@ public abstract class ComboBoxWithButtonPane extends JPanel {
button.setPreferredSize(new Dimension(20, 20)); button.setPreferredSize(new Dimension(20, 20));
button.addActionListener(getButtonListener()); button.addActionListener(getButtonListener());
UILabel title = new UILabel(getTitleText(), SwingConstants.RIGHT); UILabel title = new UILabel(getTitleText());
title.setPreferredSize(new Dimension(60, 20)); title.setPreferredSize(new Dimension(60, 20));
this.setLayout(new BorderLayout(H_GAP, 0)); this.setLayout(new BorderLayout(H_GAP, 0));

8
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java

@ -28,7 +28,11 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
public GanttReportDataContentPane() { public GanttReportDataContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
initAllComponent(); initAllComponent();
this.add(getContentPane(), BorderLayout.CENTER); JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }
private void initAllComponent() { private void initAllComponent() {
@ -51,7 +55,7 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(title + ":", SwingConstants.RIGHT); UILabel label = new UILabel(title);
label.setPreferredSize(new Dimension(75, 20)); label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST); this.add(label, BorderLayout.WEST);

26
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java

@ -33,29 +33,27 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{
public GanttTableDataContentPane() { public GanttTableDataContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
initAllComponent(); initAllComponent();
this.add(getContentPane(), BorderLayout.CENTER); JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }
private void initAllComponent() { private void initAllComponent() {
seriesComboBox = new UIComboBox(); seriesComboBox = new UIComboBox();
seriesComboBox.setPreferredSize(new Dimension(100,20));
startTimeComboBox = new UIComboBox(); startTimeComboBox = new UIComboBox();
startTimeComboBox.setPreferredSize(new Dimension(100,20));
endTimeComboBox = new UIComboBox(); endTimeComboBox = new UIComboBox();
endTimeComboBox.setPreferredSize(new Dimension(100,20));
markerTimeComboBox = new UIComboBox(); markerTimeComboBox = new UIComboBox();
markerTimeComboBox.setPreferredSize(new Dimension(100,20));
markerTimeComboBox.addItem(NONE); markerTimeComboBox.addItem(NONE);
processComboBox = new UIComboBox(); processComboBox = new UIComboBox();
processComboBox.setPreferredSize(new Dimension(100,20));
processComboBox.addItem(NONE); processComboBox.addItem(NONE);
taskIDComboBox = new UIComboBox(); taskIDComboBox = new UIComboBox();
taskIDComboBox.setPreferredSize(new Dimension(100,20));
taskIDComboBox.addItem(NONE); taskIDComboBox.addItem(NONE);
taskIDComboBox.setToolTipText(Inter.getLocText("Plugin-ChartF_Task_ID_Tooltip")); taskIDComboBox.setToolTipText(Inter.getLocText("Plugin-ChartF_Task_ID_Tooltip"));
} }
@ -67,15 +65,15 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{
double[] col = {p,f}; double[] col = {p,f};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")+":", SwingConstants.RIGHT), seriesComboBox}, new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")), seriesComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Time")+":", SwingConstants.RIGHT), startTimeComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Time")), startTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Time")+":", SwingConstants.RIGHT), endTimeComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Time")), endTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Marker_Time")+":", SwingConstants.RIGHT), markerTimeComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Marker_Time")), markerTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Process")+":", SwingConstants.RIGHT), processComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Process")), processComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Task_ID")+":", SwingConstants.RIGHT), taskIDComboBox} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Task_ID")), taskIDComboBox}
}; };
return TableLayoutHelper.createTableLayoutPane(components, row, col); return TableLayoutHelper.createGapTableLayoutPane(components, row, col,24,6);
} }
@Override @Override

2
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java

@ -38,7 +38,7 @@ public class GanttTableDataProjectPane extends AbstractTableDataContentPane impl
projectName = new ComboBoxWithButtonPane(){ projectName = new ComboBoxWithButtonPane(){
@Override @Override
protected String getTitleText() { protected String getTitleText() {
return Inter.getLocText("Plugin-ChartF_Project_Name") + ":"; return Inter.getLocText("Plugin-ChartF_Project_Name");
} }
@Override @Override

2
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java

@ -27,7 +27,7 @@ public abstract class TinyFormulaWithButtonPane extends JPanel implements UIObse
} }
public TinyFormulaWithButtonPane(String text, String iconUrl) { public TinyFormulaWithButtonPane(String text, String iconUrl) {
editLabel = new UIEditLabel(text,SwingConstants.RIGHT){ editLabel = new UIEditLabel(text,SwingConstants.LEFT){
protected void doAfterMousePress(){ protected void doAfterMousePress(){
clearAllBackground(); clearAllBackground();
} }

7
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java

@ -25,8 +25,9 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
public GanttLinkReportDataContentPane() { public GanttLinkReportDataContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
initAllComponent(); initAllComponent();
this.add(getContentPane(), BorderLayout.CENTER); JPanel panel = getContentPane();
} panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER); }
private void initAllComponent() { private void initAllComponent() {
startTaskID = createTinyFormulaPaneWithTitle(Inter.getLocText("Plugin-ChartF_Start_Task_ID")); startTaskID = createTinyFormulaPaneWithTitle(Inter.getLocText("Plugin-ChartF_Start_Task_ID"));
@ -42,7 +43,7 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(title + ":", SwingConstants.RIGHT); UILabel label = new UILabel(title );
label.setPreferredSize(new Dimension(75, 20)); label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST); this.add(label, BorderLayout.WEST);

18
designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java

@ -8,7 +8,6 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.gantt.data.VanGanttDefinitionHelper;
import com.fr.plugin.chart.gantt.data.VanGanttLinkTableDefinition; import com.fr.plugin.chart.gantt.data.VanGanttLinkTableDefinition;
import com.fr.plugin.chart.gantt.designer.data.data.GanttDataPaneHelper; import com.fr.plugin.chart.gantt.designer.data.data.GanttDataPaneHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -28,18 +27,19 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane
public GanttLinkTableDataContentPane() { public GanttLinkTableDataContentPane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
initAllComponent(); initAllComponent();
this.add(getContentPane(), BorderLayout.CENTER); JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }
private void initAllComponent() { private void initAllComponent() {
startTaskIDComboBox = new UIComboBox(); startTaskIDComboBox = new UIComboBox();
startTaskIDComboBox.setPreferredSize(new Dimension(100,20));
endTaskIDComboBox = new UIComboBox(); endTaskIDComboBox = new UIComboBox();
endTaskIDComboBox.setPreferredSize(new Dimension(100,20));
linkTypeComboBox = new UIComboBox(); linkTypeComboBox = new UIComboBox();
linkTypeComboBox.setPreferredSize(new Dimension(100,20));
} }
@ -50,12 +50,12 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane
double[] col = {p,f}; double[] col = {p,f};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Task_ID")+":", SwingConstants.RIGHT), startTaskIDComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Task_ID")), startTaskIDComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Task_ID")+":", SwingConstants.RIGHT), endTaskIDComboBox}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Task_ID")), endTaskIDComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Link_Type")+":", SwingConstants.RIGHT), linkTypeComboBox} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Link_Type")), linkTypeComboBox}
}; };
return TableLayoutHelper.createTableLayoutPane(components, row, col); return TableLayoutHelper.createGapTableLayoutPane(components, row, col,24,6);
} }
@Override @Override

2
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java

@ -31,7 +31,7 @@ public class AreaPane extends AbstractReportDataContentPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaName} new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaName}
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
} }

6
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java

@ -2,8 +2,8 @@ package com.fr.plugin.chart.map.designer.data.component.report;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.plugin.chart.map.data.VanMapReportDefinition; import com.fr.plugin.chart.map.data.VanMapReportDefinition;
import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -19,8 +19,8 @@ public class LineMapAreaPane extends PointMapAreaPane {
protected JPanel createContentPane() { protected JPanel createContentPane() {
initAreaPane(); initAreaPane();
initEndAreaPane(); initEndAreaPane();
JPanel panel1 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point")+":", areaPane, LEFT_GAP); JPanel panel1 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point"), areaPane, LEFT_GAP);
JPanel panel2 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point")+":", endAreaPane, LEFT_GAP); JPanel panel2 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point"), endAreaPane, LEFT_GAP);
JPanel content = new JPanel(new BorderLayout(0, V_GAP)); JPanel content = new JPanel(new BorderLayout(0, V_GAP));
content.add(panel1, BorderLayout.NORTH); content.add(panel1, BorderLayout.NORTH);

8
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java

@ -34,11 +34,11 @@ public class LongLatAreaPane extends AreaPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude") + ":", SwingConstants.RIGHT), longitude}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude") + ":", SwingConstants.RIGHT), latitude}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaName} new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaName}
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6);
} }
@Override @Override

4
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java

@ -46,9 +46,9 @@ public class AreaPane extends AbstractTableDataContentPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p}; double[] rowSize = {p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaNameCom} new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaNameCom}
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6);
} }
protected void initAreaNameCom() { protected void initAreaNameCom() {

6
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java

@ -2,8 +2,8 @@ package com.fr.plugin.chart.map.designer.data.component.table;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.plugin.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane; import com.fr.plugin.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
import javax.swing.*; import javax.swing.*;
@ -25,8 +25,8 @@ public class LineMapAreaPane extends PointMapAreaPane {
initAreaPane(parentPane); initAreaPane(parentPane);
initEndAreaPane(parentPane); initEndAreaPane(parentPane);
JPanel startPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point")+":", areaPane, LEFT_GAP); JPanel startPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point"), areaPane, LEFT_GAP);
JPanel endPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point")+":", endAreaPane, LEFT_GAP); JPanel endPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point"), endAreaPane, LEFT_GAP);
JPanel content = new JPanel(new BorderLayout(0, V_GAP)); JPanel content = new JPanel(new BorderLayout(0, V_GAP));
content.add(startPane, BorderLayout.NORTH); content.add(startPane, BorderLayout.NORTH);

8
designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java

@ -36,12 +36,12 @@ public class LongLatAreaPane extends AreaPane {
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude") + ":", SwingConstants.RIGHT), longitudeCom}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitudeCom},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude") + ":", SwingConstants.RIGHT), latitudeCom}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitudeCom},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaNameCom} new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaNameCom}
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6);
} }
public void refreshBoxListWithSelectTableData(List list) { public void refreshBoxListWithSelectTableData(List list) {

3
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java

@ -25,6 +25,7 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte
initAreaName(); initAreaName();
this.add(getContent(), "0,0,2,0"); this.add(getContent(), "0,0,2,0");
this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
} }
protected void initAreaName() { protected void initAreaName() {
@ -33,7 +34,7 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte
protected void initLayout() { protected void initLayout() {
this.setLayout(new BorderLayout(4, 0)); this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT); UILabel label = new UILabel(Inter.getLocText("FR-Chart-Area_Name"));
label.setPreferredSize(new Dimension(75, 20)); label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST); this.add(label, BorderLayout.WEST);

19
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java

@ -2,6 +2,9 @@ package com.fr.plugin.chart.map.designer.data.contentpane.report;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.map.data.VanMapReportDefinition; import com.fr.plugin.chart.map.data.VanMapReportDefinition;
@ -48,6 +51,10 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa
//================================public class=================================== //================================public class===================================
public class LongLatReportFormulaPane extends BasicBeanPane<VanMapReportDefinition> { public class LongLatReportFormulaPane extends BasicBeanPane<VanMapReportDefinition> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
private UIButtonGroup<Integer> locationType; private UIButtonGroup<Integer> locationType;
private JPanel centerPane; private JPanel centerPane;
@ -85,7 +92,17 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa
locationType.setSelectedIndex(0); locationType.setSelectedIndex(0);
this.add(locationType, BorderLayout.NORTH); double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Geographical_Position")),locationType},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,30,6);
this.add(panel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
} }

29
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java

@ -5,9 +5,10 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
@ -33,11 +34,16 @@ public class VanAreaMapPlotTableDataContentPane extends AbstractTableDataContent
initAreaNameCom(); initAreaNameCom();
JPanel areaNamePane = createAreaNamePane(); JPanel areaNamePane = createAreaNamePane();
JSeparator jSeparator = new JSeparator();
areaNamePane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
jSeparator.setPreferredSize(new Dimension(246,2));
this.add(areaNamePane, BorderLayout.CENTER); this.add(areaNamePane, BorderLayout.NORTH);
this.add(jSeparator, BorderLayout.CENTER);
seriesTypeUseComboxPane = new SeriesTypeUseComboxPaneWithOutFilter(parent, new VanChartMapPlot()); seriesTypeUseComboxPane = new SeriesTypeUseComboxPaneWithOutFilter(parent, new VanChartMapPlot());
this.add(seriesTypeUseComboxPane, BorderLayout.SOUTH); this.add(seriesTypeUseComboxPane, BorderLayout.SOUTH);
} }
protected void initAreaNameCom() { protected void initAreaNameCom() {
@ -53,14 +59,21 @@ public class VanAreaMapPlotTableDataContentPane extends AbstractTableDataContent
} }
protected JPanel createAreaNamePane() { protected JPanel createAreaNamePane() {
JPanel areaNamePane = new JPanel(new BorderLayout(4, 0)); UILabel label = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name"));
areaNamePane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); label.setPreferredSize(new Dimension(80, 20));
UILabel label = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT);
label.setPreferredSize(new Dimension(75, 20));
areaNameCom.setPreferredSize(new Dimension(100, 20)); areaNameCom.setPreferredSize(new Dimension(100, 20));
areaNamePane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{areaNameCom, null, null, label, null})); double p = TableLayout.PREFERRED;
return areaNamePane; double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{label, areaNameCom},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
} }
protected void makeToolTipUse(UIComboBox comBox) { protected void makeToolTipUse(UIComboBox comBox) {

17
designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java

@ -2,6 +2,9 @@ package com.fr.plugin.chart.map.designer.data.contentpane.table;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
@ -80,6 +83,10 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData
public LongLatAreaTableComboPane() { public LongLatAreaTableComboPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
this.setLayout(new BorderLayout(0, 5)); this.setLayout(new BorderLayout(0, 5));
centerPane = new JPanel(new CardLayout()){ centerPane = new JPanel(new CardLayout()){
@Override @Override
@ -110,7 +117,15 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData
locationType.setSelectedIndex(0); locationType.setSelectedIndex(0);
this.add(locationType, BorderLayout.NORTH); double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Geographical_Position")),locationType},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,30,6);
this.add(panel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
} }

14
designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrContentPane.java

@ -3,14 +3,18 @@ package com.fr.plugin.chart.map.designer.other;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.plugin.chart.designer.other.AbstractConditionAttrContentPane;
import com.fr.plugin.chart.designer.other.VanChartConditionAttrContentPane; import com.fr.plugin.chart.designer.other.VanChartConditionAttrContentPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.*;
import com.fr.plugin.chart.type.MapMarkerType;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.designer.VanMapAreaAndPointGroupPane; import com.fr.plugin.chart.map.designer.VanMapAreaAndPointGroupPane;
import com.fr.plugin.chart.map.designer.VanMapAreaPointAndLineGroupPane; import com.fr.plugin.chart.map.designer.VanMapAreaPointAndLineGroupPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartBubblePointMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartCommonPointMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartDefaultPointMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartImagePointMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartLineMapConditionPane;
import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartMapConditionPane;
import com.fr.plugin.chart.type.MapMarkerType;
import com.fr.plugin.chart.type.MapType;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -19,7 +23,7 @@ import java.awt.*;
* Created by Mitisky on 16/5/23. * Created by Mitisky on 16/5/23.
* 组合地图时有两个 * 组合地图时有两个
*/ */
public class VanChartMapConditionAttrContentPane extends AbstractConditionAttrContentPane { public class VanChartMapConditionAttrContentPane extends VanChartConditionAttrContentPane {
private VanChartConditionAttrContentPane pointConditionPane; private VanChartConditionAttrContentPane pointConditionPane;
private VanChartConditionAttrContentPane areaConditionPane; private VanChartConditionAttrContentPane areaConditionPane;
private VanChartConditionAttrContentPane lineConditionPane; private VanChartConditionAttrContentPane lineConditionPane;

4
designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrPane.java

@ -1,13 +1,13 @@
package com.fr.plugin.chart.map.designer.other; package com.fr.plugin.chart.map.designer.other;
import com.fr.plugin.chart.designer.other.AbstractConditionAttrContentPane; import com.fr.plugin.chart.designer.other.VanChartConditionAttrContentPane;
import com.fr.plugin.chart.designer.other.VanChartConditionAttrPane; import com.fr.plugin.chart.designer.other.VanChartConditionAttrPane;
/** /**
* Created by Mitisky on 16/5/20. * Created by Mitisky on 16/5/20.
*/ */
public class VanChartMapConditionAttrPane extends VanChartConditionAttrPane{ public class VanChartMapConditionAttrPane extends VanChartConditionAttrPane{
protected AbstractConditionAttrContentPane createConditionAttrContentPane() { protected VanChartConditionAttrContentPane createConditionAttrContentPane() {
return new VanChartMapConditionAttrContentPane(); return new VanChartMapConditionAttrContentPane();
} }
} }

5
designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapInteractivePane.java

@ -2,15 +2,14 @@ package com.fr.plugin.chart.map.designer.other;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.other.AutoRefreshPane; import com.fr.plugin.chart.designer.other.AutoRefreshPane;
import com.fr.plugin.chart.designer.other.AutoRefreshPaneWithoutTooltip; import com.fr.plugin.chart.designer.other.AutoRefreshPaneWithoutTooltip;
import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.*; import javax.swing.*;
@ -24,7 +23,7 @@ public class VanChartMapInteractivePane extends VanChartInteractivePaneWithMapZo
@Override @Override
protected JPanel createHyperlinkPane() { protected JPanel createHyperlinkPane() {
hyperlinkPane = new VanChartMapHyperLinkPane(); hyperlinkPane = new VanChartMapHyperLinkPane();
return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane, HYPERLINK_LEFT_GAP); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane);
} }
@Override @Override
protected void populateHyperlink(Plot plot) { protected void populateHyperlink(Plot plot) {

67
designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -7,6 +7,7 @@ import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.FRTreeComboBox; import com.fr.design.gui.icombobox.FRTreeComboBox;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
@ -81,7 +82,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
private UITextArea attribution; private UITextArea attribution;
private UIComboBox zoomLevel; private UIComboBox zoomLevel;
private UIComboBox viewCenterCom; private UIButtonGroup viewCenterCom;
private JPanel longAndLatPane; private JPanel longAndLatPane;
private UISpinner longitude; private UISpinner longitude;
private UISpinner latitude; private UISpinner latitude;
@ -112,18 +113,20 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
public VanChartMapSourceChoosePane() { public VanChartMapSourceChoosePane() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10,0,0,10)); this.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {226}; double[] columnSize = {246};
double[] rowSize = {p,p,p,p,p,p,p,p}; double[] rowSize = {p,p,p,p,p,p,p,p};
JPanel panel = new JPanel(new BorderLayout());
panel.add(createMapSourcesPane(), BorderLayout.NORTH);
panel.add(createGISLayerPane(), BorderLayout.CENTER);
JPanel BasePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer_Basic"), panel);
Component[][] comps = new Component[][]{ Component[][] comps = new Component[][]{
new Component[]{new JSeparator()}, new Component[]{BasePane},
new Component[]{createMapSourcesPane()},
new Component[]{new JSeparator()},
new Component[]{createGISLayerPane()},
new Component[]{new JSeparator()},
new Component[]{createMapInitStatusPane()} new Component[]{createMapInitStatusPane()}
}; };
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(comps,rowSize,columnSize); JPanel contentPane = TableLayoutHelper.createTableLayoutPane(comps,rowSize,columnSize);
@ -190,7 +193,17 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
sourceComboBox.addPopupMenuListener(popupMenuListener); sourceComboBox.addPopupMenuListener(popupMenuListener);
sourceTitleLabel = createSourceTitleLabel(); sourceTitleLabel = createSourceTitleLabel();
return TableLayout4VanChartHelper.createTableLayoutPaneWithUILabel(sourceTitleLabel, sourceComboBox);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{sourceTitleLabel,sourceComboBox},
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize, columnSize);
} }
private JPanel createGISLayerPane() { private JPanel createGISLayerPane() {
@ -259,7 +272,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
panel.add(gisLayer, BorderLayout.CENTER); panel.add(gisLayer, BorderLayout.CENTER);
panel.add(layerCardPane, BorderLayout.SOUTH); panel.add(layerCardPane, BorderLayout.SOUTH);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Gis_Layer"), panel); return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Gis_Layer"), panel);
} }
private JPanel createCustomTileLayer() { private JPanel createCustomTileLayer() {
@ -391,24 +404,26 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
private JPanel createMapInitStatusPane() { private JPanel createMapInitStatusPane() {
zoomLevel = new UIComboBox(ZOOM_LEVELS); zoomLevel = new UIComboBox(ZOOM_LEVELS);
viewCenterCom = new UIComboBox(new String[]{AUTO_CENTER_STRING, CUSTOM_CENTER_STRING}); viewCenterCom = new UIButtonGroup(new String[]{AUTO_CENTER_STRING, CUSTOM_CENTER_STRING});
longitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0); longitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0);
latitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0); latitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] rowSize = {p,p}; double[] rowSize = {p,p,p};
Component[][] comps = new Component[][]{ Component[][] comps = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer"), SwingConstants.RIGHT), zoomLevel}, new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_View_Center"), SwingConstants.RIGHT), viewCenterCom}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer")), zoomLevel},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_View_Center")), viewCenterCom},
}; };
final JPanel northPane = TableLayoutHelper.createTableLayoutPane(comps,rowSize,COLUMN_SIZE); final JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps,rowSize,COLUMN_SIZE);
Component[][] longAndLatComps = new Component[][]{ Component[][] longAndLatComps = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Longitude"), SwingConstants.RIGHT), longitude}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Latitude"), SwingConstants.RIGHT), latitude} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude}
}; };
longAndLatPane = TableLayoutHelper.createTableLayoutPane(longAndLatComps,rowSize,COLUMN_SIZE); longAndLatPane =TableLayout4VanChartHelper.createGapTableLayoutPane(longAndLatComps,rowSize,COLUMN_SIZE);
longAndLatPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
longAndLatPane.setVisible(false); longAndLatPane.setVisible(false);
JPanel contentPane = new JPanel(new BorderLayout(0, 6)){ JPanel contentPane = new JPanel(new BorderLayout(0, 6)){
@ -425,17 +440,17 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
contentPane.add(northPane, BorderLayout.NORTH); contentPane.add(northPane, BorderLayout.NORTH);
contentPane.add(longAndLatPane, BorderLayout.CENTER); contentPane.add(longAndLatPane, BorderLayout.CENTER);
viewCenterCom.addItemListener(new ItemListener() { viewCenterCom.addActionListener(new ActionListener() {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void actionPerformed(ActionEvent e) {
longAndLatPane.setVisible(!isAutoViewCenter()); longAndLatPane.setVisible(!isAutoViewCenter());
} }
}); });
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Map_Init_Status"), contentPane); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Map_Init_Status"), contentPane);
} }
private boolean isAutoViewCenter() { private boolean isAutoViewCenter() {
return ComparatorUtils.equals(viewCenterCom.getSelectedItem(), AUTO_CENTER_STRING); return viewCenterCom.getSelectedIndex()==0;
} }
private PopupMenuListener popupMenuListener = new PopupMenuListener() { private PopupMenuListener popupMenuListener = new PopupMenuListener() {
@ -534,7 +549,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
private void resetViewCenter(VanChartMapPlot mapPlot) { private void resetViewCenter(VanChartMapPlot mapPlot) {
mapPlot.getViewCenter().setAuto(true); mapPlot.getViewCenter().setAuto(true);
viewCenterCom.setSelectedItem(AUTO_CENTER_STRING); viewCenterCom.setSelectedIndex(0);
} }
private void resetZoomLevel(VanChartMapPlot mapPlot) { private void resetZoomLevel(VanChartMapPlot mapPlot) {
@ -575,15 +590,17 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
ViewCenter viewCenter = mapPlot.getViewCenter(); ViewCenter viewCenter = mapPlot.getViewCenter();
if(viewCenter.isAuto()){ if(viewCenter.isAuto()){
viewCenterCom.setSelectedItem(AUTO_CENTER_STRING); viewCenterCom.setSelectedIndex(0);
longitude.setValue(0); longitude.setValue(0);
latitude.setValue(0); latitude.setValue(0);
} else { } else {
viewCenterCom.setSelectedItem(CUSTOM_CENTER_STRING); viewCenterCom.setSelectedIndex(1);
longitude.setValue(viewCenter.getLongitude()); longitude.setValue(viewCenter.getLongitude());
latitude.setValue(viewCenter.getLatitude()); latitude.setValue(viewCenter.getLatitude());
} }
longAndLatPane.setVisible(!isAutoViewCenter());
checkLayerCardPane(); checkLayerCardPane();
} }

18
designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java

@ -62,7 +62,7 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize_north = {p, f}; double[] columnSize_north = {p, f};
double[] rowSize_north = {p, p}; double[] rowSize_north = {p, p, p};
levelNumEdit = new UISpinner(1, 15, 1, levelNum){ levelNumEdit = new UISpinner(1, 15, 1, levelNum){
@Override @Override
@ -87,8 +87,9 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
nameField.setPreferredSize(new Dimension(WD, HT)); nameField.setPreferredSize(new Dimension(WD, HT));
Component[][] components_north = new Component[][]{ Component[][] components_north = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")+":", SwingConstants.RIGHT), levelNumEdit}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), nameField},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")+":", SwingConstants.RIGHT), nameField}, new Component[]{new JSeparator(), null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")), levelNumEdit},
}; };
return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north); return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north);
@ -115,22 +116,23 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize_center = {p, f}; double[] columnSize_center = {p, f};
double[] rowSize_center = new double[levelNum + 1]; double[] rowSize_center = new double[levelNum + 2];
initLevelNameList(); initLevelNameList();
for (int i = 0; i < levelNum + 1; i++){ for (int i = 0; i < levelNum + 2; i++){
rowSize_center[i] = p; rowSize_center[i] = p;
} }
Component[][] components_center = new Component[levelNum + 1][]; Component[][] components_center = new Component[levelNum + 2][];
for (int i = 0; i < levelNum; i++){ for (int i = 0; i < levelNum; i++){
components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1) +":", SwingConstants.RIGHT), levelNameList.get(i)}; components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1)), levelNameList.get(i)};
} }
value = new TinyFormulaPane(); value = new TinyFormulaPane();
components_center[levelNum] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), value}; components_center[levelNum] = new Component[]{new JSeparator(), null};
components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), value};
registerListener4Center(); registerListener4Center();

20
designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java

@ -84,17 +84,17 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize_center = {p, f}; double[] columnSize_center = {p, f};
double[] rowSize_center = new double[levelNum + 2]; double[] rowSize_center = new double[levelNum + 3];
initLevelNameList(); initLevelNameList();
for (int i = 0; i < levelNum + 2; i++){ for (int i = 0; i < levelNum + 3; i++){
rowSize_center[i] = p; rowSize_center[i] = p;
} }
Component[][] components_center = new Component[levelNum + 2][]; Component[][] components_center = new Component[levelNum + 3][];
for (int i = 0; i < levelNum; i++){ for (int i = 0; i < levelNum; i++){
components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1) +":", SwingConstants.RIGHT), levelNameList.get(i)}; components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1)), levelNameList.get(i)};
} }
value = new UIComboBox(); value = new UIComboBox();
@ -103,8 +103,9 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
calculateCombox.reset(); calculateCombox.reset();
calculateCombox.setPreferredSize(new Dimension(WD, HT)); calculateCombox.setPreferredSize(new Dimension(WD, HT));
components_center[levelNum] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), value}; components_center[levelNum] = new Component[]{new JSeparator(), null};
components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method") + ":", SwingConstants.RIGHT), calculateCombox}; components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), value};
components_center[levelNum+2] = new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox};
initCenterItemListener(); initCenterItemListener();
@ -147,7 +148,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize_north = {p, f}; double[] columnSize_north = {p, f};
double[] rowSize_north = {p, p}; double[] rowSize_north = {p, p, p};
levelNumEdit = new UISpinner(1, 15, 1, levelNum){ levelNumEdit = new UISpinner(1, 15, 1, levelNum){
@Override @Override
@ -173,8 +174,9 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
nameField.setPreferredSize(new Dimension(WD, HT)); nameField.setPreferredSize(new Dimension(WD, HT));
Component[][] components_north = new Component[][]{ Component[][] components_north = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")+":", SwingConstants.RIGHT), levelNumEdit}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), nameField},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")+":", SwingConstants.RIGHT), nameField}, new Component[]{new JSeparator(),null },
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")), levelNumEdit},
}; };
return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north); return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north);

13
designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotReportDataContentPane.java

@ -38,14 +38,15 @@ public class StructurePlotReportDataContentPane extends AbstractReportDataConten
nodeValue = new TinyFormulaPane(); nodeValue = new TinyFormulaPane();
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name"), SwingConstants.RIGHT), nodeName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name")), nodeName},
new Component[]{new UILabel("id", SwingConstants.RIGHT), nodeID}, new Component[]{new UILabel("id"), nodeID},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID"), SwingConstants.RIGHT), parentID}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID")), parentID},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), seriesName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), seriesName},
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value"), SwingConstants.RIGHT), nodeValue}, new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value")), nodeValue},
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);

27
designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java

@ -30,7 +30,8 @@ public class StructurePlotTableDataContentPane extends AbstractTableDataContentP
public StructurePlotTableDataContentPane() { public StructurePlotTableDataContentPane() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {p, p}; double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p};
nodeName = new UIComboBox(); nodeName = new UIComboBox();
@ -40,26 +41,20 @@ public class StructurePlotTableDataContentPane extends AbstractTableDataContentP
nodeValue = new UIComboBox(); nodeValue = new UIComboBox();
calculateCombox = new CalculateComboBox(); calculateCombox = new CalculateComboBox();
nodeName.setPreferredSize(new Dimension(100, 20));
nodeId.setPreferredSize(new Dimension(100, 20));
parenrId.setPreferredSize(new Dimension(100, 20));
seriesName.setPreferredSize(new Dimension(100, 20));
nodeValue.setPreferredSize(new Dimension(100, 20));
calculateCombox.setPreferredSize(new Dimension(100, 20));
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name"), SwingConstants.RIGHT), nodeName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name")), nodeName},
new Component[]{new UILabel("id", SwingConstants.RIGHT), nodeId}, new Component[]{new UILabel("id"), nodeId},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID"), SwingConstants.RIGHT), parenrId}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID")), parenrId},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), seriesName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), seriesName},
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value"), SwingConstants.RIGHT), nodeValue}, new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value")), nodeValue},
new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method"), SwingConstants.RIGHT), calculateCombox} new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }

10
designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java

@ -34,12 +34,14 @@ public class WordCloudPlotReportDataContentPane extends AbstractReportDataConten
wordValue = new TinyFormulaPane(); wordValue = new TinyFormulaPane();
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), name}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), name},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name"), SwingConstants.RIGHT), wordName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name")), wordName},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value"), SwingConstants.RIGHT), wordValue} new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value")), wordValue}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);

21
designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java

@ -28,7 +28,8 @@ public class WordCloudPlotTableDataContentPane extends AbstractTableDataContentP
public WordCloudPlotTableDataContentPane() { public WordCloudPlotTableDataContentPane() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = { p, p }; double f = TableLayout.FILL;
double[] columnSize = { p, f};
double[] rowSize = { p, p, p, p}; double[] rowSize = { p, p, p, p};
name = new UITextField(); name = new UITextField();
@ -37,22 +38,20 @@ public class WordCloudPlotTableDataContentPane extends AbstractTableDataContentP
calculateCombox = new CalculateComboBox(); calculateCombox = new CalculateComboBox();
name.setPreferredSize(new Dimension(100, 20));
wordName.setPreferredSize(new Dimension(100, 20));
wordValue.setPreferredSize(new Dimension(100, 20));
calculateCombox.setPreferredSize(new Dimension(100, 20));
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), name}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), name},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name"), SwingConstants.RIGHT), wordName}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name")), wordName},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value"), SwingConstants.RIGHT), wordValue}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value")), wordValue},
new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method"), SwingConstants.RIGHT), calculateCombox} new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox}
}; };
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
} }
@Override @Override

Loading…
Cancel
Save