Browse Source

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

* commit '0afa354f2f7e7acb674471f12c757cc8a1334d31': (33 commits)
  update
  update
  update
  REPORT-3980 [9.0一轮回归]单元格形态数据字典公式无法保存 REPORT-3981 [9.0一轮回归]插入行策略默认值设置后,切换到其他单元格选择默认值时不为空 修改代码质量
  REPORT-3163 合作开发9.0设计器=>交互验收=》统一改成“事件”
  REPORT-3163 合作开发9.0设计器=>交互验收=》点击插入按钮,带指向箭头的弹窗被关闭了
  REPORT-3163 合作开发9.0设计器=>交互验收=》用不到的属性面板不继承
  REPORT-3163 合作开发9.0设计器=>控件设置事件编辑面板边框调整
  REPORT-3163 合作开发9.0设计器=>弹出框不可用时,显示提示
  REPORT-3163 合作开发9.0设计器=>交互验收=》修复一些bug
  REPORT-3163 合作开发9.0设计器=>交互验收=》弹出的属性面板被弹回后,其对应tab应为选中状态
  REPORT-3163 合作开发9.0设计器=>交互验收=》属性面板弹出时,底部有一个表示可以缩放的控件
  REPORT-3163 合作开发9.0设计器=>交互验收=》鼠标悬停时应无颜色变化
  REPORT-3163 合作开发9.0设计器=>交互验收=》属性面板弹出时,应该有一个统一的固定位置
  REPORT-3163 合作开发9.0设计器=>交互验收=》属性面板弹出时,应该加边框线
  9.0新图表设置面板修改 特效面板修改,其中超链和条件显示的代码需要再整理整理
  REPORT-3983 [9.0一轮回归]选中一片单元格,样式边框外边框、内边框显示异常
  REPORT-3163 合作开发9.0设计器=>交互验收=》属性栏收起,没有tab是选中状态
  REPORT-3163 合作开发9.0设计器=>交互验收=》继承
  REPORT-2354 将原来存在finereportEnv中的登录信息移到config.xml中
  ...
master
xiaoxia 7 years ago
parent
commit
6218dd18f6
  1. 6
      designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java
  2. 5
      designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java
  3. 5
      designer/src/com/fr/design/mainframe/InformationCollector.java
  4. 3
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  5. 8
      designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java
  6. 6
      designer/src/com/fr/design/mainframe/bbs/ExitLabel.java
  7. 26
      designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java
  8. 12
      designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java
  9. 2
      designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java
  10. 2
      designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java
  11. 14
      designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  12. 20
      designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java
  13. 3
      designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java
  14. 10
      designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java
  15. 30
      designer/src/com/fr/design/widget/CellWidgetCardPane.java
  16. 3
      designer/src/com/fr/design/widget/WidgetEventPane.java
  17. 1
      designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  18. 2
      designer/src/com/fr/design/widget/ui/ButtonDefinePane.java
  19. 6
      designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java
  20. 12
      designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java
  21. 6
      designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java
  22. 8
      designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java
  23. 68
      designer_base/src/com/fr/design/DesignerEnvManager.java
  24. 18
      designer_base/src/com/fr/design/actions/file/PreferencePane.java
  25. 31
      designer_base/src/com/fr/design/bbs/BBSLoginUtils.java
  26. 1
      designer_base/src/com/fr/design/constants/UIConstants.java
  27. 36
      designer_base/src/com/fr/design/extra/LoginWebBridge.java
  28. 8
      designer_base/src/com/fr/design/extra/PluginFromStorePane.java
  29. 9
      designer_base/src/com/fr/design/extra/PluginOperateUtils.java
  30. 7
      designer_base/src/com/fr/design/extra/PluginUpdatePane.java
  31. 8
      designer_base/src/com/fr/design/extra/PluginUtils.java
  32. 20
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  33. 19
      designer_base/src/com/fr/design/extra/WebViewDlgHelper.java
  34. 10
      designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java
  35. 4
      designer_base/src/com/fr/design/gui/UIDefaultTheme.java
  36. 12
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  37. 17
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  38. 4
      designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java
  39. 47
      designer_base/src/com/fr/design/gui/itextfield/UIPropertyTextField.java
  40. 14
      designer_base/src/com/fr/design/gui/itextfield/UITextField.java
  41. 14
      designer_base/src/com/fr/design/gui/style/BorderPane.java
  42. BIN
      designer_base/src/com/fr/design/images/buttonicon/minus.png
  43. BIN
      designer_base/src/com/fr/design/images/buttonicon/plus.png
  44. 1
      designer_base/src/com/fr/design/locale/designer.properties
  45. 3
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  46. 3
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  47. 3
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  48. 3
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  49. 3
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  50. 79
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  51. 4
      designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java
  52. 7
      designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java
  53. 28
      designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java
  54. 1
      designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java
  55. 3
      designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java
  56. 11
      designer_base/src/com/fr/design/present/dict/FormulaDictPane.java
  57. 2
      designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java
  58. 1
      designer_base/src/com/fr/design/style/color/ColorSelectDialog.java
  59. 8
      designer_base/src/com/fr/file/FILEChooserPane.java
  60. 172
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  61. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java
  62. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  63. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java
  64. 1
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java
  65. 9
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java
  66. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java
  67. 15
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
  68. 15
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java
  69. 18
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java
  70. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  71. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java
  72. 14
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java
  73. 17
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  74. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java
  75. 18
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java
  76. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java
  77. 6
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java
  78. 17
      designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java
  79. 130
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  80. 2
      designer_chart/src/com/fr/plugin/chart/custom/other/VanChartCustomInteractivePane.java
  81. 4
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  82. 6
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  83. 37
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java
  84. 1
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPaneWithoutTooltip.java
  85. 84
      designer_chart/src/com/fr/plugin/chart/designer/other/ChartConditionNameObjectCreator.java
  86. 84
      designer_chart/src/com/fr/plugin/chart/designer/other/ChartHyperlinkNameObjectCreartor.java
  87. 46
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java
  88. 8
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrPane.java
  89. 74
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java
  90. 102
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartListControlPane.java
  91. 44
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java
  92. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java
  93. 5
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java
  94. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java
  95. 8
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
  96. 26
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java
  97. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java
  98. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java
  99. 7
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
  100. 18
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java
  101. Some files were not shown because too many files have changed in this diff Show More

6
designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java

@ -89,14 +89,10 @@ public class ChartFloatAction extends ElementCaseAction {
Style style = newFloatElement.getStyle();
if (style != null) {
newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black,
Constants.LINE_NONE, Color.black,
Constants.LINE_NONE, Color.black,
Constants.LINE_NONE, Color.black));
newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black));
}
reportPane.getEditingElementCase().addFloatElement(newFloatElement);
reportPane.setSelection(new FloatSelection(newFloatElement.getName()));
reportPane.fireTargetModified();
reportPane.fireSelectionChangeListener();
} catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error in Float");

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

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

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

