Browse Source

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

master
fanglei 7 years ago
parent
commit
6ec84ffb62
  1. 28
      designer/src/com/fr/design/mainframe/ReportComponentComposite.java
  2. 2
      designer/src/com/fr/design/mainframe/ReportFloatPane.java
  3. 43
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  4. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/no_result.png
  5. 37
      designer/src/com/fr/design/mainframe/alphafine/preview/ActionPreviewPane.java
  6. 31
      designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java
  7. 10
      designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java
  8. 9
      designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java
  9. 9
      designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java
  10. 9
      designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java
  11. 24
      designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java
  12. 4
      designer/src/com/fr/grid/GridColumn.java
  13. 15
      designer/src/com/fr/grid/GridColumnUI.java
  14. 13
      designer/src/com/fr/grid/GridCorner.java
  15. 2
      designer/src/com/fr/grid/GridMouseAdapter.java
  16. 4
      designer/src/com/fr/grid/GridRow.java
  17. 11
      designer/src/com/fr/grid/GridRowUI.java
  18. 60
      designer/src/com/fr/poly/PolyDesigner.java
  19. 3
      designer/src/com/fr/start/Designer.java
  20. 14
      designer_base/src/com/fr/design/actions/core/ActionFactory.java
  21. 30
      designer_base/src/com/fr/design/dialog/BasicScrollPane.java
  22. 6
      designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java
  23. 44
      designer_base/src/com/fr/design/file/HistoryTemplateListPane.java
  24. 6
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  25. 2
      designer_base/src/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java
  26. 4
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java
  27. 21
      designer_base/src/com/fr/design/gui/style/FormatPane.java
  28. 1
      designer_base/src/com/fr/design/locale/designer.properties
  29. 1
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  30. 1
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  31. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  32. 41
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  33. 5
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  34. 5
      designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java
  35. 18
      designer_base/src/com/fr/design/style/AbstractSelectBox.java
  36. 2
      designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java
  37. 113
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  38. 2
      designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java
  39. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/area.png
  40. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/bar.png
  41. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/bubble.png
  42. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/column.png
  43. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/custom.png
  44. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/drillmap.png
  45. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/funnel.png
  46. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/gantt.png
  47. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/gauge.png
  48. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/heatmap.png
  49. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/line.png
  50. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/map.png
  51. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/multiPie.png
  52. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/pie.png
  53. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/radar.png
  54. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/scatter.png
  55. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/structure.png
  56. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/treeMap.png
  57. BIN
      designer_chart/src/com/fr/design/images/form/toolbar/wordcloud.png
  58. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_Drill_Map.png
  59. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewBubble.png
  60. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewCustom.png
  61. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewFunnel.png
  62. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewGantt.png
  63. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewGauge.png
  64. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewHeatMap.png
  65. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMap.png
  66. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png
  67. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewRadar.png
  68. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewScatter.png
  69. BIN
      designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png
  70. 9
      designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java
  71. 5
      designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java
  72. 44
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  73. 10
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java
  74. 38
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  75. 28
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java
  76. 31
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/AbstractPlotSeriesPane.java
  77. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java
  78. 40
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  79. 3
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/XYScatterSeriesPane.java
  80. 93
      designer_chart/src/com/fr/design/module/ChartDesignerModule.java
  81. 40
      designer_chart/src/com/fr/plugin/chart/area/AreaIndependentVanChartInterface.java
  82. 96
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaConditionPane.java
  83. 95
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java
  84. 51
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java
  85. BIN
      designer_chart/src/com/fr/plugin/chart/area/images/area.png
  86. BIN
      designer_chart/src/com/fr/plugin/chart/area/images/custom.png
  87. BIN
      designer_chart/src/com/fr/plugin/chart/area/images/percentStack.png
  88. BIN
      designer_chart/src/com/fr/plugin/chart/area/images/stack.png
  89. 56
      designer_chart/src/com/fr/plugin/chart/bar/BarIndependentVanChartInterface.java
  90. 96
      designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java
  91. 23
      designer_chart/src/com/fr/plugin/chart/bar/VanChartBarStylePane.java
  92. BIN
      designer_chart/src/com/fr/plugin/chart/bar/images/bar.png
  93. BIN
      designer_chart/src/com/fr/plugin/chart/bar/images/custom.png
  94. BIN
      designer_chart/src/com/fr/plugin/chart/bar/images/percentstack.png
  95. BIN
      designer_chart/src/com/fr/plugin/chart/bar/images/stack.png
  96. 85
      designer_chart/src/com/fr/plugin/chart/bubble/BubbleIndependentVanChartInterface.java
  97. 94
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleConditionPane.java
  98. 22
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleConditionSelectionPane.java
  99. 27
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java
  100. 171
      designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java
  101. Some files were not shown because too many files have changed in this diff Show More

28
designer/src/com/fr/design/mainframe/ReportComponentComposite.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.FRContext;
import com.fr.base.ScreenResolution;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.designer.EditingState;
import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListPane;
@ -11,6 +12,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.grid.Grid;
import com.fr.main.impl.WorkBook;
import com.fr.poly.PolyDesigner;
import com.fr.report.report.TemplateReport;
import javax.swing.*;
@ -45,9 +47,6 @@ public class ReportComponentComposite extends JComponent {
private JSliderPane jSliderContainer;
private boolean isCtrl = false;
/**
* Constructor with workbook..
*/
@ -66,29 +65,10 @@ public class ReportComponentComposite extends JComponent {
jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener);
}
KeyListener showValSpinnerKeyListener = new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (e.isControlDown()) {
isCtrl = true;
}
}
@Override
public void keyReleased(KeyEvent e) {
isCtrl = false;
}
};
MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() {
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
if (isCtrl) {
if (InputEventBaseOnOS.isControlDown(e)) {
int dir = e.getWheelRotation();
int old_resolution = (int) jSliderContainer.getShowVal().getValue();
jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN));
@ -149,12 +129,12 @@ public class ReportComponentComposite extends JComponent {
}
if (centerCardPane.editingComponet.elementCasePane == null) {
centerCardPane.getPolyDezi().polyArea.addMouseWheelListener(showValSpinnerMouseWheelListener);
return;
}
Grid grid = centerCardPane.editingComponet.elementCasePane.getGrid();
this.centerCardPane.editingComponet.elementCasePane.getGrid().addMouseWheelListener(showValSpinnerMouseWheelListener);
this.centerCardPane.editingComponet.elementCasePane.getGrid().addKeyListener(showValSpinnerKeyListener);
if (!grid.hasFocus() && grid.isRequestFocusEnabled()) {
grid.requestFocus();

2
designer/src/com/fr/design/mainframe/ReportFloatPane.java

@ -62,7 +62,7 @@ public class ReportFloatPane extends JPanel {
new Component[]{new UILabel(), new UILabel(Inter.getLocText("FR-Designer_Add_FloatElement")), emptyLabel, toolBarPane},
};
JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
leftTopPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 15));
leftTopPane.setBorder(BorderFactory.createEmptyBorder(12, 5, 0, 15));
this.add(leftTopPane, BorderLayout.NORTH);
}

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

@ -16,15 +16,13 @@ import com.fr.design.mainframe.alphafine.cell.model.PluginModel;
import com.fr.design.mainframe.alphafine.cell.render.ContentCellRender;
import com.fr.design.mainframe.alphafine.listener.DocumentAdapter;
import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.design.mainframe.alphafine.preview.ActionPreviewPane;
import com.fr.design.mainframe.alphafine.preview.DocumentPreviewPane;
import com.fr.design.mainframe.alphafine.preview.FilePreviewPane;
import com.fr.design.mainframe.alphafine.preview.PluginPreviewPane;
import com.fr.design.mainframe.alphafine.preview.*;
import com.fr.design.mainframe.alphafine.search.manager.*;
import com.fr.form.main.Form;
import com.fr.form.main.FormIO;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.general.http.HttpClient;
import com.fr.io.TemplateWorkBookIO;
@ -75,6 +73,7 @@ public class AlphaFineDialog extends UIDialog {
private JPanel searchResultPane;
private Point pressedPoint;
private UIScrollPane leftSearchResultPane;
private JPanel defaultPane;
private JPanel rightSearchResultPane;
private AlphaFineList searchResultList;
private SearchListModel searchListModel;
@ -299,15 +298,10 @@ public class AlphaFineDialog extends UIDialog {
leftSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT));
rightSearchResultPane = new JPanel();
rightSearchResultPane.setBackground(Color.WHITE);
UILabel splitLine = new UILabel();
splitLine.setBackground(AlphaFineConstants.GRAY);
splitLine.setPreferredSize(new Dimension(1, AlphaFineConstants.CONTENT_HEIGHT));
rightSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.RIGHT_WIDTH - 1, AlphaFineConstants.CONTENT_HEIGHT));
searchResultPane.add(leftSearchResultPane, BorderLayout.WEST);
searchResultPane.add(splitLine, BorderLayout.CENTER);
searchResultPane.add(rightSearchResultPane, BorderLayout.EAST);
UILabel splitLabel = new UILabel();
splitLabel.setBackground(AlphaFineConstants.GRAY);
splitLabel.setPreferredSize(new Dimension(AlphaFineConstants.HEIGHT, 1));
searchResultPane.add(splitLabel, BorderLayout.NORTH);
add(searchResultPane, BorderLayout.SOUTH);
@ -344,6 +338,32 @@ public class AlphaFineDialog extends UIDialog {
*/
private void fireStopLoading() {
searchListModel.resetState();
replaceLeftPane();
}
/**
* 刷新容器
*/
private void refreshContainer() {
validate();
repaint();
revalidate();
}
/**
* 重置结果面板
*/
private void replaceLeftPane() {
if (searchListModel.getSize() == 0 && defaultPane == null) {
defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/no_result.png"));
searchResultPane.remove(leftSearchResultPane);
searchResultPane.add(defaultPane, BorderLayout.WEST);
} else if (searchListModel.getSize() > 0 && defaultPane != null) {
searchResultPane.remove(defaultPane);
defaultPane = null;
searchResultPane.add(leftSearchResultPane, BorderLayout.WEST);
}
refreshContainer();
}
/**
@ -534,7 +554,7 @@ public class AlphaFineDialog extends UIDialog {
break;
case ACTION:
rightSearchResultPane.removeAll();
rightSearchResultPane.add(new ActionPreviewPane());
rightSearchResultPane.add(new NoResultPane(Inter.getLocText("FR-Designer_NoResult"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/noresult.png")));
validate();
repaint();
break;
@ -625,7 +645,6 @@ public class AlphaFineDialog extends UIDialog {
*/
private void initGlobalListener() {
initAWTEventListener();
initMouseListener();
}
/**
@ -912,6 +931,8 @@ public class AlphaFineDialog extends UIDialog {
if (getSelectedIndex() == 1) {
searchTextField.requestFocus();
}
} else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
searchTextField.requestFocus();
}
}
});

BIN
designer/src/com/fr/design/mainframe/alphafine/images/no_result.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

37
designer/src/com/fr/design/mainframe/alphafine/preview/ActionPreviewPane.java

@ -1,37 +0,0 @@
package com.fr.design.mainframe.alphafine.preview;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
/**
* Created by XiaXiang on 2017/5/5.
*/
public class ActionPreviewPane extends JPanel {
private static final Font NAME = new Font("Song_TypeFace", 0, 14);
public ActionPreviewPane() {
setLayout(new BorderLayout());
setBackground(null);
setBorder(BorderFactory.createEmptyBorder(135, 0, 0, 0));
UILabel image = new UILabel();
image.setPreferredSize(new Dimension(150, 111));
image.setHorizontalAlignment(SwingConstants.CENTER);
image.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
image.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/noresult.png"));
UILabel description = new UILabel(Inter.getLocText("FR-Designer_NoResult"));
description.setForeground(AlphaFineConstants.MEDIUM_GRAY);
description.setFont(NAME);
description.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
description.setHorizontalAlignment(SwingConstants.CENTER);
this.add(image, BorderLayout.CENTER);
this.add(description, BorderLayout.SOUTH);
}
}

31
designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java

@ -0,0 +1,31 @@
package com.fr.design.mainframe.alphafine.preview;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.general.FRFont;
import javax.swing.*;
import java.awt.*;
/**
* Created by XiaXiang on 2017/8/14.
*/
public class NoResultPane extends JPanel {
public NoResultPane(String title, Icon icon) {
setLayout(new BorderLayout());
setBackground(Color.white);
setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT));
UILabel image = new UILabel();
image.setPreferredSize(new Dimension(150, 111));
image.setHorizontalAlignment(SwingConstants.CENTER);
image.setIcon(icon);
image.setBorder(BorderFactory.createEmptyBorder(100,0,0,0));
UILabel description = new UILabel(title);
description.setForeground(AlphaFineConstants.MEDIUM_GRAY);
description.setFont(FRFont.getInstance("SimSun", Font.PLAIN, 14));
description.setBorder(BorderFactory.createEmptyBorder(0, 0, 135, 0));
description.setHorizontalAlignment(SwingConstants.CENTER);
add(image, BorderLayout.CENTER);
add(description, BorderLayout.SOUTH);
}
}

