Browse Source

Merge branch 'release/9.0' of http://www.finedevelop.com:2015/scm/~plough/design into release/9.0

master
plough 7 years ago
parent
commit
5217335dbf
  1. 6
      designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java
  2. 4
      designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java
  3. 5
      designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java
  4. 5
      designer/src/com/fr/design/mainframe/InformationCollector.java
  5. 3
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  6. 8
      designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java
  7. 6
      designer/src/com/fr/design/mainframe/bbs/ExitLabel.java
  8. 26
      designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java
  9. 12
      designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java
  10. 2
      designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java
  11. 2
      designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java
  12. 2
      designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  13. 20
      designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java
  14. 3
      designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java
  15. 24
      designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java
  16. 2
      designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java
  17. 70
      designer_base/src/com/fr/design/DesignerEnvManager.java
  18. 31
      designer_base/src/com/fr/design/bbs/BBSLoginUtils.java
  19. 60
      designer_base/src/com/fr/design/extra/LoginWebBridge.java
  20. 8
      designer_base/src/com/fr/design/extra/PluginFromStorePane.java
  21. 7
      designer_base/src/com/fr/design/extra/PluginOperateUtils.java
  22. 7
      designer_base/src/com/fr/design/extra/PluginUpdatePane.java
  23. 20
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  24. 8
      designer_base/src/com/fr/design/file/HistoryTemplateListPane.java
  25. 10
      designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java
  26. 224
      designer_base/src/com/fr/design/gui/chart/DownLoadOnLineSourcesHelper.java
  27. BIN
      designer_base/src/com/fr/design/gui/chart/background.png
  28. 12
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  29. 17
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  30. 6
      designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java
  31. 14
      designer_base/src/com/fr/design/gui/style/BorderPane.java
  32. 6
      designer_base/src/com/fr/design/layout/TableLayoutHelper.java
  33. 4
      designer_base/src/com/fr/design/locale/designer.properties
  34. 6
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  35. 4
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  36. 6
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  37. 6
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  38. 4
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  39. 3
      designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java
  40. 11
      designer_base/src/com/fr/design/present/dict/FormulaDictPane.java
  41. 6
      designer_chart/src/com/fr/design/chart/gui/ChartComponent.java
  42. 172
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  43. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java
  44. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  45. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java
  46. 1
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java
  47. 9
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java
  48. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java
  49. 15
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
  50. 17
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java
  51. 18
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java
  52. 14
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  53. 12
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java
  54. 14
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java
  55. 17
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  56. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java
  57. 18
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java
  58. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java
  59. 8
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java
  60. 17
      designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java
  61. 5
      designer_chart/src/com/fr/plugin/chart/custom/CustomPlotDesignerPaneFactory.java
  62. 59
      designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java
  63. 4
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartCustomPlotSelectPane.java
  64. 130
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  65. 2
      designer_chart/src/com/fr/plugin/chart/custom/other/VanChartCustomInteractivePane.java
  66. 2
      designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomAxisAreaPane.java
  67. 2
      designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomPlotLabelTabPane.java
  68. 4
      designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java
  69. 6
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  70. 37
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java
  71. 1
      designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPaneWithoutTooltip.java
  72. 84
      designer_chart/src/com/fr/plugin/chart/designer/other/ChartConditionNameObjectCreator.java
  73. 84
      designer_chart/src/com/fr/plugin/chart/designer/other/ChartHyperlinkNameObjectCreartor.java
  74. 48
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrContentPane.java
  75. 8
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionAttrPane.java
  76. 74
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java
  77. 102
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartListControlPane.java
  78. 44
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java
  79. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java
  80. 5
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java
  81. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java
  82. 8
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
  83. 26
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java
  84. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java
  85. 2
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java
  86. 7
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
  87. 18
      designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java
  88. 2
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java
  89. 6
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java
  90. 8
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java
  91. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java
  92. 6
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java
  93. 8
      designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java
  94. 3
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java
  95. 19
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java
  96. 29
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java
  97. 17
      designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java
  98. 14
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrContentPane.java
  99. 4
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrPane.java
  100. 5
      designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapInteractivePane.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");

4
designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java

