Browse Source

Merge branch 'feature/10.0' of http://cloud.finedevelop.com:2015/scm/~harrison/design into feature/10.0

research/11.0
Harrison 5 years ago
parent
commit
770abaaba7
  1. 2
      designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java
  2. 2
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindDialog.java
  3. 2
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java
  4. 2
      designer-base/src/main/java/com/fr/design/condition/ContinuousTreeSelectionModel.java
  5. 2
      designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
  6. 6
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  7. 1
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java
  8. 1
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
  9. 3
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java
  10. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java
  11. 23
      designer-base/src/main/java/com/fr/design/fun/MultiStyleUIConfigProvider.java
  12. 39
      designer-base/src/main/java/com/fr/design/fun/StyleUIConfigProvider.java
  13. 26
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractMultiStyleUIConfigProvider.java
  14. 41
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractStyleUIConfigProvider.java
  15. 12
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  16. 12
      designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java
  17. 5
      designer-chart/src/main/java/com/fr/design/chartx/CustomChartDataPane.java
  18. 52
      designer-chart/src/main/java/com/fr/design/chartx/GanttChartDataPane.java
  19. 4
      designer-chart/src/main/java/com/fr/design/chartx/component/CellDataSeriesXYValueCorrelationPane.java
  20. 76
      designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapChartDataPane.java
  21. 120
      designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapDataPane.java
  22. 136
      designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapLayerPane.java
  23. 128
      designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/EachLayerDataDefinitionPane.java
  24. 111
      designer-chart/src/main/java/com/fr/design/chartx/data/map/AbstractAreaLngLatPane.java
  25. 106
      designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithComboBox.java
  26. 113
      designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithTinyFormula.java
  27. 93
      designer-chart/src/main/java/com/fr/design/chartx/data/map/MapChartDataPane.java
  28. 71
      designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithComboBox.java
  29. 84
      designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithTinyFormula.java
  30. 6
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java
  31. 49
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AreaMapCellDataFieldsPane.java
  32. 50
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AreaMapDataSetFieldsPane.java
  33. 64
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/LineMapCellDataFieldsPane.java
  34. 61
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/LineMapDataSetFieldsPane.java
  35. 48
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/PointMapCellDataFieldsPane.java
  36. 51
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/PointMapDataSetFieldsPane.java
  37. 12
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/ScatterDataSetFieldsPane.java
  38. 9
      designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java
  39. 8
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java
  40. 23
      designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java
  41. 3
      designer-chart/src/main/java/com/fr/van/chart/custom/CustomIndependentVanChartInterface.java
  42. 1
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  43. 8
      designer-chart/src/main/java/com/fr/van/chart/drillmap/VanDrillMapChartTypeUI.java
  44. 52
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/VanChartDrillMapContentsPane.java
  45. 39
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/VanChartDrillMapDataPane.java
  46. 130
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/VanChartMapLayerAndDataTabPane.java
  47. 117
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapDataPane.java
  48. 171
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java
  49. 94
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/SingleLayerDataDefinitionPane.java
  50. 38
      designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java
  51. 18
      designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/VanHeatMapChartTypeUI.java
  52. 36
      designer-chart/src/main/java/com/fr/van/chart/map/VanMapChartTypeUI.java
  53. 4
      designer-chart/src/main/java/com/fr/van/chart/map/designer/VanChartGroupPane.java
  54. 84
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/CustomMapChartDataContentsPane.java
  55. 177
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/MapDataPaneHelper.java
  56. 121
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java
  57. 34
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/LongitudeLatitudeAndArea.java
  58. 23
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/SeriesNameUseFieldNamePaneWithOutFilter.java
  59. 29
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/SeriesNameUseFieldValuePaneWithOutFilter.java
  60. 40
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/SeriesTypeUseComboxPaneWithOutFilter.java
  61. 13
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/AbstractLongLatAreaPane.java
  62. 65
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/AreaPane.java
  63. 71
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LineMapAreaPane.java
  64. 37
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LineMapLongLatAreaPane.java
  65. 78
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LongLatAreaPane.java
  66. 47
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/PointMapAreaPane.java
  67. 14
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/PointMapLongLatAreaPane.java
  68. 26
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/AbstractLongLatAreaPane.java
  69. 104
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/AreaPane.java
  70. 100
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LineMapAreaPane.java
  71. 42
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LineMapLongLatAreaPane.java
  72. 123
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LongLatAreaPane.java
  73. 69
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/PointMapAreaPane.java
  74. 18
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/PointMapLongLatAreaPane.java
  75. 111
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java
  76. 24
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanLineMapPlotReportDataContentPane.java
  77. 171
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java
  78. 177
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java
  79. 25
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java
  80. 225
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java
  81. 33
      designer-realize/src/main/java/com/fr/design/style/StylePane.java

2
designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java

@ -51,7 +51,7 @@ public class FineUIAction extends UpdateAction {
BasicDialog dialog = pane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
// Do nothing
}
});
dialog.setVisible(true);

2
designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindDialog.java

@ -31,7 +31,7 @@ public class RemindDialog extends UIDialog {
@Override
public void checkValid() throws Exception {
// Do nothing
}
public RemindPane getRemindPane() {

2
designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java

@ -114,6 +114,7 @@ public class RemindPane extends JPanel {
@Override
public void removeLayoutComponent(Component comp) {
// Do nothing
}
@Override
@ -139,6 +140,7 @@ public class RemindPane extends JPanel {
@Override
public void addLayoutComponent(String name, Component comp) {
// Do nothing
}
};
}

2
designer-base/src/main/java/com/fr/design/condition/ContinuousTreeSelectionModel.java

@ -16,8 +16,6 @@ import com.fr.design.utils.gui.GUICoreUtils;
* 一个层次连续节点.
*/
public class ContinuousTreeSelectionModel extends DefaultTreeSelectionModel {
public ContinuousTreeSelectionModel() {
}
public void addSelectionPaths(TreePath[] paths) {
if (paths == null || paths.length == 0) {

2
designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java

@ -272,10 +272,12 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
*/
@Override
public void editingCanceled(ChangeEvent e) {
// Do nothing
}
@Override
public void editingStopped(ChangeEvent e) {
// Do nothing
}
}

6
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java

@ -103,10 +103,12 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
// Do nothing
}
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
// Do nothing
}
};
@ -114,10 +116,12 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
private PopupMenuListener listener = new PopupMenuListener() {
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
// Do nothing
}
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
// Do nothing
}
@Override
@ -199,6 +203,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
protected void addFocusListener() {
// Do nothing
}
@SuppressWarnings("unchecked")
@ -492,6 +497,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
protected void failedToFindTable() {
// Do nothing
}
protected String getTableName() {

1
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java

@ -75,6 +75,7 @@ public class ChoosePaneSupportFormula extends ChoosePane {
}
protected void addFocusListener() {
// Do nothing
}
/**

1
designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java

@ -255,6 +255,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
}
protected void checkRepeatedDSName(List<String> exsitTableDataNameList) {
// Do nothing
}
/**

3
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java

@ -140,8 +140,6 @@ public class PreviewTableModel extends AbstractTableModel {
* 就是由于预览的JTable在不停的getRowCount来显示数据.
*/
private static class ErrorResultSet extends AbstractDataModel {
public ErrorResultSet() {
}
public int getRowCount() {
return 0;
@ -160,6 +158,7 @@ public class PreviewTableModel extends AbstractTableModel {
}
public void release() throws Exception {
// Do nothing
}
}

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java

@ -62,7 +62,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
editor = ValueEditorPaneFactory.createStoreProcedValueEditorPane();
editor.getMenu().addPopupMenuListener(new PopupMenuListener() {
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
// Do nothing
}
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {

23
designer-base/src/main/java/com/fr/design/fun/MultiStyleUIConfigProvider.java

@ -0,0 +1,23 @@
package com.fr.design.fun;
import com.fr.common.annotations.Open;
import com.fr.stable.fun.mark.Mutable;
import java.util.List;
/**
* Created by kerry on 2019-11-11
*/
@Open
public interface MultiStyleUIConfigProvider extends Mutable {
String XML_TAG = "MultiStyleUIConfigProvider";
int CURRENT_LEVEL = 1;
/**
* 获取配置项list
*
* @return 配置项list
*/
List<StyleUIConfigProvider> getConfigList();
}

39
designer-base/src/main/java/com/fr/design/fun/StyleUIConfigProvider.java

@ -0,0 +1,39 @@
package com.fr.design.fun;
import com.fr.base.Style;
import com.fr.common.annotations.Open;
import com.fr.stable.fun.mark.Mutable;
import javax.swing.JComponent;
import javax.swing.event.ChangeListener;
/**
* Created by kerry on 2019-11-11
*/
@Open
public interface StyleUIConfigProvider extends Mutable {
String XML_TAG = "CustomStyleUIConfigProvider";
int CURRENT_LEVEL = 1;
/**
* @return 配置名
*/
String configName();
/**
* @param changeListener 需要添加的listener
* @return 对应的component
*/
JComponent uiComponent(ChangeListener changeListener);
/**
* @return 更新后的样式
*/
Style updateConfig();
/**
* @param style 待渲染的样式
*/
void populateConfig(Style style);
}

26
designer-base/src/main/java/com/fr/design/fun/impl/AbstractMultiStyleUIConfigProvider.java

@ -0,0 +1,26 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.StyleUIConfigProvider;
import com.fr.design.fun.MultiStyleUIConfigProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
import java.util.ArrayList;
import java.util.List;
/**
* Created by kerry on 2019-11-11
*/
@API(level = MultiStyleUIConfigProvider.CURRENT_LEVEL)
public abstract class AbstractMultiStyleUIConfigProvider extends AbstractProvider implements MultiStyleUIConfigProvider {
@Override
public List<StyleUIConfigProvider> getConfigList() {
return new ArrayList<StyleUIConfigProvider>();
}
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
}

41
designer-base/src/main/java/com/fr/design/fun/impl/AbstractStyleUIConfigProvider.java

@ -0,0 +1,41 @@
package com.fr.design.fun.impl;
import com.fr.base.Style;
import com.fr.design.fun.StyleUIConfigProvider;
import com.fr.stable.StringUtils;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
import javax.swing.JComponent;
import javax.swing.event.ChangeListener;
/**
* Created by kerry on 2019-11-11
*/
@API(level = StyleUIConfigProvider.CURRENT_LEVEL)
public class AbstractStyleUIConfigProvider extends AbstractProvider implements StyleUIConfigProvider {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String configName() {
return StringUtils.EMPTY;
}
@Override
public JComponent uiComponent(ChangeListener changeListener) {
return null;
}
@Override
public Style updateConfig() {
return null;
}
@Override
public void populateConfig(Style style) {
}
}

12
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -82,13 +82,13 @@ import com.fr.van.chart.bar.BarIndependentVanChartInterface;
import com.fr.van.chart.bubble.BubbleIndependentVanChartInterface;
import com.fr.van.chart.column.VanColumnChartTypeUI;
import com.fr.van.chart.custom.CustomIndependentVanChartInterface;
import com.fr.van.chart.drillmap.DrillMapIndependentVanChartInterface;
import com.fr.van.chart.drillmap.VanDrillMapChartTypeUI;
import com.fr.van.chart.funnel.designer.FunnelIndependentVanChartInterface;
import com.fr.van.chart.gantt.designer.GanttIndependentVanChartInterface;
import com.fr.van.chart.gauge.GaugeIndependentVanChartInterface;
import com.fr.van.chart.heatmap.designer.HeatMapIndependentVanChartInterface;
import com.fr.van.chart.heatmap.designer.VanHeatMapChartTypeUI;
import com.fr.van.chart.line.LineIndependentVanChartInterface;
import com.fr.van.chart.map.MapIndependentVanChartInterface;
import com.fr.van.chart.map.VanMapChartTypeUI;
import com.fr.van.chart.multilayer.MultiPieIndependentVanChartInterface;
import com.fr.van.chart.pie.PieIndependentVanChartInterface;
import com.fr.van.chart.radar.RadarIndependentVanChartInterface;
@ -192,11 +192,11 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartBubblePlot.VAN_CHART_BUBBLE_PLOT_ID, new BubbleIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartCustomPlot.VAN_CHART_CUSTOM_PLOT_ID, new CustomIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartMultiPiePlot.VAN_CHART_MULTILAYER_PLOT_ID, new MultiPieIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartMapPlot.VAN_CHART_MAP_ID, new MapIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartDrillMapPlot.VAN_CHART_DRILL_MAP_ID, new DrillMapIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartMapPlot.VAN_CHART_MAP_ID, new VanMapChartTypeUI());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartDrillMapPlot.VAN_CHART_DRILL_MAP_ID, new VanDrillMapChartTypeUI());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartTreeMapPlot.VAN_CHART_TREE_MAP_PLOT_ID, new TreeMapIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartFunnelPlot.VAN_CHART_FUNNEL_PLOT_ID, new FunnelIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartHeatMapPlot.VAN_CHART_HEAT_MAP_ID, new HeatMapIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartHeatMapPlot.VAN_CHART_HEAT_MAP_ID, new VanHeatMapChartTypeUI());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartWordCloudPlot.WORD_CLOUD_PLOT_ID, new WordCloudIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new VanStructureChartTypeUI());

12
designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java

@ -13,6 +13,12 @@ import java.awt.BorderLayout;
*/
public abstract class AbstractChartDataPane<T extends ChartDataDefinitionProvider> extends ChartDataPane {
private VanChart vanChart;
protected VanChart getVanChart() {
return vanChart;
}
public AbstractChartDataPane(AttributeChangeListener listener) {
super(listener);
}
@ -26,15 +32,15 @@ public abstract class AbstractChartDataPane<T extends ChartDataDefinitionProvide
if (collection == null) {
return;
}
VanChart chart = collection.getSelectedChartProvider(VanChart.class);
if (chart == null) {
vanChart = collection.getSelectedChartProvider(VanChart.class);
if (vanChart == null) {
return;
}
this.removeAll();
this.add(createContentPane(), BorderLayout.CENTER);
ChartDataDefinitionProvider dataSetCollection = chart.getChartDataDefinition();
ChartDataDefinitionProvider dataSetCollection = vanChart.getChartDataDefinition();
populate((T) dataSetCollection);

5
designer-chart/src/main/java/com/fr/design/chartx/CustomChartDataPane.java

@ -3,6 +3,8 @@ package com.fr.design.chartx;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.CustomChartDataDefinition;
import com.fr.design.chartx.fields.diff.GaugeCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.GaugeDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.ScatterCellDataFieldsPane;
@ -86,8 +88,7 @@ public class CustomChartDataPane extends ChartDataPane {
case RING:
case SLOT:
case CUVETTE:
//todo 仪表板没写好
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
return new SingleDataPane(new GaugeDataSetFieldsPane(), new GaugeCellDataFieldsPane());
case SCATTER:
case BUBBLE:
return new SingleDataPane(new ScatterDataSetFieldsPane(), new ScatterCellDataFieldsPane());

52
designer-chart/src/main/java/com/fr/design/chartx/GanttChartDataPane.java

@ -1,52 +0,0 @@
package com.fr.design.chartx;
import com.fr.chartx.data.GanttChartDataDefinition;
import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.van.chart.map.designer.VanChartGroupPane;
import javax.swing.JPanel;
/**
* Created by shine on 2019/5/22.
*/
public class GanttChartDataPane extends AbstractChartDataPane<GanttChartDataDefinition> {
private AbstractVanSingleDataPane dataPane;
private AbstractVanSingleDataPane linkPane;
@Override
protected JPanel createContentPane() {
dataPane = new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane());
}
};
linkPane = new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane());
}
};
return new VanChartGroupPane(new String[]{"data", "link"}, new JPanel[]{dataPane, linkPane}) {
};
}
public GanttChartDataPane(AttributeChangeListener listener) {
super(listener);
}
@Override
public void populate(GanttChartDataDefinition ganttChartDataDefinition) {
dataPane.populate(ganttChartDataDefinition.getDataDefinition());
linkPane.populate(ganttChartDataDefinition.getLinkDefinition());
}
@Override
public GanttChartDataDefinition update() {
return null;
}
}

4
designer-chart/src/main/java/com/fr/design/chartx/component/CellDataSeriesXYValueCorrelationPane.java

@ -37,7 +37,7 @@ public class CellDataSeriesXYValueCorrelationPane extends AbstractCorrelationPan
field.getSeriesName().getFieldName(),
field.getXField().getFieldName(),
field.getYField().getFieldName(),
field.getValueField().getFieldName()
field.getSizeField().getFieldName()
};
result.add(array);
}
@ -57,7 +57,7 @@ public class CellDataSeriesXYValueCorrelationPane extends AbstractCorrelationPan
bubbleColumnField.setSeriesName(series);
bubbleColumnField.setXField(xField);
bubbleColumnField.setYField(yField);
bubbleColumnField.setValueField(value);
bubbleColumnField.setSizeField(value);
bubbleColumnFieldList.add(bubbleColumnField);
}

76
designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapChartDataPane.java