10
designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java

@ -74,15 +74,13 @@ public class ActionSearchManager implements AlphaFineSearchProcessor {
if (!AlphaFineHelper.getFilterResult().contains(object)) {
result.add(object);
}
}
if (result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set")));
if (result.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(result);
return lessModelList;
}
if (result.size() > 0 && result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set")));
lessModelList.addAll(result);
} else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.ACTION));
lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE));

9
designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java

@ -76,13 +76,12 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor {
searchResult.add(cellModel);
}
}
if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP")));
if (searchResult.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(searchResult);
return lessModelList;
}
if (searchResult.size() > 0 && searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP")));
lessModelList.addAll(searchResult);
} else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.DOCUMENT));
lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE));

9
designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java

@ -100,13 +100,12 @@ public class FileSearchManager implements AlphaFineSearchProcessor {
}
}
if (result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates")));
if (result.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(result);
return lessModelList;
}
if (result.size() > 0 && result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates")));
lessModelList.addAll(result);
} else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.FILE));
lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE));

9
designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java

@ -109,13 +109,12 @@ public class PluginSearchManager implements AlphaFineSearchProcessor {
searchResult.add(cellModel);
}
}
if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon")));
if (searchResult.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(searchResult);
return this.lessModelList;
}
if (searchResult.size() > 0 && searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates")));
lessModelList.addAll(searchResult);
} else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.PLUGIN));
lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE));