@ -41,7 +41,7 @@ import java.util.regex.Pattern;
*
* @author yaoh.wu
* @version 2017年8月3日
* 复用对话框代码保留对话框原始布局
* 复用对话框代码保留对话框原始布局
* @since 8.0
*/
public class SelectedDataColumnPane extends BasicPane {
@ -282,7 +282,7 @@ public class SelectedDataColumnPane extends BasicPane {
private void initWithParameterButton(final ElementCasePane casePane, final TemplateCellElement cellElement) {
final SelectedDataColumnPane that = this;
editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel());
paramButton = new UIButton(Inter.getLocText("TableData_Dynamic_Parameter_Setting"));
paramButton = new UIButton(Inter.getLocText("FR-Designer-Basic_Dynamic_Parameter_Injection"));
paramButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
BasicDialog paramDialog = editorPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {

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

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

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

24
designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -1,6 +1,7 @@
package com.fr.quickeditor.cellquick;
import com.fr.base.Formula;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.columnrow.DSColumnConditionAction;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.DSColumnCellAction;
@ -219,8 +220,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
uiLabel.setPreferredSize(new Dimension(60, 20));
UIButton uiButton = new UIButton();
if (tc != null) {
//第一次初始化时tc为空,引发NullPointerException
uiButton = new UIButton(new DSColumnConditionAction(tc));
//第一次初始化时tc为空,会引发NullPointerException
UpdateAction condition = new DSColumnConditionAction(tc);
//丢掉icon,修改按钮名称为编辑
condition.setSmallIcon(null);
condition.setName(Inter.getLocText("FR-Designer_Edit"));
uiButton = new UIButton(condition);
}
Component[][] components = new Component[][]{
new Component[]{uiLabel, uiButton}
@ -531,6 +536,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SortPane
*/
public class ResultSetSortConfigPane extends JPanel {
private static final String DEFAULT_VALUE = "=";
private JPanel contentPane;
//面板
private UIButtonGroup sortTypePane;
@ -553,7 +559,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout);
formulaField = new JFormulaField("");
formulaField = new JFormulaField(DEFAULT_VALUE);
centerPane.add(new JPanel(), "none");
centerPane.add(formulaField, "content");
UILabel sortLabel = new UILabel(Inter.getLocText("Sort-Sort_Order"));
@ -648,6 +654,8 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SelectCountPane
*/
public class ResultSetFilterConfigPane extends JPanel {
private static final String DEFAULT_VALUE = "=";
private JPanel contentPane;
private UIComboBox rsComboBox;
private JPanel setCardPane;
@ -733,12 +741,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
tipCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
//前N个
topFormulaPane = new JFormulaField("=");
topFormulaPane = new JFormulaField(DEFAULT_VALUE);
setCardPane.add(topFormulaPane, FilterType.TOP.name());
tipCardPane.add(new JPanel(), FilterType.TOP.name());
//后N个
bottomFormulaPane = new JFormulaField("=");
bottomFormulaPane = new JFormulaField(DEFAULT_VALUE);
setCardPane.add(bottomFormulaPane, FilterType.BOTTOM.name());
tipCardPane.add(new JPanel(), FilterType.BOTTOM.name());
@ -967,13 +975,15 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.ValuePane
*/
public class CustomValuePane extends JPanel {
private static final String DEFAULT_VALUE = "=$$$";
private JFormulaField formulaField;
public CustomValuePane() {
this.setLayout(new BorderLayout());
UILabel customValueLabel = new UILabel(Inter.getLocText("FR-Designer_Display_Value"));
customValueLabel.setPreferredSize(new Dimension(60, 20));
formulaField = new JFormulaField("$$$");
formulaField = new JFormulaField(DEFAULT_VALUE);
this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
new Component[]{customValueLabel, formulaField},
}, new double[]{P}, new double[]{P, F}, HGAP, VGAP), BorderLayout.CENTER);
@ -988,7 +998,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
//formula
String valueFormula = dSColumn.getResult();
if (valueFormula == null) {
valueFormula = "$$$";
valueFormula = DEFAULT_VALUE;
}
formulaField.populateElement(cellElement);
formulaField.populate(valueFormula);

2
designer/src/com/fr/quickeditor/cellquick/CellStringQuickEditor.java

@ -69,7 +69,7 @@ public class CellStringQuickEditor extends CellQuickEditor {
return;
}
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
//todo 按enter键换至下一个单元格 yaoh.wu虽然模仿选中单元格按enter这种场景可以做到,但是原理没有弄清楚。
//todo yaoh.wu:按enter键换至下一个单元格 虽然模仿选中单元格按enter这种场景可以做到,但是原理没有弄清楚。
GridKeyListener dispatchListener = new GridKeyListener(tc.getGrid());
dispatchListener.keyPressed(e);
dispatchListener.keyTyped(e);

70
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,11 +1275,7 @@ 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)){
}else if ("lastBBSTime".equals(name)){
readLastBBSTime(reader);
} else if ("lastBBSNewsTime".equals(name)){
readLastBBSNewsTime(reader);
@ -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);

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

60
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,24 +314,28 @@ public class LoginWebBridge {
public void getLoginInfo(String userInfo) {
org.json.JSONObject jo = new org.json.JSONObject(userInfo);
String status = jo.get("status").toString();
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, ""));
} else if (status.equals(LOGIN_FAILED)) {
//账号没有QQ授权
closeQQWindow();
try {
Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("QQ_binding")));
} catch (Exception exp) {
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);
ConfigManager.getProviderInstance().setBbsUid(uid);
ConfigManager.getProviderInstance().setInShowBBsName(username);
BBSLoginUtils.bbsLogin(username, "");
} else if (status.equals(LOGIN_FAILED)) {
//账号没有QQ授权
closeQQWindow();
try {
Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("QQ_binding")));
} 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) {

7
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"));

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

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

8
designer_base/src/com/fr/design/file/HistoryTemplateListPane.java

@ -8,6 +8,7 @@ import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.gui.chart.DownLoadOnLineSourcesHelper;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.UIList;
@ -232,6 +233,13 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations, C
getCurrentEditingTemplate().repaint();
}
@Override
public void downLoadSources() {
DownLoadOnLineSourcesHelper pane = new DownLoadOnLineSourcesHelper();
pane.addMapJSONSiteInfo();
pane.addPhantomSiteInfo();
pane.installOnline();
}
private class HistoryListCellRender extends DefaultListCellRenderer {

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

224
designer_base/src/com/fr/design/gui/chart/DownLoadOnLineSourcesHelper.java

@ -0,0 +1,224 @@
package com.fr.design.gui.chart;
import com.fr.base.FRContext;
import com.fr.design.RestartHelper;
import com.fr.design.extra.PluginConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient;
import com.fr.stable.StableUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
/**
* Created by shine on 2017/8/21.
*/
public class DownLoadOnLineSourcesHelper {
// 定义加载窗口大小
private static final int LOAD_WIDTH = 455;
private static final int INCIDENT_HEIGHT = 15;
private static final int LOAD_HEIGHT = 295;
private static final int PERCENT = 100;
//进度显示界面
private JDialog dialog;
//进度条
private JProgressBar progressbar;
private List<SiteInfo> list = new ArrayList<>();
//安装结果
private boolean result = true;
//链接服务器的客户端
private HttpClient httpClient;
//总共字节数
private double totalBytes = 0;
private static final double PHANTOM_MB = 96.1 * 1024 * 1024;
public void addPhantomSiteInfo() {
this.addSiteInfo("plugin.phantomjs", "/assist/phantomjs", PHANTOM_MB);
}
private static final double MAP_JSON_MB = 3.8 * 1024 * 1024;
public void addMapJSONSiteInfo() {
this.addSiteInfo("map.json", "/assets/map", MAP_JSON_MB);
}
public void addSiteInfo(String siteKind, String localDir, double megaBits) {
if (new File(FRContext.getCurrentEnv().getPath() + localDir).exists()) {
//本地有这个资源,不下载
return;
}
httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(siteKind));
if (httpClient.getResponseCode() != HttpURLConnection.HTTP_OK) {
//服务器连不上,不下载
return;
}
totalBytes += megaBits;
list.add(new SiteInfo(siteKind, localDir));
}
public void installOnline() {
int choose = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer-Download_Online_Sources"), null, JOptionPane.YES_NO_OPTION);
if (choose == JOptionPane.OK_OPTION) {
initDialog();
dialog.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
//取消下载
result = false;
exitDialog();
}
public void windowOpened(WindowEvent e) {
downloadAndInstallPluginDependenceFile();
exitDialog();
}
});
dialog.setVisible(true);
}
}
/**
* 下载和安装不分开是因为本地如果只安装好了一个依赖下次就不需要重复下载了
* 如果下载依赖后不安装则后面的插件会把前面的插件覆盖故而下载好了一个安装一个
*
* @return
* @throws Exception
*/
private void downloadAndInstallPluginDependenceFile() {
try {
double currentBytesRead = 0;
for (int i = 0; i < list.size(); i++) {
SiteInfo siteInfo = list.get(i);
httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(siteInfo.siteKind));
if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) {
InputStream reader = httpClient.getResponseStream();
String temp = StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE);
File file = new File(temp);
StableUtils.makesureFileExist(file);
FileOutputStream writer = new FileOutputStream(temp);
byte[] buffer = new byte[PluginConstants.BYTES_NUM];
int bytesRead;
while ((bytesRead = reader.read(buffer)) > 0 && result) {
writer.write(buffer, 0, bytesRead);
buffer = new byte[PluginConstants.BYTES_NUM];
currentBytesRead += bytesRead;
setProgress(currentBytesRead);
}
reader.close();
writer.flush();
writer.close();
if (result) {
//安装文件
IOUtils.unZipFilesGBK(temp, FRContext.getCurrentEnv().getPath() + siteInfo.localDir);
}
} else {
result = false;
}
}
} catch (Exception e) {
result = false;
}
}
private void initDialog() {
// 创建标签,并在标签上放置一张图片
BufferedImage image = IOUtils.readImage("/com/fr/design/gui/chart/background.png");
ImageIcon imageIcon = new ImageIcon(image);
UILabel label = new UILabel(imageIcon);
label.setBounds(0, 0, LOAD_WIDTH, LOAD_HEIGHT);
progressbar = new JProgressBar();
// 显示当前进度值信息
progressbar.setStringPainted(true);
// 设置进度条边框不显示
progressbar.setBorderPainted(false);
// 设置进度条的前景色
progressbar.setForeground(new Color(0x38aef5));
// 设置进度条的背景色
progressbar.setBackground(new Color(188, 190, 194));
progressbar.setBounds(0, LOAD_HEIGHT, LOAD_WIDTH, INCIDENT_HEIGHT);
progressbar.setMinimum(0);
progressbar.setMaximum((int) totalBytes);
setProgress(0);
dialog = new JDialog();
dialog.setTitle(Inter.getLocText("FR-Designer-Dependence_Install_Online"));
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(label, BorderLayout.CENTER);
contentPane.add(progressbar, BorderLayout.SOUTH);
dialog.getContentPane().add(contentPane);
dialog.setModal(true);
dialog.setResizable(true);
dialog.setSize(LOAD_WIDTH, LOAD_HEIGHT + INCIDENT_HEIGHT);
dialog.setResizable(false);
GUICoreUtils.centerWindow(dialog);
dialog.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
}
private void setProgress(double current) {
progressbar.setValue((int) current);
progressbar.setString(current / totalBytes * PERCENT + "%");
progressbar.paintImmediately(new Rectangle(0, 0, LOAD_WIDTH, INCIDENT_HEIGHT * 2));
}
private void exitDialog() {
dialog.dispose();
if (result) {
int choose = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer_Work_After_Restart_Designer"), null, JOptionPane.YES_NO_OPTION);
if (choose == JOptionPane.OK_OPTION) {
RestartHelper.restart();
}
} else {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Dependence_Install_Failed"));
}
}
private class SiteInfo {
String siteKind;
String localDir;
SiteInfo(String siteKind, String localDir) {
this.siteKind = siteKind;
this.localDir = localDir;
}
}
}