@ -0,0 +1,76 @@
package com.fr.design.chartx.data.drillMap;
import com.fr.chartx.data.DrillMapChartDataDefinition;
import com.fr.design.chartx.AbstractChartDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.van.chart.map.designer.VanChartGroupPane;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/13
*/
public class DrillMapChartDataPane extends AbstractChartDataPane<DrillMapChartDataDefinition> {
private DrillMapLayerPane layerPane;
private DrillMapDataPane dataPane;
public DrillMapChartDataPane(AttributeChangeListener listener) {
super(listener);
}
private VanChartDrillMapPlot getDrillMapPlot() {
if (getVanChart() != null) {
return getVanChart().getPlot();
}
return null;
}
@Override
protected JPanel createContentPane() {
VanChartDrillMapPlot drillMapPlot = getDrillMapPlot();
if (drillMapPlot == null) {
return new JPanel();
}
layerPane = new DrillMapLayerPane(drillMapPlot);
dataPane = new DrillMapDataPane(drillMapPlot);
return new VanChartGroupPane(new String[]{Toolkit.i18nText("Fine-Design_Chart_Map_Drill_Level"), Toolkit.i18nText("Fine-Design_Chart_Use_Data")},
new JPanel[]{layerPane, dataPane}) {
@Override
protected void tabChanged(int index) {
if (index == 0) {
return;
}
dataPane.fireMapTypeChanged();
}
};
}
@Override
protected void populate(DrillMapChartDataDefinition drillMapChartDataDefinition) {
if (drillMapChartDataDefinition == null) {
return;
}
VanChartDrillMapPlot drillMapPlot = getDrillMapPlot();
layerPane.populateBean(drillMapPlot);
dataPane.populateBean(drillMapChartDataDefinition);
}
@Override
protected DrillMapChartDataDefinition update() {
VanChartDrillMapPlot drillMapPlot = getDrillMapPlot();
layerPane.updateBean(drillMapPlot);
DrillMapChartDataDefinition definition = new DrillMapChartDataDefinition();
dataPane.updateBean(definition);
return definition;
}
}

120
designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapDataPane.java

@ -0,0 +1,120 @@
package com.fr.design.chartx.data.drillMap;
import com.fr.chartx.data.DrillMapChartDataDefinition;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.fields.diff.AreaMapCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.AreaMapDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import java.awt.BorderLayout;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Mitisky on 16/6/20.
* 钻取地图数据配置界面中 和钻取层级平级的数据界面
*/
public class DrillMapDataPane extends BasicBeanPane<DrillMapChartDataDefinition> {
private UIComboBoxPane<DrillMapChartDataDefinition> dataDefinitionType;//数据定义方式:底层数据汇总/各层级分别指定
private SingleDataPane bottomDataPane;//底层数据汇总方式定义钻取地图数据
private EachLayerDataDefinitionPane eachLayerDataDefinitionPane;//各层级分别指定
public DrillMapDataPane(VanChartDrillMapPlot drillMapPlot) {
bottomDataPane = new SingleDataPane(new AreaMapDataSetFieldsPane(), new AreaMapCellDataFieldsPane());
eachLayerDataDefinitionPane = new EachLayerDataDefinitionPane(drillMapPlot);
dataDefinitionType = new UIComboBoxPane<DrillMapChartDataDefinition>() {
@Override
protected List<FurtherBasicBeanPane<? extends DrillMapChartDataDefinition>> initPaneList() {
List<FurtherBasicBeanPane<? extends DrillMapChartDataDefinition>> paneList = new ArrayList<FurtherBasicBeanPane<? extends DrillMapChartDataDefinition>>();
paneList.add(new BottomLayerDataDefinitionPane());
paneList.add(eachLayerDataDefinitionPane);
return paneList;
}
@Override
protected String title4PopupWindow() {
return null;
}
};
this.setLayout(new BorderLayout());
this.add(dataDefinitionType, BorderLayout.CENTER);
}
public void fireMapTypeChanged() {
eachLayerDataDefinitionPane.fireMapTypeChanged();
}
@Override
public void populateBean(DrillMapChartDataDefinition ob) {
dataDefinitionType.setSelectedIndex(ob.isFromBottomData() ? 0 : 1);
bottomDataPane.populateBean(ob.getBottomDataDefinition());
eachLayerDataDefinitionPane.populateBean(ob);
}
/**
* Update.
*/
@Override
public DrillMapChartDataDefinition updateBean() {
return null;
}
@Override
public void updateBean(DrillMapChartDataDefinition drillMapDefinition) {
if (dataDefinitionType.getSelectedIndex() == 0) {
drillMapDefinition.setFromBottomData(true);
drillMapDefinition.setBottomDataDefinition(bottomDataPane.updateBean());
} else {
drillMapDefinition.setFromBottomData(false);
eachLayerDataDefinitionPane.updateBean(drillMapDefinition);
}
}
@Override
protected String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Use_Data");
}
private class BottomLayerDataDefinitionPane extends FurtherBasicBeanPane<DrillMapChartDataDefinition> {
private BottomLayerDataDefinitionPane() {
this.setLayout(new BorderLayout());
this.add(bottomDataPane, BorderLayout.CENTER);
}
@Override
public boolean accept(Object ob) {
return false;
}
@Override
public void reset() {
}
@Override
public void populateBean(DrillMapChartDataDefinition ob) {
}
@Override
public DrillMapChartDataDefinition updateBean() {
return null;
}
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Bottom_Data_Sum");
}
}
}

136
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java → designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapLayerPane.java