24
designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.form;
import com.fr.base.DynamicUnitList;
import com.fr.base.ScreenResolution;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.cell.bar.DynamicScrollBar;
import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener;
@ -40,7 +41,6 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
private FormTabPane sheetNameTab;
private JPanel hbarContainer;
private JSliderPane jSliderContainer;
private boolean isCtrl = false;
public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) {
this.jForm = jform;
@ -52,33 +52,13 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
jSliderContainer.getShowVal().addChangeListener(showValSpinnerChangeListener);
jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener);
this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(showValSpinnerMouseWheelListener);
this.elementCaseDesigner.elementCasePane.getGrid().addKeyListener(showValSpinnerKeyListener);
elementCaseDesigner.addTargetModifiedListener(this);
}
KeyListener showValSpinnerKeyListener = new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (e.isControlDown()) {
isCtrl = true;
}
}
@Override
public void keyReleased(KeyEvent e) {
isCtrl = false;
}
};
MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() {
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
if (isCtrl) {
if (InputEventBaseOnOS.isControlDown(e)) {
int dir = e.getWheelRotation();
int old_resolution = (int) jSliderContainer.getShowVal().getValue();
jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN));

4
designer/src/com/fr/grid/GridColumn.java

@ -68,11 +68,11 @@ public class GridColumn extends GridHeader<String> {
@Override
public Dimension getPreferredSize() {
ElementCasePane reportPane = this.getElementCasePane();
float time = (float)reportPane.getResolution()/ ScreenResolution.getScreenResolution();
if (!reportPane.isColumnHeaderVisible()) {
return new Dimension(0, 0);
}
return new Dimension(super.getPreferredSize().width, GraphHelper.getFontMetrics(this.getFont()).getHeight() + SIZE_ADJUST);
return new Dimension(super.getPreferredSize().width, (int) (GraphHelper.getFontMetrics(this.getFont()).getHeight() * time + SIZE_ADJUST));
}
}

15
designer/src/com/fr/grid/GridColumnUI.java

@ -48,6 +48,9 @@ public class GridColumnUI extends ComponentUI {
Grid gird = reportPane.getGrid();
// size
Dimension size = gridColumn.getSize();
float time = (float)resolution/ScreenResolution.getScreenResolution();
g2d.setFont(gridColumn.getFont().deriveFont(gridColumn.getFont().getSize2D() * time));
ElementCase elementCase = reportPane.getEditingElementCase();
DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCase);
int horizontalValue = gird.getHorizontalValue();
@ -77,7 +80,7 @@ public class GridColumnUI extends ComponentUI {
g2d.setPaint(gridColumn.getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, 0, size.getHeight());
double tmpWidth2 = 0;
drawColumn(horizontalBeginValue, horizontalEndValue, columnWidthList, tmpWidth2, reportPane, g2d, gridColumn);
drawColumn(horizontalBeginValue, horizontalEndValue, columnWidthList, tmpWidth2, reportPane, g2d, gridColumn, size);
// 画上边的边框线.
g2d.setColor(gridColumn.getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, tmpWidth2, 0);
@ -85,14 +88,13 @@ public class GridColumnUI extends ComponentUI {
private void drawColumn(int horizontalBeginValue, int horizontalEndValue, DynamicUnitList columnWidthList, double tmpWidth2,
ElementCasePane reportPane, Graphics2D g2d, GridColumn gridColumn) {
ElementCasePane reportPane, Graphics2D g2d, GridColumn gridColumn, Dimension size) {
// draw column.
boolean isSelectedBounds;
double tmpWidth1 = 0;
double tmpIncreaseWidth = 0;
ElementCase elementCase = reportPane.getEditingElementCase();
Dimension size = gridColumn.getSize();
// FontMetrics
FontRenderContext fontRenderContext = g2d.getFontRenderContext();
LineMetrics fm = gridColumn.getFont().getLineMetrics("", fontRenderContext);
@ -158,8 +160,9 @@ public class GridColumnUI extends ComponentUI {
columnContent += "(FR)";
}
}
float time = (float)resolution/ScreenResolution.getScreenResolution();
double stringWidth = gridColumn.getFont().getStringBounds(columnContent, fontRenderContext).getWidth();
double stringWidth = gridColumn.getFont().getStringBounds(columnContent, fontRenderContext).getWidth() * time;
// if (stringWidth > tmpIncreaseWidth) {
// paintMoreContent(i, g2d, tmpWidth1, size, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent);
// } else {
@ -203,8 +206,8 @@ public class GridColumnUI extends ComponentUI {
g2d.setPaint(UIManager.getColor("controlShadow"));
}
}
GraphHelper.drawString(g2d, columnContent, tmpWidth1 + (tmpIncreaseWidth - stringWidth) / 2, fmAscent + GridHeader.SIZE_ADJUST / 2 + 1);
GraphHelper.drawString(g2d, columnContent, tmpWidth1 + (tmpIncreaseWidth - stringWidth) / 2,
(gridColumn.getSize().height/2 + g2d.getFont().getSize2D()/2));
}

13
designer/src/com/fr/grid/GridCorner.java

@ -12,6 +12,7 @@ import java.awt.geom.Rectangle2D;
import javax.swing.event.MouseInputListener;
import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution;
import com.fr.design.mainframe.ElementCasePane;
/**
@ -37,7 +38,7 @@ public class GridCorner extends BaseGridComponent {
Graphics2D g2d = (Graphics2D) g;
ElementCasePane reportPane = this.getElementCasePane();
float time = (float)reportPane.getResolution()/ ScreenResolution.getScreenResolution();
//size
Dimension size = this.getSize();
Rectangle2D rect2D = new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight());
@ -50,7 +51,7 @@ public class GridCorner extends BaseGridComponent {
GraphHelper.fill(g2d, rect2D);
}
paintArc(g2d, size);
paintArc(g2d, size, time);
//画左边的边框线.
g2d.setColor(reportPane.getGridColumn().getSeparatorLineColor());
@ -85,15 +86,15 @@ public class GridCorner extends BaseGridComponent {
}
private void paintArc(Graphics2D g2d, Dimension size) {
private void paintArc(Graphics2D g2d, Dimension size, float time) {
g2d.setColor(Color.gray);
int width = size.width - 16;
int width = (int) (size.width - (16 * time));
int avgWidth = width / 3;
int height = size.height - 8;
int height = (int) (size.height - (8 * time));
int avgHeight = height / 3;
for (int i = 0; i < 3; i ++) {
for (int j = 0; j < 3; j ++) {
GraphHelper.fillArc(g2d, 8 + i * avgWidth, 4 + j * avgHeight, 3, 3, 0, 360);
GraphHelper.fillArc(g2d, (8 * time) + (i * avgWidth), (4 * time) + (j * avgHeight), 3, 3, 0, 360);
}
}
}

2
designer/src/com/fr/grid/GridMouseAdapter.java

@ -807,11 +807,13 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
* @param e
*/
public void mouseWheelMoved(MouseWheelEvent e) {
if (!InputEventBaseOnOS.isControlDown(e)) {
ElementCasePane reportPane = grid.getElementCasePane();
if (reportPane.isHorizontalScrollBarVisible()) {
reportPane.getVerticalScrollBar().setValue(reportPane.getVerticalScrollBar().getValue() + e.getWheelRotation() * 3);
}
}
}
/**
* @param e

4
designer/src/com/fr/grid/GridRow.java

@ -65,13 +65,13 @@ public class GridRow extends GridHeader<Integer> {
@Override
public Dimension getPreferredSize() {
ElementCasePane reportPane = this.getElementCasePane();
float time = (float)reportPane.getResolution()/ ScreenResolution.getScreenResolution();
if (!(reportPane.isRowHeaderVisible())) {
return new Dimension(0, 0);
}
int maxCharNumber = this.caculateMaxCharNumber(reportPane);
return new Dimension(maxCharNumber * GraphHelper.getFontMetrics(this.getFont()).charWidth('M'), super.getPreferredSize().height);
return new Dimension((int) (maxCharNumber * GraphHelper.getFontMetrics(this.getFont()).charWidth('M') * time), super.getPreferredSize().height);
}
/**

11
designer/src/com/fr/grid/GridRowUI.java

@ -46,6 +46,9 @@ public class GridRowUI extends ComponentUI {
ElementCasePane reportPane = gridRow.getElementCasePane();
// size
Dimension size = gridRow.getSize();
float time = (float)resolution/ScreenResolution.getScreenResolution();
g2d.setFont(gridRow.getFont().deriveFont(gridRow.getFont().getSize2D() * time));
ElementCase elementCase = reportPane.getEditingElementCase();
DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCase);
int verticalValue = reportPane.getGrid().getVerticalValue();
@ -152,10 +155,10 @@ public class GridRowUI extends ComponentUI {
, ElementCase elementCase, Dimension size, double tmpHeight1) {
// FontMetrics
FontRenderContext fontRenderContext = g2d.getFontRenderContext();
float fmAscent = GraphHelper.getFontMetrics(gridRow.getFont()).getAscent();
double stringWidth = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getWidth();
double stringHeight = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getHeight();
float time = (float)resolution/ScreenResolution.getScreenResolution();
float fmAscent = GraphHelper.getFontMetrics(gridRow.getFont()).getAscent() * time;
double stringWidth = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getWidth() * time;
double stringHeight = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getHeight() * time;
if (isSelectedBounds) {
g2d.setColor(gridRow.getSelectedForeground());
} else {

60
designer/src/com/fr/poly/PolyDesigner.java

@ -7,6 +7,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.edit.CopyAction;
@ -51,10 +52,7 @@ import com.fr.stable.unit.UnitRectangle;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.List;
@ -98,7 +96,6 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
private JSliderPane jSliderContainer;
private int resolution = (int) (ScreenResolution.getScreenResolution() * JSliderPane.getInstance().resolutionTimes);
private float time;
private boolean isCtrl = false;
public PolyDesigner(PolyWorkSheet report) {
super(report);
@ -123,6 +120,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
this.setFocusTraversalKeysEnabled(false);
new PolyDesignerDropTarget(this);
toolBarComponent = new JComponent[]{new CutAction(this).createToolBarComponent(), new CopyAction(this).createToolBarComponent(), new PasteAction(this).createToolBarComponent(), new DeleteBlockAction(this).createToolBarComponent()};
polyArea.addMouseWheelListener(mouseWheelListener);
this.addSelectionChangeListener(new SelectionListener() {
@Override
@ -138,8 +136,21 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
});
}
MouseWheelListener mouseWheelListener = new MouseWheelListener() {
@Override
public void mouseWheelMoved(MouseWheelEvent evt) {
int id = evt.getID();
if (id == MouseEvent.MOUSE_WHEEL){
if (!InputEventBaseOnOS.isControlDown(evt)) {
int rotations = evt.getWheelRotation();
verScrollBar.setValue(verScrollBar.getValue() + rotations * ROTATIONS);
}
}
}
};
private void initComponents() {
jSliderContainer = JSliderPane.getInstance();
// jSliderContainer = JSliderPane.getInstance();
this.setLayout(FRGUIPaneFactory.createBorderLayout());
ployareaPane = new JPanel(new PolyDesignerLayout());
polyArea = new PolyArea(this, resolution);
@ -155,28 +166,8 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
ployareaPane.setBackground(Color.WHITE);
this.add(ployareaPane, BorderLayout.CENTER);
this.add(polyComponetsBar, BorderLayout.WEST);
this.addKeyListener(showValSpinnerKeyListener);
}
KeyListener showValSpinnerKeyListener = new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (e.isControlDown()) {
isCtrl = true;
}
}
@Override
public void keyReleased(KeyEvent e) {
isCtrl = false;
}
};
private void initPolyBlocks() {
for (int i = 0, count = this.getTarget().getBlockCount(); i < count; i++) {
TemplateBlock block = (TemplateBlock) getTarget().getBlock(i);
@ -671,23 +662,6 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
return this.getWidth();
}
@Override
protected void processMouseWheelEvent(java.awt.event.MouseWheelEvent evt) {
int id = evt.getID();
switch (id) {
case MouseEvent.MOUSE_WHEEL: {
if (isCtrl) {
int dir = evt.getWheelRotation();
int old_resolution = (int) jSliderContainer.getShowVal().getValue();
jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN));
} else {
int rotations = evt.getWheelRotation();
this.getVerticalScrollBar().setValue(this.getVerticalScrollBar().getValue() + rotations * ROTATIONS);
}
break;
}
}
}
/**
* 开始编辑

3
designer/src/com/fr/start/Designer.java

@ -116,6 +116,9 @@ public class Designer extends BaseDesigner {
if (ActionFactory.getChartPreStyleAction() != null) {
menuDef.addShortCut(ActionFactory.getChartPreStyleAction());
}
if (ActionFactory.getChartMapEditorAction() != null) {
menuDef.addShortCut(ActionFactory.getChartMapEditorAction());
}
}
insertMenu(menuDef, MenuHandler.SERVER);

14
designer_base/src/com/fr/design/actions/core/ActionFactory.java

@ -32,6 +32,8 @@ public class ActionFactory {
private static UpdateAction chartPreStyleAction = null;
private static UpdateAction chartMapEditorAction = null;
/**
* 待说明
*
@ -69,6 +71,18 @@ public class ActionFactory {
return chartPreStyleAction;
}
/**
* 注册图表的 地图资源
* @param action 地图资源action
*/
public static void registerChartMapEditorAction(UpdateAction action) {
chartMapEditorAction = action;
}
public static UpdateAction getChartMapEditorAction() {
return chartMapEditorAction;
}
/**
* kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
*

30
designer_base/src/com/fr/design/dialog/BasicScrollPane.java

@ -1,23 +1,15 @@
package com.fr.design.dialog;
import java.awt.AWTEvent;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.LayoutManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.iscrollbar.UIScrollBar;
import javax.swing.*;
import java.awt.*;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.iscrollbar.UIScrollBar;
public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
private static final long serialVersionUID = -4293765343535336275L;
private static final int MAXVALUE = 100;
@ -119,7 +111,7 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
/**
* august:不容易啊 还要用笔画图立个方程才计算出来
*
* @param e
* @param
*/
protected void ajustValues() {
doLayout();
@ -170,6 +162,13 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
beginY = value * (preferheight - maxheight) / (MAXVALUE - scrollBar.getVisibleAmount());
}
}
setLeftContentPaneBounds(parent, scrollBar, beginY, maxheight);
leftcontentPane.validate();
}
}
protected void setLeftContentPaneBounds(Container parent, UIScrollBar scrollBar, int beginY, int maxheight) {
int width = parent.getWidth();
int height = parent.getHeight();
if (leftcontentPane.getPreferredSize().height > maxheight) {
@ -178,9 +177,6 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
} else {
leftcontentPane.setBounds(0, 0, width - DET_WIDTH, height);
}
leftcontentPane.validate();
}
}
protected boolean isShowScrollBar() {

6
designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java

@ -128,6 +128,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
}
public void setCurrentEditor(int i) {
upButton.setSelectedIndex(i);
currentEditor = this.cards[i];
centerPane.removeAll();
centerPane.add(currentEditor);
@ -223,6 +224,10 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
return columnIndex;
}
public void updateUpButton(){
upButton.setSelectedIndex(this.getCurrentEditorIndex());
}
public Object update(String makeAdiff) {
String name = currentEditor.getName();
Object columnIndex = currentEditor.getValue();
@ -335,6 +340,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
* 清除组件数据
*/
public void clearComponentsData() {
setCurrentEditor(0);
for (Editor card : cards) {
card.clearData();
}

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

@ -1,31 +1,20 @@
package com.fr.design.file;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.*;
import java.util.List;
import java.util.logging.Level;
import javax.swing.*;
import com.fr.design.constants.UIConstants;
import com.fr.design.DesignerEnvManager;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import com.fr.base.FRContext;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.dav.LocalEnv;
import com.fr.design.DesignModelAdapter;
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.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.UIList;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
@ -33,9 +22,19 @@ import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.stable.Constants;
import com.fr.stable.project.ProjectConstants;
import com.fr.design.utils.gui.GUIPaintUtils;
public class HistoryTemplateListPane extends JPanel implements FileOperations {
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
public class HistoryTemplateListPane extends JPanel implements FileOperations, CallbackEvent{
private static final int LIST_BORDER = 4;
private List<JTemplate<?, ?>> historyList;
private JTemplate<?, ?> editingTemplate;
@ -228,6 +227,11 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations {
return ComparatorUtils.equals(filename, editingFileName);
}
@Override
public void callback() {
getCurrentEditingTemplate().repaint();
}
private class HistoryListCellRender extends DefaultListCellRenderer {

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

@ -301,6 +301,12 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
return;
}
}
// 如果有可见模态对话框,则不隐藏
for (Window window : DesignerContext.getDesignerFrame().getOwnedWindows()) {
if (window instanceof JDialog && window.isVisible() && ((JDialog)window).isModal()) {
return;
}
}
saveSettings();
setVisible(false);
}

2
designer_base/src/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java

@ -1,10 +1,10 @@
package com.fr.design.gui.frpane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.dialog.BasicPane;
import javax.swing.*;
import java.awt.*;

4
designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java

@ -57,12 +57,12 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
super.paint(g, c);
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Color linecolor = UIConstants.TITLED_BORDER_COLOR;
Color linecolor = UIConstants.POP_DIALOG_BORDER;
if (comboBox.isPopupVisible()) {
arrowButton.setSelected(true);
} else {
linecolor = UIConstants.TITLED_BORDER_COLOR;
linecolor = UIConstants.POP_DIALOG_BORDER;
arrowButton.setSelected(false);
}
g2d.setColor(linecolor);

21
designer_base/src/com/fr/design/gui/style/FormatPane.java

@ -113,12 +113,7 @@ public class FormatPane extends AbstractBasicStylePane {
centerPane.setBorder(LEFT_BORDER);
frFontPane.setBorder(LEFT_BORDER);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Base_Format"), SwingConstants.LEFT), typePane},
new Component[]{null, centerPane},
new Component[]{fontPane, frFontPane},
};
Component[][] components = getComponent(fontPane, centerPane, typePane);
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
@ -126,6 +121,16 @@ public class FormatPane extends AbstractBasicStylePane {
this.add(panel, BorderLayout.CENTER);
}
protected Component[][] getComponent (JPanel fontPane, JPanel centerPane, JPanel typePane) {
return new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Base_Format"), SwingConstants.LEFT), typePane},
new Component[]{null, centerPane},
new Component[]{fontPane, frFontPane},
};
}
protected UIComboBoxRenderer createComBoxRender() {
return new UIComboBoxRenderer() {
@Override
@ -383,6 +388,10 @@ public class FormatPane extends AbstractBasicStylePane {
};
typeComboBox.setRenderer(render);
typeComboBox.addItemListener(itemListener);
setTypeComboBoxPane(typeComboBox);
}
protected void setTypeComboBoxPane (UIComboBox typeComboBox) {
this.add(typeComboBox, BorderLayout.NORTH);
}

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

@ -2126,3 +2126,4 @@ FS-Designer_DS_Filter_Even_Tip=Even_Tip
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

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

@ -2122,3 +2122,4 @@ FR-Designer_Barcode_Size=Barcode_Size
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

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

@ -2133,3 +2133,4 @@ FR-Designer_Barcode_Size=\u6761\u5F62\u7801\u5927\u5C0F
FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5947\u6570\u96C6(1,3,5...)
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

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

@ -2125,3 +2125,4 @@ FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB\
FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u9078\u64C7\u4E86\u5076\u6578\u96C6(2,4,6...)
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

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

@ -77,7 +77,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public static final EastRegionContainerPane getInstance() {
if (THIS == null) {
THIS = new EastRegionContainerPane();
// THIS.setLastToolPaneY(DesignerEnvManager.getEnvManager().getLastEastRegionToolPaneY());
THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastEastRegionContainerWidth());
}
return THIS;
@ -85,13 +84,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public EastRegionContainerPane() {
super();
// setVerticalDragEnabled(false);
initPropertyItemList();
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available"));
defaultAuthorityPane = getDefaultPane(Inter.getLocText("FR-Designer_Not_Support_Authority_Edit"));
switchMode(PropertyMode.REPORT);
// initContentPane();
// super(leftPane, rightPane);
setContainerWidth(CONTAINER_WIDTH);
}
@ -230,8 +226,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public EastRegionContainerPane(JPanel leftPane, JPanel rightPane) {
super(leftPane, rightPane);
// setVerticalDragEnabled(false);
// setContainerWidth(260);
}
public void replaceUpPane(JComponent pane) {
@ -377,29 +371,23 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
hasEnabledTab = true;
if (!propertyItem.isPoppedOut()) {
propertyCard.show(rightPane, name); // 显示第一个可用tab
propertyItem.setTabButtonSelected();
hasAvailableTab = true;
break;
}
}
}
if (!hasAvailableTab) {
resetPropertyIcons();
if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) {
propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE);
} else {
propertyCard.show(rightPane, DEFAULT_PANE);
}
}
// if (this.getRightPane() instanceof DockingView) {
// ((DockingView) this.getRightPane()).refreshDockingView();
// }
}
public void refreshDownPane() {
// JComponent pane = propertyItemList.get(1).getContentPane();
// if (pane instanceof DockingView) {
// ((DockingView) pane).refreshDockingView();
// }
}
private void refreshContainer() {
@ -460,7 +448,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
this.btnIconName = btnIconName;
initButton();
initPropertyPanel();
// this.visibleModes = new ArrayList<PropertyMode>(visibleModes);
initModes(visibleModes, enableModes);
}
@ -576,11 +563,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
// private void refreshContainer() {
// propertyPanel.validate();
// propertyPanel.repaint();
// propertyPanel.revalidate();
// }
private String getBtnIconUrl() {
return ICON_BASE_DIR + btnIconName + iconSuffix;
}
@ -594,6 +576,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
public void setTabButtonSelected() {
resetPropertyIcons();
iconSuffix = ICON_SUFFIX_SELECTED;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
}
private void initButton() {
button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) {
public Dimension getPreferredSize() {
@ -614,11 +604,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} else {
popupFixedPane();
}
resetPropertyIcons();
iconSuffix = ICON_SUFFIX_SELECTED;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
setTabButtonSelected();
}
});
}
@ -655,7 +641,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 弹出对话框
public void popupDialog() {
// setIsPoppedOut(true);
if (isPoppedOut) {
return;
}
@ -667,15 +652,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupDialog.adjustLocation();
popupDialog.setVisible(true);
}
// initContentPane();
// refreshContainer();
removeItem(this);
}
public void popToFrame() {
if (isPoppedOut) {
isPoppedOut = false;
// popupDialog.dispose();
popupDialog.setVisible(false);
initContentPane();
onResize();
@ -892,7 +874,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
container.add(popupToolPane, BorderLayout.NORTH);
container.add(contentPane, BorderLayout.CENTER);
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT);
// validate();
adjustLocation();
initListener();

5
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -379,10 +379,9 @@ public abstract class ToolBarMenuDock {
// shortCuts.add(new ForumAction());
}
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new AboutAction());
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new AlphaFineAction());
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new AboutAction());
return shortCuts.toArray(new ShortCut[shortCuts.size()]);
}