BIN
designer_base/src/com/fr/design/gui/chart/background.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

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

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

@ -33,7 +33,11 @@ public class UIMenuNameableCreator implements Nameable{
public void setObj(Object obj) {
this.obj = obj;
}
public Class<? extends BasicBeanPane> getPaneClazz() {
return paneClazz;
}
/**
* 覆盖的clone方法
*/

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

6
designer_base/src/com/fr/design/layout/TableLayoutHelper.java

@ -203,7 +203,7 @@ public class TableLayoutHelper {
* 修改TableLayout布局的容器指定位置垂直间距的大小
*
* @param container 容器
* @param index vgap的索引ContainervGapA[ComponentA]vGapB[ComponentB]vGapC,vGapB index=2,
* @param index vgap的索引Container{vGapA[ComponentA]vGapB[ComponentB]vGapC},vGapB index=2,
* 详情见{@link TableLayout#setRow(int, double)}
* @param vgap vgap的新值
*/
@ -211,6 +211,7 @@ public class TableLayoutHelper {
TableLayout layout = (TableLayout) container.getLayout();
layout.setRow(index, vgap);
layout.layoutContainer(container);
container.revalidate();
container.repaint();
}
@ -218,7 +219,7 @@ public class TableLayoutHelper {
* 修改TableLayout布局的容器指定位置水平间距的大小
*
* @param container 容器
* @param index hgap的索引ContainerhGapA[ComponentA]hGapB[ComponentB],hGapB index=2,
* @param index hgap的索引Container{hGapA[ComponentA]hGapB[ComponentB]},hGapB index=2,
* 详情见{@link TableLayout#setColumn(int, double)}
* @param hgap hgap的新值
*/
@ -226,6 +227,7 @@ public class TableLayoutHelper {
TableLayout layout = (TableLayout) container.getLayout();
layout.setColumn(index, hgap);
layout.layoutContainer(container);
container.revalidate();
container.repaint();
}

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

@ -2127,4 +2127,6 @@ 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
FR-Designer-Download_Online_Sources=
FR-Designer_Select_Color=Select Color
FR-Designer-Basic_Dynamic_Parameter_Injection=Injection

6
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,4 +2123,6 @@ 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
FR-Designer-Download_Online_Sources=
FR-Designer_Select_Color=Select Color
FR-Designer-Basic_Dynamic_Parameter_Injection=Injection

4
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,4 +2121,6 @@ FS-Designer_DS_Filter_Even_Tip=
FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit=
FR-Designer-Download_Online_Sources=
FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\

6
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,4 +2122,6 @@ 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=
FR-Designer-Download_Online_Sources=
FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=

6
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,4 +2134,6 @@ 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
FR-Designer-Download_Online_Sources=\u56FE\u8868\u9700\u8981\u4E0B\u8F7D\u6700\u65B0\u7684\u8D44\u6E90\u6587\u4EF6\uFF0C\u662F\u5426\u5B89\u88C5\uFF1F
FR-Designer_Select_Color=\u9009\u62E9\u989C\u8272
FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165

4
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,4 +2126,6 @@ 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-Download_Online_Sources=
FR-Designer_Select_Color=
FR-Designer-Basic_Dynamic_Parameter_Injection=\u6CE8\u5165

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

6
designer_chart/src/com/fr/design/chart/gui/ChartComponent.java

@ -331,4 +331,10 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene
public void callback() {
this.repaint();
}
@Override
public void downLoadSources() {
HistoryTemplateListPane.getInstance().downLoadSources();
}
}

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

17
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;
}
}

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

@ -48,25 +48,29 @@ 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}));
boxPane = new JPanel();
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));
categoryPane.add(boxPane, BorderLayout.SOUTH);
this.setLayout(new BorderLayout());
this.add(categoryPane, BorderLayout.NORTH);
this.add(new JSeparator());
seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot());
this.add(seriesTypeComboxPane, BorderLayout.SOUTH);