@ -1,19 +1,18 @@
package com.fr.van.chart.drillmap.designer.data.comp;
package com.fr.design.chartx.data.drillMap;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.chartx.TwoTuple;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.drillmap.DrillMapHelper;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper;
import com.fr.plugin.chart.type.MapType;
import com.fr.plugin.chart.type.ZoomLevel;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.drillmap.designer.data.comp.MapDataTree;
import com.fr.van.chart.map.designer.type.VanChartMapSourceChoosePane;
import javax.swing.BorderFactory;
@ -28,7 +27,7 @@ import java.util.HashMap;
* Created by Mitisky on 16/6/20.
* 钻取地图数据配置界面--钻取层级界面
*/
public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
public class DrillMapLayerPane extends BasicBeanPane<VanChartDrillMapPlot> {
private static final String[] CUSTOM_MAP_TYPES = new String[]{MapType.AREA.getLocaleString(), MapType.POINT.getLocaleString()};
private static final String[] AREA_MAP_TYPES = new String[]{MapType.AREA.getLocaleString()};
private static final String[] POINT_MAP_TYPES = new String[]{MapType.POINT.getLocaleString()};
@ -44,25 +43,65 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
private MapDataTree mapDataTree;
private Component[][] detailComps;
private int depth;
private MapType oldMapType;
private String oldGeoUrl;
@Override
protected void layoutContentPane() {
leftcontentPane = createContentPane();
leftcontentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
this.add(leftcontentPane);
public DrillMapLayerPane(VanChartDrillMapPlot drillMapPlot) {
initMapTypeAndZoom(drillMapPlot);
JPanel contentPane = createContentPane(drillMapPlot);
this.setLayout(new BorderLayout());
this.add(contentPane, BorderLayout.CENTER);
}
@Override
protected JPanel createContentPane() {
private void initMapTypeAndZoom(VanChartDrillMapPlot drillMapPlot) {
if (drillMapPlot != null) {
int depth = getRootAndDepth(drillMapPlot).getSecond();
java.util.List<ZoomLevel> levelList = drillMapPlot.getLayerLevelList();
java.util.List<MapType> mapTypeList = drillMapPlot.getLayerMapTypeList();
//根据层级初始属性,一切以json那边读到的层级为准
int levelSize = levelList.size();
for (int i = levelSize; i < depth; i++) {
levelList.add(ZoomLevel.AUTO);
}
MapType mapType = drillMapPlot.getMapType() == MapType.POINT ? MapType.POINT : MapType.AREA;
int typeSize = mapTypeList.size();
for (int j = typeSize; j < depth; j++) {
mapTypeList.add(mapType);
}
}
}
public static TwoTuple<DefaultMutableTreeNode, Integer> getRootAndDepth(VanChartDrillMapPlot drillMapPlot) {
int depth = 1;
DefaultMutableTreeNode root = CompatibleGeoJSONTreeHelper.getNodeByJSONPath(drillMapPlot.getGeoUrl());
if (root != null) {
depth = root.getDepth() + 1;//根节点也算一层
}
return new TwoTuple<>(root, depth);
}
private JPanel createContentPane(VanChartDrillMapPlot drillMapPlot) {
if (drillMapPlot == null) {
return new JPanel();
}
DefaultMutableTreeNode root = CompatibleGeoJSONTreeHelper.getNodeByJSONPath(drillMapPlot.getGeoUrl());
if (mapDataTree == null) {
mapDataTree = new MapDataTree(CompatibleGeoJSONTreeHelper.getRootNodeWithoutPara(oldGeoUrl));
mapDataTree = new MapDataTree(root);
mapDataTree.setRootVisible(true);
} else {
mapDataTree.changeRootNode(root);
}
JPanel mapDataTreePanel = new JPanel(new BorderLayout());
mapDataTreePanel.add(mapDataTree);
@ -71,8 +110,8 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
double[] columnSize = {f};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{createTitlePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layer_Tree"), mapDataTreePanel)},
new Component[]{createTitlePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layer_Detail"), createLayerDetailPane())}
new Component[]{createTitlePane(Toolkit.i18nText("Fine-Design_Chart_Layer_Tree"), mapDataTreePanel)},
new Component[]{createTitlePane(Toolkit.i18nText("Fine-Design_Chart_Layer_Detail"), createLayerDetailPane(drillMapPlot))}
};
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -88,7 +127,10 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
return jPanel;
}
private JPanel createLayerDetailPane() {
private JPanel createLayerDetailPane(VanChartDrillMapPlot drillMapPlot) {
int depth = getRootAndDepth(drillMapPlot).getSecond();
String[] items = TEMP.get(drillMapPlot.getMapType());
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, p, p};
@ -96,62 +138,31 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
detailComps = new Component[depth + 1][3];
rowSize[0] = p;
detailComps[0] = new Component[]{
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Descriptor")),
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Zoom_Layer")),
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layer_Map_Type"))
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Descriptor")),
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Zoom_Layer")),
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Layer_Map_Type"))
};
for (int i = 0; i < depth; i++) {
rowSize[i + 1] = p;
int d = i + 1;
UILabel label = new UILabel(String.format("%s%d%s", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Index_Article"), d, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Index_Layer")));
UILabel label = new UILabel(String.format("%s%d%s", Toolkit.i18nText("Fine-Design_Chart_Index_Article"), d, Toolkit.i18nText("Fine-Design_Chart_Index_Layer")));
UIComboBox level = new UIComboBox(VanChartMapSourceChoosePane.ZOOM_LEVELS);
level.setEnabled(i != 0);
UIComboBox type = new UIComboBox(TEMP.get(oldMapType));
UIComboBox type = new UIComboBox(items);
detailComps[i + 1] = new Component[]{label, level, type};
}
return TableLayoutHelper.createGapTableLayoutPane(detailComps, rowSize, columnSize, 10, 6);
}
/**
* Populate.
*
* @param ob
*/
@Override
public void populateBean(ChartCollection ob) {
VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob);
public void populateBean(VanChartDrillMapPlot drillMapPlot) {
if (drillMapPlot != null) {
java.util.List<ZoomLevel> levelList = drillMapPlot.getLayerLevelList();
java.util.List<MapType> mapTypeList = drillMapPlot.getLayerMapTypeList();
if (detailComps == null || drillMapPlot.getMapType() != oldMapType || !ComparatorUtils.equals(drillMapPlot.getGeoUrl(), oldGeoUrl)) {
oldMapType = drillMapPlot.getMapType();
oldGeoUrl = drillMapPlot.getGeoUrl();
DefaultMutableTreeNode root = CompatibleGeoJSONTreeHelper.getNodeByJSONPath(oldGeoUrl);
if (root != null) {
mapDataTree.changeRootNode(root);
depth = root.getDepth() + 1;//根节点也算一层
}
this.remove(leftcontentPane);
layoutContentPane();
}
//根据层级初始属性,一切以json那边读到的层级为准
int levelSize = levelList.size();
for (int i = levelSize; i < depth; i++) {
levelList.add(ZoomLevel.AUTO);
}
MapType mapType = drillMapPlot.getMapType() == MapType.POINT ? MapType.POINT : MapType.AREA;
int typeSize = mapTypeList.size();
for (int j = typeSize; j < depth; j++) {
mapTypeList.add(mapType);
}
for (int i = 0; i < depth; i++) {
for (int i = 0; i < levelList.size(); i++) {
Component[] components = detailComps[i + 1];
if (components != null) {
UIComboBox level = (UIComboBox) components[1];
@ -171,13 +182,12 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
* Update.
*/
@Override
public ChartCollection updateBean() {
public VanChartDrillMapPlot updateBean() {
return null;
}
@Override
public void updateBean(ChartCollection ob) {
VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob);
public void updateBean(VanChartDrillMapPlot drillMapPlot) {
if (drillMapPlot != null && detailComps != null) {
java.util.List<ZoomLevel> levelList = new ArrayList<ZoomLevel>();
java.util.List<MapType> mapTypeList = new ArrayList<MapType>();
@ -198,6 +208,6 @@ public class DrillMapLayerPane extends BasicScrollPane<ChartCollection> {
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Map_Drill_Level");
return Toolkit.i18nText("Fine-Design_Chart_Map_Drill_Level");
}
}

128
designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/EachLayerDataDefinitionPane.java

@ -0,0 +1,128 @@
package com.fr.design.chartx.data.drillMap;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.DrillMapChartDataDefinition;
import com.fr.design.chartx.fields.diff.AreaMapCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.AreaMapDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.PointMapCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.PointMapDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.MultiTabPane;
import com.fr.design.i18n.Toolkit;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.type.MapType;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Mitisky on 16/6/20.
* 各层级分别指定的界面
*/
public class EachLayerDataDefinitionPane extends MultiTabPane<DrillMapChartDataDefinition> {
private List<MapType> oldTypeList;
private VanChartDrillMapPlot plot;
public EachLayerDataDefinitionPane(VanChartDrillMapPlot drillMapPlot) {
this.plot = drillMapPlot;
initComps();
}
private void initComps() {
paneList = initPaneList(this.plot);
super.relayoutWhenListChange();
}
public void fireMapTypeChanged() {
if (!ComparatorUtils.equals(plot.getLayerMapTypeList(), oldTypeList)) {
initComps();
}
}
protected List<BasicPane> initPaneList(VanChartDrillMapPlot drillMapPlot) {
List<BasicPane> paneList = new ArrayList<BasicPane>();
oldTypeList = drillMapPlot.getLayerMapTypeList();
int depth = DrillMapLayerPane.getRootAndDepth(drillMapPlot).getSecond();
for (int i = 0; i < depth; i++) {
final String title = String.format("%s%d%s", Toolkit.i18nText("Fine-Design_Chart_Index_Article"), i, Toolkit.i18nText("Fine-Design_Chart_Index_Layer"));
MapType mapType = oldTypeList.get(i);
SingleDataPane pane = mapType == MapType.AREA ? new SingleDataPane(new AreaMapDataSetFieldsPane(), new AreaMapCellDataFieldsPane()) {
@Override
protected String title4PopupWindow() {
return title;
}
} : new SingleDataPane(new PointMapDataSetFieldsPane(), new PointMapCellDataFieldsPane()) {
@Override
protected String title4PopupWindow() {
return title;
}
};
paneList.add(pane);
}
return paneList;
}
@Override
public void relayoutWhenListChange() {
}
@Override
protected List<BasicPane> initPaneList() {
return new ArrayList<BasicPane>();
}
@Override
public void populateBean(DrillMapChartDataDefinition drillMapChartDataDefinition) {
List<AbstractDataDefinition> eachLayerDataDefinitionList = drillMapChartDataDefinition.getEachLayerDataDefinitionList();
if (eachLayerDataDefinitionList == null || eachLayerDataDefinitionList.size() == 0) {
return;
}
for (int i = 0, len = paneList.size(); i < len; i++) {
BasicPane basicPane = paneList.get(i);
if (basicPane instanceof SingleDataPane) {
((SingleDataPane) basicPane).populateBean(eachLayerDataDefinitionList.get(i));
}
}
}
@Override
public DrillMapChartDataDefinition updateBean() {
return null;
}
@Override
public void updateBean(DrillMapChartDataDefinition drillMapDefinition) {
List<AbstractDataDefinition> eachLayerDataDefinitionList = new ArrayList<AbstractDataDefinition>();
for (BasicPane basicPane : paneList) {
if (basicPane instanceof SingleDataPane) {
eachLayerDataDefinitionList.add(((SingleDataPane) basicPane).updateBean());
}
}
drillMapDefinition.setEachLayerDataDefinitionList(eachLayerDataDefinitionList);
}
@Override
public boolean accept(Object ob) {
return false;
}
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Each_Layer_Data_Special");
}
@Override
public void reset() {
}
}

111
designer-chart/src/main/java/com/fr/design/chartx/data/map/AbstractAreaLngLatPane.java

@ -0,0 +1,111 @@
package com.fr.design.chartx.data.map;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.Arrays;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/13
*/
public abstract class AbstractAreaLngLatPane extends JPanel {
private JPanel centerPane;
private UIButtonGroup<Integer> locationType;
private JPanel areaPane;
private JPanel lngLatAreaPane;
protected abstract JPanel createAreaPane();
protected abstract JPanel createAreaLngLatPane();
public AbstractAreaLngLatPane() {
centerPane = new JPanel(new CardLayout()) {
@Override
public Dimension getPreferredSize() {
if (locationType.getSelectedIndex() == 0) {
return areaPane.getPreferredSize();
} else {
return lngLatAreaPane.getPreferredSize();
}
}
};
locationType = new UIButtonGroup<Integer>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Location_With_Area_Name"),
Toolkit.i18nText("Fine-Design_Chart_Location_With_LongAndLat")});
locationType.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
checkCenterPane();
}
});
lngLatAreaPane = createAreaLngLatPane();
areaPane = createAreaPane();
centerPane.add(areaPane, "area");
centerPane.add(lngLatAreaPane, "longLat");
locationType.setSelectedIndex(0);
this.setLayout(new BorderLayout(0, 6));
this.add(locationType, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
}
private void checkCenterPane() {
CardLayout cardLayout = (CardLayout) centerPane.getLayout();
if (locationType.getSelectedIndex() == 0) {
cardLayout.show(centerPane, "area");
} else {
cardLayout.show(centerPane, "longLat");
}
}
public void populate(boolean useAreaName) {
locationType.setSelectedIndex(useAreaName ? 0 : 1);
checkCenterPane();
}
public boolean update() {
return locationType.getSelectedIndex() == 0;
}
protected JPanel createPane(String[] labels, JComponent... fieldComponents) {
int len = Math.min(labels.length, fieldComponents.length);
if (len == 0) {
return new JPanel();
}
Component[][] components = new Component[len][2];
for (int i = 0; i < len; i++) {
components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), fieldComponents[i]};
}
double p = TableLayout.PREFERRED;
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 6);
}
}

106
designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithComboBox.java

@ -0,0 +1,106 @@
package com.fr.design.chartx.data.map;
import com.fr.chartx.data.field.diff.LineMapColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/13
*/
public class LineMapAreaLngLatPaneWithComboBox extends LineMapAreaLngLatPaneWithTinyFormula {
private UIComboBox fromArea_tab0;
private UIComboBox toArea_tab0;
private UIComboBox fromArea_tab1;
private UIComboBox fromLng_tab1;
private UIComboBox fromLat_tab1;
private UIComboBox toArea_tab1;
private UIComboBox toLng_tab1;
private UIComboBox toLat_tab1;
@Override
protected JPanel createAreaPane() {
if (fromArea_tab0 == null) {
fromArea_tab0 = new UIComboBox();
toArea_tab0 = new UIComboBox();
}
return createPane(
new String[]{Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name"),
Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")},
fromArea_tab0, toArea_tab0
);
}
@Override
protected JPanel createAreaLngLatPane() {
if (fromArea_tab1 == null) {
fromArea_tab1 = new UIComboBox();
fromLng_tab1 = new UIComboBox();
fromLat_tab1 = new UIComboBox();
toArea_tab1 = new UIComboBox();
toLng_tab1 = new UIComboBox();
toLat_tab1 = new UIComboBox();
}
return createPane(
new String[]{
Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name"),
Toolkit.i18nText("Fine-Design_Chart_Start_Longitude"),
Toolkit.i18nText("Fine-Design_Chart_Start_Latitude"),
Toolkit.i18nText("Fine-Design_Chart_End_Area_Name"),
Toolkit.i18nText("Fine-Design_Chart_End_Longitude"),
Toolkit.i18nText("Fine-Design_Chart_End_Latitude")},
fromArea_tab1,
fromLng_tab1,
fromLat_tab1,
toArea_tab1,
toLng_tab1,
toLat_tab1);
}
protected void populateTab0(LineMapColumnFieldCollection fieldCollection) {
AbstractDataSetFieldsPane.populateField(fromArea_tab0, fieldCollection.getFromAreaName());
AbstractDataSetFieldsPane.populateField(toArea_tab0, fieldCollection.getToAreaName());
}
protected void updateTab0(LineMapColumnFieldCollection fieldCollection) {
AbstractDataSetFieldsPane.updateField(fromArea_tab0, fieldCollection.getFromAreaName());
AbstractDataSetFieldsPane.updateField(toArea_tab0, fieldCollection.getToAreaName());
}
protected void populateTab1(LineMapColumnFieldCollection fieldCollection) {
AbstractDataSetFieldsPane.populateField(fromArea_tab1, fieldCollection.getFromAreaName());
AbstractDataSetFieldsPane.populateField(toArea_tab1, fieldCollection.getToAreaName());
AbstractDataSetFieldsPane.populateField(fromLng_tab1, fieldCollection.getFromLng());
AbstractDataSetFieldsPane.populateField(toLng_tab1, fieldCollection.getToLng());
AbstractDataSetFieldsPane.populateField(fromLat_tab1, fieldCollection.getFromLat());
AbstractDataSetFieldsPane.populateField(toLat_tab1, fieldCollection.getToLat());
}
protected void updateTab1(LineMapColumnFieldCollection fieldCollection) {
AbstractDataSetFieldsPane.updateField(fromArea_tab1, fieldCollection.getFromAreaName());
AbstractDataSetFieldsPane.updateField(toArea_tab1, fieldCollection.getToAreaName());
AbstractDataSetFieldsPane.updateField(fromLng_tab1, fieldCollection.getFromLng());
AbstractDataSetFieldsPane.updateField(toLng_tab1, fieldCollection.getToLng());
AbstractDataSetFieldsPane.updateField(fromLat_tab1, fieldCollection.getFromLat());
AbstractDataSetFieldsPane.updateField(toLat_tab1, fieldCollection.getToLat());
}
public UIComboBox[] allFieldComboBox() {
return new UIComboBox[]{
fromArea_tab0,
toArea_tab0,
fromArea_tab1,
fromLng_tab1,
fromLat_tab1,
toArea_tab1,
toLng_tab1,
toLat_tab1
};
}
}

113
designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithTinyFormula.java

@ -0,0 +1,113 @@
package com.fr.design.chartx.data.map;
import com.fr.chartx.data.field.diff.LineMapColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.i18n.Toolkit;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/13
*/
public class LineMapAreaLngLatPaneWithTinyFormula extends AbstractAreaLngLatPane {
private TinyFormulaPane fromArea_tab0;
private TinyFormulaPane toArea_tab0;
private TinyFormulaPane fromArea_tab1;
private TinyFormulaPane fromLng_tab1;
private TinyFormulaPane fromLat_tab1;
private TinyFormulaPane toArea_tab1;
private TinyFormulaPane toLng_tab1;
private TinyFormulaPane toLat_tab1;
@Override
protected JPanel createAreaPane() {
if (fromArea_tab0 == null) {
fromArea_tab0 = new TinyFormulaPane();
toArea_tab0 = new TinyFormulaPane();
}
return createPane(
new String[]{Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name"),
Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")},
fromArea_tab0, toArea_tab0
);
}
@Override
protected JPanel createAreaLngLatPane() {
if (fromArea_tab1 == null) {
fromArea_tab1 = new TinyFormulaPane();
fromLng_tab1 = new TinyFormulaPane();
fromLat_tab1 = new TinyFormulaPane();
toArea_tab1 = new TinyFormulaPane();
toLng_tab1 = new TinyFormulaPane();
toLat_tab1 = new TinyFormulaPane();
}
return createPane(
new String[]{
Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name"),
Toolkit.i18nText("Fine-Design_Chart_Start_Longitude"),
Toolkit.i18nText("Fine-Design_Chart_Start_Latitude"),
Toolkit.i18nText("Fine-Design_Chart_End_Area_Name"),
Toolkit.i18nText("Fine-Design_Chart_End_Longitude"),
Toolkit.i18nText("Fine-Design_Chart_End_Latitude")},
fromArea_tab1,
fromLng_tab1,
fromLat_tab1,
toArea_tab1,
toLng_tab1,
toLat_tab1);
}
protected void populateTab0(LineMapColumnFieldCollection fieldCollection) {
AbstractCellDataFieldsPane.populateField(fromArea_tab0, fieldCollection.getFromAreaName());
AbstractCellDataFieldsPane.populateField(toArea_tab0, fieldCollection.getToAreaName());
}
protected void updateTab0(LineMapColumnFieldCollection fieldCollection) {
AbstractCellDataFieldsPane.updateField(fromArea_tab0, fieldCollection.getFromAreaName());
AbstractCellDataFieldsPane.updateField(toArea_tab0, fieldCollection.getToAreaName());
}
protected void populateTab1(LineMapColumnFieldCollection fieldCollection) {
AbstractCellDataFieldsPane.populateField(fromArea_tab1, fieldCollection.getFromAreaName());
AbstractCellDataFieldsPane.populateField(toArea_tab1, fieldCollection.getToAreaName());
AbstractCellDataFieldsPane.populateField(fromLng_tab1, fieldCollection.getFromLng());
AbstractCellDataFieldsPane.populateField(toLng_tab1, fieldCollection.getToLng());
AbstractCellDataFieldsPane.populateField(fromLat_tab1, fieldCollection.getFromLat());
AbstractCellDataFieldsPane.populateField(toLat_tab1, fieldCollection.getToLat());
}
protected void updateTab1(LineMapColumnFieldCollection fieldCollection) {
AbstractCellDataFieldsPane.updateField(fromArea_tab1, fieldCollection.getFromAreaName());
AbstractCellDataFieldsPane.updateField(toArea_tab1, fieldCollection.getToAreaName());
AbstractCellDataFieldsPane.updateField(fromLng_tab1, fieldCollection.getFromLng());
AbstractCellDataFieldsPane.updateField(toLng_tab1, fieldCollection.getToLng());
AbstractCellDataFieldsPane.updateField(fromLat_tab1, fieldCollection.getFromLat());
AbstractCellDataFieldsPane.updateField(toLat_tab1, fieldCollection.getToLat());
}
public void populate(LineMapColumnFieldCollection fieldCollection) {
super.populate(fieldCollection.isUseAreaName());
if (fieldCollection.isUseAreaName()) {
populateTab0(fieldCollection);
} else {
populateTab1(fieldCollection);
}
}
public void update(LineMapColumnFieldCollection fieldCollection) {
fieldCollection.setUseAreaName(super.update());
if (fieldCollection.isUseAreaName()) {
updateTab0(fieldCollection);
} else {
updateTab1(fieldCollection);
}
}
}

93
designer-chart/src/main/java/com/fr/design/chartx/data/map/MapChartDataPane.java

@ -0,0 +1,93 @@
package com.fr.design.chartx.data.map;
import com.fr.chartx.data.MapChartDataDefinition;
import com.fr.design.chartx.AbstractChartDataPane;
import com.fr.design.chartx.fields.diff.AreaMapCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.AreaMapDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.LineMapCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.LineMapDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.PointMapCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.PointMapDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.type.MapType;
import com.fr.van.chart.map.designer.VanMapAreaPointAndLineGroupPane;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/12
*/
public class MapChartDataPane extends AbstractChartDataPane<MapChartDataDefinition> {
private SingleDataPane areaPane;
private SingleDataPane pointPane;
private SingleDataPane linePane;
public MapChartDataPane(AttributeChangeListener listener) {
super(listener);
}
@Override
protected JPanel createContentPane() {
MapType mapType = MapType.AREA;
if (this.getVanChart() != null) {
VanChartMapPlot mapPlot = this.getVanChart().getPlot();
mapType = mapPlot == null ? mapType : mapPlot.getMapType();
}
switch (mapType) {
case AREA:
areaPane = new SingleDataPane(new AreaMapDataSetFieldsPane(), new AreaMapCellDataFieldsPane());
return areaPane;
case POINT:
pointPane = new SingleDataPane(new PointMapDataSetFieldsPane(), new PointMapCellDataFieldsPane());
return pointPane;
case LINE:
linePane = new SingleDataPane(new LineMapDataSetFieldsPane(), new LineMapCellDataFieldsPane());
return linePane;
case CUSTOM:
areaPane = new SingleDataPane(new AreaMapDataSetFieldsPane(), new AreaMapCellDataFieldsPane());
pointPane = new SingleDataPane(new PointMapDataSetFieldsPane(), new PointMapCellDataFieldsPane());
linePane = new SingleDataPane(new LineMapDataSetFieldsPane(), new LineMapCellDataFieldsPane());
return new VanMapAreaPointAndLineGroupPane(areaPane, pointPane, linePane);
default:
areaPane = new SingleDataPane(new AreaMapDataSetFieldsPane(), new AreaMapCellDataFieldsPane());
return areaPane;
}
}
@Override
protected void populate(MapChartDataDefinition mapChartDataDefinition) {
if (mapChartDataDefinition == null) {
return;
}
if (areaPane != null) {
areaPane.populateBean(mapChartDataDefinition.getAreaMapDataDefinition());
}
if (pointPane != null) {
pointPane.populateBean(mapChartDataDefinition.getPointMapDataDefinition());
}
if (linePane != null) {
linePane.populateBean(mapChartDataDefinition.getLineMapDataDefinition());
}
}
@Override
protected MapChartDataDefinition update() {
MapChartDataDefinition mapChartDataDefinition = new MapChartDataDefinition();
if (areaPane != null) {
mapChartDataDefinition.setAreaMapDataDefinition(areaPane.updateBean());
}
if (pointPane != null) {
mapChartDataDefinition.setPointMapDataDefinition(pointPane.updateBean());
}
if (linePane != null) {
mapChartDataDefinition.setLineMapDataDefinition(linePane.updateBean());
}
return mapChartDataDefinition;
}
}

71
designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithComboBox.java

@ -0,0 +1,71 @@
package com.fr.design.chartx.data.map;
import com.fr.chartx.data.field.diff.PointMapColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/13
*/
public class PointMapAreaLngLatPaneWithComboBox extends PointMapAreaLngLatPaneWithTinyFormula {
private UIComboBox area_tab0;
private UIComboBox area_tab1;
private UIComboBox lng_tab1;
private UIComboBox lat_tab1;
@Override
protected JPanel createAreaPane() {
if (area_tab0 == null) {
area_tab0 = new UIComboBox();
}
return createPane(
new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name")},
area_tab0
);
}
@Override
protected JPanel createAreaLngLatPane() {
if (area_tab1 == null) {
area_tab1 = new UIComboBox();
lng_tab1 = new UIComboBox();
lat_tab1 = new UIComboBox();
}
return createPane(
new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_Longitude"), Toolkit.i18nText("Fine-Design_Chart_Latitude")},
area_tab1, lng_tab1, lat_tab1
);
}
protected void populateTab0(PointMapColumnFieldCollection fieldCollection) {
AbstractDataSetFieldsPane.populateField(area_tab0, fieldCollection.getAreaName());
}
protected void updateTab0(PointMapColumnFieldCollection fieldCollection) {
AbstractDataSetFieldsPane.updateField(area_tab0, fieldCollection.getAreaName());
}
protected void populateTab1(PointMapColumnFieldCollection fieldCollection) {
AbstractDataSetFieldsPane.populateField(area_tab1, fieldCollection.getAreaName());
AbstractDataSetFieldsPane.populateField(lng_tab1, fieldCollection.getLng());
AbstractDataSetFieldsPane.populateField(lat_tab1, fieldCollection.getLat());
}
protected void updateTab1(PointMapColumnFieldCollection fieldCollection) {
AbstractDataSetFieldsPane.updateField(area_tab1, fieldCollection.getAreaName());
AbstractDataSetFieldsPane.updateField(lng_tab1, fieldCollection.getLng());
AbstractDataSetFieldsPane.updateField(lat_tab1, fieldCollection.getLat());
}
public UIComboBox[] allFieldComboBox() {
return new UIComboBox[]{
area_tab0, area_tab1, lng_tab1, lat_tab1
};
}
}

84
designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithTinyFormula.java

@ -0,0 +1,84 @@
package com.fr.design.chartx.data.map;
import com.fr.chartx.data.field.diff.PointMapColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.i18n.Toolkit;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/13
*/
public class PointMapAreaLngLatPaneWithTinyFormula extends AbstractAreaLngLatPane {
private TinyFormulaPane area_tab0;
private TinyFormulaPane area_tab1;
private TinyFormulaPane lng_tab1;
private TinyFormulaPane lat_tab1;
@Override
protected JPanel createAreaPane() {
if (area_tab0 == null) {
area_tab0 = new TinyFormulaPane();
}
return createPane(
new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name")},
area_tab0
);
}
@Override
protected JPanel createAreaLngLatPane() {
if (area_tab1 == null) {
area_tab1 = new TinyFormulaPane();
lng_tab1 = new TinyFormulaPane();
lat_tab1 = new TinyFormulaPane();
}
return createPane(
new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_Longitude"), Toolkit.i18nText("Fine-Design_Chart_Latitude")},
area_tab1, lng_tab1, lat_tab1
);
}
protected void populateTab0(PointMapColumnFieldCollection fieldCollection) {
AbstractCellDataFieldsPane.populateField(area_tab0, fieldCollection.getAreaName());
}
protected void updateTab0(PointMapColumnFieldCollection fieldCollection) {
AbstractCellDataFieldsPane.updateField(area_tab0, fieldCollection.getAreaName());
}
protected void populateTab1(PointMapColumnFieldCollection fieldCollection) {
AbstractCellDataFieldsPane.populateField(area_tab1, fieldCollection.getAreaName());
AbstractCellDataFieldsPane.populateField(lng_tab1, fieldCollection.getLng());
AbstractCellDataFieldsPane.populateField(lat_tab1, fieldCollection.getLat());
}
protected void updateTab1(PointMapColumnFieldCollection fieldCollection) {
AbstractCellDataFieldsPane.updateField(area_tab1, fieldCollection.getAreaName());
AbstractCellDataFieldsPane.updateField(lng_tab1, fieldCollection.getLng());
AbstractCellDataFieldsPane.updateField(lat_tab1, fieldCollection.getLat());
}
public void populate(PointMapColumnFieldCollection fieldCollection) {
super.populate(fieldCollection.isUseAreaName());
if (fieldCollection.isUseAreaName()) {
populateTab0(fieldCollection);
} else {
populateTab1(fieldCollection);
}
}
public void update(PointMapColumnFieldCollection fieldCollection) {
fieldCollection.setUseAreaName(super.update());
if (fieldCollection.isUseAreaName()) {
updateTab0(fieldCollection);
} else {
updateTab1(fieldCollection);
}
}
}

6
designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java

@ -17,10 +17,10 @@ import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.util.Arrays;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.Arrays;
import java.util.List;
import static com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper.refreshBoxItems;
@ -37,7 +37,7 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
protected void initComponents() {
this.setLayout(new BorderLayout(0, 6));
this.setBorder(BorderFactory.createEmptyBorder(2, 24, 0, 15));
this.setBorder(BorderFactory.createEmptyBorder(6, 24, 0, 15));
JPanel north = createNorthPane(),
center = createCenterPane(),

49
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AreaMapCellDataFieldsPane.java

@ -0,0 +1,49 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.AreaMapColumnFieldCollection;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.i18n.Toolkit;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/7
*/
public class AreaMapCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesValuePane<AreaMapColumnFieldCollection> {
private TinyFormulaPane areaName;
@Override
protected String[] fieldLabels() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Area_Name")
};
}
@Override
protected TinyFormulaPane[] formulaPanes() {
return new TinyFormulaPane[]{
createAreaName()
};
}
private TinyFormulaPane createAreaName() {
if (areaName == null) {
areaName = new TinyFormulaPane();
}
return areaName;
}
@Override
public void populateBean(AreaMapColumnFieldCollection ob) {
populateField(areaName, ob.getAreaName());
populateSeriesValuePane(ob);
}
@Override
public AreaMapColumnFieldCollection updateBean() {
AreaMapColumnFieldCollection fieldCollection = new AreaMapColumnFieldCollection();
updateField(areaName, fieldCollection.getAreaName());
updateSeriesValuePane(fieldCollection);
return fieldCollection;
}
}

50
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AreaMapDataSetFieldsPane.java

@ -0,0 +1,50 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.AreaMapColumnFieldCollection;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/7
*/
public class AreaMapDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValuePane<AreaMapColumnFieldCollection> {
private UIComboBox areaName;
@Override
protected String[] fieldLabels() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Area_Name")
};
}
@Override
protected UIComboBox[] filedComboBoxes() {
return new UIComboBox[]{
createAreaName()
};
}
private UIComboBox createAreaName() {
if (areaName == null) {
areaName = new UIComboBox();
}
return areaName;
}
@Override
public void populateBean(AreaMapColumnFieldCollection ob) {
populateField(areaName, ob.getAreaName());
populateSeriesValuePane(ob);
}
@Override
public AreaMapColumnFieldCollection updateBean() {
AreaMapColumnFieldCollection fieldCollection = new AreaMapColumnFieldCollection();
updateField(areaName, fieldCollection.getAreaName());
updateSeriesValuePane(fieldCollection);
return fieldCollection;
}
}

64
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/LineMapCellDataFieldsPane.java

@ -0,0 +1,64 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.LineMapColumnFieldCollection;
import com.fr.design.chartx.data.map.LineMapAreaLngLatPaneWithTinyFormula;
import com.fr.design.formula.TinyFormulaPane;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/11
*/
public class LineMapCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesValuePane<LineMapColumnFieldCollection> {
private LineMapAreaLngLatPaneWithTinyFormula areaLngLatPane;
private TinyFormulaPane lineName;
@Override
protected JPanel createNorthPane() {
if (areaLngLatPane == null) {
areaLngLatPane = new LineMapAreaLngLatPaneWithTinyFormula();
}
return areaLngLatPane;
}
@Override
protected String[] fieldLabels() {
return new String[]{
"lineName"
};
}
@Override
protected TinyFormulaPane[] formulaPanes() {
if (lineName == null) {
lineName = new TinyFormulaPane();
}
return new TinyFormulaPane[]{
lineName
};
}
@Override
public void populateBean(LineMapColumnFieldCollection ob) {
areaLngLatPane.populate(ob);
populateField(lineName, ob.getLineName());
populateSeriesValuePane(ob);
}
@Override
public LineMapColumnFieldCollection updateBean() {
LineMapColumnFieldCollection fieldCollection = new LineMapColumnFieldCollection();
areaLngLatPane.update(fieldCollection);
updateField(lineName, fieldCollection.getLineName());
updateSeriesValuePane(fieldCollection);
return fieldCollection;
}
}

61
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/LineMapDataSetFieldsPane.java

@ -0,0 +1,61 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.LineMapColumnFieldCollection;
import com.fr.design.chartx.data.map.LineMapAreaLngLatPaneWithComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.third.jodd.util.ArraysUtil;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/11
*/
public class LineMapDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValuePane<LineMapColumnFieldCollection> {
private LineMapAreaLngLatPaneWithComboBox areaLngLatPane;
private UIComboBox lineName;
@Override
protected JPanel createNorthPane() {
if (areaLngLatPane == null) {
areaLngLatPane = new LineMapAreaLngLatPaneWithComboBox();
}
return areaLngLatPane;
}
@Override
protected String[] fieldLabels() {
return new String[]{
"lineName"
};
}
@Override
protected UIComboBox[] filedComboBoxes() {
if (lineName == null) {
lineName = new UIComboBox();
}
UIComboBox[] result = areaLngLatPane.allFieldComboBox();
return ArraysUtil.join(new UIComboBox[]{
lineName
}, result);
}
@Override
public void populateBean(LineMapColumnFieldCollection ob) {
areaLngLatPane.populate(ob);
populateField(lineName, ob.getLineName());
populateSeriesValuePane(ob);
}
@Override
public LineMapColumnFieldCollection updateBean() {
LineMapColumnFieldCollection columnFieldCollection = new LineMapColumnFieldCollection();
areaLngLatPane.update(columnFieldCollection);
updateField(lineName, columnFieldCollection.getLineName());
updateSeriesValuePane(columnFieldCollection);
return columnFieldCollection;
}
}

48
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/PointMapCellDataFieldsPane.java

@ -0,0 +1,48 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.PointMapColumnFieldCollection;
import com.fr.design.chartx.data.map.PointMapAreaLngLatPaneWithTinyFormula;
import com.fr.design.formula.TinyFormulaPane;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/8
*/
public class PointMapCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesValuePane<PointMapColumnFieldCollection> {
private PointMapAreaLngLatPaneWithTinyFormula areaLngLatPane;
@Override
protected JPanel createNorthPane() {
if (areaLngLatPane == null) {
areaLngLatPane = new PointMapAreaLngLatPaneWithTinyFormula();
}
return areaLngLatPane;
}
@Override
protected String[] fieldLabels() {
return new String[0];
}
@Override
protected TinyFormulaPane[] formulaPanes() {
return new TinyFormulaPane[0];
}
@Override
public void populateBean(PointMapColumnFieldCollection ob) {
areaLngLatPane.populate(ob);
populateSeriesValuePane(ob);
}
@Override
public PointMapColumnFieldCollection updateBean() {
PointMapColumnFieldCollection fieldCollection = new PointMapColumnFieldCollection();
areaLngLatPane.update(fieldCollection);
updateSeriesValuePane(fieldCollection);
return fieldCollection;
}
}

51
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/PointMapDataSetFieldsPane.java

@ -0,0 +1,51 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.PointMapColumnFieldCollection;
import com.fr.design.chartx.data.map.PointMapAreaLngLatPaneWithComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import javax.swing.JPanel;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/11/8
*/
public class PointMapDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValuePane<PointMapColumnFieldCollection> {
private PointMapAreaLngLatPaneWithComboBox areaLngLatPane;
@Override
protected JPanel createNorthPane() {
if (areaLngLatPane == null) {
areaLngLatPane = new PointMapAreaLngLatPaneWithComboBox();
}
return areaLngLatPane;
}
@Override
protected String[] fieldLabels() {
return new String[0];
}
@Override
protected UIComboBox[] filedComboBoxes() {
if (areaLngLatPane == null) {
areaLngLatPane = new PointMapAreaLngLatPaneWithComboBox();
}
return areaLngLatPane.allFieldComboBox();
}
@Override
public void populateBean(PointMapColumnFieldCollection ob) {
areaLngLatPane.populate(ob);
populateSeriesValuePane(ob);
}
@Override
public PointMapColumnFieldCollection updateBean() {
PointMapColumnFieldCollection fieldCollection = new PointMapColumnFieldCollection();
areaLngLatPane.update(fieldCollection);
updateSeriesValuePane(fieldCollection);
return fieldCollection;
}
}

12
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/ScatterDataSetFieldsPane.java

@ -22,7 +22,7 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
private UIComboBoxWithNone series;
private UIComboBox xField;
private UIComboBox yField;
private UIComboBoxWithNone value;
private UIComboBoxWithNone size;
//todo 数据筛选
private AbstractSingleFilterPane filterPane;
@ -34,7 +34,7 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
series = new UIComboBoxWithNone();
xField = new UIComboBox();
yField = new UIComboBox();
value = new UIComboBoxWithNone();
size = new UIComboBoxWithNone();
filterPane = new AbstractSingleFilterPane() {
@Override
@ -59,7 +59,7 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
@Override
protected UIComboBox[] filedComboBoxes() {
return new UIComboBox[]{
series, xField, yField, value
series, xField, yField, size
};
}
@ -80,7 +80,8 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
updateField(series, field.getSeriesName());
updateField(xField, field.getXField());
updateField(yField, field.getYField());
updateField(value, field.getValueField());
updateField(size, field.getSizeField());
filterPane.updateBean(field.getSeriesName().getFilterProperties());
return collection;
}
@ -90,6 +91,7 @@ public class ScatterDataSetFieldsPane extends AbstractDataSetFieldsPane<BubbleCo
populateField(series, field.getSeriesName());
populateField(xField, field.getXField());
populateField(yField, field.getYField());
populateField(value, field.getValueField());
populateField(size, field.getSizeField());
filterPane.populateBean(field.getSeriesName().getFilterProperties());
}
}