5
designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java

@ -137,6 +137,8 @@ public class DatabaseDictPane extends FurtherBasicBeanPane<DatabaseDictionary> i
this.chooseTable.populateBean(new DataBaseItems(dbName, dbDict.getSchema(), dbDict.getTableName()));
if (this.database == null) {
this.keyColumnPane.updateUpButton();
this.valueDictPane.updateUpButton();
return;
}
@ -187,6 +189,9 @@ public class DatabaseDictPane extends FurtherBasicBeanPane<DatabaseDictionary> i
}
dbDict.setKeyColumnIndex(keyColumnIndex);
dbDict.setKeyColumnName(keyColumnName);
}else {
this.keyColumnPane.updateUpButton();
this.valueDictPane.updateUpButton();
}
Object value = this.valueDictPane.update();
if (value instanceof Integer) {

18
designer_base/src/com/fr/design/style/AbstractSelectBox.java

@ -38,12 +38,10 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
displayComponent.setEmptyBackground();
displayComponent.setBorder(new TriggleLineBorder());
triggleButton = new UIToggleButton(UIConstants.ARROW_DOWN_ICON);
triggleButton.setRoundBorder(true, Constants.LEFT);
triggleButton.setPreferredSize(new Dimension(21, 20));
triggleButton.setPreferredSize(new Dimension(20, 20));
JPanel displayPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
displayPane.add(displayComponent, BorderLayout.CENTER);
displayComponent.setPreferredSize(new Dimension(preWidth, displayPane.getPreferredSize().height));
displayComponent.addMouseListener(mouseListener);
@ -59,7 +57,6 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
}
public void ancestorRemoved(AncestorEvent evt) {
hidePopupMenu();
}
public void ancestorMoved(AncestorEvent event) {
@ -75,8 +72,6 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
triggleButton.setEnabled(enabled);
}
@Override
public JPanel initWindowPane(double preWidth) {
// TODO Auto-generated method stub
@ -88,8 +83,8 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
super.paint(g);
Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setColor(UIConstants.LINE_COLOR);
g2d.drawRoundRect(0, 0, this.getWidth() , this.getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
g2d.setColor(UIConstants.POP_DIALOG_BORDER);
g2d.drawRoundRect(0, 0, this.getWidth() - 1 , this.getHeight() - 1, 4, 4);
triggleButton.setSelected(isPopupVisible());
}
@ -105,15 +100,12 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
private class TriggleLineBorder extends AbstractBorder {
private static final long serialVersionUID = 1065857667981063530L;
protected Insets borderInsets = new Insets(0, 0, 0, 1);
protected Insets borderInsets = new Insets(0, 0, 0, 0);
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
g.translate(x, y);
g.setColor(UIConstants.LINE_COLOR);
g.drawLine(3, 0, w-2, 0);
g.drawLine(3, h - 1, w-2, h - 1);
g.drawLine(w - 1, 0, w - 1, h);
g.setColor(UIConstants.POP_DIALOG_BORDER);
g.translate(-x, -y);
}

2
designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java

@ -19,7 +19,7 @@ public class GUIPaintUtils {
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR);
} else {
g2d.setColor(UIConstants.TITLED_BORDER_COLOR);
g2d.setColor(UIConstants.POP_DIALOG_BORDER);
}
if (isRound) {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

113
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -9,8 +9,25 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chart.fun.IndependentChartUIProvider;
import com.fr.design.chart.gui.ChartWidgetOption;
import com.fr.design.chartinterface.*;
import com.fr.design.chartinterface.AreaIndependentChartInterface;
import com.fr.design.chartinterface.BarIndependentChartInterface;
import com.fr.design.chartinterface.BubbleIndependentChartInterface;
import com.fr.design.chartinterface.ColumnIndependentChartInterface;
import com.fr.design.chartinterface.CustomIndependentChartInterface;
import com.fr.design.chartinterface.DonutIndependentChartInterface;
import com.fr.design.chartinterface.FunnelIndependentChartInterface;
import com.fr.design.chartinterface.GanttIndependentChartInterface;
import com.fr.design.chartinterface.GisMapIndependentChartInterface;
import com.fr.design.chartinterface.LineIndependentChartInterface;
import com.fr.design.chartinterface.MapIndependentChartInterface;
import com.fr.design.chartinterface.MeterIndependentChartInterface;
import com.fr.design.chartinterface.PieIndependentChartInterface;
import com.fr.design.chartinterface.RadarIndependentChartInterface;
import com.fr.design.chartinterface.RangeIndependentChartInterface;
import com.fr.design.chartinterface.StockIndependentChartInterface;
import com.fr.design.chartinterface.XYScatterIndependentChartInterface;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -25,20 +42,58 @@ import com.fr.form.ui.ChartEditor;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.chart.PiePlot4VanChart;
import com.fr.plugin.chart.area.AreaIndependentVanChartInterface;
import com.fr.plugin.chart.area.VanChartAreaPlot;
import com.fr.plugin.chart.bar.BarIndependentVanChartInterface;
import com.fr.plugin.chart.bubble.BubbleIndependentVanChartInterface;
import com.fr.plugin.chart.bubble.VanChartBubblePlot;
import com.fr.plugin.chart.column.ColumnIndependentVanChartInterface;
import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.plugin.chart.custom.CustomIndependentVanChartInterface;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.drillmap.DrillMapIndependentVanChartInterface;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.funnel.VanChartFunnelPlot;
import com.fr.plugin.chart.funnel.designer.FunnelIndependentVanChartInterface;
import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.plugin.chart.gantt.designer.GanttIndependentVanChartInterface;
import com.fr.plugin.chart.gauge.GaugeIndependentVanChartInterface;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.heatmap.VanChartHeatMapPlot;
import com.fr.plugin.chart.heatmap.designer.HeatMapIndependentVanChartInterface;
import com.fr.plugin.chart.line.LineIndependentVanChartInterface;
import com.fr.plugin.chart.line.VanChartLinePlot;
import com.fr.plugin.chart.map.MapIndependentVanChartInterface;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.multilayer.MultiPieIndependentVanChartInterface;
import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot;
import com.fr.plugin.chart.pie.PieIndependentVanChartInterface;
import com.fr.plugin.chart.radar.RadarIndependentVanChartInterface;
import com.fr.plugin.chart.radar.VanChartRadarPlot;
import com.fr.plugin.chart.scatter.ScatterIndependentVanChartInterface;
import com.fr.plugin.chart.scatter.VanChartScatterPlot;
import com.fr.plugin.chart.structure.VanChartStructurePlot;
import com.fr.plugin.chart.structure.desinger.StructureIndependentVanChartInterface;
import com.fr.plugin.chart.treemap.TreeMapIndependentVanChartInterface;
import com.fr.plugin.chart.treemap.VanChartTreeMapPlot;
import com.fr.plugin.chart.vanchart.imgevent.design.DesignImageEvent;
import com.fr.plugin.chart.wordcloud.VanChartWordCloudPlot;
import com.fr.plugin.chart.wordcloud.designer.WordCloudIndependentVanChartInterface;
import com.fr.plugin.injectable.PluginSingleInjection;
import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.plugin.solution.closeable.CloseableContainedMap;
import com.fr.stable.ArrayUtils;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import javax.swing.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* Created by eason on 14/12/29.
@ -58,24 +113,18 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
static {
readDefault();
readVanChart();
StableFactory.registerMarkedObject(XML_TAG, classManager);
}
static {
GeneralContext.listenPluginRunningChanged(new PluginEventListener() {
GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@Override
public void on(PluginEvent event) {
public void envChanged() {
//重新注册designModuleFactory
DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption());
}
}, new PluginFilter() {
@Override
public boolean accept(PluginContext context) {
return context.contain(PluginModule.ExtraChartType);
DesignImageEvent.registerDefaultCallbackEvent(HistoryTemplateListPane.getInstance());
}
});
}
@ -131,6 +180,36 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
}
}
private static void readVanChart() {
if (chartTypeInterfaces.containsKey(ChartTypeManager.VAN_CHART_PRIORITY)) {
return;
}
CloseableContainedMap<String, IndependentChartUIProvider, LinkedHashMap> chartUIList =
new CloseableContainedMap<String, IndependentChartUIProvider, LinkedHashMap>(LinkedHashMap.class);
chartUIList.put(PiePlot4VanChart.VAN_CHART_PIE_PLOT, new PieIndependentVanChartInterface());
chartUIList.put(VanChartColumnPlot.VAN_CHART_COLUMN_PLOT_ID, new ColumnIndependentVanChartInterface());
chartUIList.put(VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID, new BarIndependentVanChartInterface());
chartUIList.put(VanChartLinePlot.VAN_CHART_LINE_PLOT, new LineIndependentVanChartInterface());
chartUIList.put(VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID, new AreaIndependentVanChartInterface());
chartUIList.put(VanChartGaugePlot.VAN_CHART_GAUGE_PLOT, new GaugeIndependentVanChartInterface());
chartUIList.put(VanChartRadarPlot.VAN_CHART_RADAR_PLOT, new RadarIndependentVanChartInterface());
chartUIList.put(VanChartScatterPlot.VAN_CHART_SCATTER_PLOT_ID, new ScatterIndependentVanChartInterface());
chartUIList.put(VanChartBubblePlot.VAN_CHART_BUBBLE_PLOT_ID, new BubbleIndependentVanChartInterface());
chartUIList.put(VanChartCustomPlot.VAN_CHART_CUSTOM_PLOT_ID, new CustomIndependentVanChartInterface());
chartUIList.put(VanChartMultiPiePlot.VAN_CHART_MULTILAYER_PLOT_ID, new MultiPieIndependentVanChartInterface());
chartUIList.put(VanChartMapPlot.VAN_CHART_MAP_ID, new MapIndependentVanChartInterface());
chartUIList.put(VanChartDrillMapPlot.VAN_CHART_DRILL_MAP_ID, new DrillMapIndependentVanChartInterface());
chartUIList.put(VanChartTreeMapPlot.VAN_CHART_TREE_MAP_PLOT_ID, new TreeMapIndependentVanChartInterface());
chartUIList.put(VanChartFunnelPlot.VAN_CHART_FUNNEL_PLOT_ID, new FunnelIndependentVanChartInterface());
chartUIList.put(VanChartHeatMapPlot.VAN_CHART_HEAT_MAP_ID, new HeatMapIndependentVanChartInterface());
chartUIList.put(VanChartWordCloudPlot.WORD_CLOUD_PLOT_ID, new WordCloudIndependentVanChartInterface());
chartUIList.put(VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface());
chartUIList.put(VanChartStructurePlot.STRUCTURE_PLOT_ID, new StructureIndependentVanChartInterface());
chartTypeInterfaces.put(ChartTypeManager.VAN_CHART_PRIORITY, chartUIList);
}
private static void readDefault() {

2
designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java

@ -81,7 +81,7 @@ public class MinMaxValuePane extends JPanel {
};
}
private void checkBoxUse() {
protected void checkBoxUse() {
minValueField.setEnabled(minCheckBox.isSelected());
maxValueField.setEnabled(maxCheckBox.isSelected());

BIN
designer_chart/src/com/fr/design/images/form/toolbar/area.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/bar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/bubble.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/column.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/custom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/drillmap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/funnel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/gantt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/gauge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/heatmap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/line.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/map.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/multiPie.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/pie.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/radar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/scatter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/structure.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
designer_chart/src/com/fr/design/images/form/toolbar/treeMap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

BIN
designer_chart/src/com/fr/design/images/form/toolbar/wordcloud.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_Drill_Map.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewBubble.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewCustom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewFunnel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewGantt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewGauge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewHeatMap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewMultiPie.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewRadar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1002 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewScatter.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

BIN
designer_chart/src/com/fr/design/images/poly/toolbar/Plugin-ChartF_NewTreeMap.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

9
designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java

@ -4,6 +4,9 @@ package com.fr.design.mainframe.chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import javax.swing.*;
import java.awt.*;
public abstract class AbstractChartAttrPane extends AbstractAttrNoScrollPane {
public abstract void populate(ChartCollection collection);
@ -25,6 +28,12 @@ public abstract class AbstractChartAttrPane extends AbstractAttrNoScrollPane {
}
protected void initContentPane() {
leftContentPane = createContentPane();
leftContentPane.setBorder(BorderFactory.createMatteBorder(10, 0, 0, 0, original));
this.add(leftContentPane, BorderLayout.CENTER);
}
/**
* 刷新图表数据界面
* @param collection 图表收集器

5
designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe.chart;
import com.fr.base.BaseUtils;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.ChartTypeInterfaceManager;
@ -74,12 +73,12 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
//构建主面板
protected void createTabsPane() {
Icon[] iconArray = new Icon[paneList.size()];
String[] iconArray = new String[paneList.size()];
card = new CardLayout();
center = new JPanel(card);
for (int i = 0; i < paneList.size(); i++) {
AbstractChartAttrPane pane = paneList.get(i);
iconArray[i] = BaseUtils.readIcon(pane.getIconPath());
iconArray[i] = pane.title4PopupWindow();
center.add(pane, pane.title4PopupWindow());
}

44
designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java

@ -4,9 +4,9 @@ package com.fr.design.mainframe.chart.gui;
* Created by hufan on 2016/10/20.
*/
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.base.AttrChangeConfig;
import com.fr.chart.base.AttrChangeType;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
@ -15,6 +15,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.awt.*;
@ -55,11 +56,9 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p,p,p};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Change_Style") + ":"),configStyleButton},
new Component[]{null, null},
new Component[]{new JSeparator(), null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Change_Style")),configStyleButton},
new Component[]{configPane, null},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -84,6 +83,8 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
panel.add(buttonConfigPane, "button");
panel.add(carouselConfigPane, "carousel");
panel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
return panel;
}
@ -92,35 +93,33 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p,p};
timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0);
colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH);
Component[][] components = new Component[][]{
new Component[]{createTimeIntervalPane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createCarouseBackgroundColorPane(),null},
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), timeInterval},
new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel},
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
}
private Component createTimeIntervalPane() {
timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0);
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Time_Interval") + ":", timeInterval);
}
private JPanel createCarouseBackgroundColorPane() {
colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH);
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Background") + ":", colorSelectBox4carousel);
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
}
private JPanel createTitleStylePane(){
styleAttrPane = new ChartTextAttrPane();
styleAttrPane = new ChartTextAttrPane(){
protected Component[][] getComponents(JPanel buttonPane) {
return new Component[][]{
new Component[]{fontNameComboBox, null},
new Component[]{buttonPane, null}
};
}
};
styleAttrPane.setPreferredSize(new Dimension(WIDTH, (int) styleAttrPane.getPreferredSize().getHeight()));
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style")+":", styleAttrPane);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-Chart_Character")+":", styleAttrPane);
}
private JPanel createButtonBackgroundColorPane(){
colorSelectBox4button = new ColorSelectBoxWithOutTransparent(WIDTH);
return TableLayoutHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Background") + ":", colorSelectBox4button);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Background") + ":", colorSelectBox4button);
}
private JPanel createButtonConfigPane() {
@ -130,7 +129,6 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
double[] rowSize = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{createTitleStylePane(),null},
new Component[]{new JSeparator(),null},
new Component[]{createButtonBackgroundColorPane(),null},
};