@ -3,6 +3,7 @@
*/
package com.fr.design.mainframe;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.data.core.db.DBUtils;
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_JAR, GeneralUtils.readBuildNO());
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_OS, System.getProperty("os.name"));
@ -254,7 +255,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
}
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager();
content.put("username", envManager.getBBSName());
content.put("username", ConfigManager.getProviderInstance().getBbsUsername());
content.put("uuid", envManager.getUUID());
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;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.UIDialog;
@ -776,7 +777,7 @@ public class AlphaFineDialog extends UIDialog {
*/
private void sendToServer(String searchKey, AlphaCellModel cellModel) {
if (cellModel.isNeedToSendToServer()) {
String username = DesignerEnvManager.getEnvManager().getBBSName();
String username = ConfigManager.getProviderInstance().getBbsUsername();
String uuid = DesignerEnvManager.getEnvManager().getUUID();
String activityKey = DesignerEnvManager.getEnvManager().getActivationKey();
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;
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.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.ActionLabel;
@ -207,8 +209,8 @@ public class BBSLoginDialog extends UIDialog {
// 登录成功
private void loginSuccess() {
DesignerEnvManager.getEnvManager().setBBSPassword(String.valueOf(passField.getPassword()));
userInfoLabel.setUserName(nameField.getText());
String password = String.valueOf(passField.getPassword());
BBSLoginUtils.bbsLogin(nameField.getText(), password);
userInfoLabel.getUserInfoPane().markSignIn(nameField.getText());
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.design.DesignerEnvManager;
import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
/**
* @author neil
@ -61,8 +60,7 @@ public class ExitLabel extends UILabel{
}
private void clearLoingInformation(){
DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY);
DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY);
BBSLoginUtils.bbsLogout();
}
private void updateInfoPane(){

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

@ -3,8 +3,10 @@
*/
package com.fr.design.mainframe.bbs;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.extra.*;
import com.fr.design.gui.ilable.UILabel;
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.SiteCenter;
import com.fr.general.http.HttpClient;
import com.fr.plugin.manage.bbs.BBSPluginLogin;
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 com.fr.stable.*;
import javax.swing.*;
import java.awt.*;
@ -77,7 +74,7 @@ public class UserInfoLabel extends UILabel {
public UserInfoLabel(UserInfoPane userInfoPane) {
this.userInfoPane = userInfoPane;
String userName = DesignerEnvManager.getEnvManager().getBBSName();
String userName = ConfigManager.getProviderInstance().getBbsUsername();
this.addMouseListener(userInfoAdapter);
this.setHorizontalAlignment(SwingConstants.CENTER);
this.setText(userName);
@ -117,10 +114,9 @@ public class UserInfoLabel extends UILabel {
}
private void clearLoginInformation() {
DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY);
DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY);
DesignerEnvManager.getEnvManager().setInShowBBsName(StringUtils.EMPTY);
DesignerEnvManager.getEnvManager().setBbsUid(DEFAULT_BBS_UID);
ConfigManager.getProviderInstance().setInShowBBsName(StringUtils.EMPTY);
ConfigManager.getProviderInstance().setBbsUid(DEFAULT_BBS_UID);
BBSLoginUtils.bbsLogout();
}
private void updateInfoPane() {
@ -192,8 +188,6 @@ public class UserInfoLabel extends UILabel {
return;
}
//往designerenvmanger里写一下
DesignerEnvManager.getEnvManager().setBBSName(userName);
this.userName = userName;
}
@ -238,8 +232,7 @@ public class UserInfoLabel extends UILabel {
@Override
public void mouseClicked(MouseEvent e) {
BBSUserInfo bbsUserInfo = BBSPluginLogin.getInstance().getUserInfo();
userName = bbsUserInfo == null ? "" : bbsUserInfo.getUserName();
userName = ConfigManager.getProviderInstance().getBbsUsername();
if (StringUtils.isNotEmpty(userName)) {
UIPopupMenu menu = new UIPopupMenu();
menu.setOnlyText(true);
@ -265,10 +258,9 @@ public class UserInfoLabel extends UILabel {
UIMenuItem closeOther = new UIMenuItem(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account"));
closeOther.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
BBSPluginLogin.getInstance().logOut();
BBSLoginUtils.bbsLogout();
UserLoginContext.fireLoginContextListener();
}
});
menu.add(priviteMessage);
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.Date;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
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.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.manage.bbs.BBSPluginLogin;
import com.fr.plugin.manage.bbs.BBSUserInfo;
import com.fr.stable.StringUtils;
@ -77,9 +76,8 @@ public class UserInfoPane extends BasicPane{
@Override
public void run() {
String username = DesignerEnvManager.getEnvManager().getBBSName();
String inShowUsername = DesignerEnvManager.getEnvManager().getInShowBBsName();
if (StringUtils.isEmpty(username) && StringUtils.isEmpty(inShowUsername)){
String username = ConfigManager.getProviderInstance().getBbsUsername();
if (StringUtils.isEmpty(username)){
markUnSignIn();
} else {
markSignIn(username);
@ -133,7 +131,7 @@ public class UserInfoPane extends BasicPane{
FRContext.getLogger().error(e.getMessage());
}
String userName = DesignerEnvManager.getEnvManager().getBBSName();
String userName = ConfigManager.getProviderInstance().getBbsUsername();
if(StringUtils.isNotEmpty(userName)){
return;
}
@ -169,8 +167,6 @@ public class UserInfoPane extends BasicPane{
*
*/
public void markSignIn(String userName){
String password = DesignerEnvManager.getEnvManager().getBBSPassword();
BBSPluginLogin.getInstance().login(new BBSUserInfo(userName, password));
this.userInfoLabel.setText(userName);
this.userInfoLabel.setUserName(userName);
this.userInfoLabel.setOpaque(true);

2
designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java

@ -76,7 +76,7 @@ public class CellElementEditPane extends BasicPane {
downTitle = new JPanel();
downTitle.setLayout(new BorderLayout());
downTitle.add(tabsHeaderIconPane, BorderLayout.NORTH);
center.setBorder(BorderFactory.createEmptyBorder(0, LEFT_BORDER, 0, RIGHT_BORDER));
center.setBorder(BorderFactory.createEmptyBorder(0, LEFT_BORDER, 0, 0));
downTitle.add(center, BorderLayout.CENTER);
this.add(downTitle, BorderLayout.CENTER);

2
designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java

@ -188,7 +188,7 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
// extendable
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD-Expandable"))) {
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Expandable"))) {
if (horizontalExpandableCheckBox.isSelected()) {
if (verticalExpandableCheckBox.isSelected()) {
cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE);

14
designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -10,7 +10,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate;
@ -22,6 +22,7 @@ import com.fr.report.cell.cellattr.CellGUIAttr;
import com.fr.report.cell.cellattr.CellInsertPolicyAttr;
import com.fr.report.cell.cellattr.CellPageAttr;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
@ -47,9 +48,9 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private UIComboBox showContent;
private UITextField tooltipTextField;
private UIPropertyTextField tooltipTextField;
private UITextField fileNameTextField;
private UIPropertyTextField fileNameTextField;
// 分页
private UICheckBox pageBeforeRowCheckBox;
@ -228,8 +229,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
final JPanel fileNamePane = new JPanel(fileNameLayout);
JPanel fileNameCCPane = new JPanel(new BorderLayout(4, 0));
fileNameCCPane.add(new UILabel(Inter.getLocText("FR-Designer_File_Name_For_Download")), BorderLayout.WEST);
fileNameTextField = new UITextField();
tooltipTextField = new UITextField();
fileNameTextField = new UIPropertyTextField();
tooltipTextField = new UIPropertyTextField();
tooltipTextField.getUI();
fileNamePane.add(new JPanel(), "none");
fileNamePane.add(fileNameCCPane, "content");
@ -248,8 +249,6 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
}
}
});
tooltipTextField = new UITextField();
tooltipTextField.getUI();
return fileNamePane;
}
@ -344,6 +343,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
this.valueEditor.populate(defaultValue);
} else {
insertRowPolicy.setSelectedIndex(0);
this.valueEditor.populate(StringUtils.EMPTY);
}
if (insertRowPolicy.getSelectedIndex() == 1) {
insertRowPane.setPreferredSize(new Dimension(100, 20));

20
designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java

@ -45,14 +45,14 @@ public class CustomStylePane extends MultiTabPane<Style> {
}
public static void main(String[] args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
content.add(new CustomStylePane(), BorderLayout.CENTER);
GUICoreUtils.centerWindow(jf);
jf.setSize(250, 400);
jf.setVisible(true);
// JFrame jf = new JFrame("test");
// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// JPanel content = (JPanel) jf.getContentPane();
// content.setLayout(new BorderLayout());
// content.add(new CustomStylePane(), BorderLayout.CENTER);
// GUICoreUtils.centerWindow(jf);
// jf.setSize(250, 400);
// jf.setVisible(true);
}
/**
@ -111,7 +111,7 @@ public class CustomStylePane extends MultiTabPane<Style> {
public boolean isBorderPaneSelected() {
return tabPane.getSelectedIndex() == TWO_INDEX;
return tabPane.getSelectedIndex() == ONE_INDEX;
}
/**
@ -137,7 +137,7 @@ public class CustomStylePane extends MultiTabPane<Style> {
*
*/
public void updateBorder() {
BorderUtils.update(reportPane, ((BorderPane) paneList.get(TWO_INDEX)).update());
BorderUtils.update(reportPane, ((BorderPane) paneList.get(ONE_INDEX)).update());
}
/**

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.errorinfo;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.base.io.IOFile;
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");
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager();
this.username = envManager.getBBSName();
this.username = ConfigManager.getProviderInstance().getBbsUsername();
this.uuid = envManager.getUUID();
this.activekey = envManager.getActivationKey();
}

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

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

30
designer/src/com/fr/design/widget/CellWidgetCardPane.java

@ -2,6 +2,7 @@ package com.fr.design.widget;
import com.fr.design.data.DataCreatorUI;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.layout.FRGUIPaneFactory;
@ -48,10 +49,30 @@ public class CellWidgetCardPane extends BasicPane {
this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout());
final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
BasicScrollPane basicScrollPane = new BasicScrollPane() {
@Override
protected JPanel createContentPane() {
return jPanel;
}
@Override
public void populateBean(Object ob) {
}
@Override
protected String title4PopupWindow() {
return null;
}
};
this.add(basicScrollPane, BorderLayout.CENTER);
//k
tabbedPane = new CardLayout();
center = new JPanel(tabbedPane);
this.add(center, BorderLayout.CENTER);
jPanel.add(center, BorderLayout.CENTER);
attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
eventTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -60,8 +81,8 @@ public class CellWidgetCardPane extends BasicPane {
eventTabPane.add(eventPane, BorderLayout.CENTER);
//k
center.add(attriTabPane, Inter.getLocText("FR-Designer_Attribute"));
center.add(eventTabPane, Inter.getLocText("FR-Designer_Form_Editing_Listeners"));
final String[] tabTitles = new String[]{Inter.getLocText("FR-Designer_Attribute"), Inter.getLocText("FR-Designer_Form_Editing_Listeners")};
center.add(eventTabPane, Inter.getLocText("FR-Designer_Event"));
final String[] tabTitles = new String[]{Inter.getLocText("FR-Designer_Attribute"), Inter.getLocText("FR-Designer_Event")};
tabsHeaderIconPane = new UIHeadGroup(tabTitles) {
@Override
@ -70,7 +91,7 @@ public class CellWidgetCardPane extends BasicPane {
}
};
tabsHeaderIconPane.setNeedLeftRightOutLine(false);
this.add(tabsHeaderIconPane, BorderLayout.NORTH);
jPanel.add(tabsHeaderIconPane, BorderLayout.NORTH);
widgetPropertyPane = new BasicWidgetPropertySettingPane();
@ -82,7 +103,6 @@ public class CellWidgetCardPane extends BasicPane {
attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
attriTabPane.add(attriCardPane, BorderLayout.CENTER);
attriCardLayout = (CardLayout) attriCardPane.getLayout();
this.setPreferredSize(new Dimension(600, 450));
}
private void initPaneList() {

3
designer/src/com/fr/design/widget/WidgetEventPane.java

@ -30,11 +30,14 @@ import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.stable.ReportConstants;
import com.fr.stable.Nameable;
import javax.swing.*;
public class WidgetEventPane extends ObjectUIControlPane {
public WidgetEventPane(ElementCasePane pane) {
super(pane);
this.setNameListEditable(false);
setBorder(BorderFactory.createEmptyBorder(10, 0, 15, 0));
}
@Override

1
designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

@ -3,7 +3,6 @@ package com.fr.design.widget.ui;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;

2
designer/src/com/fr/design/widget/ui/ButtonDefinePane.java

@ -5,8 +5,6 @@ import com.fr.design.widget.ui.btn.ButtonDetailPaneFactory;
import com.fr.form.ui.Button;
import com.fr.form.ui.FreeButton;
import com.fr.design.widget.btn.ButtonDetailPane;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;

6
designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java

@ -3,7 +3,7 @@ package com.fr.design.widget.ui;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -14,7 +14,7 @@ import javax.swing.*;
import java.awt.*;
public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
private UITextField text;
private UIPropertyTextField text;
public CheckBoxDefinePane() {
this.iniComoponents();
@ -22,7 +22,7 @@ public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> {
private void iniComoponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
text = new UITextField(8);
text = new UIPropertyTextField();
JPanel panel = new JPanel(new BorderLayout());
panel.add(text, BorderLayout.CENTER);
panel.setBorder(BorderFactory.createEmptyBorder(0, 35, 0, 0));

12
designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java

@ -5,7 +5,7 @@ import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -24,7 +24,7 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30;
protected UICheckBox allowBlankCheckBox;
// richer:错误信息,是所有控件共有的属性,所以放到这里来
protected UITextField errorMsgTextField;
protected UIPropertyTextField errorMsgTextField;
protected JPanel validatePane;
public FieldEditorDefinePane() {
@ -33,7 +33,6 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
initErrorMsgPane();
JPanel contentPane = this.setFirstContentPane();
if (contentPane != null) {
UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, contentPane);
@ -45,9 +44,8 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
protected void initErrorMsgPane() {
// 错误信息
errorMsgTextField = new UITextField(10);
// richer:主要为了方便查看比较长的错误信息
errorMsgTextField = new UIPropertyTextField();
// // richer:主要为了方便查看比较长的错误信息
errorMsgTextField.getDocument().addDocumentListener(new DocumentListener() {
public void changedUpdate(DocumentEvent e) {
@ -98,7 +96,7 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
protected void addValidatePane() {
validatePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
final UILabel uiLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Error", "FR-Designer_Tooltips"}));
errorMsgTextField = new UITextField(10);
initErrorMsgPane();
allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Null"));
allowBlankCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT));

6
designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java

@ -9,7 +9,7 @@ import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -28,7 +28,7 @@ public class IframeEditorDefinePane extends AbstractDataModify<IframeEditor> {
private static final int P_W = 610;
private static final int P_H = 580;
private UITextField srcTextField;
private UIPropertyTextField srcTextField;
private ReportletParameterViewPane parameterViewPane;
private UICheckBox horizontalCheck;
private UICheckBox verticalCheck;
@ -61,7 +61,7 @@ public class IframeEditorDefinePane extends AbstractDataModify<IframeEditor> {
java.awt.Component[][] coms = {
{horizontalCheck, null},
{verticalCheck, null},
{new UILabel(Inter.getLocText("Form-Url")), srcTextField = new UITextField()},
{new UILabel(Inter.getLocText("Form-Url")), srcTextField = new UIPropertyTextField()},
{new UILabel(Inter.getLocText("FR-Designer_Parameters")), parameterViewPaneButton}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, 45, LayoutConstants.VGAP_LARGE);

8
designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java

@ -1,7 +1,7 @@
package com.fr.design.widget.ui;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itextfield.UIPropertyTextField;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.WaterMark;
@ -13,14 +13,12 @@ import java.awt.event.KeyListener;
public class WaterMarkDictPane extends JPanel {
private UITextField waterMarkTextField;
private UIPropertyTextField waterMarkTextField;
public WaterMarkDictPane() {
this.setLayout(new BorderLayout());
// this.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
// this.add(new UILabel(Inter.getLocText("WaterMark") + ":"));
waterMarkTextField = new UITextField(13);
waterMarkTextField = new UIPropertyTextField();
UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0));

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

@ -89,14 +89,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
private int westRegionContainerWidth = 240;
private String encryptionKey;
private String jdkHome;
//当前设计器用户的论坛昵称
private String bbsName;
//当前设计器用户的论坛密码
private String bbsPassword;
//当前设计器用户的论坛ID
private int bbsUid;
//当前设计器用户的昵称显示(带消息)
private String inShowBBsName;
//上一次登录弹窗的时间, 为了控制一天只弹一次窗口
private String lastShowBBSTime;
//上一次资讯弹窗时间, 为了控制一天只弹一次
@ -1145,37 +1138,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
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() {
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){
String tmpVal;
@ -1325,10 +1275,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
readEncrytionKey(reader);
} else if ("jdkHome".equals(name)) {
this.jdkHome = reader.getElementValue();
} else if ("bbsName".equals(name)){
readBBSName(reader);
} else if ("bbsPassword".equals(name)){
readBBSPassword(reader);
}else if ("lastBBSTime".equals(name)){
readLastBBSTime(reader);
} else if ("lastBBSNewsTime".equals(name)){
@ -1736,18 +1682,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
//写论坛相关的两个属性
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)){
writer.startTAG("lastBBSTime");
writer.textNode(lastShowBBSTime);

18
designer_base/src/com/fr/design/actions/file/PreferencePane.java

@ -75,13 +75,6 @@ public class PreferencePane extends BasicPane {
private static final FRLevel[] LOG = {FRLevel.SEVERE, FRLevel.WARNING, FRLevel.INFO, FRLevel.DEBUG};
private static java.util.List<String> LANGUAGE = new ArrayList<>();
static {
Map<Locale, String> map = Inter.getSupportLocaleMap();
LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default"));
for(Locale locale : map.keySet()){
LANGUAGE.add(getLocaledLanguage(map.get(locale), locale));
}
};
private static int designerEnvLanguageIndex; // 打开设置对话框时,设计器使用的语言
private boolean languageChanged; // 是否修改了设计器语言设置
@ -116,6 +109,17 @@ public class PreferencePane extends BasicPane {
public PreferencePane() {
this.initComponents();
this.initLanguageItems();
}
// 语言选项
private void initLanguageItems() {
LANGUAGE.clear();
Map<Locale, String> map = Inter.getSupportLocaleMap();
LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default"));
for(Locale locale : map.keySet()){
LANGUAGE.add(getLocaledLanguage(map.get(locale), locale));
}
}
protected void initComponents() {

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());
}
}
}

1
designer_base/src/com/fr/design/constants/UIConstants.java

@ -104,6 +104,7 @@ public interface UIConstants {
public static final Color SPLIT_LINE = new Color(201, 198, 184);
public static final Color TITLED_BORDER_COLOR = new Color(0xededee);
public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221);
public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd);
public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png");

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

@ -1,16 +1,15 @@
package com.fr.design.extra;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.bbs.BBSLoginUtils;
import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.ucenter.Client;
import com.fr.design.extra.ucenter.XMLHelper;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.SiteCenter;
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.StringUtils;
import javafx.scene.web.WebEngine;
@ -20,7 +19,6 @@ import java.awt.*;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.LinkedList;
public class LoginWebBridge {
@ -59,7 +57,7 @@ public class LoginWebBridge {
private String userName;
public LoginWebBridge() {
String username = DesignerEnvManager.getEnvManager().getBBSName();
String username = ConfigManager.getProviderInstance().getBbsUsername();
setUserName(username, uiLabel);
}
@ -130,16 +128,16 @@ public class LoginWebBridge {
*/
public void setMessageCount(int count) {
if (count == MIN_MESSAGE_COUNT) {
uiLabel.setText(DesignerEnvManager.getEnvManager().getBBSName());
DesignerEnvManager.getEnvManager().setInShowBBsName(DesignerEnvManager.getEnvManager().getBBSName());
uiLabel.setText(ConfigManager.getProviderInstance().getBbsUsername());
ConfigManager.getProviderInstance().setInShowBBsName(ConfigManager.getProviderInstance().getBbsUsername());
return;
}
this.messageCount = count;
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(StringUtils.BLANK);
DesignerEnvManager.getEnvManager().setInShowBBsName(sb.toString());
ConfigManager.getProviderInstance().setInShowBBsName(sb.toString());
uiLabel.setText(sb.toString());
}
@ -278,11 +276,9 @@ public class LoginWebBridge {
if (list.size() > 0) {
int $uid = Integer.parseInt(list.get(0));
if ($uid > 0) {
DesignerEnvManager.getEnvManager().setBbsUid($uid);
DesignerEnvManager.getEnvManager().setBBSName(username);
DesignerEnvManager.getEnvManager().setInShowBBsName(username);
DesignerEnvManager.getEnvManager().setBBSPassword(password);
BBSPluginLogin.getInstance().login(new BBSUserInfo(username, password));
ConfigManager.getProviderInstance().setBbsUid($uid);
ConfigManager.getProviderInstance().setInShowBBsName(username);
BBSLoginUtils.bbsLogin(username, password);
return LOGININ;//登录成功,0
} else if ($uid == -1) {
return USERNAME_NOT_EXSIT;//用户名不存在,-1
@ -318,16 +314,16 @@ public class LoginWebBridge {
public void getLoginInfo(String userInfo) {
org.json.JSONObject jo = new org.json.JSONObject(userInfo);
String status = jo.get("status").toString();
try{
if (status.equals(LOGIN_SUCCESS)) {
String username = jo.get("username").toString();
int uid = Integer.parseInt(jo.get("uid") == null ? "" : jo.get("uid").toString());
closeWindow();
closeQQWindow();
pluginuiLabel.setText(username);
DesignerEnvManager.getEnvManager().setBBSName(username);
DesignerEnvManager.getEnvManager().setBbsUid(uid);
DesignerEnvManager.getEnvManager().setInShowBBsName(username);
BBSPluginLogin.getInstance().login(new BBSUserInfo(username, ""));
ConfigManager.getProviderInstance().setBbsUid(uid);
ConfigManager.getProviderInstance().setInShowBBsName(username);
BBSLoginUtils.bbsLogin(username, "");
} else if (status.equals(LOGIN_FAILED)) {
//账号没有QQ授权
closeQQWindow();
@ -336,6 +332,10 @@ public class LoginWebBridge {
} catch (Exception exp) {
}
}
}catch (Exception e){
FRContext.getLogger().error(e.getMessage());
}
}
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;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.design.extra.tradition.callback.UpdateOnlineCallback;
import com.fr.design.gui.frpane.UITabbedPane;
@ -9,11 +10,10 @@ import com.fr.general.Inter;
import com.fr.json.JSONObject;
import com.fr.plugin.context.PluginMarker;
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.ProgressCallback;
import com.fr.plugin.view.PluginView;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import java.io.File;
@ -188,10 +188,10 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane<List<Plug
}
private void doUpdateOnline(final PluginStatusCheckCompletePane pane) {
if (!BBSPluginLogin.getInstance().hasLogin()) {
if (!StringUtils.isNotEmpty(ConfigManager.getProviderInstance().getBbsUsername())) {
LoginCheckContext.fireLoginCheckListener();
}
if (BBSPluginLogin.getInstance().hasLogin()) {
if (StringUtils.isNotEmpty(ConfigManager.getProviderInstance().getBbsUsername())) {
PluginView plugin = controlPane.getSelectedPlugin();
String id = null;
if (plugin != null) {

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

@ -1,5 +1,6 @@
package com.fr.design.extra;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.design.extra.exe.callback.*;
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.PluginMarker;
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.PluginTask;
import com.fr.plugin.manage.control.PluginTaskCallback;
@ -260,9 +259,7 @@ public class PluginOperateUtils {
}
public static void getLoginInfo(JSCallback jsCallback, UILabel uiLabel) {
BBSUserInfo bbsUserInfo = BBSPluginLogin.getInstance().getUserInfo();
String username = bbsUserInfo == null ? "" : bbsUserInfo.getUserName();
String username = ConfigManager.getProviderInstance().getBbsUsername();
if (StringUtils.isEmpty(username)) {
jsCallback.execute("");
uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn"));
@ -292,7 +289,7 @@ public class PluginOperateUtils {
pluginInfo.append(PluginUtils.getMessageByErrorCode(pluginTaskResult.errorCode()));
continue;
}
PluginMarker pluginMarker = pluginTask.getMarker();
PluginMarker pluginMarker = pluginTask.getToMarker();
PluginContext pluginContext = PluginManager.getContext(pluginMarker);
if (pluginContext != null) {
pluginInfo.append(pluginContext.getName()).append(PluginUtils.getMessageByErrorCode(pluginTaskResult.errorCode()));

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

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

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

@ -78,8 +78,8 @@ public class PluginUtils {
return jsonArray.toString();
}
public static void downloadShopScripts(String id, String username, String password, Process<Double> p) throws Exception {
HttpClient httpClient = new HttpClient(getDownloadPath(id, username, password));
public static void downloadShopScripts(String id, Process<Double> p) throws Exception {
HttpClient httpClient = new HttpClient(getDownloadPath(id));
if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) {
int totalSize = httpClient.getContentLength();
InputStream reader = httpClient.getResponseStream();
@ -104,11 +104,9 @@ public class PluginUtils {
}
}
private static String getDownloadPath(String id, String username, String password) throws Exception {
private static String getDownloadPath(String id) throws Exception {
HashMap<String, String> map = new HashMap<String, String>();
map.put("id", id);
map.put("username", username);
map.put("password", password);
HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("shop.plugin.scripts"));
httpClient.asGet();
String resText = httpClient.getResponseText();

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

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

19
designer_base/src/com/fr/design/extra/WebViewDlgHelper.java

@ -1,7 +1,6 @@
package com.fr.design.extra;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.UIDialog;
@ -171,10 +170,8 @@ public class WebViewDlgHelper {
new SwingWorker<Boolean, Void>() {
@Override
protected Boolean doInBackground() throws Exception {
String username = DesignerEnvManager.getEnvManager().getBBSName();
String password = DesignerEnvManager.getEnvManager().getBBSPassword();
try {
PluginUtils.downloadShopScripts(scriptsId, username, password, new Process<Double>() {
PluginUtils.downloadShopScripts(scriptsId, new Process<Double>() {
@Override
public void process(Double integer) {
}
@ -198,19 +195,7 @@ public class WebViewDlgHelper {
IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome);
copyMainFile(StableUtils.pathJoin(installHome, "index.html"), StableUtils.pathJoin(installHome, relativePath));
// TODO: 2017/4/17 删除之前存放在安装目录下的script
int rv = JOptionPane.showOptionDialog(
null,
Inter.getLocText("FR-Designer-Plugin_Shop_Installed"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
new String[]{Inter.getLocText("FR-Designer-Basic_Restart_Designer"), Inter.getLocText("FR-Designer-Basic_Restart_Designer_Later")},
null
);
if (rv == JOptionPane.OK_OPTION) {
RestartHelper.restart();
}
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE);
}
} catch (InterruptedException | ExecutionException e) {
FRContext.getLogger().error(e.getMessage(), e);

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

@ -20,6 +20,9 @@ public class UIExpandablePane extends JPanel {
private int headWidth;
private int headHeight;
public JPanel getContentPanel() {
return contentPanel;
}
public UIExpandablePane(String title, int headWidth, int headHeight, JPanel contentPanel) {
super();
@ -43,12 +46,17 @@ public class UIExpandablePane extends JPanel {
headerPanel = new HeaderPane(color, title, headHeight);
headerPanel.addMouseListener(new PanelAction());
contentPanel.setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, 0));
setcontentPanelontentPanelBorder ();
this.add(headerPanel, BorderLayout.NORTH);
this.add(contentPanel, BorderLayout.CENTER);
setOpaque(false);
}
protected void setcontentPanelontentPanelBorder (){
contentPanel.setBorder(BorderFactory.createEmptyBorder(0 ,LEFT_BORDER, 0, 0));
}
class PanelAction extends MouseAdapter {
public void mousePressed(MouseEvent e) {
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.selectionBackground", ThemeUtils.TEXT_SELECTED_BG_COLOR);
table.put("Tree.selectionForeground", ThemeUtils.TEXT_SELECTED_TEXT_COLOR);
table.put("Tree.hash", new ColorUIResource(208, 205, 190));
table.put("Tree.line", new ColorUIResource(208, 205, 190));
table.put("Tree.hash", new ColorUIResource(240, 240,243));
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;
import com.fr.base.chart.BasePlot;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel;
@ -16,7 +17,8 @@ import com.fr.stable.Nameable;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
/**
* Created by plough on 2017/7/21.
@ -37,10 +39,18 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected JPanel cardPane;
protected BasePlot plot;
public UIControlPane() {
this.initComponentPane();
}
public UIControlPane(BasePlot plot) {
this.plot =plot;
this.initComponentPane();
}
/**
* 生成添加按钮的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.FRContext;
import com.fr.base.chart.BasePlot;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.core.ActionFactory;
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.gui.ibutton.UIButton;
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.ModNameActionListener;
import com.fr.design.gui.ilist.UINameEdList;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
@ -40,8 +41,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
@ -61,10 +60,15 @@ public abstract class UIListControlPane extends UIControlPane {
private boolean isNameRepeated = false;
protected boolean isPopulating = false;
public UIListControlPane() {
this.initComponentPane();
}
public UIListControlPane(BasePlot plot) {
super(plot);
}
@Override
protected JPanel createControlUpdatePane() {
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 CardLayout card;
private JPanel cardPane;
@ -926,6 +935,7 @@ public abstract class UIListControlPane extends UIControlPane {
for (int i = 0, len = updatePanes.length; i < len; i++) {
Object ob2Populate = creators[i].acceptObject2Populate(el.wrapper);
ob2Populate = getob2Populate(ob2Populate);
if (ob2Populate != null) {
if (updatePanes[i] == null) {
if (isMulti(creators[i].getUpdatePane()) || isTree(creators[i].getUpdatePane())) {
@ -944,6 +954,7 @@ public abstract class UIListControlPane extends UIControlPane {
}
}
public boolean isMulti(Class _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;
}
public Class<? extends BasicBeanPane> getPaneClazz() {
return paneClazz;
}
/**
* 覆盖的clone方法
*/

47
designer_base/src/com/fr/design/gui/itextfield/UIPropertyTextField.java

@ -0,0 +1,47 @@
package com.fr.design.gui.itextfield;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.text.Document;
/**
* Created by ibm on 2017/8/16.
*/
public class UIPropertyTextField extends UITextField{
public UIPropertyTextField() {
super();
}
public UIPropertyTextField(int columns) {
super(columns);
}
public UIPropertyTextField(String text, int columns) {
super(text, columns);
}
public UIPropertyTextField(String text) {
super(text);
}
public UIPropertyTextField(Document doc, String text, int columns) {
super(doc, text, columns);
}
protected void initListener() {
if (shouldResponseChangeListener()) {
addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
}
@Override
public void focusLost(FocusEvent e) {
attributeChange();
}
});
}
}
}

14
designer_base/src/com/fr/design/gui/itextfield/UITextField.java

@ -13,8 +13,6 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.Document;
import java.awt.*;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
/**
* @author Jerry
@ -61,13 +59,19 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
protected void initListener() {
if (shouldResponseChangeListener()) {
addFocusListener(new FocusListener() {
getDocument().addDocumentListener(new DocumentListener() {
@Override
public void focusGained(FocusEvent e) {
public void insertUpdate(DocumentEvent e) {
attributeChange();
}
@Override
public void removeUpdate(DocumentEvent e) {
attributeChange();
}
@Override
public void focusLost(FocusEvent e) {
public void changedUpdate(DocumentEvent e) {
attributeChange();
}
});

14
designer_base/src/com/fr/design/gui/style/BorderPane.java

@ -53,17 +53,6 @@ public class BorderPane extends AbstractBasicStylePane {
this.initComponents();
}
public static void main(String[] args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new BorderLayout());
content.add(new BorderPane(), BorderLayout.CENTER);
GUICoreUtils.centerWindow(jf);
jf.setSize(290, 400);
jf.setVisible(true);
}
protected void initComponents() {
initButtonsWithIcon();
this.setLayout(new BorderLayout(0, 6));
@ -184,7 +173,7 @@ public class BorderPane extends AbstractBasicStylePane {
}
public Style update(Style style) {
style = style.deriveBackground(backgroundPane.update());
if (style == null) {
style = Style.DEFAULT_STYLE;
}
@ -193,6 +182,7 @@ public class BorderPane extends AbstractBasicStylePane {
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(),
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor());
style = style.deriveBackground(backgroundPane.update());
return style;
}

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

1
designer_base/src/com/fr/design/locale/designer.properties

@ -2127,3 +2127,4 @@ FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer_Mobile-Height-Percent=Max Percent
FR-Designer_Mobile-Height-Limit=Height Limit
FR-Designer-AlphaFine_NO_Result=no search result
FR-Designer_Select_Color=Select Color

3
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -859,7 +859,7 @@ RP_Authority_Edit=Permission
Warnning=Warning
RoleName_Can_Not_Be_Null=Role name can not be null or duplicate
Application=Applications
Formula_Dictionary_Display_Examples_Html=<html>Real value range is \
Formula_Dictionary_Display_Examples_Html=<html>the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$, <br>the result is 1, 2, ..., 100 and -1, -2, ..., -100.<br></html>
ECP-error_pwd=Password Error
FR-Hyperlink_ChartHyperlink=Chart Hyperlink
M_Edit-FormatBrush=Format Painter
@ -2123,3 +2123,4 @@ FS-Designer_DS_Filter_Odd_Tip=Odd_Tip
FS-Designer_DS_Filter_Even_Tip=Even_Tip
FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer-AlphaFine_NO_Result=no search result
FR-Designer_Select_Color=Select Color

3
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -857,7 +857,7 @@ RP_Authority_Edit=\u6A29\u9650\u7DE8\u96C6
Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9
RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u305A\u3001\u91CD\u8907\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u305B\u3093
Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3
Formula_Dictionary_Display_Examples_Html=<html>\u5B9F\u969B\u5024\u7BC4\u56F2\u306F\
Formula_Dictionary_Display_Examples_Html=<html>\u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002<br></html>
ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC
FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF
M_Edit-FormatBrush=\u66F8\u5F0F\u30D6\u30E9\u30B7(B)
@ -2121,3 +2121,4 @@ FS-Designer_DS_Filter_Even_Tip=
FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit=
FR-Designer_Select_Color=

3
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -857,7 +857,7 @@ RP_Authority_Edit=\uAD8C\uD55C\uD3B8\uC9D1
Warnning=\uC54C\uB9BC
RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4.
Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158
Formula_Dictionary_Display_Examples_Html=<html>\uC2E4\uC81C\uAC12\uBC94\uC704:\
Formula_Dictionary_Display_Examples_Html=<html>\uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C<br>\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100. <br>&nbsp;</html>
ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958
FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C
M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B)
@ -2122,3 +2122,4 @@ FS-Designer_DS_Filter_Even_Tip=
FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit=
FR-Designer_Select_Color=

3
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -859,7 +859,7 @@ RP_Authority_Edit=\u6743\u9650\u7F16\u8F91
Warnning=\u63D0\u9192
RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D
Application=\u5E94\u7528\u7A0B\u5E8F
Formula_Dictionary_Display_Examples_Html=<html>\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \
Formula_Dictionary_Display_Examples_Html=<html>\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C<br>\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002<br>&nbsp;</html>
ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF
FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE
M_Edit-FormatBrush=\u683C\u5F0F\u5237(B)
@ -2134,3 +2134,4 @@ FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\
FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5076\u6570\u96C6(2,4,6...)
FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u4E3A1,2-3,5,8\uFF0C\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u5185\u503C\u53C2\u6570$_count_\u8868\u793A\u603B\u4E2A\u6570
FR-Designer-AlphaFine_NO_Result=\u65E0\u641C\u7D22\u7ED3\u679C
FR-Designer_Select_Color=\u9009\u62E9\u989C\u8272

3
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -859,7 +859,7 @@ RP_Authority_Edit=\u6B0A\u9650\u7DE8\u8F2F
Warnning=\u63D0\u9192
RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907
Application=\u61C9\u7528\u7A0B\u5F0F
Formula_Dictionary_Display_Examples_Html=
Formula_Dictionary_Display_Examples_Html=<html>\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C<br>\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002<br>&nbsp;</html>
ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4
FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8
M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B)
@ -2126,3 +2126,4 @@ FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB
FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u70BA1,2-3,5,8\uFF0C\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u5185\u7F6E\u53C3\u6578$_count_\u8868\u793A\u7E02\u500B\u6578
M-New_FormBook=\u65B0\u589E\u6C7A\u7B56\u5831\u8868
FR-Designer-AlphaFine_NO_Result=\u7121\u641C\u7D22\u7D50\u679C
FR-Designer_Select_Color=

79
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -13,6 +13,7 @@ import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.third.fr.pdf.kernel.utils.CompareTool;
import com.sap.conn.jco.JCo;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
@ -38,7 +39,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 弹出对话框高度
private static final int POPUP_MIN_HEIGHT = 145;
private static final int POPUP_MAX_HEIGHT = 480;
private static final int POPUP_DEFAULT_HEIGHT = 360;
private static final int POPUP_DEFAULT_HEIGHT = 356;
public static final String KEY_CELL_ELEMENT = "cellElement";
public static final String KEY_CELL_ATTR = "cellAttr";
public static final String KEY_FLOAT_ELEMENT = "floatElement";
@ -53,6 +54,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private JPanel defaultPane; // "无可用配置项"面板
private JPanel defaultAuthorityPane; // "该元素不支持权限编辑"
private PropertyItem selectedItem; // 当前被选中的属性配置项
public enum PropertyMode {
REPORT, // 报表
@ -219,6 +221,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
@Override
public void onResize() {
if (!isRightPaneVisible()) {
resetPropertyIcons();
} else {
refreshRightPane();
}
for (PropertyItem item : propertyItemMap.values()) {
item.onResize();
}
@ -374,6 +381,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
* 刷新右面板
*/
public void refreshRightPane() {
// 可继承,就继承
if (selectedItem != null && selectedItem.isVisible() && selectedItem.isEnabled() && !selectedItem.isPoppedOut()) {
selectedItem.setTabButtonSelected();
propertyCard.show(rightPane, selectedItem.getName());
return;
}
// 不可继承时,选中第一个可用 tab
boolean hasAvailableTab = false;
boolean hasEnabledTab = false;
for (String name : propertyItemMap.keySet()) {
@ -388,6 +403,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
}
// 无可用 tab 时,显示提示文字
if (!hasAvailableTab) {
resetPropertyIcons();
if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) {
@ -417,6 +433,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
private void resetPropertyIcons() {
for (PropertyItem item : propertyItemMap.values()) {
item.resetButtonIcon();
@ -477,6 +494,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void updateStatus() {
setEnabled(enableModes.contains(currentMode));
setVisible(visibleModes.contains(currentMode));
if (isPoppedOut()) {
if (!isVisible()) {
popToFrame();
} else if (!isEnabled()) {
popupDialog.showDefaultPane();
}
}
}
public boolean isVisible() {
@ -593,6 +617,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
selectedItem = this;
}
private void initButton() {
@ -672,6 +697,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupDialog.setVisible(false);
initContentPane();
onResize();
if (isEnabled()) {
propertyCard.show(rightPane, getName());
setTabButtonSelected();
}
refreshContainer();
}
}
@ -763,7 +792,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
} else if (isMovable) {
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
setBackground(Color.pink);
} else {
setCursor(Cursor.getDefaultCursor());
}
@ -867,12 +895,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private class PopupDialog extends JDialog {
private Container container;
private static final int RESIZE_RANGE = 4;
private static final int RESIZE_RANGE = 8;
private Cursor originCursor;
private Cursor southResizeCursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR);
private Point mouseDownCompCoords;
private JPanel contentWrapper;
private JComponent contentPane;
private JPanel defaultPane; // 无可用配置项
private PropertyItem propertyItem;
public PopupDialog(PropertyItem propertyItem) {
super(DesignerContext.getDesignerFrame());
@ -882,29 +912,50 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.UP_BUTTON);
popupToolPane.setParentDialog(this);
contentPane = propertyItem.getContentPane();
container.add(popupToolPane, BorderLayout.NORTH);
container.add(contentPane, BorderLayout.CENTER);
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT);
contentWrapper = new JPanel(new BorderLayout());
contentWrapper.add(popupToolPane, BorderLayout.NORTH);
contentWrapper.add(contentPane, BorderLayout.CENTER);
contentWrapper.setBorder(BorderFactory.createLineBorder(UIConstants.PROPERTY_DIALOG_BORDER));
JPanel horizontalToolPane = new JPanel() {
@Override
public void paint(Graphics g) {
g.drawImage(UIConstants.DRAG_BAR, 0, 0, getWidth(), getHeight(), null);
g.drawImage(UIConstants.DRAG_DOT, (getWidth() - RESIZE_RANGE) / 2, 3, RESIZE_RANGE, 5, null);
}
};
contentWrapper.add(horizontalToolPane, BorderLayout.SOUTH);
container.add(contentWrapper, BorderLayout.CENTER);
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT + RESIZE_RANGE);
adjustLocation();
initListener();
this.setVisible(true);
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available"));
}
public void showDefaultPane() {
replaceContentPane(defaultPane);
}
public void adjustLocation() {
Point btnCoords = propertyItem.getButton().getLocationOnScreen();
this.setLocation(btnCoords.x - CONTENT_WIDTH, btnCoords.y);
this.setLocation(
getLeftPane().getLocationOnScreen().x - CONTENT_WIDTH,
DesignerContext.getDesignerFrame().getLocationOnScreen().y + 228
);
}
public void replaceContentPane(PropertyItem propertyItem) {
this.propertyItem = propertyItem;
JComponent contentPane = propertyItem.getContentPane();
container.remove(this.contentPane);
container.add(this.contentPane = contentPane);
// pack();
if (getSize().height < container.getPreferredSize().height) {
setSize(CONTENT_WIDTH, container.getPreferredSize().height);
replaceContentPane(propertyItem.getContentPane());
}
public void replaceContentPane(JComponent contentPane) {
contentWrapper.remove(this.contentPane);
contentWrapper.add(this.contentPane = contentPane, BorderLayout.CENTER);
refreshContainer();
}

4
designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java

@ -22,7 +22,7 @@ import java.awt.*;
public class GradientBackgroundQuickPane extends BackgroundQuickPane {
private static final long serialVersionUID = -6854603990673031897L;
private static final int DEFAULT_GRADIENT_WIDTH = 185;
private static final int DEFAULT_GRADIENT_WIDTH = 150 ;
private int gradientBarWidth = DEFAULT_GRADIENT_WIDTH;
@ -52,7 +52,7 @@ public class GradientBackgroundQuickPane extends BackgroundQuickPane {
Component[][] components = new Component[][]{
new Component[]{gradientBar, null},
new Component[]{new UILabel(Inter.getLocText("Gradient-Direction") + ":"), directionPane}
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Gradient_Direction")), directionPane}
};
JPanel Gradient = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
this.setLayout(new BorderLayout());

7
designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java

@ -61,17 +61,14 @@ public class ImageBackgroundQuickPane extends BackgroundQuickPane {
contentPane.add(southPane, BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER);
JPanel selectFilePane = new JPanel(new GridLayout(0, 2));
UIButton selectPictureButton = new UIButton(Inter.getLocText("Image-Select_Picture"));
selectFilePane.add(new JPanel());
selectFilePane.add(selectPictureButton);
selectPictureButton.addActionListener(selectPictureActionListener);
if(hasImageLayout){
southPane.add(imageLayoutPane, BorderLayout.CENTER);
southPane.add(imageLayoutPane, BorderLayout.SOUTH);
}
southPane.add(selectFilePane, BorderLayout.SOUTH);
southPane.add(selectPictureButton, BorderLayout.CENTER);
imageLayoutPane.addChangeListener(new ChangeListener() {

28
designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java

@ -2,14 +2,17 @@ package com.fr.design.mainframe.backgroundpane;
import com.fr.base.GraphHelper;
import com.fr.base.background.PatternBackground;
import com.fr.design.constants.UIConstants;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.Background;
import com.fr.general.Inter;
import com.fr.design.style.color.ColorSelectBox;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
@ -26,7 +29,7 @@ import java.awt.geom.Rectangle2D;
public class PatternBackgroundQuickPane extends BackgroundQuickPane {
private int patternIndex = 0; // pattern setIndex.
private final static int DEFAULT_DIM_HEIGHT = 190;
private final static int DEFAULT_DIM_HEIGHT = 210;
private ColorSelectBox foregroundColorPane;
private ColorSelectBox backgroundColorPane;
private PatternButton[] patternButtonArray;
@ -47,11 +50,20 @@ public class PatternBackgroundQuickPane extends BackgroundQuickPane {
patternButtonGroup.add(patternButtonArray[i]);
typePane2.add(patternButtonArray[i]);
}
JPanel colorPane = new JPanel(new GridLayout(0, 2));
foregroundColorPane = new ColorSelectBox(70);
backgroundColorPane = new ColorSelectBox(70);
colorPane.add(this.createLabelColorPane(Inter.getLocText("FR-Designer_Foreground") + ":", foregroundColorPane));
colorPane.add(this.createLabelColorPane(Inter.getLocText("FR-Designer_Background") + ":", backgroundColorPane));
foregroundColorPane = new ColorSelectBox(60);
backgroundColorPane = new ColorSelectBox(60);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Foreground"), UILabel.LEFT), foregroundColorPane},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background"), UILabel.LEFT), backgroundColorPane},
};
double[] rowSize = {p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
JPanel colorPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_LARGE);
this.add(colorPane, BorderLayout.CENTER);
foregroundColorPane.addSelectChangeListener(colorChangeListener);
backgroundColorPane.addSelectChangeListener(colorChangeListener);

1
designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java

@ -33,7 +33,6 @@ public class TextureBackgroundQuickPane extends BackgroundQuickPane {
this.add(borderPane, BorderLayout.NORTH);
contentPane.setLayout(new GridLayout(0, 8, 1, 1));
contentPane.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
borderPane.setPreferredSize(new Dimension(0, 145));
ButtonGroup patternButtonGroup = new ButtonGroup();
textureButtonArray = new TextureButton[EMBED_TEXTURE_PAINT_ARRAY.length];
for (int i = 0; i < EMBED_TEXTURE_PAINT_ARRAY.length; i++) {

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.templateinfo;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.base.io.IOFile;
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) {
HashMap<String, Object> consumingMap = new HashMap<>();
String username = DesignerEnvManager.getEnvManager().getBBSName();
String username = ConfigManager.getProviderInstance().getBbsUsername();
String uuid = DesignerEnvManager.getEnvManager().getUUID();
String activitykey = DesignerEnvManager.getEnvManager().getActivationKey();
String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime());

11
designer_base/src/com/fr/design/present/dict/FormulaDictPane.java

@ -20,6 +20,7 @@ import java.awt.*;
public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
private static final int EDITOR_COLUMN = 15;
private static final int LEFT_BORDER = 5;
private FormulaEditor keyFormulaEditor;
private FormulaEditor valueFormulaEditor;
@ -41,8 +42,8 @@ public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
private void initComponents() {
keyFormulaEditor = new FormulaEditor();
keyFormulaEditor.setColumns(EDITOR_COLUMN);
JPanel keyFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 0));
keyFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0,-5,0,-5));
JPanel keyFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0));
keyFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER));
keyFormulaEditor.setPreferredSize(new Dimension(144, 20));
Icon icon = BaseUtils.readIcon("/com/fr/design/images/m_insert/formula.png");
keyFormulaContainer.add(new JLabel(icon));
@ -58,15 +59,15 @@ public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
UILabel tag = new UILabel(Inter.getLocText("Formula_Dictionary_Display_Examples_Html"));
tag.setPreferredSize(new Dimension(225,20));
tag.setPreferredSize(new Dimension(225, 40));
JPanel t = new JPanel(new BorderLayout());
t.add(tag, BorderLayout.CENTER);
Formula vf = new Formula("$$$");
valueFormulaEditor = new FormulaEditor("", vf);
JPanel valueFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 0));
valueFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0,-5,0,-5));
JPanel valueFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0));
valueFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER));
valueFormulaEditor.setPreferredSize(new Dimension(144, 20));
valueFormulaContainer.add(new JLabel(icon));
valueFormulaContainer.add(valueFormulaEditor);

2
designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java

@ -56,7 +56,7 @@ public class ColorSelectDetailPane extends BasicPane {
@Override
protected String title4PopupWindow() {
return null;
return Inter.getLocText("FR-Designer_Select_Color");
}
protected void initComponents() {

1
designer_base/src/com/fr/design/style/color/ColorSelectDialog.java

@ -113,6 +113,7 @@ public class ColorSelectDialog extends MiddleChartDialog{
}
});
this.setTitle(pane.title4PopupWindow());
GUICoreUtils.setWindowCenter(getOwner(), this);
}

8
designer_base/src/com/fr/file/FILEChooserPane.java

@ -1,10 +1,6 @@
package com.fr.file;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
@ -510,7 +506,7 @@ public class FILEChooserPane extends BasicPane {
this.suffix = suffix;
dialog = showWindow(SwingUtilities.getWindowAncestor(parent), false);
dialog = showWindow((Window)parent, false);
JPanel contentPane = (JPanel) dialog.getContentPane();
contentPane.setLayout(FRGUIPaneFactory.createM_BorderLayout());
contentPane.add(this, BorderLayout.CENTER);

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.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.TopDefinition;
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.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
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.style.AbstractChartTabPane;
import com.fr.design.mainframe.chart.gui.style.ThirdTabPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -31,8 +33,8 @@ import java.util.List;
*/
public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private static final long serialVersionUID = 3650522989381790194L;
private static final int PAN_WIDTH = 210;
private static final int FIL_HEIGHT = 130;
private static final int PAN_WIDTH = 234;
private static final int FIL_HEIGHT = 150;
private CategoryFilterPane categoryPane;
private SeriesFilterPane seriesPane;
@ -45,6 +47,18 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
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) {
plot4Pane = plot;
@ -99,6 +113,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
this.removeAll();
paneList = initPaneList4NoPresent(plot4Pane, parentPane);
initAllPane();
tabPane.setPreferredSize(new Dimension(200, 20));
centerPane.setPreferredSize(new Dimension(getContentPaneWidth(), 200));
this.validate();
}
@ -160,6 +176,10 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private PresentComboBox present;
private AbstractAttrNoScrollPane parent;
private JPanel preDataNumPane;
private JPanel presentPane;
public CategoryFilterPane(AbstractAttrNoScrollPane parent) {
super(true);
this.parent = parent;
@ -175,59 +195,59 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override
protected JPanel createContentPane() {
this.setLayout(new BorderLayout());
JPanel pane = new JPanel();
JPanel pane = initOtherPane();
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;
}
protected void initOtherPane(JPanel pane) {
JPanel prePane = new JPanel();
prePane.setLayout(new FlowLayout(FlowLayout.LEFT));
prePane.setPreferredSize(new Dimension(200, 20));
pane.add(prePane);
onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore"));
protected JPanel initOtherPane() {
onlyPreData = new UICheckBox(Inter.getLocText("Plugin-ChartF_OnlyUseBeforeRecords"));
JPanel panel1 = new JPanel(new BorderLayout());
JPanel panel2 = new JPanel(new BorderLayout());
panel1.add(onlyPreData, BorderLayout.NORTH);
preDataNum = new UITextField();
preDataNum.setPreferredSize(new Dimension(50, 20));
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);
UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_RecordsNum"));
combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther"));
combineOther.setSelected(true);
otherPane.add(combineOther);
JPanel catePane = new JPanel();
pane.add(catePane);
catePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p,f};
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"));
catePane.add(notShowNull);
panel2.add(notShowNull, BorderLayout.NORTH);
onlyPreData.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
checkBoxUse();
}
});
}
private void initPresentPane(JPanel pane) {
JPanel presentPane = new JPanel();
presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0));
pane.add(presentPane);
present = new PresentComboBox() {
protected void fireChange() {
fire();
}
};
present.setPreferredSize(new Dimension(70, 20));
presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":"));
presentPane.add(present);
presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("FR-Chart-Style_Present") ,present);
panel2.add(presentPane, BorderLayout.SOUTH);
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() {
if (this.parent != null) {
this.parent.attributeChanged();
@ -245,9 +265,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
* 检查分类过滤界面 Box是否可用.
*/
public void checkBoxUse() {
preDataNum.setEnabled(onlyPreData.isSelected());
combineOther.setEnabled(onlyPreData.isSelected());
;
preDataNumPane.setVisible(onlyPreData.isSelected());
}
/**
@ -320,6 +338,9 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
private AbstractAttrNoScrollPane parent;
private JPanel preDataNumPane;
private JPanel presentPane;
public SeriesFilterPane(AbstractAttrNoScrollPane parent) {
super(true);
this.parent = parent;
@ -335,62 +356,60 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override
protected JPanel createContentPane() {
this.setLayout(new BorderLayout());
JPanel pane = new JPanel();
JPanel pane = initOtherPane();
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;
}
protected void initOtherPane(JPanel pane) {
JPanel prePane = new JPanel();
prePane.setLayout(new FlowLayout(FlowLayout.LEFT));
prePane.setPreferredSize(new Dimension(200, 20));
pane.add(prePane);
onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore"));
protected JPanel initOtherPane() {
onlyPreData = new UICheckBox(Inter.getLocText("Plugin-ChartF_OnlyUseBeforeRecords"));
JPanel panel1 = new JPanel(new BorderLayout());
JPanel panel2 = new JPanel(new BorderLayout());
panel1.add(onlyPreData, BorderLayout.NORTH);
preDataNum = new UITextField();
preDataNum.setPreferredSize(new Dimension(50, 20));
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);
UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_RecordsNum"));
combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther"));
combineOther.setSelected(true);
otherPane.add(combineOther);
JPanel catePane = new JPanel();
pane.add(catePane);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
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"));
catePane.add(notShowNull);
panel2.add(notShowNull, BorderLayout.NORTH);
onlyPreData.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
checkBoxUse();
}
});
}
private void initPresentPane(JPanel pane) {
JPanel presentPane = new JPanel();
presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0));
pane.add(presentPane);
present = new PresentComboBox() {
protected void fireChange() {
fire();
}
};
present.setPreferredSize(new Dimension(70, 20));
presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":"));
presentPane.add(present);
presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("FR-Chart-Style_Present") ,present);
panel2.add(presentPane, BorderLayout.SOUTH);
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() {
if (this.parent != null) {
parent.attributeChanged();
@ -409,8 +428,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
* 检查Box是否可用
*/
public void checkBoxUse() {
preDataNum.setEnabled(onlyPreData.isSelected());
combineOther.setEnabled(onlyPreData.isSelected());
preDataNumPane.setVisible(onlyPreData.isSelected());
}
/**
@ -480,11 +498,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override
protected JPanel createContentPane() {
this.setLayout(new BorderLayout());
JPanel pane = new JPanel();
JPanel pane = new JPanel(new BorderLayout());
this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(pane);
return pane;
}
@ -516,11 +531,8 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override
protected JPanel createContentPane() {
this.setLayout(new BorderLayout());
JPanel pane = new JPanel();
JPanel pane = initOtherPane();
this.add(pane, BorderLayout.NORTH);
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setPreferredSize(new Dimension(200, 110));
initOtherPane(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);
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.design.beans.FurtherBasicBeanPane;
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.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import javax.swing.*;
import java.awt.*;
@ -46,7 +46,12 @@ public class NormalChartDataPane extends DataContentsPane {
@Override
protected JPanel createContentPane() {
return new BasicScrollPane<ChartCollection>() {
return new AbstractVanChartScrollPane<ChartCollection>() {
protected void layoutContentPane() {
leftcontentPane = createContentPane();
this.add(leftcontentPane);
}
@Override
protected JPanel createContentPane() {
@ -56,9 +61,10 @@ public class NormalChartDataPane extends DataContentsPane {
this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6));
JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0));
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));
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(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;
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.TopDefinition;
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.UILabel;
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 javax.swing.*;
@ -35,7 +36,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
}
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));
tableDataPane = new DatabaseTableDataPane(label) {
@Override
@ -45,9 +46,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
}
};
tableDataPane.setBorder(BorderFactory.createMatteBorder(0,6,0, 0, getBackground()));
tableDataPane.setBorder(BorderFactory.createEmptyBorder(0,1,0,1));
tableDataPane.setPreferredSize(new Dimension(205 , 20));
tableDataPane.setPreferredSize(new Dimension(246 , 20));
this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0));
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();
this.add(seriesPane, "0,2,2,2");
seriesPane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
}
//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.chartdata.BubbleReportDefinition;
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.data.ChartDataFilterPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.util.ArrayList;
import java.util.List;
@ -24,9 +25,9 @@ public class BubblePlotReportDataContentPane extends AbstractReportDataContentPa
public BubblePlotReportDataContentPane(ChartDataPane parent) {
initEveryPane();
this.add(new BoldFontTextLabel(Inter.getLocText("Data_Filter")), "0,4,2,4");
this.add(filterPane = new ChartDataFilterPane(new BubblePlot(), parent), "0,6,2,4");
filterPane = new ChartDataFilterPane(new BubblePlot(), parent);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
this.add(panel, "0,6,2,4");
}
@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.formula.TinyFormulaPane;
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.data.ChartDataFilterPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -43,7 +43,7 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
public CategoryPlotMoreCateReportDataContentPane(ChartDataPane parent) {
initEveryPane();
categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name") + ":");
categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name"));
JPanel catePane = new JPanel();
catePane.setLayout(new BorderLayout(2, 2));
@ -61,9 +61,13 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
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(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter")), "0,4,2,4");
this.add(filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent), "0,6,2,4");
filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
this.add(panel, "0,6,2,4");
addButton.addActionListener(new ActionListener() {
@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.SeriesDefinition;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils;
import javax.swing.*;
@ -32,12 +32,13 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
public CategoryPlotReportDataContentPane(ChartDataPane parent) {
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(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter")), "0,4,2,4");
this.add(filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent), "0,6,2,4");
}
filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
this.add(panel, "0,6,2,4"); }
protected TinyFormulaPane initCategoryBox(final String leftLabel) {
TinyFormulaPane categoryName = new TinyFormulaPane() {
@ -46,7 +47,7 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
this.setLayout(new BorderLayout(4, 0));
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));
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.chartdata.MeterReportDefinition;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
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.data.ChartDataFilterPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.awt.*;
@ -46,21 +46,22 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan
double[] rowSize = { p, p, p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(getCateNameString(), SwingConstants.RIGHT), getSingCatePane()},
new Component[]{new UILabel(getNValueString(), SwingConstants.RIGHT), singValuePane = new TinyFormulaPane()},
new Component[]{new UILabel(getCateNameString()), getSingCatePane()},
new Component[]{new UILabel(getNValueString()), singValuePane = new TinyFormulaPane()},
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.add(panel, BorderLayout.NORTH);
filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane);
double[] cs = {p};
components = new Component[][]{
new Component[]{new JSeparator()},
new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Designer_Data_Filter"))},
new Component[]{filterPane = new ChartDataFilterPane(new MeterPlot(), parent)},
new Component[]{panel1},
};
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;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
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>{
private boolean isNeedSummaryCaculateMethod = true;
@ -134,4 +136,10 @@ public abstract class AbstractTableDataContentPane extends BasicBeanPane<ChartCo
public boolean 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) {
categoryCombox = new UIComboBox();
categoryCombox.setPreferredSize(new Dimension(100,20));
categoryCombox.setPreferredSize(new Dimension(120,20));
JPanel categoryPane = new JPanel(new BorderLayout(4,0));
categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground()));
UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT) ;
categoryLabel.setPreferredSize(new Dimension(75,20));
UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name")) ;
categoryLabel.setPreferredSize(new Dimension(85,20));
addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
addButton.setPreferredSize(new Dimension(20, 20));
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.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS));
@ -67,6 +70,7 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
this.setLayout(new BorderLayout());
this.add(categoryPane, BorderLayout.NORTH);
this.add(new JSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
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;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.NormalTableDataDefinition;
import com.fr.chart.chartdata.TopDefinition;
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.mainframe.chart.gui.ChartDataPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
@ -41,17 +41,19 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa
categoryCombox = new UIComboBox();
JPanel categoryPane = new JPanel(new BorderLayout(4,0));
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));
categoryCombox.setPreferredSize(new Dimension(100,20));
categoryCombox.addItem(Inter.getLocText("Chart-Use_None"));
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.add(categoryPane, BorderLayout.NORTH);
this.add(getJSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
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};
Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Step_Name") + ":", SwingConstants.RIGHT),step},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_Start") + ":", SwingConstants.RIGHT),planStart},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_End") + ":", SwingConstants.RIGHT),planEnd},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_Start") + ":", SwingConstants.RIGHT),finalStart},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_End") + ":", SwingConstants.RIGHT),finalEnd},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Percent") + ":", SwingConstants.RIGHT),percent},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Items") + ":", SwingConstants.RIGHT),project},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Step_Name")),step},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_Start")),planStart},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_End")),planEnd},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_Start")),finalStart},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_End")),finalEnd},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Percent")),percent},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Items")),project},
} ;
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
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;
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.chart.chartattr.ChartCollection;
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.general.Inter;
import javax.swing.*;
import java.awt.*;
import java.util.List;
/**
* 仪表盘, 属性表, 数据集数据界面.
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2012-12-21 下午04:51:50
*/
public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane {
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_NAME = Inter.getLocText("Chart-Category_Use_Name");
private static final String METER_VALUE = Inter.getLocText("Chart-Pointer_Value");
private UIComboBox nameBox;
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.gui.frpane.UICorrelationPane;
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.UITableEditor;
import com.fr.design.gui.itextfield.UITextField;
@ -98,7 +97,6 @@ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane<ChartCollec
protected Component[][] getUseComponent() {
return new Component[][]{
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.design.beans.FurtherBasicBeanPane;
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.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -77,11 +76,11 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
double f = TableLayout.FILL;
double[] columnSize = {f};
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));
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));
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));
Component[][] components = getUseComponent(Label1, Label2, Label3);
@ -96,11 +95,11 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane<ChartColle
double f = TableLayout.FILL;
double[] columnSize = {f};
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));
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));
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));
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[]{seriesValue, null, null, Label2, 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[][]{
new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, 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.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -47,13 +48,16 @@ public class SeriesTypeUseComboxPane extends UIComboBoxPane<ChartCollection> {
protected void initLayout() {
this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM));
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));
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(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;
centerPane.add(np.pane, nameArray[i]);
}
initTabPane();
initLayout();
}
protected void initTabPane() {
if (!paneList.isEmpty()) {
tabPane = new UIHeadGroup(nameArray) {
@Override
@ -48,7 +53,6 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
};
centerPane.setBorder(myBorder);
}
initLayout();
}
@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.chartdata.BubbleTableDefinition;
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.layout.TableLayout;
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.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
@ -56,20 +56,19 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon
double[] rowSize_north = {p, p, p, p};
Component[][] components_north = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")+":", SwingConstants.RIGHT), seriesName},
new Component[]{new UILabel("x :", SwingConstants.RIGHT), xCombox},
new Component[]{new UILabel("y :", SwingConstants.RIGHT), yCombox},
new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), bubbleSize},
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")), seriesName},
new Component[]{new UILabel("x" ), xCombox},
new Component[]{new UILabel("y"), yCombox},
new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), bubbleSize},
};
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[][]{
new Component[]{north},
new Component[]{new JSeparator()},
new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))},
new Component[]{dataScreeningPane}
new Component[]{filterPane}
};

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.beans.BasicBeanPane;
import com.fr.design.chart.javascript.ChartEmailPane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.fun.HyperlinkProvider;
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.module.DesignModuleFactory;
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.stable.ListMap;
import com.fr.stable.Nameable;
import com.fr.stable.bridge.StableFactory;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* Created by Fangjie on 2016/4/28.
*/
public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
public class VanChartHyperLinkPane extends UIListControlPane {
public VanChartHyperLinkPane() {
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) {
this.plot = plot;
HashMap paneMap = getHyperlinkMap(plot);
//安装平台内打开插件时,添加相应按钮
@ -40,20 +128,31 @@ public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
// paneMap.put(nc.getHyperlink(), nc.getUpdatePane());
}
//todo@mengao 去掉UIMenuNameableCreator
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);
for(int i = 0; nameGroup != null && i < nameGroup.size(); i++) {
NameJavaScript javaScript = nameGroup.getNameHyperlink(i);
if(javaScript != null && javaScript.getJavaScript() != null) {
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();
}
@ -77,14 +176,15 @@ public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
}
private NameJavaScriptGroup updateNameGroup() {
Nameable[] nameables = update();
NameJavaScriptGroup nameGroup = new NameJavaScriptGroup();
nameGroup.clear();
resetItemName();
java.util.List list = updateBean();
for(int i = 0; i < list.size(); i++) {
UIMenuNameableCreator menu = (UIMenuNameableCreator)list.get(i);
for(int i = 0; i < nameables.length; i++) {
UIMenuNameableCreator menu = (UIMenuNameableCreator)((NameObject)nameables[i]).getObject();
NameJavaScript nameJava = new NameJavaScript(menu.getName(), (JavaScript)menu.getObj());
nameJava.setName(nameables[i].getName());
nameGroup.addNameHyperlink(nameJava);
}
@ -130,4 +230,12 @@ public class VanChartHyperLinkPane extends UICorrelationComboBoxPane {
}
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() {
hyperlinkPane = new VanChartCustomPlotHyperlinkPane();
return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane, 0);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane);
}
@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);
}
}
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) {
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) {

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.gui.ibutton.UIButton;
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.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
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.base.RefreshMoreLabel;
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.vanchart.VanChart;
@ -35,15 +37,12 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
private VanChart chart;
private UIButtonGroup moreLabel;
private UISpinner autoRefreshTime;
private UIButtonGroup autoTooltip;
private UICheckBox autoTooltip;
private UIButton tooltipSet;
private JPanel contentPane;
private boolean isLargeModel;
public UIButtonGroup getMoreLabel() {
return moreLabel;
}
public UISpinner getAutoRefreshTime() {
return autoRefreshTime;
}
@ -66,7 +65,7 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
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() {
@Override
public void stateChanged(ChangeEvent e) {
@ -80,24 +79,26 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
jPanel.add(autoTooltip, BorderLayout.CENTER);
jPanel.add(tooltipSet, BorderLayout.EAST);
JPanel moreLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_More_Label"), moreLabel);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p, p};
double[] rowSize = {p, p};
Component[][] components = initComponent(jPanel);
JPanel temp = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
content.add(temp, BorderLayout.CENTER);
contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
content.add(moreLabelPane, BorderLayout.NORTH);
content.add(contentPane, BorderLayout.CENTER);
return content;
}
protected Component[][] initComponent(JPanel autoTooltipPane){
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_Auto_Tooltip")), autoTooltipPane},
new Component[]{autoTooltip, tooltipSet},
};
}
@ -131,19 +132,19 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
protected void layoutContentPane() {
leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0));
this.add(leftcontentPane);
}
public void checkRefreshEnable() {
Boolean enable = moreLabel.getSelectedIndex() == 0;
autoRefreshTime.setEnabled(enable);
contentPane.setVisible(enable);
autoTooltip.setEnabled(enable && !isLargeModel);
checkTooltipEnable();
}
public void checkTooltipEnable() {
Boolean enable = moreLabel.getSelectedIndex() == 0 && autoTooltip.getSelectedIndex() == 0;
Boolean enable = moreLabel.getSelectedIndex() == 0 && autoTooltip.isSelected();
tooltipSet.setEnabled(enable && !isLargeModel);
}
@ -152,7 +153,7 @@ public class AutoRefreshPane extends BasicScrollPane<RefreshMoreLabel> {
public void populateBean(RefreshMoreLabel refreshMoreLabel) {
moreLabel.setSelectedIndex(refreshMoreLabel.isMoreLabel() ? 0 : 1);
populateAutoRefreshTime();
autoTooltip.setSelectedIndex(refreshMoreLabel.isAutoTooltip() ? 0 : 1);
autoTooltip.setSelected(refreshMoreLabel.isAutoTooltip());
checkRefreshEnable();
@ -173,7 +174,7 @@ public class AutoRefreshPane extends BasicScrollPane<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){
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()}
};
}

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.ConditionCollection;
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.general.Inter;
import com.fr.general.NameObject;
import com.fr.plugin.chart.designer.component.ConditionUIMenuNameableCreator;
import com.fr.stable.Nameable;
import java.awt.*;
import java.util.ArrayList;
@ -20,18 +22,8 @@ import java.util.List;
public class VanChartConditionAttrContentPane extends AbstractConditionAttrContentPane{
private static final Dimension DIALOG_SIZE = new Dimension(500, 600);
private UICorrelationComboBoxPane conditionPane;
private UIListControlPane conditionPane;
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) {
@ -41,19 +33,28 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
}
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.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++) {
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();
}
@ -62,14 +63,17 @@ public class VanChartConditionAttrContentPane extends AbstractConditionAttrConte
update(cc);
}
public void update(ConditionCollection cc){
List<UIMenuNameableCreator> list = conditionPane.updateBean();
public void update(ConditionCollection cc) {
Nameable[] nameables = conditionPane.update();
cc.clearConditionAttr();
for(UIMenuNameableCreator creator : list){
ConditionAttr ca = (ConditionAttr)creator.getObj();
ca.setName(creator.getName());
for (int i = 0; i < nameables.length; i++) {
if (nameables[i] instanceof UIMenuNameableCreator) {
UIMenuNameableCreator uiMenuNameableCreator = (UIMenuNameableCreator) nameables[i];
ConditionAttr ca = (ConditionAttr) uiMenuNameableCreator.getObj();
ca.setName(uiMenuNameableCreator.getName());
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.design.ChartTypeInterfaceManager;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import javax.swing.*;
//条件属性
public class VanChartConditionAttrPane extends BasicScrollPane<Chart> {
public class VanChartConditionAttrPane extends AbstractVanChartScrollPane<Chart> {
private static final long serialVersionUID = 5725969986029470291L;
private AbstractConditionAttrContentPane conditionAttrContentPane;
private VanChartConditionAttrContentPane conditionAttrContentPane;
public VanChartConditionAttrPane() {
super();
@ -27,7 +27,7 @@ public class VanChartConditionAttrPane extends BasicScrollPane<Chart> {
return conditionAttrContentPane;
}
protected AbstractConditionAttrContentPane createConditionAttrContentPane() {
protected VanChartConditionAttrContentPane createConditionAttrContentPane() {
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.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
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.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
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.VanChartZoom;
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.TableLayout4VanChartHelper;
import com.fr.plugin.chart.vanchart.VanChart;
@ -33,7 +32,7 @@ import java.awt.*;
import java.awt.event.ActionEvent;
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 int AUTO_REFRESH_LEFT_GAP = 18;
@ -43,7 +42,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
protected UICheckBox fullScreenDisplay;
protected UIToggleButton collapse;
protected UIToggleButton isChartAnimation;
protected UIButtonGroup isChartAnimation;
//坐标轴翻转属性
private UIButtonGroup<Integer> axisRotation;
@ -56,6 +55,8 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
private TinyFormulaPane from;
private TinyFormulaPane to;
private UIButtonGroup<String> zoomType;
private JPanel changeEnablePane;
private JPanel zoomTypePane;
protected VanChartHyperLinkPane superLink;
@ -89,22 +90,15 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
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[][]{
new Component[]{createToolBarPane(new double[]{p,p,p,p,p}, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createAnimationPane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createAxisRotationPane(new double[]{p}, columnSize, plot),null},
new Component[]{jSeparator4AxisRotation,null},
new Component[]{createAxisRotationPane(new double[]{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[]{new JSeparator(),null},
new Component[]{createHyperlinkPane(),null}
};
@ -122,18 +116,18 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
zoomType = new UIButtonGroup(getNameArray(), getValueArray());
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 zoomGesturePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_ZoomGesture"), zoomGesture);
JPanel zoomWidgetPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomWidget"), zoomWidget);
JPanel zoomGesturePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomGesture"), zoomGesture);
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_To")), to},
};
JPanel temp = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel changeEnablePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_WidgetBoundary"), temp);
JPanel zoomTypePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType);
changeEnablePane = TableLayoutHelper.createTableLayoutPane(components, row, col);
changeEnablePane.setBorder(BorderFactory.createEmptyBorder(10,15,0,0));
zoomTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType);
zoomTypePane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, changeEnablePane, zoomTypePane, plot);
zoomWidget.addActionListener(new ActionListener() {
@Override
@ -141,7 +135,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
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) {
@ -161,10 +155,11 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
axisRotation = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Open"),
Inter.getLocText("Plugin-ChartF_Close")});
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);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis_Rotation") + ":", panel);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Axis"), panel);
}
protected String[] getNameArray() {
@ -186,16 +181,16 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
Component[][] components = createToolBarComponents();
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_ToolBar"), panel);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ToolBar"), panel);
}
protected Component[][] createToolBarComponents() {
return new Component[][]{
new Component[]{isSort, null},
new Component[]{exportImages, null},
new Component[]{fullScreenDisplay, null},
new Component[]{collapse, null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),isSort},
new Component[]{null, exportImages},
new Component[]{null, fullScreenDisplay},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_layout")),collapse},
};
}
@ -209,15 +204,16 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
protected JPanel createAnimationPane(){
isChartAnimation = new UIToggleButton(Inter.getLocText("Plugin-ChartF_OpenAnimation"));
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Animation"), isChartAnimation);
isChartAnimation = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
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){
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) {
@ -227,16 +223,14 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
protected JPanel createHyperlinkPane() {
superLink = new VanChartHyperLinkPane();
return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), superLink);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), superLink);
}
private void checkZoomPane() {
boolean zoomWidgetEnabled = zoomWidget.getSelectedIndex() == 0;
zoomResize.setEnabled(zoomWidgetEnabled);
GUICoreUtils.setEnabled(from, zoomWidgetEnabled);
GUICoreUtils.setEnabled(to, zoomWidgetEnabled);
zoomType.setEnabled(!zoomWidgetEnabled);
changeEnablePane.setVisible(zoomWidgetEnabled);
zoomTypePane.setVisible(!zoomWidgetEnabled);
}
@Override
@ -307,7 +301,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
private void populateChartAnimate(Chart chart, Plot plot) {
if(plot.isSupportAnimate()) {
isChartAnimation.setSelected(chart.isJSDraw());
isChartAnimation.setSelectedIndex(chart.isJSDraw() ? 0 : 1);
isChartAnimation.setEnabled(!largeModel(plot));
}
}
@ -410,7 +404,7 @@ public class VanChartInteractivePane extends BasicScrollPane<Chart> {
private void updateChartAnimate(Chart chart, Plot plot) {
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;
import com.fr.chart.base.DrillMapTools;
import com.fr.chart.chartattr.Chart;
import com.fr.design.gui.ibutton.UIButtonGroup;
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.component.background.VanChartBackgroundPaneWithOutImageAndShadow;
import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom;
import com.fr.chart.base.DrillMapTools;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import javax.swing.*;
@ -36,16 +36,11 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{createToolBarPane(rowSize, columnSize),null},
new Component[]{new JSeparator(),null},
new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize),null},
new Component[]{createAnimationPane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createDrillToolsPane(), null},
new Component[]{new JSeparator(), null},
new Component[]{createAutoRefreshPane(plot),null},
new Component[]{new JSeparator(),null},
new Component[]{createHyperlinkPane(),null}
};
@ -54,18 +49,27 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
private JPanel createDrillToolsPane() {
openOrClose = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
textAttrPane = new ChartTextAttrPane();
backgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
selectBackgroundPane = new VanChartBackgroundPaneWithOutImageAndShadow();
textAttrPane = new ChartTextAttrPane(){
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{null},
new Component[]{fontNameComboBox},
new Component[]{buttonPane}
};
}
};
backgroundPane = new VanChartBackgroundPane4DrillMap();
selectBackgroundPane = new VanChartBackgroundPane4DrillMap();
catalogSuperLink = new VanChartCatalogHyperLinkPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p,p,p,p,p};
double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{null,null},
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_Select_Color"), selectBackgroundPane)},
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) {
return TableLayout4VanChartHelper.createTitlePane(title, component, 20);
return TableLayout4VanChartHelper.createGapTableLayoutPane(title, component);
}
private void checkEnable() {
@ -133,4 +137,16 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
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.GanttReportDataProjectPane;
import javax.swing.*;
import java.awt.*;
/**
@ -18,6 +19,7 @@ public class GanttPlotReportDataContentPane extends AbstractReportDataContentPan
public GanttPlotReportDataContentPane() {
initComponent();
this.setLayout(new BorderLayout(0, V_GAP));
projectPane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(projectPane, BorderLayout.NORTH);
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.GanttTableDataProjectPane;
import javax.swing.*;
import java.awt.*;
import java.util.List;
@ -19,8 +20,10 @@ public class GanttPlotTableDataContentPane extends AbstractTableDataContentPane
public GanttPlotTableDataContentPane() {
initComponent();
this.setLayout(new BorderLayout(0, V_GAP));
projectPane.setBorder(BorderFactory.createEmptyBorder(0,17,0,15));
this.add(projectPane, BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER);
this.add(new JSeparator(), BorderLayout.CENTER);
this.add(contentPane, BorderLayout.SOUTH);
}
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.addActionListener(getButtonListener());
UILabel title = new UILabel(getTitleText(), SwingConstants.RIGHT);
UILabel title = new UILabel(getTitleText());
title.setPreferredSize(new Dimension(60, 20));
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() {
this.setLayout(new BorderLayout());
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() {
@ -51,7 +55,7 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
protected void initLayout() {
this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(title + ":", SwingConstants.RIGHT);
UILabel label = new UILabel(title);
label.setPreferredSize(new Dimension(75, 20));
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() {
this.setLayout(new BorderLayout());
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() {
seriesComboBox = new UIComboBox();
seriesComboBox.setPreferredSize(new Dimension(100,20));
startTimeComboBox = new UIComboBox();
startTimeComboBox.setPreferredSize(new Dimension(100,20));
endTimeComboBox = new UIComboBox();
endTimeComboBox.setPreferredSize(new Dimension(100,20));
markerTimeComboBox = new UIComboBox();
markerTimeComboBox.setPreferredSize(new Dimension(100,20));
markerTimeComboBox.addItem(NONE);
processComboBox = new UIComboBox();
processComboBox.setPreferredSize(new Dimension(100,20));
processComboBox.addItem(NONE);
taskIDComboBox = new UIComboBox();
taskIDComboBox.setPreferredSize(new Dimension(100,20));
taskIDComboBox.addItem(NONE);
taskIDComboBox.setToolTipText(Inter.getLocText("Plugin-ChartF_Task_ID_Tooltip"));
}
@ -67,15 +65,15 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{
double[] col = {p,f};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")+":", SwingConstants.RIGHT), seriesComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Time")+":", SwingConstants.RIGHT), startTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Time")+":", SwingConstants.RIGHT), endTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Marker_Time")+":", SwingConstants.RIGHT), markerTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Process")+":", SwingConstants.RIGHT), processComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Task_ID")+":", SwingConstants.RIGHT), taskIDComboBox}
new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")), seriesComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Time")), startTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Time")), endTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Marker_Time")), markerTimeComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Process")), processComboBox},
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

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(){
@Override
protected String getTitleText() {
return Inter.getLocText("Plugin-ChartF_Project_Name") + ":";
return Inter.getLocText("Plugin-ChartF_Project_Name");
}
@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) {
editLabel = new UIEditLabel(text,SwingConstants.RIGHT){
editLabel = new UIEditLabel(text,SwingConstants.LEFT){
protected void doAfterMousePress(){
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() {
this.setLayout(new BorderLayout());
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() {
startTaskID = createTinyFormulaPaneWithTitle(Inter.getLocText("Plugin-ChartF_Start_Task_ID"));
@ -42,7 +43,7 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
protected void initLayout() {
this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(title + ":", SwingConstants.RIGHT);
UILabel label = new UILabel(title );
label.setPreferredSize(new Dimension(75, 20));
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.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
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.designer.data.data.GanttDataPaneHelper;
import com.fr.stable.StringUtils;
@ -28,18 +27,19 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane
public GanttLinkTableDataContentPane() {
this.setLayout(new BorderLayout());
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() {
startTaskIDComboBox = new UIComboBox();
startTaskIDComboBox.setPreferredSize(new Dimension(100,20));
endTaskIDComboBox = new UIComboBox();
endTaskIDComboBox.setPreferredSize(new Dimension(100,20));
linkTypeComboBox = new UIComboBox();
linkTypeComboBox.setPreferredSize(new Dimension(100,20));
}
@ -50,12 +50,12 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane
double[] col = {p,f};
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_End_Task_ID")+":", SwingConstants.RIGHT), endTaskIDComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Link_Type")+":", SwingConstants.RIGHT), linkTypeComboBox}
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Task_ID")), startTaskIDComboBox},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Task_ID")), endTaskIDComboBox},
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

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save