9
designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java

@ -4,8 +4,11 @@ import com.fr.chartx.data.CellDataDefinition;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.i18n.Toolkit;
import com.fr.stable.AssistUtils;
import java.awt.BorderLayout;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
/**
* Created by shine on 2019/5/21.
@ -43,7 +46,11 @@ public class CellDataPane extends FurtherBasicBeanPane<CellDataDefinition> {
@Override
public void populateBean(CellDataDefinition ob) {
cellDataFieldsPane.populateBean(ob.getColumnFieldCollection());
Type dataType = ((ParameterizedType) cellDataFieldsPane.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
if (AssistUtils.equals(ob.getColumnFieldCollection().getClass(), dataType)) {
cellDataFieldsPane.populateBean(ob.getColumnFieldCollection());
}
}
@Override

8
designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java

@ -11,9 +11,12 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.stable.AssistUtils;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
/**
@ -101,8 +104,11 @@ public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
checkBoxUse();
tableDataPane.populateBean(ob.getNameTableData());
Type dataType = ((ParameterizedType) dataSetFieldsPane.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
if (AssistUtils.equals(ob.getColumnFieldCollection().getClass(), dataType)) {
dataSetFieldsPane.populateBean(ob.getColumnFieldCollection());
}
dataSetFieldsPane.populateBean(ob.getColumnFieldCollection());
}
@Override

23
designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java

@ -1,11 +1,14 @@
package com.fr.van.chart.bubble;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.ScatterCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.ScatterDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.SingleCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.SingleCategoryDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
@ -18,6 +21,7 @@ import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContent
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.VanChartBubblePlot;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.bubble.data.VanChartBubblePlotTableDataContentPane;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort;
import com.fr.van.chart.designer.other.VanChartOtherPane;
@ -123,8 +127,27 @@ public class BubbleIndependentVanChartInterface extends AbstractIndependentVanCh
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
VanChartBubblePlot plot;
@Override
public void populate(ChartCollection collection) {
if (collection == null) {
return;
}
VanChart chart = collection.getSelectedChartProvider(VanChart.class);
if (chart == null) {
return;
}
plot = chart.getPlot();
super.populate(collection);
}
@Override
protected SingleDataPane createSingleDataPane() {
if (plot != null && plot.isForceBubble()) {
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
}
return new SingleDataPane(new ScatterDataSetFieldsPane(), new ScatterCellDataFieldsPane());
}
};

3
designer-chart/src/main/java/com/fr/van/chart/custom/CustomIndependentVanChartInterface.java

@ -1,5 +1,6 @@
package com.fr.van.chart.custom;
import com.fr.design.chartx.CustomChartDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -73,6 +74,6 @@ public class CustomIndependentVanChartInterface extends AbstractIndependentVanCh
}
public ChartDataPane getChartDataPane(AttributeChangeListener listener){
return new VanChartCustomDataPane(listener);
return new CustomChartDataPane(listener);
}
}

1
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -385,6 +385,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected void checkAllUse() {
checkCardPane();
checkLabelPane();
limitPane.checkMaxProPortionUse();
}
protected void checkCardPane() {

8
designer-chart/src/main/java/com/fr/van/chart/drillmap/DrillMapIndependentVanChartInterface.java → designer-chart/src/main/java/com/fr/van/chart/drillmap/VanDrillMapChartTypeUI.java

@ -1,5 +1,6 @@
package com.fr.van.chart.drillmap;
import com.fr.design.chartx.data.drillMap.DrillMapChartDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -7,16 +8,15 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.van.chart.designer.other.VanChartOtherPane;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.drillmap.designer.data.VanChartDrillMapDataPane;
import com.fr.van.chart.drillmap.designer.other.VanChartDrillMapOtherPane;
import com.fr.van.chart.drillmap.designer.type.VanChartDrillMapPlotPane;
import com.fr.van.chart.map.MapIndependentVanChartInterface;
import com.fr.van.chart.map.VanMapChartTypeUI;
import com.fr.van.chart.map.designer.style.VanChartMapStylePane;
/**
* Created by Mitisky on 16/6/20.
*/
public class DrillMapIndependentVanChartInterface extends MapIndependentVanChartInterface {
public class VanDrillMapChartTypeUI extends VanMapChartTypeUI {
@Override
public String getName() {
return Toolkit.i18nText("Fine-Design_Chart_Drill_Map");
@ -61,7 +61,7 @@ public class DrillMapIndependentVanChartInterface extends MapIndependentVanChart
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new VanChartDrillMapDataPane(listener);
return new DrillMapChartDataPane(listener);
}
/**

52
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/VanChartDrillMapContentsPane.java

@ -1,52 +0,0 @@
package com.fr.van.chart.drillmap.designer.data;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.DataContentsPane;
import javax.swing.JPanel;
/**
* Created by Mitisky on 16/6/20.
*/
public class VanChartDrillMapContentsPane extends DataContentsPane {
private VanChartMapLayerAndDataTabPane layerAndDataTabPane;
private AttributeChangeListener listener;
private ChartDataPane parent;
public VanChartDrillMapContentsPane(AttributeChangeListener listener, ChartDataPane parent) {
this.listener = listener;
this.parent = parent;
initAll();
}
/**
* 设置是否关联单元格数据.
*
* @param supportCellData
*/
@Override
public void setSupportCellData(boolean supportCellData) {
layerAndDataTabPane.setSupportCellData(supportCellData);
}
@Override
public void populate(ChartCollection collection) {
layerAndDataTabPane.populateBean(collection);
}
@Override
public void update(ChartCollection collection) {
layerAndDataTabPane.updateBean(collection);
}
@Override
protected JPanel createContentPane() {
layerAndDataTabPane = new VanChartMapLayerAndDataTabPane(this.listener, this.parent);
return layerAndDataTabPane;
}
}

39
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/VanChartDrillMapDataPane.java

@ -1,39 +0,0 @@
package com.fr.van.chart.drillmap.designer.data;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* Created by Mitisky on 16/6/20.
*/
public class VanChartDrillMapDataPane extends ChartDataPane{
public VanChartDrillMapDataPane(AttributeChangeListener listener) {
super(listener);
}
@Override
protected JPanel createContentPane() {
contentsPane = new VanChartDrillMapContentsPane(listener, VanChartDrillMapDataPane.this);
return contentsPane;
}
//编辑内置数据集会stateChange,会调用这里
@Override
protected void repeatLayout(ChartCollection collection) {
if(contentsPane != null) {
this.remove(contentsPane);
}
this.setLayout(new BorderLayout(0, 0));
contentsPane = new VanChartDrillMapContentsPane(listener, VanChartDrillMapDataPane.this);
contentsPane.setSupportCellData(isSupportCellData());
this.add(contentsPane, BorderLayout.CENTER);
}
}

130
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/VanChartMapLayerAndDataTabPane.java

@ -1,130 +0,0 @@
package com.fr.van.chart.drillmap.designer.data;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.MultiTabPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.general.ComparatorUtils;
import com.fr.van.chart.drillmap.designer.data.comp.DrillMapDataPane;
import com.fr.van.chart.drillmap.designer.data.comp.DrillMapLayerPane;
import com.fr.van.chart.map.designer.data.MapDataPaneHelper;
import java.awt.CardLayout;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Mitisky on 16/6/20.
* 钻取层级和数据界面切换的界面
*/
public class VanChartMapLayerAndDataTabPane extends MultiTabPane<ChartCollection> {
private DrillMapLayerPane layerPane;
private DrillMapDataPane dataPane;
private ChartCollection chartCollection;
public VanChartMapLayerAndDataTabPane(AttributeChangeListener listener, ChartDataPane parent) {
cardLayout = new CardLayout();
layerPane = new DrillMapLayerPane();
dataPane = new DrillMapDataPane(listener, parent);
paneList = initPaneList();
initComponents();
}
private void initComponents(){
super.relayoutWhenListChange();
}
protected void tabChanged() {
if(getSelectedIndex() == 0){
return;
}
if(chartCollection == null){
return;
}
if(!ComparatorUtils.equals(MapDataPaneHelper.getDrillMapLayerMapTypeList(chartCollection), dataPane.getCurrentMapTypeList())){
dataPane.populateBean(chartCollection);
}
}
/**
* 当List中的界面变化时, 重新布局
*/
public void relayoutWhenListChange() {
}
@Override
protected List<BasicPane> initPaneList() {
List<BasicPane> paneList = new ArrayList<BasicPane>();
if(layerPane != null) {
paneList.add(layerPane);
}
if(dataPane != null) {
paneList.add(dataPane);
}
return paneList;
}
@Override
public void populateBean(ChartCollection ob) {
chartCollection = ob;
layerPane.populateBean(ob);
dataPane.populateBean(ob);
}
/**
* Update.
*/
@Override
public ChartCollection updateBean() {
return null;
}
@Override
public void updateBean(ChartCollection ob) {
layerPane.updateBean(ob);
dataPane.updateBean(ob);
}
/**
* 设置是否关联单元格数据.
*
* @param supportCellData
*/
public void setSupportCellData(boolean supportCellData) {
dataPane.setSupportCellData(supportCellData);
}
/**
* 是否是指定类型
*
* @param ob 对象
* @return 是否是指定类型
*/
@Override
public boolean accept(Object ob) {
return false;
}
/**
* title应该是一个属性不只是对话框的标题时用到与其他组件结合时也会用得到
*
* @return 绥化狂标题
*/
@Override
public String title4PopupWindow() {
return null;
}
/**
* 重置
*/
@Override
public void reset() {
}
}

117
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapDataPane.java

@ -1,117 +0,0 @@
package com.fr.van.chart.drillmap.designer.data.comp;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.plugin.chart.drillmap.data.DrillMapDefinition;
import com.fr.plugin.chart.type.MapType;
import com.fr.van.chart.map.designer.data.MapDataPaneHelper;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Mitisky on 16/6/20.
* 钻取地图数据配置界面中 和钻取层级平级的数据界面
*/
public class DrillMapDataPane extends BasicBeanPane<ChartCollection> {
private UIComboBoxPane<ChartCollection> dataDefinitionType;//数据定义方式:底层数据汇总/各层级分别指定
private SingleLayerDataDefinitionPane bottomDataDefinitionPane;//底层数据汇总方式定义钻取地图数据
private EachLayerDataDefinitionPane eachLayerDataDefinitionPane;//各层级分别指定
private ChartDataPane parent;
public DrillMapDataPane(final AttributeChangeListener listener,final ChartDataPane parent) {
this.parent = parent;
bottomDataDefinitionPane = new SingleLayerDataDefinitionPane(listener, parent);
eachLayerDataDefinitionPane = new EachLayerDataDefinitionPane(listener, parent);
dataDefinitionType = new UIComboBoxPane<ChartCollection>() {
@Override
protected List<FurtherBasicBeanPane<? extends ChartCollection>> initPaneList() {
List<FurtherBasicBeanPane<? extends ChartCollection>> paneList = new ArrayList<FurtherBasicBeanPane<? extends ChartCollection>>();
paneList.add(bottomDataDefinitionPane);
paneList.add(eachLayerDataDefinitionPane);
return paneList;
}
@Override
protected String title4PopupWindow() {
return null;
}
};
this.setLayout(new BorderLayout());
this.add(dataDefinitionType, BorderLayout.CENTER);
}
public List<MapType> getCurrentMapTypeList() {
return eachLayerDataDefinitionPane.getCurrentMapTypeList();
}
/**
* 设置是否关联单元格数据.
*
* @param supportCellData
*/
public void setSupportCellData(boolean supportCellData) {
bottomDataDefinitionPane.setSupportCellData(supportCellData);
eachLayerDataDefinitionPane.setSupportCellData(supportCellData);
}
/**
* Populate.
*
* @param ob
*/
@Override
public void populateBean(ChartCollection ob) {
dataDefinitionType.setSelectedIndex(MapDataPaneHelper.isFromBottomData(ob) ? 0 : 1);
ChartCollection bottomDataChartCollection = MapDataPaneHelper.getBottomDataDrillMapChartCollection(ob);
bottomDataDefinitionPane.populateBean(bottomDataChartCollection);
eachLayerDataDefinitionPane.populateBean(ob);
parent.initAllListeners();
}
/**
* Update.
*/
@Override
public ChartCollection updateBean() {
return null;
}
@Override
public void updateBean(ChartCollection ob) {
DrillMapDefinition drillMapDefinition = MapDataPaneHelper.getDrillMapDefinition(ob);
if(drillMapDefinition == null){
drillMapDefinition = new DrillMapDefinition();
ob.getSelectedChart().setFilterDefinition(drillMapDefinition);
}
if(dataDefinitionType.getSelectedIndex() == 0){
drillMapDefinition.setFromBottomData(true);
ChartCollection temp = new ChartCollection(new Chart());
bottomDataDefinitionPane.updateBean(temp);
drillMapDefinition.setBottomDataDefinition(temp.getSelectedChart().getFilterDefinition());
} else {
drillMapDefinition.setFromBottomData(false);
eachLayerDataDefinitionPane.updateBean(ob);
}
}
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Data");
}
}

171
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java

@ -1,171 +0,0 @@
package com.fr.van.chart.drillmap.designer.data.comp;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.MultiTabPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.drillmap.DrillMapHelper;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.drillmap.data.DrillMapDefinition;
import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper;
import com.fr.plugin.chart.type.MapType;
import com.fr.van.chart.map.designer.data.MapDataPaneHelper;
import javax.swing.tree.DefaultMutableTreeNode;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Mitisky on 16/6/20.
* 各层级分别指定的界面
*/
public class EachLayerDataDefinitionPane extends MultiTabPane<ChartCollection> {
private AttributeChangeListener listener;
private ChartDataPane parent;
private int depth;
private String oldGeoUrl;
private List<MapType> oldMapList;
public EachLayerDataDefinitionPane(AttributeChangeListener listener, ChartDataPane parent) {
this.listener = listener;
this.parent = parent;
cardLayout = new CardLayout();
}
private void initComponents(){
super.relayoutWhenListChange();
}
/**
* 当List中的界面变化时, 重新布局
*/
public void relayoutWhenListChange() {
}
public List<MapType> getCurrentMapTypeList() {
return oldMapList;
}
@Override
protected List<BasicPane> initPaneList() {
List<BasicPane> paneList = new ArrayList<BasicPane>();
for(int i = 1; i < depth + 1; i++){
String tile = String.format("%s%d%s", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Index_Article"), i, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Index_Layer"));
SingleLayerDataDefinitionPane pane = new SingleLayerDataDefinitionPane(tile, this.listener, this.parent);
pane.setSupportCellData(parent.isSupportCellData());
paneList.add(pane);
}
return paneList;
}
@Override
public void populateBean(ChartCollection ob) {
VanChartDrillMapPlot drillMapPlot = DrillMapHelper.getDrillMapPlot(ob);
if(drillMapPlot == null){
return;
}
if(!ComparatorUtils.equals(oldGeoUrl, drillMapPlot.getGeoUrl())) {
oldGeoUrl = drillMapPlot.getGeoUrl();
DefaultMutableTreeNode root = CompatibleGeoJSONTreeHelper.getNodeByJSONPath(oldGeoUrl);
if (root == null) {
return;
}
depth = root.getDepth() + 1;//根节点也算一层
paneList = initPaneList();
this.removeAll();
initComponents();
}
oldMapList = drillMapPlot.getLayerMapTypeList();
populatePaneList(ob);
}
private void populatePaneList(ChartCollection chartCollection){
for(int i = 0, len = paneList.size(); i < len; i++){
BasicPane basicPane = paneList.get(i);
MapType mapType = oldMapList.get(i);
if(basicPane instanceof SingleLayerDataDefinitionPane){
ChartCollection clone = MapDataPaneHelper.getLayerChartCollection(chartCollection, i, mapType);
((SingleLayerDataDefinitionPane) basicPane).populateBean(clone);
}
}
}
/**
* Update.
*/
@Override
public ChartCollection updateBean() {
return null;
}
@Override
public void updateBean(ChartCollection ob) {
DrillMapDefinition drillMapDefinition = MapDataPaneHelper.getDrillMapDefinition(ob);
List<TopDefinitionProvider> eachLayerDataDefinitionList = new ArrayList<TopDefinitionProvider>();
for(BasicPane basicPane : paneList){
if(basicPane instanceof SingleLayerDataDefinitionPane){
ChartCollection temp = new ChartCollection(new Chart());
((SingleLayerDataDefinitionPane) basicPane).updateBean(temp);
eachLayerDataDefinitionList.add(temp.getSelectedChart().getFilterDefinition());
}
}
drillMapDefinition.setEachLayerDataDefinitionList(eachLayerDataDefinitionList);
}
/**
* 是否是指定类型
*
* @param ob 对象
* @return 是否是指定类型
*/
@Override
public boolean accept(Object ob) {
return false;
}
/**
* title应该是一个属性不只是对话框的标题时用到与其他组件结合时也会用得到
*
* @return 绥化狂标题
*/
@Override
public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Each_Layer_Data_Special");
}
/**
* 重置
*/
@Override
public void reset() {
}
/**
* 设置是否关联单元格数据.
*
* @param supportCellData
*/
public void setSupportCellData(boolean supportCellData) {
if(paneList == null){
return;
}
for(BasicPane basicPane : paneList){
if(basicPane instanceof SingleLayerDataDefinitionPane){
((SingleLayerDataDefinitionPane) basicPane).setSupportCellData(supportCellData);
}
}
}
}