10
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java

@ -97,6 +97,12 @@ public class ChartFillStylePane extends BasicBeanPane<AttrFillStyle>{
customPane.setPreferredSize(new Dimension(200, 130));
colorGradient.setPreferredSize(new Dimension(120, 30));
this.setLayout(new BorderLayout());
this.add(getContentPane(),BorderLayout.CENTER);
}
protected JPanel getContentPane () {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { f };
@ -105,9 +111,7 @@ public class ChartFillStylePane extends BasicBeanPane<AttrFillStyle>{
new Component[]{styleSelectBox},
new Component[]{customPane}
} ;
JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ColorMatch"},components,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
return TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"ColorMatch"},components,rowSize,columnSize);
}
@Override

38
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -1,25 +1,23 @@
package com.fr.design.mainframe.chart.gui.style;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font;
import javax.swing.JPanel;
import com.fr.base.BaseUtils;
import com.fr.base.Utils;
import com.fr.chart.base.TextAttr;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.dialog.BasicPane;
import com.fr.general.FRFont;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import javax.swing.*;
import java.awt.*;
public class ChartTextAttrPane extends BasicPane {
private static final long serialVersionUID = 6731679928019436869L;
@ -147,17 +145,23 @@ public class ChartTextAttrPane extends BasicPane {
buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
double[] columnSize = {f};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{fontNameComboBox},
new Component[]{buttonPane}
};
double[] columnSize = {p,f};
double[] rowSize = {p, p, p};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
populate(FRFont.getInstance());
}
protected Component[][] getComponents(JPanel buttonPane) {
UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT);
return new Component[][]{
new Component[]{null, null},
new Component[]{text, fontNameComboBox},
new Component[]{null, buttonPane}
};
}
}

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