12
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);
}
/**

8
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,8 +53,7 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
};
centerPane.setBorder(myBorder);
}
initLayout();
}
}
@Override
public void paint(Graphics g) {

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

5
designer_chart/src/com/fr/plugin/chart/custom/CustomPlotDesignerPaneFactory.java

@ -10,17 +10,16 @@ import com.fr.plugin.chart.PiePlot4VanChart;
import com.fr.plugin.chart.attr.plot.VanChartAxisPlot;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.bubble.VanChartBubblePlot;
import com.fr.plugin.chart.custom.CustomPlotFactory;
import com.fr.plugin.chart.bubble.data.VanChartBubblePlotTableDataContentPane;
import com.fr.plugin.chart.custom.component.CustomPlotLocationPane;
import com.fr.plugin.chart.custom.type.CustomPlotType;
import com.fr.plugin.chart.bubble.data.VanChartBubblePlotTableDataContentPane;
import com.fr.plugin.chart.scatter.data.VanChartScatterPlotTableDataContentPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.designer.style.axis.VanChartAxisPane;
import com.fr.plugin.chart.designer.style.axis.gauge.VanChartGaugeAxisPane;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.radar.VanChartRadarPlot;
import com.fr.plugin.chart.scatter.VanChartScatterPlot;
import com.fr.plugin.chart.scatter.data.VanChartScatterPlotTableDataContentPane;
import java.lang.reflect.Constructor;
import java.util.HashMap;

59
designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java

@ -11,12 +11,11 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.custom.component.VanChartCustomPlotSelectPane;
import com.fr.plugin.chart.custom.type.CustomPlotType;
import com.fr.plugin.chart.custom.type.CustomStyle;
import com.fr.plugin.chart.custom.CustomPlotFactory;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
import com.fr.plugin.chart.vanchart.VanChart;
@ -45,7 +44,7 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
//自定义和自动版面的容器,cardLayOut布局
private JPanel contentPane;
protected Component[][] getPaneComponents(JPanel typePane){
protected Component[][] getPaneComponents(JPanel typePane) {
initContent();
@ -72,14 +71,14 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
double[] columnSize = {p, f};
double[] rowSize = {p, p};
customPane = TableLayoutHelper.createTableLayoutPane(components, rowSize , columnSize);
customPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
contentPane = new JPanel(new CardLayout()){
contentPane = new JPanel(new CardLayout()) {
@Override
public Dimension getPreferredSize() {
if(isCustom){
if (isCustom) {
return customPane.getPreferredSize();
} else{
} else {
return new Dimension(autoPane.getWidth(), 0);
}
}
@ -98,7 +97,6 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
}
@Override
protected String[] getTypeIconPath() {
return new String[]{"/com/fr/plugin/chart/custom/images/column_line.png",
@ -143,22 +141,22 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
}
Chart[] customChart = CustomIndependentVanChart.CustomVanChartTypes;
for(int i = 0, len = customChart.length; i < len; i++){
if(typeDemo.get(i).isPressing){
if (i == customChart.length-1){
for (int i = 0, len = customChart.length; i < len; i++) {
if (typeDemo.get(i).isPressing) {
if (i == customChart.length - 1) {
isCustom = true;
//先重置自定义组合面板,如果不重置,无法获取选择顺序
if (lastState == customChart.length-1 && samePlot) {
if (lastState == customChart.length - 1 && samePlot) {
//更新数据配置,刪除已经不在的图表数据
dealCustomDefinition(chart);
customSelectPane.updateBean(chart);
}else if (samePlot){//如果是同一个图表切换过来,则重置面板
} else if (samePlot) {//如果是同一个图表切换过来,则重置面板
customSelectPane.populateBean(chart);
}
}
}else {
} else {
isCustom = false;
}
}
@ -170,20 +168,20 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
private void dealCustomDefinition(Chart chart) {
CustomDefinition definition = (CustomDefinition) chart.getFilterDefinition();
if (definition == null){
if (definition == null) {
return;
}
Map<CustomPlotType, TopDefinitionProvider> definitionMap = definition.getDefinitionProviderMap();
if (definitionMap == null){
if (definitionMap == null) {
return;
}
Map<CustomPlotType, TopDefinitionProvider> newDefinitionMap = new HashMap<CustomPlotType, TopDefinitionProvider>();
VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot();
for (int i = 0; i < customPlot.getCustomPlotList().size(); i++){
for (int i = 0; i < customPlot.getCustomPlotList().size(); i++) {
CustomPlotType plotType = CustomPlotFactory.getCustomType(customPlot.getCustomPlotList().get(i));
TopDefinitionProvider definitionProvider = definitionMap.get(plotType);
@ -195,16 +193,17 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
/**
* 不同图表切換重置chart屬性
*
* @param chart
* @param newPlot
*/
@Override
protected void resetChartAttr(Chart chart, Plot newPlot){
protected void resetChartAttr(Chart chart, Plot newPlot) {
super.resetChartAttr(chart, newPlot);
//切换图表清空数据配置
chart.setFilterDefinition(null);
//设置默认不排序
VanChartTools tools = ((VanChart)chart).getVanChartTools();
VanChartTools tools = ((VanChart) chart).getVanChartTools();
if (tools != null) {
tools.setSort(false);
}
@ -214,19 +213,19 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
for (ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
//获取上次选中的图标
VanChartCustomPlot customPlot = (VanChartCustomPlot)chart.getPlot();
VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot();
lastTypeIndex = customPlot.getCustomStyle().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
isCustom = customPlot.getCustomStyle() == CustomStyle.CUSTOM;
//自定义选择时,更新自定义面板
if (isCustom){
if (isCustom) {
customSelectPane.populateBean(chart);
}
@ -246,17 +245,17 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
return VanChartCustomPlot.VAN_CHART_CUSTOM_PLOT_ID;
}
protected Plot getSelectedClonedPlot(){
protected Plot getSelectedClonedPlot() {
VanChartCustomPlot newPlot = null;
Chart[] customChart = CustomIndependentVanChart.CustomVanChartTypes;
for(int i = 0, len = customChart.length; i < len; i++){
if(typeDemo.get(i).isPressing){
newPlot = (VanChartCustomPlot)customChart[i].getPlot();
for (int i = 0, len = customChart.length; i < len; i++) {
if (typeDemo.get(i).isPressing) {
newPlot = (VanChartCustomPlot) customChart[i].getPlot();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
cloned = (Plot) newPlot.clone();
} catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error In ScatterChart");
}
@ -271,7 +270,7 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
/**
*删除配置的条件属性
*/
protected void cloneOldConditionCollection(Plot oldPlot, Plot newPlot) throws CloneNotSupportedException{
protected void cloneOldConditionCollection(Plot oldPlot, Plot newPlot) throws CloneNotSupportedException {
cloneOldDefaultAttrConditionCollection(oldPlot, newPlot);
}
@ -279,7 +278,7 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
/**
* 删除线型配置
*/
protected void cloneOldDefaultAttrConditionCollection(Plot oldPlot, Plot newPlot) throws CloneNotSupportedException{
protected void cloneOldDefaultAttrConditionCollection(Plot oldPlot, Plot newPlot) throws CloneNotSupportedException {
if (oldPlot.getConditionCollection() != null) {
ConditionCollection newCondition = new ConditionCollection();
newCondition.setDefaultAttr((ConditionAttr) oldPlot.getConditionCollection().getDefaultAttr().clone());
@ -288,7 +287,7 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
//删除线型设置
ConditionAttr attrList = newCondition.getDefaultAttr();
DataSeriesCondition attr = attrList.getExisted(VanChartAttrLine.class);
if (attr != null){
if (attr != null) {
attrList.remove(VanChartAttrLine.class);
}
}

4
designer_chart/src/com/fr/plugin/chart/custom/component/VanChartCustomPlotSelectPane.java

@ -8,11 +8,11 @@ import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.custom.CustomPlotDesignerPaneFactory;
import com.fr.plugin.chart.custom.CustomPlotFactory;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.custom.type.CustomPlotType;
import com.fr.plugin.chart.custom.type.CustomStyle;
import com.fr.plugin.chart.custom.CustomPlotDesignerPaneFactory;
import com.fr.plugin.chart.custom.CustomPlotFactory;
import javax.swing.*;
import java.awt.*;

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

2
designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomAxisAreaPane.java

@ -2,9 +2,9 @@ package com.fr.plugin.chart.custom.style;
import com.fr.chart.chartattr.Plot;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.custom.CustomPlotDesignerPaneFactory;
import com.fr.plugin.chart.custom.CustomPlotFactory;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.designer.style.background.VanChartAxisAreaPane;
import java.util.List;

2
designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomPlotLabelTabPane.java

@ -5,10 +5,10 @@ import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.design.dialog.BasicPane;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.custom.CustomPlotFactory;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.custom.component.VanChartCustomPlotTabPane;
import com.fr.plugin.chart.custom.type.CustomPlotType;
import com.fr.plugin.chart.custom.CustomPlotFactory;
import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.designer.style.label.VanChartPlotLabelPane;

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

48
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());
cc.addConditionAttr(ca);
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save