94
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/SingleLayerDataDefinitionPane.java

@ -1,94 +0,0 @@
package com.fr.van.chart.drillmap.designer.data.comp;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane;
import java.awt.BorderLayout;
/**
* Created by Mitisky on 16/6/21.
* 各层级分别指定中 单层区域地图数据配置 以及 底层数据汇总方式的界面
*/
public class SingleLayerDataDefinitionPane extends FurtherBasicBeanPane<ChartCollection> {
private String title;
private NormalChartDataPane normalChartDataPane;
//底层数据汇总
public SingleLayerDataDefinitionPane(AttributeChangeListener listener, ChartDataPane parent) {
this(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Bottom_Data_Sum"), listener, parent);
}
public SingleLayerDataDefinitionPane(String title, AttributeChangeListener listener, ChartDataPane parent) {
this.title = title;
normalChartDataPane = new NormalChartDataPane(listener, parent);
this.setLayout(new BorderLayout());
this.add(normalChartDataPane, BorderLayout.CENTER);
}
/**
* 设置是否关联单元格数据.
*
* @param supportCellData
*/
public void setSupportCellData(boolean supportCellData) {
normalChartDataPane.setSupportCellData(supportCellData);
}
/**
* 是否是指定类型
*
* @param ob 对象
* @return 是否是指定类型
*/
@Override
public boolean accept(Object ob) {
return false;
}
/**
* title应该是一个属性不只是对话框的标题时用到与其他组件结合时也会用得到
*
* @return 绥化狂标题
*/
@Override
public String title4PopupWindow() {
return title;
}
/**
* 重置
*/
@Override
public void reset() {
}
/**
* Populate.
*
* @param ob
*/
@Override
public void populateBean(ChartCollection ob) {
normalChartDataPane.populate(ob);
}
@Override
public void updateBean(ChartCollection ob) {
normalChartDataPane.update(ob);
}
/**
* Update.
*/
@Override
public ChartCollection updateBean() {
return null;
}
}

38
designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java

@ -1,7 +1,14 @@
package com.fr.van.chart.gauge;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.GaugeCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.GaugeDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.SingleCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.SingleCategoryDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -15,6 +22,7 @@ import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContent
import com.fr.design.mainframe.chart.gui.data.table.MeterPlotTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.custom.component.CategoryCustomPlotTableDataContentPane;
import com.fr.van.chart.custom.component.MeterCustomPlotReportDataContentPane;
import com.fr.van.chart.custom.component.MeterCustomPlotTableDataContentPane;
@ -107,4 +115,34 @@ public class GaugeIndependentVanChartInterface extends AbstractIndependentVanCha
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){
return new VanChartGaugeSeriesPane(parent, plot);
}
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
VanChartGaugePlot gaugePlot;
@Override
public void populate(ChartCollection collection) {
if (collection == null) {
return;
}
VanChart chart = collection.getSelectedChartProvider(VanChart.class);
if (chart == null) {
return;
}
gaugePlot = chart.getPlot();
super.populate(collection);
}
@Override
protected SingleDataPane createSingleDataPane() {
if (gaugePlot != null && !gaugePlot.isMultiPointer()) {
return new SingleDataPane(new GaugeDataSetFieldsPane(), new GaugeCellDataFieldsPane());
}
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
}
};
}
}

18
designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/HeatMapIndependentVanChartInterface.java → designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/VanHeatMapChartTypeUI.java