@ -1,24 +1,18 @@
package com.fr.design.mainframe.chart.gui.style;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.util.List;
import javax.swing.JPanel;
import javax.swing.border.Border;
import com.fr.chart.chartattr.Plot;
import com.fr.design.constants.UIConstants;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*;
import java.util.List;
public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
private static final long serialVersionUID = 2298609199400393886L;
@ -114,8 +108,8 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
protected static class NamePane {
private String name;
private AbstractChartTabPane pane;
public NamePane(String name, AbstractChartTabPane pane) {
private BasicScrollPane pane;
public NamePane(String name, BasicScrollPane pane) {
this.name = name;
this.pane = pane;
}
@ -125,10 +119,10 @@ public abstract class ThirdTabPane<T> extends BasicBeanPane<T>{
public void setName(String name) {
this.name = name;
}
public AbstractChartTabPane getPane() {
public BasicScrollPane getPane() {
return pane;
}
public void setPane(AbstractChartTabPane pane) {
public void setPane(BasicScrollPane pane) {
this.pane = pane;
}

31
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/AbstractPlotSeriesPane.java

@ -32,42 +32,47 @@ public abstract class AbstractPlotSeriesPane extends BasicBeanPane<Plot>{
this.parentPane = parent;
fillStylePane = getFillStylePane();
this.setLayout(new BorderLayout());
this.add(getContentPane(custom), BorderLayout.CENTER);
}
protected JPanel getContentPane(boolean custom) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { f };
double[] rowSize = { p,p,p};
double[] columnSize = {f};
double[] rowSize = {p, p, p};
Component[][] components = new Component[3][1];
if(custom) {
if(!(plot instanceof Bar2DPlot)) {
JPanel panel;
if (custom) {
if (!(plot instanceof Bar2DPlot)) {
components[0] = new Component[]{getContentInPlotType()};
components[1] = new Component[]{new JSeparator()};
}
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(panel);
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
this.setLayout(new BorderLayout());
this.add(scrollPane, BorderLayout.CENTER);
} else {
if(fillStylePane != null) {
if (fillStylePane != null) {
components[0] = new Component[]{fillStylePane};
components[1] = new Component[]{new JSeparator()};
}
JPanel contentPane = getContentInPlotType();
if(contentPane != null) {
if (contentPane != null) {
components[2] = new Component[]{contentPane};
}
JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
this.setLayout(new BorderLayout());
this.add(panel,BorderLayout.CENTER);
panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15));
return panel;
}
/**

4
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java

@ -3,9 +3,9 @@ package com.fr.design.mainframe.chart.gui.style.series;
import com.fr.chart.chartattr.Chart;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.designer.AbstractVanChartScrollPane;
import javax.swing.*;
import java.awt.*;
@ -15,7 +15,7 @@ import java.awt.*;
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-1-5 上午10:31:50
*/
public class ChartSeriesPane extends BasicScrollPane<Chart>{
public class ChartSeriesPane extends AbstractVanChartScrollPane<Chart> {
protected AbstractPlotSeriesPane seriesStyleContentPane;
protected Chart chart;

40
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -1,27 +1,11 @@
package com.fr.design.mainframe.chart.gui.style.series;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.LayoutManager;
import java.awt.Point;
import java.awt.event.*;
import java.util.ArrayList;
import java.util.List;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.base.Formula;
import com.fr.chart.base.AreaColor;
import com.fr.chart.base.ChartBaseUtils;
import com.fr.chart.chartglyph.MapHotAreaColor;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.frpane.UINumberDragPane;
@ -31,12 +15,20 @@ import com.fr.design.gui.ipoppane.PopupHider;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.design.style.color.ColorControlWindow;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = 10;
@ -105,11 +97,10 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p, p};
Component[][] components = createComponents();
upControlPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
upControlPane = TableLayoutHelper.createTableLayoutPane(components, getRowSIze (), columnSize);
this.textFieldList = this.getTextFieldList();
this.textGroup = new TextFieldGroupPane();
@ -122,6 +113,11 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
refreshGroupPane(colors, getValueArray(number));
}
protected double[] getRowSIze () {
double p = TableLayout.PREFERRED;
return new double[]{p, p, p};
}
protected UIButtonGroup<Integer> getDesignTypeButtonGroup(){
return designTypeButtonGroup;
}

3
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/XYScatterSeriesPane.java

@ -10,6 +10,7 @@ import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.ConfigHelper;
/**
* 散点图 属性表 系列界面.
@ -57,7 +58,7 @@ public class XYScatterSeriesPane extends LineSeriesPane {
attrList.remove(attr);
}
if(!ComparatorUtils.equals(markerPane.getSelectedMarkder().getMarkerType(), Marker.NULL_M)){
if(!ComparatorUtils.equals(markerPane.getSelectedMarkder().getMarkerType(), ConfigHelper.NULL_M)){
attrList.addDataSeriesCondition(new AttrMarkerType(markerPane.getSelectedMarkder().getMarkerType()));
}
}

93
designer_chart/src/com/fr/design/module/ChartDesignerModule.java

@ -1 +1,92 @@
package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App<?>[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if (ArrayUtils.isEmpty(rowChart)) { continue; } String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } }
package com.fr.design.module;
import com.fr.chart.base.ChartInternationalNameContentBean;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.chart.ChartDialog;
import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.chart.gui.ChartWidgetOption;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.mainframe.App;
import com.fr.design.mainframe.ChartPropertyPane;
import com.fr.form.ui.ChartEditor;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.plugin.chart.map.server.ChartMapEditorAction;
import com.fr.stable.ArrayUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import javax.swing.*;
/**
* Created by IntelliJ IDEA.
* Author : Richer
* Version: 7.0.3
* Date: 13-7-8
* Time: 上午9:13
*/
public class ChartDesignerModule extends DesignModule {
public void start() {
super.start();
dealBeforeRegister();
register();
registerFloatEditor();
}
protected void dealBeforeRegister(){
StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class);
StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class);
}
private void register(){
DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup());
DesignModuleFactory.registerChartEditorClass(ChartEditor.class);
DesignModuleFactory.registerChartComponentClass(ChartComponent.class);
DesignModuleFactory.registerChartDialogClass(ChartDialog.class);
DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class);
ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction());
ActionFactory.registerChartMapEditorAction(new ChartMapEditorAction());
}
protected void registerFloatEditor() {
ActionFactory.registerChartCollection(ChartCollection.class);
}
/**
* 返回设计器能打开的模板类型的一个数组列表
*
* @return 可以打开的模板类型的数组
*/
public App<?>[] apps4TemplateOpener() {
return new App[0];
}
protected WidgetOption[] options4Show() {
ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames();
ChartWidgetOption[] child = new ChartWidgetOption[typeName.length];
for (int i = 0; i < typeName.length; i++) {
String plotID = typeName[i].getPlotID();
Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID);
if (ArrayUtils.isEmpty(rowChart)) {
continue;
}
String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID);
Icon icon = IOUtils.readIcon(iconPath);
child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]);
}
return child;
}
public String getInterNationalName() {
return Inter.getLocText("FR-Chart-Design_ChartModule");
}
}

40
designer_chart/src/com/fr/plugin/chart/area/AreaIndependentVanChartInterface.java

@ -0,0 +1,40 @@
package com.fr.plugin.chart.area;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.vanchart.AbstractMultiCategoryVanChartUI;
/**
* Created by Mitisky on 15/11/18.
*/
public class AreaIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI {
@Override
public String getIconPath() {
return "com/fr/design/images/form/toolbar/area.png";
}
@Override
public AbstractChartTypePane getPlotTypePane() {
return new VanChartAreaPlotPane();
}
public ConditionAttributesPane getPlotConditionPane(Plot plot){
return new VanChartAreaConditionPane(plot);
}
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){
return new VanChartAreaSeriesPane(parent, plot);
}
/**
* plot面板的标题
* 插件兼容
*/
public String getPlotTypeTitle4PopupWindow(){
return VanChartAreaPlotPane.TITLE;
}
}

96
designer_chart/src/com/fr/plugin/chart/area/VanChartAreaConditionPane.java