@ -3,10 +3,15 @@ package com.fr.van.chart.heatmap.designer;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.PointMapCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.PointMapDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
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.type.AbstractChartTypePane;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithMapZoom;
@ -15,13 +20,13 @@ import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.heatmap.designer.other.VanChartHeatMapConditionPane;
import com.fr.van.chart.heatmap.designer.style.VanChartHeatMapSeriesPane;
import com.fr.van.chart.heatmap.designer.type.VanChartHeatMapTypePane;
import com.fr.van.chart.map.MapIndependentVanChartInterface;
import com.fr.van.chart.map.VanMapChartTypeUI;
import com.fr.van.chart.map.designer.style.VanChartMapStylePane;
/**
* Created by Mitisky on 16/10/20.
*/
public class HeatMapIndependentVanChartInterface extends MapIndependentVanChartInterface {
public class VanHeatMapChartTypeUI extends VanMapChartTypeUI {
/**
* 图标路径
@ -57,8 +62,13 @@ public class HeatMapIndependentVanChartInterface extends MapIndependentVanChartI
}
@Override
protected boolean areaPlot(Plot plot) {
return false;
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new PointMapDataSetFieldsPane(), new PointMapCellDataFieldsPane());
}
};
}
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot) {

36
designer-chart/src/main/java/com/fr/van/chart/map/MapIndependentVanChartInterface.java → designer-chart/src/main/java/com/fr/van/chart/map/VanMapChartTypeUI.java

@ -2,26 +2,16 @@ package com.fr.van.chart.map;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.data.map.MapChartDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
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.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.type.MapType;
import com.fr.van.chart.designer.other.VanChartOtherPane;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.map.designer.data.VanChartMapDataPane;
import com.fr.van.chart.map.designer.data.contentpane.report.VanAreaMapPlotReportDataContentPane;
import com.fr.van.chart.map.designer.data.contentpane.report.VanLineMapPlotReportDataContentPane;
import com.fr.van.chart.map.designer.data.contentpane.report.VanPointMapPlotReportDataContentPane;
import com.fr.van.chart.map.designer.data.contentpane.table.VanAreaMapPlotTableDataContentPane;
import com.fr.van.chart.map.designer.data.contentpane.table.VanLineMapPlotTableDataContentPane;
import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
import com.fr.van.chart.map.designer.other.VanChartMapOtherPane;
import com.fr.van.chart.map.designer.other.condition.pane.VanChartMapConditionPane;
import com.fr.van.chart.map.designer.style.VanChartMapStylePane;
@ -31,7 +21,7 @@ import com.fr.van.chart.vanchart.AbstractIndependentVanChartUI;
/**
* Created by Mitisky on 16/5/4.
*/
public class MapIndependentVanChartInterface extends AbstractIndependentVanChartUI {
public class VanMapChartTypeUI extends AbstractIndependentVanChartUI {
@Override
public String getName() {
@ -70,28 +60,8 @@ public class MapIndependentVanChartInterface extends AbstractIndependentVanChart
return new VanChartMapPlotPane();
}
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){
return areaPlot(plot) ? new VanAreaMapPlotTableDataContentPane(parent)
: linePlot(plot) ? new VanLineMapPlotTableDataContentPane(parent)
: new VanPointMapPlotTableDataContentPane(parent);
}
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){
return areaPlot(plot) ? new VanAreaMapPlotReportDataContentPane(parent)
: linePlot(plot) ? new VanLineMapPlotReportDataContentPane(parent)
: new VanPointMapPlotReportDataContentPane(parent);
}
public ChartDataPane getChartDataPane(AttributeChangeListener listener){
return new VanChartMapDataPane(listener);
}
protected boolean areaPlot(Plot plot){
return plot != null && plot instanceof VanChartMapPlot && ((VanChartMapPlot) plot).getMapType() == MapType.AREA;
}
protected boolean linePlot(Plot plot){
return plot != null && plot instanceof VanChartMapPlot && ((VanChartMapPlot) plot).getMapType() == MapType.LINE;
return new MapChartDataPane(listener);
}
/**

4
designer-chart/src/main/java/com/fr/van/chart/map/designer/VanChartGroupPane.java

@ -35,6 +35,7 @@ public abstract class VanChartGroupPane extends JPanel{
@Override
public void stateChanged(ChangeEvent e) {
cardLayout.show(centerPane, nameList[buttonGroup.getSelectedIndex()]);
tabChanged(buttonGroup.getSelectedIndex());
}
});
buttonGroup.setBorder(getButtonGroupBorder());
@ -43,6 +44,9 @@ public abstract class VanChartGroupPane extends JPanel{
this.add(centerPane, BorderLayout.CENTER);
}
protected void tabChanged(int index) {
}
protected Border getButtonGroupBorder () {
return null;
}

84
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/CustomMapChartDataContentsPane.java

@ -1,84 +0,0 @@
package com.fr.van.chart.map.designer.data;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.DataContentsPane;
import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane;
import com.fr.van.chart.map.designer.VanMapAreaPointAndLineGroupPane;
import javax.swing.JPanel;
/**
* Created by Mitisky on 16/5/17.
*/
public class CustomMapChartDataContentsPane extends DataContentsPane{
private NormalChartDataPane areaMapChartDataPane;
private NormalChartDataPane pointMapChartDataPane;
private NormalChartDataPane lineMapChartDataPane;
private AttributeChangeListener listener;
private ChartDataPane parent;
public CustomMapChartDataContentsPane(AttributeChangeListener listener, ChartDataPane parent) {
this.listener = listener;
this.parent = parent;
initAll();
}
@Override
public void setSupportCellData(boolean supportCellData) {
areaMapChartDataPane.setSupportCellData(supportCellData);
pointMapChartDataPane.setSupportCellData(supportCellData);
lineMapChartDataPane.setSupportCellData(supportCellData);
}
@Override
public void populate(ChartCollection collection) {
populateAreaMap(collection);
populatePointMap(collection);
populateLineMap(collection);
}
@Override
public void update(ChartCollection collection) {
updatePointMap(collection);
updateAreaMap(collection);
updateLineMap(collection);
}
public void populatePointMap(ChartCollection collection) {
pointMapChartDataPane.populate(collection);
}
public void populateLineMap(ChartCollection collection) {
lineMapChartDataPane.populate(collection);
}
public void updatePointMap(ChartCollection collection) {
pointMapChartDataPane.update(collection);
}
public void populateAreaMap(ChartCollection collection) {
areaMapChartDataPane.populate(collection);
}
public void updateAreaMap(ChartCollection collection) {
areaMapChartDataPane.update(collection);
}
public void updateLineMap(ChartCollection collection) {
lineMapChartDataPane.update(collection);
}
@Override
protected JPanel createContentPane() {
areaMapChartDataPane = new NormalChartDataPane(listener, parent);
pointMapChartDataPane = new NormalChartDataPane(listener, parent);
lineMapChartDataPane = new NormalChartDataPane(listener, parent);
return new VanMapAreaPointAndLineGroupPane(areaMapChartDataPane, pointMapChartDataPane, lineMapChartDataPane);
}
}

177
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/MapDataPaneHelper.java

@ -1,177 +0,0 @@
package com.fr.van.chart.map.designer.data;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import com.fr.plugin.chart.drillmap.data.DrillMapDefinition;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.data.VanMapDefinition;
import com.fr.plugin.chart.type.MapType;
import java.util.List;
/**
* Created by shine on 2017/8/8.
*/
public class MapDataPaneHelper {
public static ChartCollection getPointMapChartCollection(ChartCollection chartCollection) {
try{
ChartCollection cloneCollection = (ChartCollection) chartCollection.clone();
Chart chart = cloneCollection.getSelectedChart();
TopDefinitionProvider definition = chart.getFilterDefinition();
if(definition != null && definition instanceof VanMapDefinition) {
chart.setFilterDefinition(((VanMapDefinition) definition).getPointDefinition());
}
Plot plot = chart.getPlot();
if(plot != null && plot instanceof VanChartMapPlot){
((VanChartMapPlot) plot).setMapType(MapType.POINT);
}
return cloneCollection;
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return chartCollection;
}
}
public static ChartCollection getLineMapChartCollection(ChartCollection chartCollection) {
try{
ChartCollection cloneCollection = (ChartCollection) chartCollection.clone();
Chart chart = cloneCollection.getSelectedChart();
TopDefinitionProvider definition = chart.getFilterDefinition();
if(definition != null && definition instanceof VanMapDefinition) {
chart.setFilterDefinition(((VanMapDefinition) definition).getLineDefinition());
}
Plot plot = chart.getPlot();
if(plot != null && plot instanceof VanChartMapPlot){
((VanChartMapPlot) plot).setMapType(MapType.LINE);
}
return cloneCollection;
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return chartCollection;
}
}
public static ChartCollection getAreaMapChartCollection(ChartCollection chartCollection) {
try{
ChartCollection cloneCollection = (ChartCollection) chartCollection.clone();
Chart chart = cloneCollection.getSelectedChart();
TopDefinitionProvider definition = chart.getFilterDefinition();
if(definition != null && definition instanceof VanMapDefinition) {
chart.setFilterDefinition(((VanMapDefinition) definition).getAreaDefinition());
}
Plot plot = chart.getPlot();
if(plot != null && plot instanceof VanChartMapPlot){
((VanChartMapPlot) plot).setMapType(MapType.AREA);
}
return cloneCollection;
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return chartCollection;
}
}
public static ChartCollection getBottomDataDrillMapChartCollection(ChartCollection chartCollection) {
try{
ChartCollection cloneCollection = (ChartCollection) chartCollection.clone();
Chart chart = cloneCollection.getSelectedChart();
TopDefinitionProvider definition = chart.getFilterDefinition();
if(definition != null && definition instanceof DrillMapDefinition) {
chart.setFilterDefinition(((DrillMapDefinition) definition).getBottomDataDefinition());
}
Plot plot = chart.getPlot();
if(plot != null && plot instanceof VanChartDrillMapPlot){
List<MapType> list = ((VanChartDrillMapPlot) plot).getLayerMapTypeList();
MapType mapType = (list != null && list.size() > 0) ? list.get(list.size() - 1) : MapType.AREA;
((VanChartMapPlot) plot).setMapType(mapType);
}
return cloneCollection;
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return chartCollection;
}
}
public static ChartCollection getLayerChartCollection(ChartCollection chartCollection, int level, MapType mapType){
if(mapType == null){
mapType = MapType.AREA;
}
try{
ChartCollection cloneCollection = (ChartCollection) chartCollection.clone();
Chart chart = cloneCollection.getSelectedChart();
TopDefinitionProvider definition = chart.getFilterDefinition();
if(definition != null && definition instanceof DrillMapDefinition) {
List<TopDefinitionProvider> list = ((DrillMapDefinition) definition).getEachLayerDataDefinitionList();
if(list.size() > level){
chart.setFilterDefinition(list.get(level));
}
}
Plot plot = chart.getPlot();
if(plot != null && plot instanceof VanChartMapPlot){
((VanChartMapPlot) plot).setMapType(mapType);
}
return cloneCollection;
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return chartCollection;
}
}
public static boolean isFromBottomData(ChartCollection chartCollection) {
DrillMapDefinition drillMapDefinition = getDrillMapDefinition(chartCollection);
return drillMapDefinition == null || drillMapDefinition.isFromBottomData();
}
public static DrillMapDefinition getDrillMapDefinition(ChartCollection chartCollection) {
if(chartCollection != null){
Chart chart = chartCollection.getSelectedChart();
if(chart != null){
TopDefinitionProvider definitionProvider = chart.getFilterDefinition();
if(definitionProvider instanceof DrillMapDefinition){
return (DrillMapDefinition) definitionProvider;
}
}
}
return null;
}
public static List<MapType> getDrillMapLayerMapTypeList(ChartCollection chartCollection) {
if(chartCollection != null){
Chart chart = chartCollection.getSelectedChart();
if(chart != null){
Plot plot = chart.getPlot();
if(plot instanceof VanChartDrillMapPlot){
return((VanChartDrillMapPlot) plot).getLayerMapTypeList();
}
}
}
return null;
}
public static MapType getPlotMapType(ChartCollection chartCollection){
Plot plot = chartCollection.getSelectedChart().getPlot();
return getPlotMapType(plot);
}
public static MapType getPlotMapType(Plot plot){
if(plot != null && plot instanceof VanChartMapPlot){
return ((VanChartMapPlot) plot).getMapType();
}
return MapType.AREA;
}
}

121
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java

@ -1,121 +0,0 @@
package com.fr.van.chart.map.designer.data;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane;
import com.fr.plugin.chart.map.data.VanMapDefinition;
import com.fr.plugin.chart.type.MapType;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* Created by Mitisky on 16/5/16.
*/
public class VanChartMapDataPane extends ChartDataPane {
MapType mapType = MapType.AREA;
public VanChartMapDataPane(AttributeChangeListener listener) {
super(listener);
}
@Override
protected JPanel createContentPane() {
contentsPane = new NormalChartDataPane(listener, VanChartMapDataPane.this);
return contentsPane;
}
protected void repeatLayout(ChartCollection collection) {
if(contentsPane != null) {
this.remove(contentsPane);
}
this.setLayout(new BorderLayout(0, 0));
switch (mapType){
case CUSTOM:
contentsPane = new CustomMapChartDataContentsPane(listener, VanChartMapDataPane.this);
break;
default:
contentsPane = new NormalChartDataPane(listener, VanChartMapDataPane.this);
break;
}
contentsPane.setSupportCellData(isSupportCellData());
this.add(contentsPane, BorderLayout.CENTER);
}
/**
* 更新界面 数据内容
*/
public void populate(ChartCollection collection) {
mapType = MapDataPaneHelper.getPlotMapType(collection);
repeatLayout(collection);
switch (mapType){
case AREA:
ChartCollection areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection);
contentsPane.populate(areaClone);
break;
case POINT:
ChartCollection pointClone = MapDataPaneHelper.getPointMapChartCollection(collection);
contentsPane.populate(pointClone);
break;
case LINE:
ChartCollection lineClone = MapDataPaneHelper.getLineMapChartCollection(collection);
contentsPane.populate(lineClone);
break;
case CUSTOM:
ChartCollection areaClone1 = MapDataPaneHelper.getAreaMapChartCollection(collection);
ChartCollection pointClone1 = MapDataPaneHelper.getPointMapChartCollection(collection);
ChartCollection lineClone1 = MapDataPaneHelper.getLineMapChartCollection(collection);
((CustomMapChartDataContentsPane)contentsPane).populateAreaMap(areaClone1);
((CustomMapChartDataContentsPane)contentsPane).populatePointMap(pointClone1);
((CustomMapChartDataContentsPane) contentsPane).populateLineMap(lineClone1);
}
}
/**
* 保存 数据界面内容
*/
public void update(ChartCollection collection) {
if(contentsPane != null) {
VanMapDefinition vanMapDefinition = new VanMapDefinition();
ChartCollection pointClone = MapDataPaneHelper.getPointMapChartCollection(collection);
ChartCollection areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection);
ChartCollection lineClone = MapDataPaneHelper.getLineMapChartCollection(collection);
switch (mapType){
case AREA:
contentsPane.update(areaClone);
pointClone.getSelectedChart().setFilterDefinition(null);
lineClone.getSelectedChart().setFilterDefinition(null);
break;
case POINT:
contentsPane.update(pointClone);
areaClone.getSelectedChart().setFilterDefinition(null);
lineClone.getSelectedChart().setFilterDefinition(null);
break;
case LINE:
contentsPane.update(lineClone);
areaClone.getSelectedChart().setFilterDefinition(null);
pointClone.getSelectedChart().setFilterDefinition(null);
break;
case CUSTOM:
((CustomMapChartDataContentsPane)contentsPane).updateAreaMap(areaClone);
((CustomMapChartDataContentsPane)contentsPane).updatePointMap(pointClone);
((CustomMapChartDataContentsPane) contentsPane).updateLineMap(lineClone);
break;
}
vanMapDefinition.setAreaDefinition(areaClone.getSelectedChart().getFilterDefinition());
vanMapDefinition.setPointDefinition(pointClone.getSelectedChart().getFilterDefinition());
vanMapDefinition.setLineDefinition(lineClone.getSelectedChart().getFilterDefinition());
collection.getSelectedChart().setFilterDefinition(vanMapDefinition);
}
}
}

34
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/LongitudeLatitudeAndArea.java

@ -1,34 +0,0 @@
package com.fr.van.chart.map.designer.data.component;
/**
* Created by hufan on 2016/12/23.
*/
public class LongitudeLatitudeAndArea {
private Object longitude;
private Object latitude;
private Object area;
public Object getLongitude() {
return longitude;
}
public void setLongitude(Object longitude) {
this.longitude = longitude;
}
public Object getLatitude() {
return latitude;
}
public void setLatitude(Object latitude) {
this.latitude = latitude;
}
public Object getArea() {
return area;
}
public void setArea(Object area) {
this.area = area;
}
}

23
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/SeriesNameUseFieldNamePaneWithOutFilter.java

@ -1,23 +0,0 @@
package com.fr.van.chart.map.designer.data.component;
import com.fr.chart.chartdata.MoreNameCDDefinition;
import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldNamePane;
import com.fr.plugin.chart.map.data.VanMapMoreNameCDDefinition;
import java.awt.Component;
/**
* Created by Mitisky on 16/5/17.
*/
public class SeriesNameUseFieldNamePaneWithOutFilter extends SeriesNameUseFieldNamePane {
@Override
protected Component[][] getUseComponent() {
return getUseComponentWithOutFilter();
}
@Override
protected MoreNameCDDefinition createMoreNameCDDefinition() {
return new VanMapMoreNameCDDefinition();
}
}

29
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/SeriesNameUseFieldValuePaneWithOutFilter.java

@ -1,29 +0,0 @@
package com.fr.van.chart.map.designer.data.component;
import com.fr.chart.chartdata.OneValueCDDefinition;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldValuePane;
import com.fr.plugin.chart.map.data.VanMapOneValueCDDefinition;
import java.awt.Component;
/**
* Created by Mitisky on 16/5/16.
*/
public class SeriesNameUseFieldValuePaneWithOutFilter extends SeriesNameUseFieldValuePane {
@Override
protected Component[][] getUseComponent(UILabel Label1, UILabel Label2, UILabel Label3) {
return getUseComponentWithOutFilter(Label1, Label2, Label3);
}
@Override
protected Component[][] getUseComponentWithOutSummary(UILabel Label1, UILabel Label2, UILabel Label3) {
return getUseComponentWithOutFilterAndSummary(Label1, Label2, Label3);
}
@Override
protected OneValueCDDefinition createOneValueCDDefinition() {
return new VanMapOneValueCDDefinition();
}
}

40
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/SeriesTypeUseComboxPaneWithOutFilter.java

@ -1,40 +0,0 @@
package com.fr.van.chart.map.designer.data.component;
import com.fr.chart.chartattr.Plot;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldNamePane;
import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldValuePane;
import com.fr.design.mainframe.chart.gui.data.table.SeriesTypeUseComboxPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* Created by Mitisky on 16/5/16.
*/
public class SeriesTypeUseComboxPaneWithOutFilter extends SeriesTypeUseComboxPane {
public SeriesTypeUseComboxPaneWithOutFilter(ChartDataPane parent, Plot initplot) {
super(parent, initplot);
}
protected void initLayout() {
super.initLayout();
this.add(new JPanel(), BorderLayout.SOUTH);
}
protected void initComponents() {
super.initComponents();
this.setSelectedIndex(1);
}
@Override
protected SeriesNameUseFieldValuePane createValuePane() {
return new SeriesNameUseFieldValuePaneWithOutFilter();
}
@Override
protected SeriesNameUseFieldNamePane createNamePane() {
return new SeriesNameUseFieldNamePaneWithOutFilter();
}
}

13
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/AbstractLongLatAreaPane.java

@ -1,13 +0,0 @@
package com.fr.van.chart.map.designer.data.component.report;
import com.fr.plugin.chart.map.data.VanMapReportDefinition;
import javax.swing.JPanel;
/**
* Created by hufan on 2016/12/21.
*/
public abstract class AbstractLongLatAreaPane extends JPanel {
public abstract void populate(VanMapReportDefinition vanMapReportDefinition);
public abstract void update(VanMapReportDefinition vanMapReportDefinition);
}

65
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/AreaPane.java

@ -1,65 +0,0 @@
package com.fr.van.chart.map.designer.data.component.report;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
/**
* Created by hufan on 2016/12/21.
*/
public class AreaPane extends AbstractReportDataContentPane {
protected TinyFormulaPane areaName;
public AreaPane() {
JPanel panel = createContentPane();
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
}
protected JPanel createContentPane() {
areaName = new TinyFormulaPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p};
Component[][] components = getComponent ();
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
}
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name")), areaName}
};
}
@Override
protected String[] columnNames() {
return new String[0];
}
public void populate(LongitudeLatitudeAndArea longLatArea) {
if (longLatArea.getArea() != null) {
areaName.getUITextField().setText(longLatArea.getArea().toString());
}
}
public LongitudeLatitudeAndArea update() {
LongitudeLatitudeAndArea longLatArea = new LongitudeLatitudeAndArea();
longLatArea.setArea(canBeFormula(areaName.getUITextField().getText()));
return longLatArea;
}
@Override
public void populateBean(ChartCollection ob) {
}
}

71
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LineMapAreaPane.java

@ -1,71 +0,0 @@
package com.fr.van.chart.map.designer.data.component.report;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.plugin.chart.map.data.VanMapReportDefinition;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
/**
* Created by hufan on 2016/12/22.
*/
public class LineMapAreaPane extends PointMapAreaPane {
private static final int V_GAP = 10;
protected AreaPane endAreaPane;
protected JPanel createContentPane() {
initAreaPane();
initEndAreaPane();
JPanel content = new JPanel(new BorderLayout(0, V_GAP));
content.add(areaPane, BorderLayout.NORTH);
content.add(endAreaPane, BorderLayout.CENTER);
return content;
}
protected void initEndAreaPane() {
endAreaPane = new AreaPane(){
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")), areaName}
};
}
};
}
@Override
protected void initAreaPane() {
areaPane =new AreaPane(){
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name")), areaName}
};
}
};
}
@Override
public void populate(VanMapReportDefinition vanMapReportDefinition) {
super.populate(vanMapReportDefinition);
LongitudeLatitudeAndArea endLongLatArea = new LongitudeLatitudeAndArea();
endLongLatArea.setArea(vanMapReportDefinition.getEndAreaName());
endLongLatArea.setLongitude(vanMapReportDefinition.getEndLongitude());
endLongLatArea.setLatitude(vanMapReportDefinition.getEndLatitude());
endAreaPane.populate(endLongLatArea);
}
@Override
public void update(VanMapReportDefinition vanMapReportDefinition) {
super.update(vanMapReportDefinition);
LongitudeLatitudeAndArea endLongLatArea = endAreaPane.update();
vanMapReportDefinition.setEndAreaName(endLongLatArea.getArea() == null ? null : endLongLatArea.getArea().toString());
vanMapReportDefinition.setEndLongitude(endLongLatArea.getLongitude() == null ? null : endLongLatArea.getLongitude().toString());
vanMapReportDefinition.setEndLatitude(endLongLatArea.getLatitude() == null ? null : endLongLatArea.getLatitude().toString());
}
}

37
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LineMapLongLatAreaPane.java

@ -1,37 +0,0 @@
package com.fr.van.chart.map.designer.data.component.report;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import java.awt.Component;
/**
* Created by hufan on 2016/12/22.
*/
public class LineMapLongLatAreaPane extends LineMapAreaPane {
protected void initEndAreaPane() {
endAreaPane = new LongLatAreaPane(){
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Longitude")), longitude},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Latitude")), latitude},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")), areaName}
};
}
};
}
protected void initAreaPane() {
areaPane = new LongLatAreaPane(){
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Longitude")), longitude},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Latitude")), latitude},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name")), areaName}
};
}
};
}
}

78
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LongLatAreaPane.java

@ -1,78 +0,0 @@
package com.fr.van.chart.map.designer.data.component.report;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
/**
* Created by hufan on 2016/12/21.
*/
public class LongLatAreaPane extends AreaPane {
protected TinyFormulaPane longitude;
protected TinyFormulaPane latitude;
public LongLatAreaPane() {
JPanel panel = createContentPane();
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
}
@Override
protected JPanel createContentPane() {
areaName = new TinyFormulaPane();
longitude = new TinyFormulaPane();
latitude = new TinyFormulaPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p, p, p};
Component[][] components = getComponent();
return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6);
}
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Longitude")), longitude},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Latitude")), latitude},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name")), areaName}
};
}
@Override
public void populateBean(ChartCollection ob) {
}
@Override
protected String[] columnNames() {
return new String[0];
}
@Override
public void populate(LongitudeLatitudeAndArea longLatArea) {
super.populate(longLatArea);
if (longLatArea.getLongitude() != null) {
longitude.getUITextField().setText(longLatArea.getLongitude().toString());
}
if (longLatArea.getLatitude() != null){
latitude.getUITextField().setText(longLatArea.getLatitude().toString());
}
}
@Override
public LongitudeLatitudeAndArea update() {
LongitudeLatitudeAndArea longLatArea = super.update();
longLatArea.setLongitude(canBeFormula(longitude.getUITextField().getText()));
longLatArea.setLatitude(canBeFormula(latitude.getUITextField().getText()));
return longLatArea;
}
}

47
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/PointMapAreaPane.java

@ -1,47 +0,0 @@
package com.fr.van.chart.map.designer.data.component.report;
import com.fr.plugin.chart.map.data.VanMapReportDefinition;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* Created by hufan on 2016/12/23.
*/
public class PointMapAreaPane extends AbstractLongLatAreaPane {
protected AreaPane areaPane;
public PointMapAreaPane() {
JPanel contentPane = createContentPane();
this.setLayout(new BorderLayout());
this.add(contentPane, BorderLayout.CENTER);
}
protected JPanel createContentPane() {
initAreaPane();
JPanel content = new JPanel(new BorderLayout());
content.add(areaPane, BorderLayout.CENTER);
return content;
}
protected void initAreaPane() {
areaPane = new AreaPane();
}
@Override
public void populate(VanMapReportDefinition vanMapReportDefinition) {
LongitudeLatitudeAndArea longLatArea = new LongitudeLatitudeAndArea();
longLatArea.setArea(vanMapReportDefinition.getCategoryName());
longLatArea.setLongitude(vanMapReportDefinition.getLongitude());
longLatArea.setLatitude(vanMapReportDefinition.getLatitude());
areaPane.populate(longLatArea);
}
@Override
public void update(VanMapReportDefinition vanMapReportDefinition) {
LongitudeLatitudeAndArea longLatArea = areaPane.update();
vanMapReportDefinition.setCategoryName(longLatArea.getArea() == null ? null : longLatArea.getArea().toString());
vanMapReportDefinition.setLongitude(longLatArea.getLongitude() == null ? null : longLatArea.getLongitude().toString());
vanMapReportDefinition.setLatitude(longLatArea.getLatitude() == null ? null : longLatArea.getLatitude().toString());
}
}

14
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/PointMapLongLatAreaPane.java

@ -1,14 +0,0 @@
package com.fr.van.chart.map.designer.data.component.report;
/**
* Created by hufan on 2016/12/23.
*/
public class PointMapLongLatAreaPane extends PointMapAreaPane {
public PointMapLongLatAreaPane() {
super();
}
protected void initAreaPane() {
areaPane = new LongLatAreaPane();
}
}

26
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/AbstractLongLatAreaPane.java

@ -1,26 +0,0 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
import javax.swing.JPanel;
import java.util.List;
/**
* Created by hufan on 2016/12/21.
*/
public abstract class AbstractLongLatAreaPane extends JPanel{
public abstract boolean isSelectedItem();
public abstract void populate(VanMapTableDefinitionProvider mapTableDefinitionProvider);
public abstract void update(VanMapTableDefinitionProvider mapTableDefinitionProvider);
public abstract void refreshBoxListWithSelectTableData(List list);
public abstract void checkBoxUse(boolean hasUse);
public abstract void clearAllBoxList();
}

104
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/AreaPane.java

@ -1,104 +0,0 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
/**
* Created by hufan on 2016/12/21.
*/
public class AreaPane extends AbstractTableDataContentPane {
protected VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane listener;
protected UIComboBox areaNameCom;
public AreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
this.listener = parentPane;
this.setLayout(new BorderLayout());
JPanel panel = createAreaNamePane();
this.add(panel, BorderLayout.CENTER);
}
@Override
public void updateBean(ChartCollection ob) {
}
public void checkBoxUse(boolean hasUse) {
areaNameCom.setEnabled(hasUse);
}
protected JPanel createAreaNamePane() {
initAreaNameCom();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p};
Component[][] components = getComponent();
return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6);
}
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name")), areaNameCom}
};
}
protected void initAreaNameCom() {
areaNameCom = new UIComboBox();
areaNameCom.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
listener.fireCheckSeriesUse(areaNameCom.getSelectedItem() != null);
makeToolTipUse(areaNameCom);
}
});
}
protected void makeToolTipUse(UIComboBox comBox) {
if (comBox.getSelectedItem() != null) {
comBox.setToolTipText(comBox.getSelectedItem().toString());
} else {
comBox.setToolTipText(null);
}
}
@Override
public void refreshBoxListWithSelectTableData(List list) {
refreshBoxItems(areaNameCom, list);
}
public boolean isSelectedItem() {
return areaNameCom.getSelectedItem() != null;
}
public void populate(LongitudeLatitudeAndArea longLatArea) {
if (longLatArea.getArea() != null){
areaNameCom.setSelectedItem(longLatArea.getArea());
}
}
public LongitudeLatitudeAndArea update() {
LongitudeLatitudeAndArea longLatArea = new LongitudeLatitudeAndArea();
longLatArea.setArea(areaNameCom.getSelectedItem());
return longLatArea;
}
@Override
public void clearAllBoxList() {
clearBoxItems(areaNameCom);
}
}

100
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LineMapAreaPane.java

@ -1,100 +0,0 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.List;
/**
* Created by hufan on 2016/12/21.
*/
public class LineMapAreaPane extends PointMapAreaPane {
private static final int V_GAP = 10;
protected AreaPane endAreaPane;
public LineMapAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
super(parentPane);
}
protected JPanel createContentPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
initAreaPane(parentPane);
initEndAreaPane(parentPane);
JPanel content = new JPanel(new BorderLayout(0, V_GAP));
content.add(areaPane, BorderLayout.NORTH);
content.add(endAreaPane, BorderLayout.CENTER);
return content;
}
protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
areaPane = new AreaPane(parentPane){
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name")), areaNameCom}
};
}
};
}
protected void initEndAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
endAreaPane = new AreaPane(parentPane){
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")), areaNameCom}
};
}
};
}
@Override
public void refreshBoxListWithSelectTableData(List list) {
super.refreshBoxListWithSelectTableData(list);
endAreaPane.refreshBoxListWithSelectTableData(list);
}
@Override
public boolean isSelectedItem() {
return super.isSelectedItem()
&& endAreaPane.isSelectedItem();
}
@Override
public void populate(VanMapTableDefinitionProvider mapTableDefinitionProvider) {
super.populate(mapTableDefinitionProvider);
LongitudeLatitudeAndArea endLongLatArea = new LongitudeLatitudeAndArea();
endLongLatArea.setArea(mapTableDefinitionProvider.getEndAreaName());
endLongLatArea.setLongitude(mapTableDefinitionProvider.getEndLongitude());
endLongLatArea.setLatitude(mapTableDefinitionProvider.getEndLatitude());
endAreaPane.populate(endLongLatArea);
}
@Override
public void update(VanMapTableDefinitionProvider mapTableDefinitionProvider) {
super.update(mapTableDefinitionProvider);
LongitudeLatitudeAndArea endLongLatArea = endAreaPane.update();
mapTableDefinitionProvider.setEndAreaName(endLongLatArea.getArea() == null ? null : endLongLatArea.getArea().toString());
mapTableDefinitionProvider.setEndLongitude(endLongLatArea.getLongitude() == null ? null : endLongLatArea.getLongitude().toString());
mapTableDefinitionProvider.setEndLatitude(endLongLatArea.getLatitude() == null ? null : endLongLatArea.getLatitude().toString());
}
@Override
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
endAreaPane.checkBoxUse(hasUse);
}
@Override
public void clearAllBoxList() {
super.clearAllBoxList();
endAreaPane.clearAllBoxList();
}
}

42
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LineMapLongLatAreaPane.java

@ -1,42 +0,0 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
import java.awt.Component;
/**
* Created by hufan on 2016/12/21.
*/
public class LineMapLongLatAreaPane extends LineMapAreaPane {
public LineMapLongLatAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
super(parentPane);
}
protected void initEndAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
endAreaPane = new LongLatAreaPane(parentPane){
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Longitude")), longitudeCom},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Latitude")), latitudeCom},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")), areaNameCom}
};
}
};
}
protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
areaPane = new LongLatAreaPane(parentPane){
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Longitude")), longitudeCom},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Latitude")), latitudeCom},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name")), areaNameCom}
};
}
};
}
}

123
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LongLatAreaPane.java

@ -1,123 +0,0 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
import javax.swing.JPanel;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
/**
* Created by hufan on 2016/12/21.
*/
public class LongLatAreaPane extends AreaPane {
protected UIComboBox longitudeCom;
protected UIComboBox latitudeCom;
public LongLatAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
super(parentPane);
}
@Override
protected JPanel createAreaNamePane() {
initAreaNameCom();
initLongitudeCom();
initLatitudeCom();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p, p, p};
Component[][] components = getComponent();
return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6);
}
protected Component[][] getComponent () {
return new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Longitude")), longitudeCom},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Latitude")), latitudeCom},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name")), areaNameCom}
};
}
public void refreshBoxListWithSelectTableData(List list) {
super.refreshBoxListWithSelectTableData(list);
refreshBoxItems(longitudeCom, list);
refreshBoxItems(latitudeCom, list);
}
protected void initLatitudeCom() {
latitudeCom = new UIComboBox();
latitudeCom.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
listener.fireCheckSeriesUse(latitudeCom.getSelectedItem() != null);
makeToolTipUse(latitudeCom);
}
});
}
@Override
public void populate(LongitudeLatitudeAndArea longLatArea) {
super.populate(longLatArea);
if(longLatArea.getLongitude() != null){
longitudeCom.setSelectedItem(longLatArea.getLongitude());
}
if(longLatArea.getLatitude() != null){
latitudeCom.setSelectedItem(longLatArea.getLatitude());
}
}
@Override
public LongitudeLatitudeAndArea update() {
LongitudeLatitudeAndArea longitudeLatitudeAndArea = super.update();
longitudeLatitudeAndArea.setLatitude(latitudeCom.getSelectedItem());
longitudeLatitudeAndArea.setLongitude(longitudeCom.getSelectedItem());
return longitudeLatitudeAndArea;
}
@Override
public void checkBoxUse(boolean hasUse) {
super.checkBoxUse(hasUse);
longitudeCom.setEnabled(hasUse);
latitudeCom.setEnabled(hasUse);
}
public void clearAllBoxList() {
super.clearAllBoxList();
clearBoxItems(longitudeCom);
clearBoxItems(latitudeCom);
}
protected void initLongitudeCom() {
longitudeCom = new UIComboBox();
longitudeCom.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
listener.fireCheckSeriesUse(longitudeCom.getSelectedItem() != null);
makeToolTipUse(longitudeCom);
}
});
}
@Override
protected String title4PopupWindow() {
return null;
}
public boolean isSelectedItem() {
return super.isSelectedItem()
&& longitudeCom.getSelectedItem() != null
&& latitudeCom.getSelectedItem() != null;
}
}

69
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/PointMapAreaPane.java

@ -1,69 +0,0 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.util.List;
/**
* Created by hufan on 2016/12/23.
*/
public class PointMapAreaPane extends AbstractLongLatAreaPane {
protected AreaPane areaPane;
public PointMapAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
JPanel contentPane = createContentPane(parentPane);
this.setLayout(new BorderLayout());
this.add(contentPane, BorderLayout.CENTER);
}
protected JPanel createContentPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
initAreaPane(parentPane);
JPanel content = new JPanel(new BorderLayout());
content.add(areaPane, BorderLayout.CENTER);
return content;
}
protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
areaPane = new AreaPane(parentPane);
}
public void refreshBoxListWithSelectTableData(List list) {
areaPane.refreshBoxListWithSelectTableData(list);
}
@Override
public void checkBoxUse(boolean hasUse) {
areaPane.checkBoxUse(hasUse);
}
@Override
public void clearAllBoxList() {
areaPane.clearAllBoxList();
}
@Override
public boolean isSelectedItem() {
return areaPane.isSelectedItem();
}
@Override
public void populate(VanMapTableDefinitionProvider mapTableDefinitionProvider) {
LongitudeLatitudeAndArea longLatArea = new LongitudeLatitudeAndArea();
longLatArea.setArea(mapTableDefinitionProvider.getCategoryName());
longLatArea.setLongitude(mapTableDefinitionProvider.getLongitude());
longLatArea.setLatitude(mapTableDefinitionProvider.getLatitude());
areaPane.populate(longLatArea);
}
@Override
public void update(VanMapTableDefinitionProvider mapTableDefinitionProvider) {
LongitudeLatitudeAndArea longLatArea = areaPane.update();
mapTableDefinitionProvider.setCategoryName(longLatArea.getArea() == null ? null : longLatArea.getArea().toString());
mapTableDefinitionProvider.setLongitude(longLatArea.getLongitude() == null ? null : longLatArea.getLongitude().toString());
mapTableDefinitionProvider.setLatitude(longLatArea.getLatitude() == null ? null : longLatArea.getLatitude().toString());
}
}

18
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/PointMapLongLatAreaPane.java

@ -1,18 +0,0 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
/**
* Created by hufan on 2016/12/23.
*/
public class PointMapLongLatAreaPane extends PointMapAreaPane {
public PointMapLongLatAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
super(parentPane);
}
protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
areaPane = new LongLatAreaPane(parentPane);
}
}

111
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java

@ -1,111 +0,0 @@
package com.fr.van.chart.map.designer.data.contentpane.report;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.SeriesDefinition;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.map.data.VanMapReportDefinition;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.List;
/**
* Created by Mitisky on 16/5/16.
*/
public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataContentPane {
protected TinyFormulaPane areaName;
public VanAreaMapPlotReportDataContentPane(ChartDataPane parent) {
initEveryPane();
initAreaName();
JPanel panel = getContent();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, "0,0,2,0");
}
protected void initAreaName() {
areaName = new TinyFormulaPane() {
@Override
protected void initLayout() {
this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name"));
label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST);
formulaTextField.setPreferredSize(new Dimension(100, 20));
this.add(formulaTextField, BorderLayout.CENTER);
this.add(formulaTextFieldButton, BorderLayout.EAST);
}
};
}
protected JPanel getContent() {
return getFormulaPane();
}
protected JPanel getFormulaPane() {
return areaName;
}
@Override
protected String[] columnNames() {
return new String[]{
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Value")
};
}
public void populateBean(ChartCollection collection) {
TopDefinitionProvider topDefinitionProvider = collection.getSelectedChart().getFilterDefinition();
if (topDefinitionProvider instanceof VanMapReportDefinition) {
VanMapReportDefinition mapReportDefinition = (VanMapReportDefinition) topDefinitionProvider;
populateDefinition(mapReportDefinition);
}
}
protected void populateDefinition(VanMapReportDefinition mapReportDefinition) {
if (mapReportDefinition.getCategoryName() != null) {
areaName.getUITextField().setText(mapReportDefinition.getCategoryName().toString());
}
if (mapReportDefinition.getSeriesSize() > 0) {
seriesPane.populateBean(mapReportDefinition.getEntryList());
}
}
public void updateBean(ChartCollection collection) {
collection.getSelectedChart().setFilterDefinition(new VanMapReportDefinition());
TopDefinitionProvider topDefinitionProvider = collection.getSelectedChart().getFilterDefinition();
if (topDefinitionProvider instanceof VanMapReportDefinition) {
VanMapReportDefinition mapReportDefinition = (VanMapReportDefinition) topDefinitionProvider;
updateDefinition(mapReportDefinition);
}
}
protected void updateDefinition(VanMapReportDefinition mapReportDefinition) {
mapReportDefinition.setCategoryName(canBeFormula(areaName.getUITextField().getText()));
mapReportDefinition.setLatitude(null);
mapReportDefinition.setLongitude(null);
List<Object[]> list = seriesPane.updateBean();
for (Object[] o : list) {
SeriesDefinition sd = new SeriesDefinition();
sd.setSeriesName(canBeFormula(o[0]));
sd.setValue(canBeFormula(o[1]));
mapReportDefinition.addSeriesValue(sd);
}
}
}

24
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanLineMapPlotReportDataContentPane.java

@ -1,24 +0,0 @@
package com.fr.van.chart.map.designer.data.contentpane.report;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.van.chart.map.designer.data.component.report.AbstractLongLatAreaPane;
import com.fr.van.chart.map.designer.data.component.report.LineMapAreaPane;
import com.fr.van.chart.map.designer.data.component.report.LineMapLongLatAreaPane;
/**
* Created by hufan on 2016/12/15.
*/
public class VanLineMapPlotReportDataContentPane extends VanPointMapPlotReportDataContentPane {
public VanLineMapPlotReportDataContentPane(ChartDataPane parent) {
super(parent);
}
protected AbstractLongLatAreaPane getAreaPane() {
return new LineMapAreaPane();
}
protected AbstractLongLatAreaPane getLongLatAreaPane() {
return new LineMapLongLatAreaPane();
}
}

171
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java