@ -0,0 +1,96 @@
package com.fr.plugin.chart.area;
import com.fr.chart.base.AttrBackground;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.Plot;
import com.fr.design.chart.series.SeriesCondition.ChartConditionPane;
import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane;
import com.fr.plugin.chart.attr.EffectHelper;
import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground;
import com.fr.plugin.chart.base.AttrDataSheet;
import com.fr.plugin.chart.base.AttrEffect;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.base.VanChartAttrTrendLine;
import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.other.condition.item.VanChartAreaFillColorConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartDataSheetContentPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartEffectConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartLabelConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartLineTypeConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartMarkerConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartSeriesColorConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartTooltipConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartTrendLineConditionPane;
import com.fr.plugin.chart.glyph.VanChartMultiCategoryDataPoint;
import com.fr.plugin.chart.scatter.large.VanChartLargeModelMarkerConditionPane;
import java.awt.*;
/**
* Created by Mitisky on 15/11/18.
*/
public class VanChartAreaConditionPane extends DataSeriesConditionPane {
private static final long serialVersionUID = -7180705321732069806L;
public VanChartAreaConditionPane(Plot plot) {
super(plot);
}
protected void initComponents() {
super.initComponents();
//添加全部条件属性后被遮挡
liteConditionPane.setPreferredSize(new Dimension(300, 400));
}
@Override
protected void addBasicAction() {
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this));
classPaneMap.put(VanChartAttrTrendLine.class, new VanChartTrendLineConditionPane(this));
classPaneMap.put(AttrAreaSeriesFillColorBackground.class, new VanChartAreaFillColorConditionPane(this, plot));
classPaneMap.put(VanChartAttrLine.class, new VanChartLineTypeConditionPane(this));
classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot));
//是否使用数据表
if (plot.getDataSheet().isVisible()) {
classPaneMap.put(AttrDataSheet.class, new VanChartDataSheetContentPane(this, plot));
}
if(PlotFactory.largeDataModel(plot)){
classPaneMap.put(VanChartAttrMarker.class, new VanChartLargeModelMarkerConditionPane(this));
} else {
classPaneMap.put(VanChartAttrMarker.class, new VanChartMarkerConditionPane(this));
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getAreaPlotDefaultEffect()));
classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot));
}
}
protected void addStyleAction() {
}
@Override
protected ChartConditionPane createListConditionPane() {
return new ChartConditionPane(){
@Override
public String[] columns2Populate() {
return new String[]{
ChartConstants.CATEGORY_INDEX,
ChartConstants.CATEGORY_NAME,
ChartConstants.SERIES_INDEX,
ChartConstants.SERIES_NAME,
ChartConstants.VALUE,
VanChartMultiCategoryDataPoint.CATEGORY_ARRAY,
};
}
};
}
/**
* 返回图表class对象
* @return class对象
*/
public Class<? extends Plot> class4Correspond() {
return VanChartAreaPlot.class;
}
}

95
designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java

@ -0,0 +1,95 @@
package com.fr.plugin.chart.area;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
/**
* Created by Mitisky on 15/11/18.
*/
public class VanChartAreaPlotPane extends AbstractVanChartTypePane {
public static final String TITLE = Inter.getLocText("Plugin-ChartF_NewArea");
private static final long serialVersionUID = -8161581682558781651L;
@Override
protected String[] getTypeIconPath() {
return new String[]{"/com/fr/plugin/chart/area/images/area.png",
"/com/fr/plugin/chart/area/images/stack.png",
"/com/fr/plugin/chart/area/images/percentStack.png",
"/com/fr/plugin/chart/area/images/custom.png",
};
}
@Override
protected String[] getTypeTipName() {
String area = Inter.getLocText("FR-Chart-Type_Area");
String stack = Inter.getLocText("FR-Chart-Type_Stacked");
String percent = Inter.getLocText("FR-Chart-Use_Percent");
return new String[]{
area,
stack + area,
percent + stack + area,
Inter.getLocText("FR-Chart-Mode_Custom")
};
}
/**
* 返回界面标题
* @return 界面标题
*/
public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewArea");
}
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartAreaPlot) {
lastTypeIndex = ((VanChartAreaPlot) plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/**
* 获取各图表类型界面ID, 本质是plotID
*
* @return 图表类型界面ID
*/
@Override
protected String getPlotTypeID() {
return VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID;
}
protected Plot getSelectedClonedPlot(){
VanChartAreaPlot newPlot = null;
Chart[] areaChart = AreaIndependentVanChart.AreaVanChartTypes;
for(int i = 0, len = areaChart.length; i < len; i++){
if(typeDemo.get(i).isPressing){
newPlot = (VanChartAreaPlot)areaChart[i].getPlot();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
} catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error In AreaChart");
}
return cloned;
}
public Chart getDefaultChart() {
return AreaIndependentVanChart.AreaVanChartTypes[0];
}
}

51
designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java

@ -0,0 +1,51 @@
package com.fr.plugin.chart.area;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane;
import com.fr.plugin.chart.line.VanChartLineSeriesPane;
import javax.swing.*;
import java.awt.*;
public class VanChartAreaSeriesPane extends VanChartLineSeriesPane{
private static final long serialVersionUID = 5497989595104913025L;
public VanChartAreaSeriesPane(ChartStylePane parent, Plot plot){
super(parent, plot);
}
protected JPanel getContentInPlotType(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p,p,p,p,p,p,p,p,p,p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{createStylePane()},
new Component[]{stylePane == null ? null : new JSeparator()},
new Component[]{createLineTypePane()},
new Component[]{new JSeparator()},
new Component[]{createMarkerPane()},
new Component[]{new JSeparator()},
new Component[]{createAreaFillColorPane()},
new Component[]{new JSeparator()},
new Component[]{createStackedAndAxisPane()},
new Component[]{createLargeDataModelPane()},
new Component[]{new JSeparator()},
new Component[]{createTrendLinePane()},
};
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
return contentPane;
}
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() {
return VanChartCustomStackAndAxisConditionPane.class;
}
}

BIN
designer_chart/src/com/fr/plugin/chart/area/images/area.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
designer_chart/src/com/fr/plugin/chart/area/images/custom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

BIN
designer_chart/src/com/fr/plugin/chart/area/images/percentStack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

BIN
designer_chart/src/com/fr/plugin/chart/area/images/stack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

56
designer_chart/src/com/fr/plugin/chart/bar/BarIndependentVanChartInterface.java

@ -0,0 +1,56 @@
package com.fr.plugin.chart.bar;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.column.VanChartColumnConditionPane;
import com.fr.plugin.chart.column.VanChartColumnSeriesPane;
import com.fr.plugin.chart.designer.other.VanChartOtherPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.vanchart.AbstractMultiCategoryVanChartUI;
/**
* Created by Mitisky on 15/10/20.
*/
public class BarIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI {
@Override
public String getIconPath() {
return "com/fr/design/images/form/toolbar/bar.png";
}
@Override
public AbstractChartTypePane getPlotTypePane() {
return new VanChartBarPlotPane();
}
public ConditionAttributesPane getPlotConditionPane(Plot plot){
return new VanChartColumnConditionPane(plot);
}
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){
return new VanChartColumnSeriesPane(parent, plot);
}
/**
* 图表的属性界面数组
* @return 属性界面
*/
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){
VanChartStylePane stylePane = new VanChartBarStylePane(listener);
VanChartOtherPane otherPane = new VanChartOtherPane();
return new AbstractChartAttrPane[]{stylePane, otherPane};
}
/**
* plot面板的标题
* 插件兼容
*/
public String getPlotTypeTitle4PopupWindow(){
return VanChartBarPlotPane.TITLE;
}
}

96
designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java

@ -0,0 +1,96 @@
package com.fr.plugin.chart.bar;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
/**
* Created by Mitisky on 15/10/20.
*/
public class VanChartBarPlotPane extends AbstractVanChartTypePane {
public static final String TITLE = Inter.getLocText("Plugin-ChartF_NewBar");
private static final long serialVersionUID = 2879689884048643002L;
@Override
protected String[] getTypeIconPath() {
return new String[]{"/com/fr/plugin/chart/bar/images/bar.png",
"/com/fr/plugin/chart/bar/images/stack.png",
"/com/fr/plugin/chart/bar/images/percentstack.png",
"/com/fr/plugin/chart/bar/images/custom.png",
};
}
@Override
protected String[] getTypeTipName() {
String bar = Inter.getLocText("FR-Chart-Type_Bar");
String stack = Inter.getLocText("FR-Chart-Type_Stacked");
String percent = Inter.getLocText("FR-Chart-Use_Percent");
return new String[]{
bar,
stack + bar,
percent + stack + bar,
Inter.getLocText("FR-Chart-Mode_Custom")
};
}
/**
* 返回界面标题
* @return 界面标题
*/
public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewBar");
}
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartColumnPlot) {
lastTypeIndex = ((VanChartColumnPlot)plot).getVanChartPlotType().ordinal();
typeDemo.get(lastTypeIndex).isPressing = true;
}
checkDemosBackground();
}
/**
* 获取各图表类型界面ID, 本质是plotID
*
* @return 图表类型界面ID
*/
@Override
protected String getPlotTypeID() {
return VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID;
}
protected Plot getSelectedClonedPlot(){
VanChartColumnPlot newPlot = null;
Chart[] barChart = BarIndependentVanChart.BarVanChartTypes;
for(int i = 0, len = barChart.length; i < len; i++){
if(typeDemo.get(i).isPressing){
newPlot = (VanChartColumnPlot)barChart[i].getPlot();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
} catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error In ColumnChart");
}
return cloned;
}
public Chart getDefaultChart() {
return BarIndependentVanChart.BarVanChartTypes[0];
}
}

23
designer_chart/src/com/fr/plugin/chart/bar/VanChartBarStylePane.java

@ -0,0 +1,23 @@
package com.fr.plugin.chart.bar;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.plugin.chart.attr.plot.VanChartAxisPlot;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.designer.style.axis.bar.VanChartBarAxisPane;
import java.util.List;
/**
* Created by Mitisky on 16/6/8.
*/
public class VanChartBarStylePane extends VanChartStylePane {
public VanChartBarStylePane(AttributeChangeListener listener) {
super(listener);
}
@Override
protected void createVanChartAxisPane(List<BasicPane> paneList, VanChartAxisPlot plot) {
paneList.add(new VanChartBarAxisPane(plot, VanChartBarStylePane.this));
}
}

BIN
designer_chart/src/com/fr/plugin/chart/bar/images/bar.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

BIN
designer_chart/src/com/fr/plugin/chart/bar/images/custom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

BIN
designer_chart/src/com/fr/plugin/chart/bar/images/percentstack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

BIN
designer_chart/src/com/fr/plugin/chart/bar/images/stack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

85
designer_chart/src/com/fr/plugin/chart/bubble/BubbleIndependentVanChartInterface.java

@ -0,0 +1,85 @@
package com.fr.plugin.chart.bubble;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.bubble.data.VanChartBubblePlotTableDataContentPane;
import com.fr.plugin.chart.designer.other.VanChartOtherPane;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.plugin.chart.vanchart.AbstractIndependentVanChartUI;
/**
* Created by Mitisky on 16/3/31.
*/
public class BubbleIndependentVanChartInterface extends AbstractIndependentVanChartUI {
/**
* 图表的类型定义界面类型就是属性表的第一个界面
*
* @return 图表的类型定义界面类型
*/
@Override
public AbstractChartTypePane getPlotTypePane() {
return new VanChartBubblePlotPane();
}
/**
* 图标路径
*
* @return 图标路径
*/
@Override
public String getIconPath() {
return "com/fr/design/images/form/toolbar/bubble.png";
}
@Override
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){
return new VanChartBubbleSeriesPane(parent, plot);
}
@Override
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){
if(((VanChartBubblePlot) plot).isForceBubble()){
return super.getTableDataSourcePane(plot, parent);
}
return new VanChartBubblePlotTableDataContentPane(parent);
}
@Override
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){
if(((VanChartBubblePlot) plot).isForceBubble()){
return super.getReportDataSourcePane(plot, parent);
}
return new BubblePlotReportDataContentPane(parent);
}
/**
* 图表的属性界面数组
* @return 属性界面
*/
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){
VanChartStylePane stylePane = new VanChartBubbleStylePane(listener);
VanChartOtherPane otherPane = new VanChartOtherPane(){
protected BasicBeanPane<Chart> createInteractivePane() {
return new VanChartBubbleInteractivePane();
}
};
return new AbstractChartAttrPane[]{stylePane, otherPane};
}
public ConditionAttributesPane getPlotConditionPane(Plot plot){
return new VanChartBubbleConditionPane(plot);
}
public String getPlotTypeTitle4PopupWindow(){
return VanChartBubblePlotPane.TITLE;
}
}