@ -1,171 +0,0 @@
package com.fr.van.chart.map.designer.data.contentpane.report;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.plugin.chart.map.data.VanMapReportDefinition;
import com.fr.van.chart.map.designer.data.component.report.AbstractLongLatAreaPane;
import com.fr.van.chart.map.designer.data.component.report.PointMapAreaPane;
import com.fr.van.chart.map.designer.data.component.report.PointMapLongLatAreaPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
/**
* Created by Mitisky on 16/5/17.
*/
public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDataContentPane {
private LongLatReportFormulaPane longLatReportFormulaPane;
public VanPointMapPlotReportDataContentPane(ChartDataPane parent) {
super(parent);
}
@Override
protected JPanel getContent() {
longLatReportFormulaPane = new LongLatReportFormulaPane();
JPanel content = new JPanel(new BorderLayout(0, 4));
content.setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 0));
content.add(longLatReportFormulaPane, BorderLayout.CENTER);
return content;
}
@Override
protected void populateDefinition(VanMapReportDefinition mapReportDefinition) {
super.populateDefinition(mapReportDefinition);
longLatReportFormulaPane.populateBean(mapReportDefinition);
}
@Override
protected void updateDefinition(VanMapReportDefinition mapReportDefinition) {
super.updateDefinition(mapReportDefinition);
longLatReportFormulaPane.updateBean(mapReportDefinition);
}
//================================public class===================================
public class LongLatReportFormulaPane extends BasicBeanPane<VanMapReportDefinition> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
private UIButtonGroup<Integer> locationType;
private JPanel centerPane;
private AbstractLongLatAreaPane areaPane;
private AbstractLongLatAreaPane longLatAreaPane;
public LongLatReportFormulaPane() {
this.setLayout(new BorderLayout(0, 5));
centerPane = new JPanel(new CardLayout()){
@Override
public Dimension getPreferredSize() {
if (locationType.getSelectedIndex() == 0){
return areaPane.getPreferredSize();
}else {
return longLatAreaPane.getPreferredSize();
}
}
};
locationType = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Location_With_Area_Name"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Location_With_LongAndLat")});
locationType.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
checkCenterPane();
}
});
longLatAreaPane = getLongLatAreaPane();
areaPane = getAreaPane();
centerPane.add(areaPane, "area");
centerPane.add(longLatAreaPane, "longLat");
locationType.setSelectedIndex(0);
double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Geographic")),locationType},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6);
this.add(panel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
}
private void checkCenterPane() {
CardLayout cardLayout = (CardLayout) centerPane.getLayout();
if (locationType.getSelectedIndex() == 0) {
cardLayout.show(centerPane, "area");
}else {
cardLayout.show(centerPane, "longLat");
}
}
public void populateBean(VanMapReportDefinition mapReportDefinition) {
locationType.setSelectedIndex(mapReportDefinition.isUseAreaName() ? 0 : 1);
if (locationType.getSelectedIndex() == 0) {
areaPane.populate(mapReportDefinition);
}else {
longLatAreaPane.populate(mapReportDefinition);
}
checkCenterPane();
}
public void updateBean(VanMapReportDefinition mapReportDefinition) {
boolean useAreaName = locationType.getSelectedIndex() == 0;
mapReportDefinition.setUseAreaName(useAreaName);
if (useAreaName) {
areaPane.update(mapReportDefinition);
}else {
longLatAreaPane.update(mapReportDefinition);
}
checkCenterPane();
}
/**
* Update.
*/
@Override
public VanMapReportDefinition updateBean() {
return null;
}
@Override
protected String title4PopupWindow() {
return null;
}
}
protected AbstractLongLatAreaPane getAreaPane() {
return new PointMapAreaPane();
}
protected AbstractLongLatAreaPane getLongLatAreaPane() {
return new PointMapLongLatAreaPane();
}
}

177
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java

@ -1,177 +0,0 @@
package com.fr.van.chart.map.designer.data.contentpane.table;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
import com.fr.van.chart.map.designer.data.component.SeriesTypeUseComboxPaneWithOutFilter;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
/**
* Created by Mitisky on 16/5/16.
*/
public class VanAreaMapPlotTableDataContentPane extends AbstractTableDataContentPane {
private UIComboBox areaNameCom;
protected SeriesTypeUseComboxPaneWithOutFilter seriesTypeUseComboxPane;
public VanAreaMapPlotTableDataContentPane(ChartDataPane parent) {
this.setLayout(new BorderLayout(0, 4));
initAreaNameCom();
JPanel areaNamePane = createAreaNamePane();
JSeparator jSeparator = new JSeparator();
areaNamePane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
jSeparator.setPreferredSize(new Dimension(246,2));
this.add(areaNamePane, BorderLayout.NORTH);
this.add(jSeparator, BorderLayout.CENTER);
seriesTypeUseComboxPane = new SeriesTypeUseComboxPaneWithOutFilter(parent, new VanChartMapPlot());
this.add(seriesTypeUseComboxPane, BorderLayout.SOUTH);
}
protected void initAreaNameCom() {
areaNameCom = new UIComboBox();
areaNameCom.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
checkSeriseUse(areaNameCom.getSelectedItem() != null);
makeToolTipUse(areaNameCom);
}
});
}
protected JPanel createAreaNamePane() {
UILabel label = new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name"));
label.setPreferredSize(new Dimension(80, 20));
areaNameCom.setPreferredSize(new Dimension(100, 20));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{label, areaNameCom},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
protected void makeToolTipUse(UIComboBox comBox) {
if (comBox.getSelectedItem() != null) {
comBox.setToolTipText(comBox.getSelectedItem().toString());
} else {
comBox.setToolTipText(null);
}
}
/**
* 检查 某些Box是否可用
*
* @param hasUse 是否使用.
*/
public void checkBoxUse(boolean hasUse) {
checkAreaName(hasUse);
checkSeriseUse(hasUse);
}
protected void checkAreaName(boolean hasUse) {
areaNameCom.setEnabled(hasUse);
}
protected void checkSeriseUse(boolean hasUse) {
if (seriesTypeUseComboxPane != null) {
seriesTypeUseComboxPane.checkUseBox(hasUse && isAreaSelectedItem());
}
}
protected boolean isAreaSelectedItem(){
return areaNameCom.getSelectedItem() != null;
}
protected void refreshBoxListWithSelectTableData(java.util.List list) {
refreshAreaName(list);
seriesTypeUseComboxPane.refreshBoxListWithSelectTableData(list);
}
protected void refreshAreaName(List list) {
refreshBoxItems(areaNameCom, list);
}
/**
* 清空所有的box设置
*/
public void clearAllBoxList() {
clearAreaName();
seriesTypeUseComboxPane.clearAllBoxList();
}
protected void clearAreaName() {
clearBoxItems(areaNameCom);
}
/**
* 保存界面内容到ChartCollection
*/
public void updateBean(ChartCollection collection) {
seriesTypeUseComboxPane.updateBean(collection);
TopDefinitionProvider topDefinitionProvider = collection.getSelectedChart().getFilterDefinition();
if(topDefinitionProvider instanceof VanMapTableDefinitionProvider){
VanMapTableDefinitionProvider mapTableDefinitionProvider = (VanMapTableDefinitionProvider)topDefinitionProvider;
updateDefinition(mapTableDefinitionProvider);
}
}
protected void updateDefinition(VanMapTableDefinitionProvider mapTableDefinitionProvider){
Object o = areaNameCom.getSelectedItem();
mapTableDefinitionProvider.setCategoryName(o == null ? null : o.toString());
}
/**
* 根据ChartCollection 更新界面
*/
public void populateBean(ChartCollection collection) {
seriesTypeUseComboxPane.populateBean(collection, this.isNeedSummaryCaculateMethod());
TopDefinitionProvider topDefinitionProvider = collection.getSelectedChart().getFilterDefinition();
if(topDefinitionProvider instanceof VanMapTableDefinitionProvider){
VanMapTableDefinitionProvider mapTableDefinitionProvider = (VanMapTableDefinitionProvider)topDefinitionProvider;
populateDefinition(mapTableDefinitionProvider);
}
}
protected void populateDefinition(VanMapTableDefinitionProvider mapTableDefinitionProvider){
if (mapTableDefinitionProvider.getCategoryName() != null) {
areaNameCom.setSelectedItem(mapTableDefinitionProvider.getCategoryName());
}
}
/**
* 重新布局整个面板
*/
public void redoLayoutPane() {
seriesTypeUseComboxPane.relayoutPane(this.isNeedSummaryCaculateMethod());
}
}

25
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java

@ -1,25 +0,0 @@
package com.fr.van.chart.map.designer.data.contentpane.table;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.van.chart.map.designer.data.component.table.AbstractLongLatAreaPane;
import com.fr.van.chart.map.designer.data.component.table.LineMapAreaPane;
import com.fr.van.chart.map.designer.data.component.table.LineMapLongLatAreaPane;
/**
* Created by hufan on 2016/12/15.
*/
public class VanLineMapPlotTableDataContentPane extends VanPointMapPlotTableDataContentPane{
public VanLineMapPlotTableDataContentPane(ChartDataPane parent) {
super(parent);
}
protected AbstractLongLatAreaPane createAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) {
return new LineMapAreaPane(longLatAreaTableComboPane);
}
protected AbstractLongLatAreaPane createLongLatAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) {
return new LineMapLongLatAreaPane(longLatAreaTableComboPane);
}
}

225
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java

@ -1,225 +0,0 @@
package com.fr.van.chart.map.designer.data.contentpane.table;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
import com.fr.van.chart.map.designer.data.component.table.AbstractLongLatAreaPane;
import com.fr.van.chart.map.designer.data.component.table.PointMapAreaPane;
import com.fr.van.chart.map.designer.data.component.table.PointMapLongLatAreaPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.List;
/**
* Created by Mitisky on 16/5/17.
*/
public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableDataContentPane {
private static final int LEFT_GAP = 19;
private static final int V_GAP = 15;
//改控件相当于面积图的区域名控件
private LongLatAreaTableComboPane longLatTableComboPane;
public VanPointMapPlotTableDataContentPane(ChartDataPane parent) {
super(parent);
}
protected void initAreaNameCom() {
longLatTableComboPane = new LongLatAreaTableComboPane();
}
protected JPanel createAreaNamePane() {
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(0,LEFT_GAP,V_GAP,0));
panel.add(longLatTableComboPane, BorderLayout.CENTER);
return panel;
}
@Override
protected void refreshAreaName(List list) {
longLatTableComboPane.refreshBoxListWithSelectTableData(list);
}
@Override
protected void checkAreaName(boolean hasUse) {
longLatTableComboPane.checkBoxUse(hasUse);
}
protected boolean isAreaSelectedItem(){
return longLatTableComboPane.isSelectedItem();
}
@Override
protected void clearAreaName() {
longLatTableComboPane.clearAllBoxList();
}
@Override
protected void updateDefinition(VanMapTableDefinitionProvider mapTableDefinitionProvider) {
longLatTableComboPane.updateBean(mapTableDefinitionProvider);
}
@Override
protected void populateDefinition(VanMapTableDefinitionProvider mapTableDefinitionProvider) {
longLatTableComboPane.populateBean(mapTableDefinitionProvider);
}
public class LongLatAreaTableComboPane extends BasicBeanPane<VanMapTableDefinitionProvider> {
private UIButtonGroup<Integer> locationType;
private JPanel centerPane;
private AbstractLongLatAreaPane longLatAreaPane;
private AbstractLongLatAreaPane areaNamePane;
public LongLatAreaTableComboPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
this.setLayout(new BorderLayout(0, 5));
centerPane = new JPanel(new CardLayout()){
@Override
public Dimension getPreferredSize() {
if (locationType.getSelectedIndex() == 0){
return new Dimension(180, (int) areaNamePane.getPreferredSize().getHeight());
}else {
return new Dimension(180, (int) longLatAreaPane.getPreferredSize().getHeight());
}
}
};
locationType = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Location_With_Area_Name"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Location_With_LongAndLat")});
locationType.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
checkCenterPane();
}
});
longLatAreaPane = createLongLatAreaPane(this);
areaNamePane = createAreaPane(this);
centerPane.add(areaNamePane, "area");
centerPane.add(longLatAreaPane, "longLat");
locationType.setSelectedIndex(0);
double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Geographic")),locationType},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,30,6);
this.add(panel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
}
public void fireCheckSeriesUse(boolean hasUse){
checkSeriseUse(hasUse);
}
private void checkCenterPane() {
CardLayout cardLayout = (CardLayout) centerPane.getLayout();
if (locationType.getSelectedIndex() == 0) {
cardLayout.show(centerPane, "area");
}else {
cardLayout.show(centerPane, "longLat");
}
fireCheckSeriesUse(true);
}
protected void refreshBoxListWithSelectTableData(List list) {
areaNamePane.refreshBoxListWithSelectTableData(list);
longLatAreaPane.refreshBoxListWithSelectTableData(list);
}
/**
* 检查 某些Box是否可用
*
* @param hasUse 是否使用.
*/
public void checkBoxUse(boolean hasUse) {
areaNamePane.checkBoxUse(hasUse);
longLatAreaPane.checkBoxUse(hasUse);
}
/**
* 清空所有的box设置
*/
public void clearAllBoxList() {
areaNamePane.clearAllBoxList();
longLatAreaPane.clearAllBoxList();
}
@Override
public void populateBean(VanMapTableDefinitionProvider mapTableDefinitionProvider) {
locationType.setSelectedIndex(mapTableDefinitionProvider.isUseAreaName() ? 0 : 1);
if (locationType.getSelectedIndex() == 0) {
areaNamePane.populate(mapTableDefinitionProvider);
}else {
longLatAreaPane.populate(mapTableDefinitionProvider);
}
checkCenterPane();
}
public void updateBean(VanMapTableDefinitionProvider mapTableDefinitionProvider){
boolean useAreaName = locationType.getSelectedIndex() == 0;
mapTableDefinitionProvider.setUseAreaName(useAreaName);
if (useAreaName) {
areaNamePane.update(mapTableDefinitionProvider);
}else {
longLatAreaPane.update(mapTableDefinitionProvider);
}
checkCenterPane();
}
@Override
public VanMapTableDefinitionProvider updateBean() {
return null;
}
@Override
protected String title4PopupWindow() {
return "longAndLat";
}
public boolean isSelectedItem() {
if (locationType.getSelectedIndex() == 0){
return areaNamePane.isSelectedItem();
}else {
return longLatAreaPane.isSelectedItem();
}
}
}
protected AbstractLongLatAreaPane createAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) {
return new PointMapAreaPane(longLatAreaTableComboPane);
}
protected AbstractLongLatAreaPane createLongLatAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) {
return new PointMapLongLatAreaPane(longLatAreaTableComboPane);
}
}

33
designer-realize/src/main/java/com/fr/design/style/StylePane.java

@ -8,7 +8,10 @@ import com.fr.base.NameStyle;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.base.core.StyleUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.StyleUIConfigProvider;
import com.fr.design.fun.MultiStyleUIConfigProvider;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
@ -18,6 +21,7 @@ import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.solution.sandbox.collection.PluginSandboxCollections;
import com.fr.report.cell.CellElement;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.FloatElement;
@ -38,6 +42,8 @@ import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.util.List;
import java.util.Set;
/**
* Style Pane.
@ -48,6 +54,7 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
private static final int FONT_INDEX = 2;
private static final int BORDER_INDEX = 3;
private static final int BACKGROUND_INDEX = 4;
private static final int NEXT_TAB_INDEX = 5;
private ElementCasePane reportPane;
protected Style editing;
private NameStyle globalStyle;
@ -56,9 +63,17 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
private FRFontPane frFontPane = null;
private BorderPane borderPane = null;
private BackgroundPane backgroundPane = null;
private static List<StyleUIConfigProvider> configList = PluginSandboxCollections.newSandboxList();
private PreivewArea previewArea;
private JPanel previewPane;
static {
Set<MultiStyleUIConfigProvider> preferenceConfigProviders = ExtraDesignClassManager.getInstance().getArray(MultiStyleUIConfigProvider.XML_TAG);
for (MultiStyleUIConfigProvider provider : preferenceConfigProviders) {
configList.addAll(provider.getConfigList());
}
}
/**
* Constructor
*/
@ -84,6 +99,9 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
mainTabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border"), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
mainTabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
for (StyleUIConfigProvider config : configList) {
mainTabbedPane.addTab(config.configName(), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
}
mainTabbedPane.addChangeListener(tabChangeActionListener);
this.setPreferredSize(new Dimension(450, 480));
}
@ -344,6 +362,9 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
if (this.backgroundPane != null) {
this.backgroundPane.populate(editing.getBackground());
}
for(StyleUIConfigProvider tabConfig : configList){
tabConfig.populateConfig(this.editing);
}
updatePreviewArea();
}
@ -378,6 +399,9 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
if (this.backgroundPane != null) {
style = style.deriveBackground(this.backgroundPane.update());
}
for(StyleUIConfigProvider tabConfig : configList){
style = tabConfig.updateConfig();
}
return style;
}
@ -401,6 +425,9 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
tabbedPane.setComponentAt(selectedIndex, StylePane.this.getBorderPane());
} else if (selectedIndex == BACKGROUND_INDEX) {
tabbedPane.setComponentAt(selectedIndex, StylePane.this.getBackgroundPane());
} else if (configList.size() + NEXT_TAB_INDEX > selectedIndex && configList.get(selectedIndex - NEXT_TAB_INDEX) != null) {
tabbedPane.setComponentAt(selectedIndex, configList.get(selectedIndex - NEXT_TAB_INDEX).uiComponent(StylePane.this));
configList.get(selectedIndex - NEXT_TAB_INDEX).populateConfig(StylePane.this.editing);
}
}
updatePreviewArea();
@ -419,7 +446,7 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
/**
* 预览Style的面板
*
*
* @author richer
*/
public static class PreivewArea extends JComponent {
@ -461,7 +488,7 @@ public class StylePane extends BasicBeanPane<Style> implements ChangeListener {
}
}

Loading…
Cancel
Save