94
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleConditionPane.java

@ -0,0 +1,94 @@
package com.fr.plugin.chart.bubble;
import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.AttrBackground;
import com.fr.chart.chartattr.Plot;
import com.fr.design.chart.series.SeriesCondition.ChartConditionPane;
import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane;
import com.fr.design.chart.series.SeriesCondition.LabelAlphaPane;
import com.fr.plugin.chart.attr.EffectHelper;
import com.fr.plugin.chart.base.AttrEffect;
import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.plugin.chart.bubble.attr.VanChartAttrBubble;
import com.fr.plugin.chart.designer.PlotFactory;
import com.fr.plugin.chart.designer.other.condition.item.VanChartBubbleSetConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartEffectConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartLabelConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartSeriesColorConditionPane;
import com.fr.plugin.chart.designer.other.condition.item.VanChartTooltipConditionPane;
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel;
import com.fr.plugin.chart.scatter.attr.ScatterAttrTooltip;
import com.fr.plugin.chart.scatter.component.label.VanChartScatterLabelConditionPane;
import com.fr.plugin.chart.scatter.component.tooltip.VanChartScatterTooltipConditionPane;
import java.awt.*;
/**
* Created by Mitisky on 16/3/31.
*/
public class VanChartBubbleConditionPane extends DataSeriesConditionPane {
private static final long serialVersionUID = -7180705321732069806L;
public VanChartBubbleConditionPane(Plot plot) {
super(plot);
}
protected void initComponents() {
super.initComponents();
//添加全部条件属性后被遮挡
liteConditionPane.setPreferredSize(new Dimension(300, 400));
}
private boolean forceBubble() {
return plot instanceof VanChartBubblePlot && ((VanChartBubblePlot) plot).isForceBubble();
}
@Override
protected ChartConditionPane createListConditionPane() {
return forceBubble() ? new ChartConditionPane() : new VanChartBubbleConditionSelectionPane();
}
@Override
protected void addBasicAction() {
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this));
classPaneMap.put(VanChartAttrBubble.class, new VanChartBubbleSetConditionPane(this));
classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this));
if(forceBubble()){
addForceAction();
} else if(PlotFactory.largeDataModel(plot)){
addLargeAction();
} else {
addNormalAction();
}
}
private void addNormalAction() {
classPaneMap.put(ScatterAttrLabel.class, new VanChartScatterLabelConditionPane(this, plot));
classPaneMap.put(ScatterAttrTooltip.class, new VanChartScatterTooltipConditionPane(this, plot));
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getBubblePlotDefaultEffect()));
}
private void addForceAction() {
classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot));
classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot));
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getBubblePlotDefaultEffect()));
}
private void addLargeAction() {
classPaneMap.put(ScatterAttrTooltip.class, new VanChartScatterTooltipConditionPane(this, plot));
}
protected void addStyleAction() {
}
/**
* 返回图表class对象
* @return class对象
*/
public Class<? extends Plot> class4Correspond() {
return VanChartBubblePlot.class;
}
}

22
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleConditionSelectionPane.java

@ -0,0 +1,22 @@
package com.fr.plugin.chart.bubble;
import com.fr.chart.base.ChartConstants;
import com.fr.design.chart.series.SeriesCondition.ChartConditionPane;
import com.fr.plugin.chart.scatter.VanChartScatterDataPoint;
/**
* Created by Mitisky on 16/3/31.
*/
public class VanChartBubbleConditionSelectionPane extends ChartConditionPane {
public String[] columns2Populate() {
return new String[]{
ChartConstants.SERIES_INDEX,
ChartConstants.SERIES_NAME,
VanChartScatterDataPoint.X,
VanChartScatterDataPoint.Y,
ChartConstants.VALUE
};
}
}

27
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java

@ -0,0 +1,27 @@
package com.fr.plugin.chart.bubble;
import com.fr.chart.chartattr.Plot;
import com.fr.general.Inter;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithOutSort;
/**
* Created by Mitisky on 16/3/31.
*/
public class VanChartBubbleInteractivePane extends VanChartInteractivePaneWithOutSort {
protected String[] getNameArray() {
Plot plot = chart.getPlot();
if(plot instanceof VanChartBubblePlot && ((VanChartBubblePlot) plot).isForceBubble()) {
return new String[]{Inter.getLocText("Plugin-ChartF_XYAxis"), Inter.getLocText("Chart-Use_None")};
}
return super.getNameArray();
}
protected String[] getValueArray() {
Plot plot = chart.getPlot();
if(plot instanceof VanChartBubblePlot && ((VanChartBubblePlot) plot).isForceBubble()) {
return new String[]{VanChartConstants.ZOOM_TYPE_XY, VanChartConstants.ZOOM_TYPE_NONE};
}
return super.getValueArray();
}
}

171
designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java

@ -0,0 +1,171 @@
package com.fr.plugin.chart.bubble;
import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
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.VanChartZoom;
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane;
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel;
import com.fr.plugin.chart.vanchart.VanChart;
/**
* Created by Mitisky on 16/3/31.
*/
public class VanChartBubblePlotPane extends AbstractVanChartTypePane {
public static final String TITLE = Inter.getLocText("Plugin-ChartF_NewBubble");;
private static final long serialVersionUID = -3481633368542654247L;
private static final float FORCE_ALPHA = 1.0f;
private static final float ALPHA = 0.7f;
@Override
protected String[] getTypeIconPath() {
return new String[]{"/com/fr/plugin/chart/bubble/images/bubble.png",
"/com/fr/plugin/chart/bubble/images/force.png"
};
}
@Override
protected String[] getTypeTipName() {
return new String[]{
Inter.getLocText("FR-Chart-Chart_BubbleChart"),
Inter.getLocText("Plugin-ChartF_NewForceBubble")
};
}
/**
* 返回界面标题
* @return 界面标题
*/
public String title4PopupWindow() {
return Inter.getLocText("Plugin-ChartF_NewBubble");
}
/**
* 更新界面内容
*/
public void populateBean(Chart chart) {
for(ChartImagePane imagePane : typeDemo) {
imagePane.isPressing = false;
}
Plot plot = chart.getPlot();
if(plot instanceof VanChartBubblePlot && ((VanChartBubblePlot)plot).isForceBubble()){
lastTypeIndex = BubblePlotType.FORCE.ordinal();
} else {
lastTypeIndex = BubblePlotType.NORMAL.ordinal();
}
typeDemo.get(lastTypeIndex).isPressing = true;
checkDemosBackground();
}
private void removeDefaultAttr(ConditionAttr conditionAttr, Class <? extends DataSeriesCondition> targetClass) {
DataSeriesCondition attr = conditionAttr.getExisted(targetClass);
if (attr != null){
conditionAttr.remove(targetClass);
}
}
/**
* 获取各图表类型界面ID, 本质是plotID
*
* @return 图表类型界面ID
*/
@Override
protected String getPlotTypeID() {
return VanChartBubblePlot.VAN_CHART_BUBBLE_PLOT_ID;
}
protected Plot getSelectedClonedPlot(){
VanChartBubblePlot newPlot = null;
Chart[] bubbleChart = BubbleIndependentVanChart.BubbleVanChartTypes;
for(int i = 0, len = bubbleChart.length; i < len; i++){
if(typeDemo.get(i).isPressing){
newPlot = (VanChartBubblePlot)bubbleChart[i].getPlot();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
} catch (CloneNotSupportedException e) {
FRLogger.getLogger().error("Error In BubbleChart");
}
return cloned;
}
public Chart getDefaultChart() {
return BubbleIndependentVanChart.BubbleVanChartTypes[0];
}
@Override
/**
* 力學氣泡圖切換到其他氣泡圖時刪除條件屬性
* 并且将bubbleAttr属性重置
*/
protected void cloneOldConditionCollection(Plot oldPlot, Plot newPlot) throws CloneNotSupportedException{
cloneOldDefaultAttrConditionCollection(oldPlot, newPlot);
}
@Override
protected void cloneOldDefaultAttrConditionCollection(Plot oldPlot, Plot newPlot) throws CloneNotSupportedException{
if (oldPlot.getConditionCollection() != null) {
ConditionCollection newCondition = new ConditionCollection();
newCondition.setDefaultAttr((ConditionAttr) oldPlot.getConditionCollection().getDefaultAttr().clone());
newPlot.setConditionCollection(newCondition);
ConditionAttr attrList = newCondition.getDefaultAttr();
//根据气泡图类型,重设透明度属性
removeDefaultAttr(attrList, AttrAlpha.class);
//删除标签属性(防止切换到大数据气泡图标签属性会拷贝过去)
removeDefaultAttr(attrList, ScatterAttrLabel.class);
AttrAlpha attrAlpha = new AttrAlpha();
attrAlpha.setAlpha(((VanChartBubblePlot)newPlot).isForceBubble() ? FORCE_ALPHA : ALPHA);
attrList.addDataSeriesCondition(attrAlpha);
}
}
@Override
protected void cloneHotHyperLink(Plot oldPlot, Plot newPlot) throws CloneNotSupportedException {
if(oldPlot instanceof VanChartBubblePlot && newPlot instanceof VanChartBubblePlot){
if(((VanChartBubblePlot) oldPlot).isForceBubble() == ((VanChartBubblePlot) newPlot).isForceBubble()){
super.cloneHotHyperLink(oldPlot, newPlot);
}
}
}
@Override
protected VanChartTools createVanChartTools() {
VanChartTools tools = new VanChartTools();
tools.setSort(false);
return tools;
}
/**
* 气泡图相同图表类型之间切换的时候chart的部分属性也需要重置
* @param chart
*/
@Override
protected void resetChartAttr4SamePlot(Chart chart){
VanChartZoom vanChartZoom = new VanChartZoom();
((VanChart)chart).setVanChartZoom(vanChartZoom);
//重置监控刷新选项
resetRefreshMoreLabelAttr((VanChart)chart);
}
}

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

Loading…
Cancel
Save