From 057ae876b590a02ee7736dda5be2e51fb08fa31c Mon Sep 17 00:00:00 2001 From: svnadmin Date: Tue, 29 Mar 2016 01:07:56 +0000 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 528 ++++++++ .gitignore | 1 + designer_chart/.classpath | 20 + designer_chart/.project | 1 + designer_chart/designer_chart.iml | 25 + .../src/com/fr/design/ChartEnvManager.java | 188 +++ .../fr/design/ChartTypeInterfaceManager.java | 211 ++++ .../com/fr/design/chart/ChartAxisFactory.java | 55 + .../design/chart/ChartCommonWizardPane.java | 22 + .../fr/design/chart/ChartComponentPane.java | 170 +++ .../com/fr/design/chart/ChartControlPane.java | 128 ++ .../src/com/fr/design/chart/ChartDialog.java | 102 ++ .../com/fr/design/chart/ChartPlotFactory.java | 132 ++ .../com/fr/design/chart/ChartSwingUtils.java | 76 ++ .../com/fr/design/chart/ChartTypePane.java | 186 +++ .../com/fr/design/chart/ChartWizardPane.java | 20 + .../com/fr/design/chart/FactoryObject.java | 40 + .../fr/design/chart/axis/AxisStyleObject.java | 29 + .../fr/design/chart/axis/AxisStylePane.java | 17 + .../chart/axis/BinaryChartStyleAxisPane.java | 63 + .../design/chart/axis/ChartAlertLinePane.java | 63 + .../axis/ChartAlertValueInTopBottomPane.java | 20 + .../chart/axis/ChartAlertValuePane.java | 229 ++++ .../design/chart/axis/ChartStyleAxisPane.java | 87 ++ .../chart/axis/CustomChartStyleAxisPane.java | 19 + .../chart/axis/GanntChartStyleAxisPane.java | 28 + .../fr/design/chart/axis/MinMaxValuePane.java | 193 +++ .../chart/axis/RadarChartStyleAxisPane.java | 26 + .../chart/axis/TernaryChartStyleAxisPane.java | 42 + .../chart/axis/ValueChartStyleAxisPane.java | 25 + .../chart/axis/XYChartStyleAxisPane.java | 26 + .../fr/design/chart/comp/BorderAttriPane.java | 59 + .../com/fr/design/chart/demo/GlyphDemo.java | 123 ++ .../chart/fun/IndependentChartUIProvider.java | 86 ++ .../fun/impl/AbstractIndependentChartUI.java | 52 + ...bstractIndependentChartUIWithAPILevel.java | 49 + .../design/chart/gui/ActiveGlyphFactory.java | 97 ++ .../fr/design/chart/gui/ChartComponent.java | 322 +++++ .../design/chart/gui/ChartWidgetOption.java | 79 ++ .../design/chart/gui/active/ActiveGlyph.java | 161 +++ .../gui/active/AlertValueActiveGlyph.java | 38 + .../chart/gui/active/AxisActiveGlyph.java | 43 + .../gui/active/CategoryAxisActiveGlyph.java | 19 + .../chart/gui/active/ChartActiveGlyph.java | 39 + .../gui/active/DataLabelActiveGlyph.java | 44 + .../gui/active/DataSeriesActiveGlyph.java | 53 + .../gui/active/DataSheetActiveGlyph.java | 30 + .../chart/gui/active/DateAxisActiveGlyph.java | 18 + .../chart/gui/active/LegendActiveGlyph.java | 30 + .../chart/gui/active/PlotActiveGlyph.java | 34 + .../gui/active/RadarAxisActiveGlyph.java | 18 + .../gui/active/RangeAxisActiveGlyph.java | 18 + .../chart/gui/active/TextActiveGlyph.java | 35 + .../gui/active/TrendLineActiveGlyph.java | 43 + .../gui/active/ValueAxisActiveGlyph.java | 19 + .../active/action/ChartComponentAction.java | 47 + .../action/SetAnalysisLineStyleAction.java | 27 + .../gui/active/action/SetAxisStyleAction.java | 33 + .../active/action/SetChartStyleAciton.java | 31 + .../action/SetDataLabelStyleAction.java | 26 + .../action/SetDataSeriesAttrAction.java | 26 + .../gui/active/action/SetDataSheetAction.java | 33 + .../active/action/SetLegendStyleAction.java | 32 + .../gui/active/action/SetPlotStyleAction.java | 32 + .../active/action/SetTitleStyleAction.java | 32 + .../chart/javascript/ChartEmailPane.java | 81 ++ .../design/chart/report/GisMapDataPane.java | 155 +++ .../chart/report/GisMapDataPane4Chart.java | 69 ++ .../report/GisMapReportDataContentPane.java | 301 +++++ .../report/GisMapTableDataContentPane.java | 350 ++++++ .../GisMapTableDataContentPane4Chart.java | 341 ++++++ .../design/chart/report/MapCubeDataPane.java | 76 ++ .../chart/report/MapCubeDataPane4Chart.java | 68 ++ .../design/chart/report/MapCubeLayerPane.java | 309 +++++ .../chart/report/MapCubeSetDataPane.java | 130 ++ .../fr/design/chart/report/MapDataPane.java | 139 +++ .../chart/report/MapDataPane4Chart.java | 133 ++ .../chart/report/MapMoreCubeLayerPane.java | 106 ++ .../report/MapMoreCubeLayerPane4Chart.java | 113 ++ .../chart/report/MapMoreReportIndexPane.java | 202 ++++ .../chart/report/MapMoreTableIndexPane.java | 209 ++++ .../chart/report/MapReportCubeDataPane.java | 74 ++ .../chart/report/MapReportDataSinglePane.java | 233 ++++ .../design/chart/report/MapReportEditor.java | 62 + .../chart/report/MapReportRenderer.java | 32 + .../fr/design/chart/report/MapSinglePane.java | 113 ++ .../chart/report/MapSinglePane4Chart.java | 79 ++ .../chart/report/MapTableCubeDataPane.java | 110 ++ .../report/MapTableCubeDataPane4Chart.java | 93 ++ .../chart/report/MapTableDataSinglePane.java | 271 +++++ .../report/MapTableDataSinglePane4Chart.java | 268 +++++ .../PlotSeries/AbstrctMapAttrEditPane.java | 23 + .../series/PlotSeries/MapCustomPane.java | 217 ++++ .../PlotSeries/MapDefiAreaNamePane.java | 250 ++++ .../PlotSeries/MapGroupExtensionPane.java | 1 + .../series/PlotSeries/MapImageEditPane.java | 763 ++++++++++++ .../series/PlotSeries/MapSelectShape.java | 86 ++ .../PlotSeries/UIGroupExtensionPane.java | 1 + .../series/PlotStyle/ChartSelectDemoPane.java | 173 +++ .../BubblePlotChartConditionPane.java | 27 + .../SeriesCondition/ChartConditionPane.java | 25 + .../ChartConditionPaneFactory.java | 46 + .../ConditionTrendLinePane.java | 233 ++++ .../DataLabelContentsPane.java | 53 + .../SeriesCondition/DataLabelStylePane.java | 121 ++ .../DataSeriesAttrCustomPane.java | 25 + .../SeriesCondition/DataSeriesAttrPane.java | 80 ++ .../DataSeriesConditionPane.java | 177 +++ .../DataSeriesCustomConditionPane.java | 21 + .../GanttPlotChartConditionPane.java | 21 + .../SeriesCondition/LabelAlphaPane.java | 56 + .../LabelAxisPositionPane.java | 74 ++ .../SeriesCondition/LabelBackgroundPane.java | 83 ++ .../SeriesCondition/LabelBorderAttrPane.java | 40 + .../SeriesCondition/LabelBorderPane.java | 34 + .../SeriesCondition/LabelColorPane.java | 63 + .../SeriesCondition/LabelContentsPane.java | 87 ++ .../SeriesCondition/LabelLineStylePane.java | 69 ++ .../SeriesCondition/LineMarkerTypePane.java | 62 + .../MapPlotChartConditionPane.java | 18 + .../PiePlotChartConditionPane.java | 20 + .../SeriesCondition/TooltipContentsPane.java | 186 +++ .../SeriesCondition/TrendLineControlPane.java | 64 + .../series/SeriesCondition/TrendLinePane.java | 74 ++ .../XYPlotChartConditionPane.java | 27 + .../dlp/AreaDataLabelPane.java | 16 + .../dlp/Bar2DDataLabelPane.java | 70 ++ .../dlp/Bar3DDataLabelPane.java | 16 + .../dlp/BubbleDataLabelPane.java | 68 ++ .../SeriesCondition/dlp/DataLabelPane.java | 243 ++++ .../dlp/GanttDataLabelPane.java | 30 + .../dlp/LineDataLabelPane.java | 16 + .../SeriesCondition/dlp/MapDataLabelPane.java | 19 + .../dlp/MeterDataLabelPane.java | 17 + .../SeriesCondition/dlp/PieDataLabelPane.java | 118 ++ .../dlp/RadarDataLabelPane.java | 17 + .../dlp/RangeDataLabelPane.java | 65 + .../dlp/StockDataLabelPane.java | 29 + .../SeriesCondition/dlp/XYDataLabelPane.java | 25 + .../Area3DPlotDataSeriesConditionPane.java | 38 + .../impl/AreaPlotDataSeriesCondtionPane.java | 25 + .../impl/Bar2DTrendLineDSConditionPane.java | 20 + .../Bar3DPlotDataSeriesConditionPane.java | 19 + .../impl/BarPlotDataSeriesConditionPane.java | 27 + .../BubblePlotDataSeriesConditionPane.java | 31 + .../impl/ChartHyperPopAttrPane.java | 152 +++ .../impl/ChartHyperPoplinkPane.java | 174 +++ .../impl/ChartHyperRelateCellLinkPane.java | 182 +++ .../impl/ChartHyperRelateFloatLinkPane.java | 199 +++ .../impl/CustomPlot4AreaConditionPane.java | 17 + ...ustomPlot4BarNoTrendLineConditionPane.java | 17 + .../CustomPlot4BarTrendLineConditionPane.java | 17 + .../impl/CustomPlot4LineConditionPane.java | 17 + .../CustomPlotDataSeriesConditionPane.java | 22 + .../impl/DataSeriesConditionPaneFactory.java | 75 ++ .../Donut2DPlotDataSeriesConditionPane.java | 20 + .../impl/FormHyperlinkNorthPane.java | 135 +++ .../impl/FormHyperlinkPane.java | 161 +++ .../GanttPlotDataSeriesConditionPane.java | 41 + .../impl/LinePlotDataSeriesConditionPane.java | 30 + .../impl/MapPlotDataSeriesConditionPane.java | 31 + .../MeterPlotDataSeriesConditionPane.java | 21 + .../Pie3DPlotDataSeriesConditionPane.java | 27 + .../impl/PiePlotDataSeriesConditionPane.java | 28 + .../RadarPlotDataSeriesConditionPane.java | 33 + .../StockPlotDataSeriesConditionPane.java | 27 + .../XYScatterPlotDataSeriesConditionPane.java | 35 + .../AreaIndependentChartInterface.java | 53 + .../BarIndependentChartInterface.java | 55 + .../BubbleIndependentChartInterface.java | 51 + .../ColumnIndependentChartInterface.java | 54 + .../CustomIndependentChartInterface.java | 51 + .../DonutIndependentChartInterface.java | 52 + .../FunnelIndependentChartInterface.java | 45 + .../GanttIndependentChartInterface.java | 44 + .../GisMapIndependentChartInterface.java | 35 + .../LineIndependentChartInterface.java | 52 + .../MapIndependentChartInterface.java | 49 + .../MeterIndependentChartInterface.java | 45 + .../PieIndependentChartInterface.java | 53 + .../RadarIndependentChartInterface.java | 52 + .../RangeIndependentChartInterface.java | 45 + .../StockIndependentChartInterface.java | 52 + .../XYScatterIndependentChartInterface.java | 53 + .../design/gui/xcombox/ComboBoxUseEditor.java | 160 +++ .../fr/design/gui/xcombox/MarkerComboBox.java | 102 ++ .../src/com/fr/design/images/add.png | Bin 0 -> 218 bytes .../src/com/fr/design/images/chart.png | Bin 0 -> 338 bytes .../src/com/fr/design/images/copyjs.png | Bin 0 -> 634 bytes .../src/com/fr/design/images/del.png | Bin 0 -> 341 bytes .../src/com/fr/design/images/exportimg.png | Bin 0 -> 446 bytes .../com/fr/design/images/newchart_normal.png | Bin 0 -> 1128 bytes .../com/fr/design/images/newchart_over.png | Bin 0 -> 706 bytes .../com/fr/design/images/newchart_press.png | Bin 0 -> 386 bytes .../src/com/fr/design/images/splash4Chart.png | Bin 0 -> 113466 bytes .../fr/design/images/toolbar/area/0_gray.png | Bin 0 -> 448 bytes .../design/images/toolbar/area/0_normal.png | Bin 0 -> 434 bytes .../fr/design/images/toolbar/area/0_over.png | Bin 0 -> 439 bytes .../fr/design/images/toolbar/area/1_gray.png | Bin 0 -> 323 bytes .../design/images/toolbar/area/1_normal.png | Bin 0 -> 318 bytes .../fr/design/images/toolbar/area/1_over.png | Bin 0 -> 328 bytes .../fr/design/images/toolbar/area/2_gray.png | Bin 0 -> 686 bytes .../design/images/toolbar/area/2_normal.png | Bin 0 -> 746 bytes .../fr/design/images/toolbar/area/2_over.png | Bin 0 -> 736 bytes .../fr/design/images/toolbar/area/3_gray.png | Bin 0 -> 484 bytes .../design/images/toolbar/area/3_normal.png | Bin 0 -> 536 bytes .../fr/design/images/toolbar/area/3_over.png | Bin 0 -> 531 bytes .../fr/design/images/toolbar/bar/0_gray.png | Bin 0 -> 182 bytes .../fr/design/images/toolbar/bar/0_normal.png | Bin 0 -> 178 bytes .../fr/design/images/toolbar/bar/0_over.png | Bin 0 -> 177 bytes .../fr/design/images/toolbar/bar/1_gray.png | Bin 0 -> 192 bytes .../fr/design/images/toolbar/bar/1_normal.png | Bin 0 -> 191 bytes .../fr/design/images/toolbar/bar/1_over.png | Bin 0 -> 191 bytes .../fr/design/images/toolbar/bar/2_gray.png | Bin 0 -> 181 bytes .../fr/design/images/toolbar/bar/2_normal.png | Bin 0 -> 182 bytes .../fr/design/images/toolbar/bar/2_over.png | Bin 0 -> 181 bytes .../fr/design/images/toolbar/bar/3_gary.png | Bin 0 -> 266 bytes .../fr/design/images/toolbar/bar/3_gray.png | Bin 0 -> 266 bytes .../fr/design/images/toolbar/bar/3_normal.png | Bin 0 -> 265 bytes .../fr/design/images/toolbar/bar/3_over.png | Bin 0 -> 265 bytes .../fr/design/images/toolbar/bar/4_gray.png | Bin 0 -> 341 bytes .../fr/design/images/toolbar/bar/4_normal.png | Bin 0 -> 350 bytes .../fr/design/images/toolbar/bar/4_over.png | Bin 0 -> 347 bytes .../fr/design/images/toolbar/bar/5_gray.png | Bin 0 -> 300 bytes .../fr/design/images/toolbar/bar/5_normal.png | Bin 0 -> 296 bytes .../fr/design/images/toolbar/bar/5_over.png | Bin 0 -> 296 bytes .../fr/design/images/toolbar/bar/6_gray.png | Bin 0 -> 246 bytes .../fr/design/images/toolbar/bar/6_normal.png | Bin 0 -> 243 bytes .../fr/design/images/toolbar/bar/6_over.png | Bin 0 -> 243 bytes .../com/fr/design/images/toolbar/border.png | Bin 0 -> 238 bytes .../design/images/toolbar/bubble/0_gray.png | Bin 0 -> 474 bytes .../design/images/toolbar/bubble/0_normal.png | Bin 0 -> 481 bytes .../design/images/toolbar/bubble/0_over.png | Bin 0 -> 476 bytes .../design/images/toolbar/column/0_gray.png | Bin 0 -> 177 bytes .../design/images/toolbar/column/0_normal.png | Bin 0 -> 176 bytes .../design/images/toolbar/column/0_over.png | Bin 0 -> 177 bytes .../design/images/toolbar/column/1_gray.png | Bin 0 -> 189 bytes .../design/images/toolbar/column/1_normal.png | Bin 0 -> 190 bytes .../design/images/toolbar/column/1_over.png | Bin 0 -> 191 bytes .../design/images/toolbar/column/2_gray.png | Bin 0 -> 188 bytes .../design/images/toolbar/column/2_normal.png | Bin 0 -> 192 bytes .../design/images/toolbar/column/2_over.png | Bin 0 -> 192 bytes .../design/images/toolbar/column/3_gray.png | Bin 0 -> 307 bytes .../design/images/toolbar/column/3_normal.png | Bin 0 -> 303 bytes .../design/images/toolbar/column/3_over.png | Bin 0 -> 303 bytes .../design/images/toolbar/column/4_gray.png | Bin 0 -> 347 bytes .../design/images/toolbar/column/4_normal.png | Bin 0 -> 349 bytes .../design/images/toolbar/column/4_over.png | Bin 0 -> 349 bytes .../design/images/toolbar/column/5_gray.png | Bin 0 -> 371 bytes .../design/images/toolbar/column/5_normal.png | Bin 0 -> 386 bytes .../design/images/toolbar/column/5_over.png | Bin 0 -> 386 bytes .../design/images/toolbar/column/6_gray.png | Bin 0 -> 288 bytes .../design/images/toolbar/column/6_normal.png | Bin 0 -> 301 bytes .../design/images/toolbar/column/6_over.png | Bin 0 -> 301 bytes .../design/images/toolbar/custom/0_gray.png | Bin 0 -> 367 bytes .../design/images/toolbar/custom/0_normal.png | Bin 0 -> 367 bytes .../design/images/toolbar/custom/0_over.png | Bin 0 -> 374 bytes .../fr/design/images/toolbar/donut/0_gray.png | Bin 0 -> 589 bytes .../design/images/toolbar/donut/0_normal.png | Bin 0 -> 579 bytes .../fr/design/images/toolbar/donut/0_over.png | Bin 0 -> 581 bytes .../fr/design/images/toolbar/donut/1_gray.png | Bin 0 -> 627 bytes .../design/images/toolbar/donut/1_normal.png | Bin 0 -> 661 bytes .../fr/design/images/toolbar/donut/1_over.png | Bin 0 -> 648 bytes .../design/images/toolbar/funnel/0_gray.png | Bin 0 -> 295 bytes .../design/images/toolbar/funnel/0_normal.png | Bin 0 -> 297 bytes .../design/images/toolbar/funnel/0_over.png | Bin 0 -> 304 bytes .../fr/design/images/toolbar/gantt/0_gray.png | Bin 0 -> 202 bytes .../design/images/toolbar/gantt/0_normal.png | Bin 0 -> 204 bytes .../fr/design/images/toolbar/gantt/0_over.png | Bin 0 -> 204 bytes .../fr/design/images/toolbar/gis/0_gray.png | Bin 0 -> 923 bytes .../fr/design/images/toolbar/gis/0_normal.png | Bin 0 -> 985 bytes .../fr/design/images/toolbar/gis/0_over.png | Bin 0 -> 982 bytes .../fr/design/images/toolbar/gis/1_gray.png | Bin 0 -> 892 bytes .../fr/design/images/toolbar/gis/1_normal.png | Bin 0 -> 961 bytes .../fr/design/images/toolbar/gis/1_over.png | Bin 0 -> 968 bytes .../fr/design/images/toolbar/line/0_gray.png | Bin 0 -> 463 bytes .../design/images/toolbar/line/0_normal.png | Bin 0 -> 474 bytes .../fr/design/images/toolbar/line/0_over.png | Bin 0 -> 479 bytes .../fr/design/images/toolbar/map/0_gray.png | Bin 0 -> 389 bytes .../fr/design/images/toolbar/map/0_normal.png | Bin 0 -> 387 bytes .../fr/design/images/toolbar/map/0_over.png | Bin 0 -> 388 bytes .../fr/design/images/toolbar/meter/0_gray.png | Bin 0 -> 469 bytes .../design/images/toolbar/meter/0_normal.png | Bin 0 -> 463 bytes .../fr/design/images/toolbar/meter/0_over.png | Bin 0 -> 470 bytes .../fr/design/images/toolbar/meter/1_gray.png | Bin 0 -> 542 bytes .../design/images/toolbar/meter/1_normal.png | Bin 0 -> 541 bytes .../fr/design/images/toolbar/meter/1_over.png | Bin 0 -> 542 bytes .../fr/design/images/toolbar/meter/2_gray.png | Bin 0 -> 519 bytes .../design/images/toolbar/meter/2_normal.png | Bin 0 -> 529 bytes .../fr/design/images/toolbar/meter/2_over.png | Bin 0 -> 529 bytes .../fr/design/images/toolbar/pie/0_gray.png | Bin 0 -> 388 bytes .../fr/design/images/toolbar/pie/0_normal.png | Bin 0 -> 392 bytes .../fr/design/images/toolbar/pie/0_over.png | Bin 0 -> 389 bytes .../fr/design/images/toolbar/pie/1_gray.png | Bin 0 -> 515 bytes .../fr/design/images/toolbar/pie/1_normal.png | Bin 0 -> 531 bytes .../fr/design/images/toolbar/pie/1_over.png | Bin 0 -> 536 bytes .../fr/design/images/toolbar/radar/0_gray.png | Bin 0 -> 969 bytes .../design/images/toolbar/radar/0_normal.png | Bin 0 -> 976 bytes .../fr/design/images/toolbar/radar/0_over.png | Bin 0 -> 995 bytes .../fr/design/images/toolbar/range/0_gray.png | Bin 0 -> 220 bytes .../design/images/toolbar/range/0_normal.png | Bin 0 -> 231 bytes .../fr/design/images/toolbar/range/0_over.png | Bin 0 -> 231 bytes .../fr/design/images/toolbar/stock/0_gray.png | Bin 0 -> 211 bytes .../design/images/toolbar/stock/0_normal.png | Bin 0 -> 207 bytes .../fr/design/images/toolbar/stock/0_over.png | Bin 0 -> 207 bytes .../images/toolbar/xyscatter/0_gray.png | Bin 0 -> 283 bytes .../images/toolbar/xyscatter/0_normal.png | Bin 0 -> 293 bytes .../images/toolbar/xyscatter/0_over.png | Bin 0 -> 291 bytes .../AbstractChartDataPane4Chart.java | 244 ++++ .../AbstractMapPlotPane4ToolBar.java | 111 ++ .../mainframe/ChartAndWidgetPropertyPane.java | 143 +++ .../com/fr/design/mainframe/ChartArea.java | 521 ++++++++ .../fr/design/mainframe/ChartDesigner.java | 264 ++++ .../mainframe/ChartDesignerPropertyPane.java | 134 +++ .../fr/design/mainframe/ChartDesignerUI.java | 211 ++++ .../design/mainframe/ChartPropertyPane.java | 57 + .../fr/design/mainframe/ChartToolBarPane.java | 558 +++++++++ .../fr/design/mainframe/ChartUndoState.java | 47 + .../design/mainframe/DesignerFrame4Chart.java | 98 ++ .../mainframe/GisMapPlotPane4ToolBar.java | 203 ++++ .../src/com/fr/design/mainframe/JChart.java | 376 ++++++ .../com/fr/design/mainframe/MapArrayPane.java | 339 ++++++ .../com/fr/design/mainframe/MapEditPane.java | 121 ++ .../design/mainframe/MapPlotPane4ToolBar.java | 210 ++++ .../mainframe/MiddleChartPropertyPane.java | 142 +++ .../design/mainframe/PlotToolBarFactory.java | 90 ++ .../mainframe/TargetComponentContainer.java | 15 + .../fr/design/mainframe/ToolTip4Chart.java | 91 ++ .../actions/AbstractExportAction4JChart.java | 132 ++ .../actions/ChartDownLoadWorker.java | 170 +++ .../actions/ChartFeedBackAciton.java | 51 + .../mainframe/actions/ChartUpdateAction.java | 25 + .../mainframe/actions/ChartWebAction.java | 56 + .../actions/ExcelExportAction4Chart.java | 68 ++ .../mainframe/actions/JChartAction.java | 21 + .../mainframe/actions/NewChartAction.java | 61 + .../mainframe/actions/OpenChartAction.java | 35 + .../actions/PDFExportAction4Chart.java | 65 + .../actions/PNGExportAction4Chart.java | 66 + .../mainframe/actions/UpdateOnlineAction.java | 74 ++ .../mainframe/actions/UpdateVersion.java | 69 ++ .../chart/AbstractChartAttrPane.java | 35 + .../mainframe/chart/AttributeChange.java | 8 + .../mainframe/chart/ChartDesignEditPane.java | 55 + .../design/mainframe/chart/ChartEditPane.java | 343 ++++++ .../mainframe/chart/ChartHyperEditPane.java | 96 ++ .../mainframe/chart/PaneTitleConstants.java | 25 + .../mainframe/chart/UpdateOnLinePane.java | 238 ++++ .../mainframe/chart/gui/ChartDataPane.java | 108 ++ .../chart/gui/ChartDesignerDataPane.java | 71 ++ .../chart/gui/ChartDesignerOtherPane.java | 65 + .../mainframe/chart/gui/ChartOtherPane.java | 139 +++ .../mainframe/chart/gui/ChartStylePane.java | 196 +++ .../chart/gui/ChartTypeButtonPane.java | 441 +++++++ .../mainframe/chart/gui/ChartTypePane.java | 166 +++ .../mainframe/chart/gui/StylePane4Chart.java | 33 + .../mainframe/chart/gui/UIEditLabel.java | 213 ++++ .../chart/gui/data/CalculateComboBox.java | 68 ++ .../chart/gui/data/ChartDataFilterPane.java | 544 +++++++++ .../gui/data/ChartDesignDataLoadPane.java | 48 + .../chart/gui/data/DataContentsPane.java | 39 + .../chart/gui/data/DatabaseTableDataPane.java | 102 ++ .../chart/gui/data/EmbbeddDataPane.java | 124 ++ .../chart/gui/data/ExcelDataPane.java | 123 ++ .../gui/data/ImportSetChartDataPane.java | 117 ++ .../chart/gui/data/JSONDataPane.java | 101 ++ .../chart/gui/data/NormalChartDataPane.java | 131 ++ .../chart/gui/data/PresentComboBox.java | 113 ++ .../chart/gui/data/ReportDataPane.java | 101 ++ .../chart/gui/data/TableDataPane.java | 160 +++ .../report/AbstractReportDataContentPane.java | 172 +++ .../BubblePlotReportDataContentPane.java | 98 ++ ...goryPlotMoreCateReportDataContentPane.java | 182 +++ .../CategoryPlotReportDataContentPane.java | 145 +++ .../GanttPlotReportDataContentPane.java | 112 ++ .../MeterPlotReportDataContentPane.java | 105 ++ .../report/PiePlotReportDataContentPane.java | 89 ++ .../StockPlotReportDataContentPane.java | 283 +++++ .../XYScatterPlotReportDataContentPane.java | 91 ++ .../table/AbstractTableDataContentPane.java | 137 +++ .../table/BubblePlotTableDataContentPane.java | 165 +++ ...egoryPlotMoreCateTableDataContentPane.java | 234 ++++ .../CategoryPlotTableDataContentPane.java | 167 +++ .../table/Factory4TableDataContentPane.java | 61 + .../table/GanttPlotTableDataContentPane.java | 198 +++ .../table/MeterPlotTableDataContentPane.java | 116 ++ .../table/PiePlotTableDataContentPane.java | 54 + .../table/SeriesNameUseFieldNamePane.java | 356 ++++++ .../table/SeriesNameUseFieldValuePane.java | 279 +++++ .../data/table/SeriesTypeUseComboxPane.java | 158 +++ .../table/StockPlotTableDataContentPane.java | 197 +++ .../XYScatterPlotTableDataContentPane.java | 153 +++ .../gui/other/ChartConditionAttrPane.java | 84 ++ .../other/ChartDesignerConditionAttrPane.java | 15 + .../other/ChartDesignerInteractivePane.java | 52 + .../chart/gui/other/ChartInteractivePane.java | 1068 +++++++++++++++++ .../chart/gui/other/ChartSwitchPane.java | 94 ++ .../chart/gui/other/TimeSwitchPane.java | 338 ++++++ .../chart/gui/style/AbstractChartTabPane.java | 21 + .../chart/gui/style/ChartAccColorPane.java | 236 ++++ .../chart/gui/style/ChartAxisLabelPane.java | 471 ++++++++ .../gui/style/ChartAxisLineStylePane.java | 91 ++ .../style/ChartAxisTitleNoFormulaPane.java | 139 +++ .../chart/gui/style/ChartAxisTitlePane.java | 146 +++ .../gui/style/ChartAxisValueTypePane.java | 136 +++ .../gui/style/ChartBackgroundNoImagePane.java | 23 + .../chart/gui/style/ChartBackgroundPane.java | 146 +++ .../chart/gui/style/ChartBeautyPane.java | 74 ++ .../chart/gui/style/ChartBorderPane.java | 73 ++ .../style/ChartDataPointLabel4GisPane.java | 176 +++ .../style/ChartDataPointLabel4MapPane.java | 173 +++ .../gui/style/ChartDatapointLabelPane.java | 441 +++++++ .../chart/gui/style/ChartFillStylePane.java | 221 ++++ .../gui/style/ChartPreFillStylePane.java | 97 ++ .../gui/style/ChartTextAttrNoColorPane.java | 81 ++ .../style/ChartTextAttrNoFontSizePane.java | 62 + .../chart/gui/style/ChartTextAttrPane.java | 144 +++ .../chart/gui/style/DateAxisValuePane.java | 360 ++++++ .../chart/gui/style/ThirdTabPane.java | 136 +++ .../analysisline/ChartAnalysisLinePane.java | 286 +++++ .../chart/gui/style/area/ChartAreaPane.java | 95 ++ .../gui/style/area/ChartAxisAreaPane.java | 23 + .../gui/style/area/ChartPlotAreaPane.java | 150 +++ .../gui/style/area/ChartWholeAreaPane.java | 83 ++ .../gui/style/area/DefaultAxisAreaPane.java | 119 ++ .../gui/style/area/Plot3DAxisAreaPane.java | 57 + .../gui/style/area/RadarAxisAreaPane.java | 69 ++ .../style/axis/ChartAxisNoFormulaPane.java | 43 + .../chart/gui/style/axis/ChartAxisPane.java | 131 ++ .../gui/style/axis/ChartAxisUsePane.java | 17 + .../axis/ChartCategoryNoFormulaPane.java | 23 + .../gui/style/axis/ChartCategoryPane.java | 269 +++++ .../axis/ChartPercentValueNoFormulaPane.java | 14 + .../gui/style/axis/ChartPercentValuePane.java | 16 + .../chart/gui/style/axis/ChartRadarPane.java | 84 ++ .../axis/ChartSecondValueNoFormulaPane.java | 46 + .../gui/style/axis/ChartSecondValuePane.java | 49 + .../style/axis/ChartValueNoFormulaPane.java | 24 + .../chart/gui/style/axis/ChartValuePane.java | 413 +++++++ .../style/datalabel/ChartDataLabelPane.java | 125 ++ .../style/datalabel/ChartLabelFontPane.java | 138 +++ .../style/datasheet/ChartDatasheetPane.java | 159 +++ .../gui/style/legend/AutoSelectedPane.java | 6 + .../gui/style/legend/ChartLegendPane.java | 154 +++ .../style/series/AbstractPlotSeriesPane.java | 131 ++ .../gui/style/series/Area3DSeriesPane.java | 57 + .../gui/style/series/AreaSeriesPane.java | 96 ++ .../gui/style/series/Bar2DSeriesPane.java | 91 ++ .../gui/style/series/Bar3DSeriesPane.java | 84 ++ .../gui/style/series/BubbleSeriesPane.java | 82 ++ .../gui/style/series/ChartSeriesPane.java | 90 ++ .../style/series/ColorPickerPaneNumFiled.java | 41 + .../series/ColorPickerPaneWithFormula.java | 50 + .../style/series/CombinedBar2DSeriesPane.java | 63 + .../series/CombinedBubbleSeriesPane.java | 62 + .../style/series/CombinedPie2DSeriesPane.java | 62 + .../style/series/CustomDefaultSeriesPane.java | 367 ++++++ .../gui/style/series/CustomSeriesPane.java | 111 ++ .../series/CustomTypeConditionSeriesPane.java | 505 ++++++++ .../gui/style/series/Donut2DSeriesPane.java | 111 ++ .../gui/style/series/FunnelSeriesPane.java | 25 + .../gui/style/series/LineSeriesPane.java | 137 +++ .../series/MapColorPickerPaneWithFormula.java | 42 + .../chart/gui/style/series/MapSeriesPane.java | 217 ++++ .../series/MapSeriesPane4ChartDesigner.java | 21 + .../gui/style/series/MeterSeriesPane.java | 137 +++ .../series/MeterSeriesPane4ChartDesigner.java | 20 + .../gui/style/series/Pie2DSeriesPane.java | 128 ++ .../gui/style/series/Pie3DSeriesPane.java | 26 + .../gui/style/series/RadarSeriesPane.java | 116 ++ .../gui/style/series/RangeSeriesPane.java | 45 + .../series/SeriesPane4ChartDesigner.java | 23 + .../gui/style/series/StockSeriesPane.java | 105 ++ .../gui/style/series/UIColorPickerPane.java | 759 ++++++++++++ .../style/series/UIColorPickerPane4Map.java | 50 + .../gui/style/series/XYScatterSeriesPane.java | 64 + .../chart/gui/style/title/ChartTitlePane.java | 195 +++ .../style/title/ChartTitlePaneNoFormula.java | 183 +++ .../chart/gui/type/AbstractBarPane.java | 61 + .../chart/gui/type/AbstractChartTypePane.java | 592 +++++++++ .../chart/gui/type/AreaPlotPane.java | 152 +++ .../chart/gui/type/AreaPlotPane4ToolBar.java | 69 ++ .../mainframe/chart/gui/type/BarPlotPane.java | 126 ++ .../chart/gui/type/BarPlotPane4ToolBar.java | 72 ++ .../chart/gui/type/BubblePlotPane.java | 79 ++ .../gui/type/BubblePlotPane4ToolBar.java | 72 ++ .../gui/type/ChartDesignerImagePane.java | 138 +++ .../chart/gui/type/ChartImagePane.java | 54 + .../chart/gui/type/ChartTabPane.java | 60 + .../chart/gui/type/ColumnPlotPane.java | 119 ++ .../gui/type/ColumnPlotPane4ToolBar.java | 73 ++ .../chart/gui/type/CustomPlotPane.java | 72 ++ .../gui/type/CustomPlotPane4ToolBar.java | 54 + .../chart/gui/type/DonutPlotPane.java | 139 +++ .../chart/gui/type/DonutPlotPane4ToolBar.java | 54 + .../chart/gui/type/FunnelPlotPane.java | 95 ++ .../chart/gui/type/GanttPlotPane.java | 75 ++ .../chart/gui/type/GanttPlotPane4ToolBar.java | 52 + .../chart/gui/type/GisMapPlotPane.java | 190 +++ .../chart/gui/type/LinePlotPane.java | 93 ++ .../chart/gui/type/LinePlotPane4ToolBar.java | 57 + .../mainframe/chart/gui/type/MapPlotPane.java | 159 +++ .../chart/gui/type/MeterPlotPane.java | 124 ++ .../chart/gui/type/MeterPlotPane4ToolBar.java | 69 ++ .../mainframe/chart/gui/type/PiePlotPane.java | 132 ++ .../chart/gui/type/PiePlotPane4ToolBar.java | 58 + .../chart/gui/type/PlotPane4ToolBar.java | 134 +++ .../chart/gui/type/RadarPlotPane.java | 76 ++ .../chart/gui/type/RadarPlotPane4ToolBar.java | 51 + .../chart/gui/type/RangePlotPane.java | 79 ++ .../chart/gui/type/RangePlotPane4ToolBar.java | 53 + .../chart/gui/type/StockPlotPane.java | 76 ++ .../chart/gui/type/StockPlotPane4ToolBar.java | 52 + .../gui/type/UserDefinedChartTypePane.java | 45 + .../gui/type/XYSCatterPlotPane4ToolBar.java | 72 ++ .../chart/gui/type/XYScatterPlotPane.java | 89 ++ .../exporter/ExcelExporter4Chart.java | 94 ++ .../mainframe/exporter/Exporter4Chart.java | 25 + .../exporter/ImageExporter4Chart.java | 89 ++ .../mainframe/exporter/PdfExporter4Chart.java | 382 ++++++ .../fr/design/module/ChartDesignerModule.java | 1 + .../fr/design/module/ChartHyperlinkGroup.java | 40 + .../fr/design/module/ChartPreStyleAction.java | 75 ++ .../module/ChartPreStyleManagerPane.java | 87 ++ .../fr/design/module/ChartPreStylePane.java | 108 ++ .../fr/design/module/ChartStartModule.java | 95 ++ .../fr/design/module/FormHyperlinkGroup.java | 37 + .../com/fr/file/FILEChooserPane4Chart.java | 52 + .../src/com/fr/start/ChartSplashPane.java | 18 + .../src/com/fr/start/Designer4Chart.java | 406 +++++++ 530 files changed, 45226 insertions(+) create mode 100644 .gitignore create mode 100644 designer_chart/.classpath create mode 100644 designer_chart/.project create mode 100644 designer_chart/designer_chart.iml create mode 100644 designer_chart/src/com/fr/design/ChartEnvManager.java create mode 100644 designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java create mode 100644 designer_chart/src/com/fr/design/chart/ChartAxisFactory.java create mode 100644 designer_chart/src/com/fr/design/chart/ChartCommonWizardPane.java create mode 100644 designer_chart/src/com/fr/design/chart/ChartComponentPane.java create mode 100644 designer_chart/src/com/fr/design/chart/ChartControlPane.java create mode 100644 designer_chart/src/com/fr/design/chart/ChartDialog.java create mode 100644 designer_chart/src/com/fr/design/chart/ChartPlotFactory.java create mode 100644 designer_chart/src/com/fr/design/chart/ChartSwingUtils.java create mode 100644 designer_chart/src/com/fr/design/chart/ChartTypePane.java create mode 100644 designer_chart/src/com/fr/design/chart/ChartWizardPane.java create mode 100644 designer_chart/src/com/fr/design/chart/FactoryObject.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/AxisStyleObject.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/AxisStylePane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/BinaryChartStyleAxisPane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/ChartAlertLinePane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/ChartAlertValueInTopBottomPane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/ChartAlertValuePane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/ChartStyleAxisPane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/CustomChartStyleAxisPane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/GanntChartStyleAxisPane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/RadarChartStyleAxisPane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/TernaryChartStyleAxisPane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/ValueChartStyleAxisPane.java create mode 100644 designer_chart/src/com/fr/design/chart/axis/XYChartStyleAxisPane.java create mode 100644 designer_chart/src/com/fr/design/chart/comp/BorderAttriPane.java create mode 100644 designer_chart/src/com/fr/design/chart/demo/GlyphDemo.java create mode 100644 designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java create mode 100644 designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java create mode 100644 designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/ActiveGlyphFactory.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/ChartComponent.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/ChartWidgetOption.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/ActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/AlertValueActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/AxisActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/CategoryAxisActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/ChartActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/DataLabelActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/DataSeriesActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/DataSheetActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/DateAxisActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/LegendActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/PlotActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/RadarAxisActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/RangeAxisActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/TextActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/TrendLineActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/ValueAxisActiveGlyph.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/ChartComponentAction.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/SetAnalysisLineStyleAction.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/SetAxisStyleAction.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/SetChartStyleAciton.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/SetDataLabelStyleAction.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSeriesAttrAction.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSheetAction.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/SetLegendStyleAction.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/SetPlotStyleAction.java create mode 100644 designer_chart/src/com/fr/design/chart/gui/active/action/SetTitleStyleAction.java create mode 100644 designer_chart/src/com/fr/design/chart/javascript/ChartEmailPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/GisMapDataPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/GisMapDataPane4Chart.java create mode 100644 designer_chart/src/com/fr/design/chart/report/GisMapReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane4Chart.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapCubeDataPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapCubeDataPane4Chart.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapCubeLayerPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapCubeSetDataPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapDataPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapDataPane4Chart.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane4Chart.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapMoreReportIndexPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapMoreTableIndexPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapReportCubeDataPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapReportDataSinglePane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapReportEditor.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapReportRenderer.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapSinglePane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapSinglePane4Chart.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane4Chart.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane.java create mode 100644 designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane4Chart.java create mode 100644 designer_chart/src/com/fr/design/chart/series/PlotSeries/AbstrctMapAttrEditPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/PlotSeries/MapDefiAreaNamePane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/PlotSeries/MapSelectShape.java create mode 100644 designer_chart/src/com/fr/design/chart/series/PlotSeries/UIGroupExtensionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/PlotStyle/ChartSelectDemoPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/BubblePlotChartConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPaneFactory.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/ConditionTrendLinePane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelContentsPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrCustomPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesCustomConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/GanttPlotChartConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAxisPositionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBackgroundPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderAttrPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelColorPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelContentsPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelLineStylePane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/LineMarkerTypePane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/MapPlotChartConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/PiePlotChartConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/TooltipContentsPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLineControlPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLinePane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/XYPlotChartConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/AreaDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar2DDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar3DDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/BubbleDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/GanttDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/LineDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MapDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MeterDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/PieDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RadarDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RangeDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/StockDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/XYDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Area3DPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/AreaPlotDataSeriesCondtionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar2DTrendLineDSConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar3DPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BarPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BubblePlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4AreaConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarNoTrendLineConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarTrendLineConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4LineConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/DataSeriesConditionPaneFactory.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Donut2DPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkNorthPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/GanttPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/LinePlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MapPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MeterPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Pie3DPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/PiePlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/RadarPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/StockPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/XYScatterPlotDataSeriesConditionPane.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/AreaIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/BarIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/BubbleIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/ColumnIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/CustomIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/DonutIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/FunnelIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/GanttIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/GisMapIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/LineIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/MapIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/MeterIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/PieIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/RadarIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/RangeIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/StockIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/chartinterface/XYScatterIndependentChartInterface.java create mode 100644 designer_chart/src/com/fr/design/gui/xcombox/ComboBoxUseEditor.java create mode 100644 designer_chart/src/com/fr/design/gui/xcombox/MarkerComboBox.java create mode 100644 designer_chart/src/com/fr/design/images/add.png create mode 100644 designer_chart/src/com/fr/design/images/chart.png create mode 100644 designer_chart/src/com/fr/design/images/copyjs.png create mode 100644 designer_chart/src/com/fr/design/images/del.png create mode 100644 designer_chart/src/com/fr/design/images/exportimg.png create mode 100644 designer_chart/src/com/fr/design/images/newchart_normal.png create mode 100644 designer_chart/src/com/fr/design/images/newchart_over.png create mode 100644 designer_chart/src/com/fr/design/images/newchart_press.png create mode 100644 designer_chart/src/com/fr/design/images/splash4Chart.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/1_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/1_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/1_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/2_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/2_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/2_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/3_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/3_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/area/3_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/1_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/1_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/1_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/2_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/2_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/2_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/3_gary.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/3_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/3_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/3_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/4_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/4_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/4_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/5_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/5_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/5_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/6_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/6_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bar/6_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/border.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bubble/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bubble/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/bubble/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/1_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/1_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/1_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/2_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/2_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/2_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/3_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/3_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/3_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/4_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/4_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/4_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/5_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/5_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/5_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/6_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/6_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/column/6_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/custom/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/custom/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/custom/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/donut/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/donut/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/donut/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/donut/1_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/donut/1_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/donut/1_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/funnel/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/funnel/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/funnel/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/gantt/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/gantt/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/gantt/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/gis/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/gis/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/gis/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/gis/1_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/gis/1_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/gis/1_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/line/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/line/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/line/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/map/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/map/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/map/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/meter/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/meter/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/meter/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/meter/1_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/meter/1_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/meter/1_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/meter/2_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/meter/2_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/meter/2_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/pie/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/pie/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/pie/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/pie/1_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/pie/1_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/pie/1_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/radar/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/radar/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/radar/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/range/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/range/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/range/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/stock/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/stock/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/stock/0_over.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_gray.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_normal.png create mode 100644 designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_over.png create mode 100644 designer_chart/src/com/fr/design/mainframe/AbstractChartDataPane4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/AbstractMapPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/ChartAndWidgetPropertyPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/ChartArea.java create mode 100644 designer_chart/src/com/fr/design/mainframe/ChartDesigner.java create mode 100644 designer_chart/src/com/fr/design/mainframe/ChartDesignerPropertyPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/ChartDesignerUI.java create mode 100644 designer_chart/src/com/fr/design/mainframe/ChartPropertyPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/ChartToolBarPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/ChartUndoState.java create mode 100644 designer_chart/src/com/fr/design/mainframe/DesignerFrame4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/GisMapPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/JChart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/MapArrayPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/MapEditPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/MapPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/PlotToolBarFactory.java create mode 100644 designer_chart/src/com/fr/design/mainframe/TargetComponentContainer.java create mode 100644 designer_chart/src/com/fr/design/mainframe/ToolTip4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/AbstractExportAction4JChart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/ChartDownLoadWorker.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/ChartFeedBackAciton.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/ChartUpdateAction.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/ChartWebAction.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/ExcelExportAction4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/JChartAction.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/NewChartAction.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/OpenChartAction.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/PDFExportAction4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/PNGExportAction4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/UpdateOnlineAction.java create mode 100644 designer_chart/src/com/fr/design/mainframe/actions/UpdateVersion.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/AttributeChange.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/ChartDesignEditPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/PaneTitleConstants.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/UpdateOnLinePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerOtherPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/ChartOtherPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/ChartStylePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/StylePane4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/CalculateComboBox.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDesignDataLoadPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/DataContentsPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/EmbbeddDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/ExcelDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/ImportSetChartDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/JSONDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/PresentComboBox.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/GanttPlotReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/PiePlotReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/StockPlotReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/XYScatterPlotReportDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/Factory4TableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/PiePlotTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/StockPlotTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/XYScatterPlotTableDataContentPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartConditionAttrPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerConditionAttrPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartSwitchPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/other/TimeSwitchPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/AbstractChartTabPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAccColorPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisLabelPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisLineStylePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisTitleNoFormulaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisTitlePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisValueTypePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartBackgroundNoImagePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartBackgroundPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartBeautyPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartBorderPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDataPointLabel4GisPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDataPointLabel4MapPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartPreFillStylePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrNoColorPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrNoFontSizePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/DateAxisValuePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/analysisline/ChartAnalysisLinePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/ChartAreaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/ChartAxisAreaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/ChartPlotAreaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/ChartWholeAreaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/DefaultAxisAreaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/Plot3DAxisAreaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/RadarAxisAreaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartAxisNoFormulaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartAxisPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartAxisUsePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryNoFormulaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartPercentValueNoFormulaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartPercentValuePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartRadarPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartSecondValueNoFormulaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartSecondValuePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValueNoFormulaPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/datalabel/ChartDataLabelPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/datalabel/ChartLabelFontPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/datasheet/ChartDatasheetPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/legend/AutoSelectedPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/legend/ChartLegendPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/AbstractPlotSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Area3DSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/AreaSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Bar2DSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Bar3DSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/BubbleSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneWithFormula.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedBar2DSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedBubbleSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedPie2DSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CustomDefaultSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CustomSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CustomTypeConditionSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Donut2DSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/FunnelSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/LineSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MapColorPickerPaneWithFormula.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MapSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MapSeriesPane4ChartDesigner.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MeterSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MeterSeriesPane4ChartDesigner.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Pie2DSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Pie3DSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/RadarSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/RangeSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/SeriesPane4ChartDesigner.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/StockSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane4Map.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/XYScatterSeriesPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/title/ChartTitlePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/style/title/ChartTitlePaneNoFormula.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/BarPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/BarPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/BubblePlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/BubblePlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartDesignerImagePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartTabPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/ColumnPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/ColumnPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/CustomPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/CustomPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/FunnelPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/GanttPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/GanttPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/LinePlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/LinePlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/MeterPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/MeterPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/PlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/RadarPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/RadarPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/RangePlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/RangePlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/StockPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/StockPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/UserDefinedChartTypePane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/XYSCatterPlotPane4ToolBar.java create mode 100644 designer_chart/src/com/fr/design/mainframe/chart/gui/type/XYScatterPlotPane.java create mode 100644 designer_chart/src/com/fr/design/mainframe/exporter/ExcelExporter4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/exporter/Exporter4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/exporter/ImageExporter4Chart.java create mode 100644 designer_chart/src/com/fr/design/mainframe/exporter/PdfExporter4Chart.java create mode 100644 designer_chart/src/com/fr/design/module/ChartDesignerModule.java create mode 100644 designer_chart/src/com/fr/design/module/ChartHyperlinkGroup.java create mode 100644 designer_chart/src/com/fr/design/module/ChartPreStyleAction.java create mode 100644 designer_chart/src/com/fr/design/module/ChartPreStyleManagerPane.java create mode 100644 designer_chart/src/com/fr/design/module/ChartPreStylePane.java create mode 100644 designer_chart/src/com/fr/design/module/ChartStartModule.java create mode 100644 designer_chart/src/com/fr/design/module/FormHyperlinkGroup.java create mode 100644 designer_chart/src/com/fr/file/FILEChooserPane4Chart.java create mode 100644 designer_chart/src/com/fr/start/ChartSplashPane.java create mode 100644 designer_chart/src/com/fr/start/Designer4Chart.java diff --git a/.gitattributes b/.gitattributes index 8e948c534..9b9bf8f8a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,529 @@ * text=auto !eol +designer_chart/.classpath -text +designer_chart/.project -text +designer_chart/designer_chart.iml -text +designer_chart/src/com/fr/design/ChartEnvManager.java -text +designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java -text +designer_chart/src/com/fr/design/chart/ChartAxisFactory.java -text +designer_chart/src/com/fr/design/chart/ChartCommonWizardPane.java -text +designer_chart/src/com/fr/design/chart/ChartComponentPane.java -text +designer_chart/src/com/fr/design/chart/ChartControlPane.java -text +designer_chart/src/com/fr/design/chart/ChartDialog.java -text +designer_chart/src/com/fr/design/chart/ChartPlotFactory.java -text +designer_chart/src/com/fr/design/chart/ChartSwingUtils.java -text +designer_chart/src/com/fr/design/chart/ChartTypePane.java -text +designer_chart/src/com/fr/design/chart/ChartWizardPane.java -text +designer_chart/src/com/fr/design/chart/FactoryObject.java -text +designer_chart/src/com/fr/design/chart/axis/AxisStyleObject.java -text +designer_chart/src/com/fr/design/chart/axis/AxisStylePane.java -text +designer_chart/src/com/fr/design/chart/axis/BinaryChartStyleAxisPane.java -text +designer_chart/src/com/fr/design/chart/axis/ChartAlertLinePane.java -text +designer_chart/src/com/fr/design/chart/axis/ChartAlertValueInTopBottomPane.java -text +designer_chart/src/com/fr/design/chart/axis/ChartAlertValuePane.java -text +designer_chart/src/com/fr/design/chart/axis/ChartStyleAxisPane.java -text +designer_chart/src/com/fr/design/chart/axis/CustomChartStyleAxisPane.java -text +designer_chart/src/com/fr/design/chart/axis/GanntChartStyleAxisPane.java -text +designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java -text +designer_chart/src/com/fr/design/chart/axis/RadarChartStyleAxisPane.java -text +designer_chart/src/com/fr/design/chart/axis/TernaryChartStyleAxisPane.java -text +designer_chart/src/com/fr/design/chart/axis/ValueChartStyleAxisPane.java -text +designer_chart/src/com/fr/design/chart/axis/XYChartStyleAxisPane.java -text +designer_chart/src/com/fr/design/chart/comp/BorderAttriPane.java -text +designer_chart/src/com/fr/design/chart/demo/GlyphDemo.java -text +designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java -text +designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java -text +designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java -text +designer_chart/src/com/fr/design/chart/gui/ActiveGlyphFactory.java -text +designer_chart/src/com/fr/design/chart/gui/ChartComponent.java -text +designer_chart/src/com/fr/design/chart/gui/ChartWidgetOption.java -text +designer_chart/src/com/fr/design/chart/gui/active/ActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/AlertValueActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/AxisActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/CategoryAxisActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/ChartActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/DataLabelActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/DataSeriesActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/DataSheetActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/DateAxisActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/LegendActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/PlotActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/RadarAxisActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/RangeAxisActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/TextActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/TrendLineActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/ValueAxisActiveGlyph.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/ChartComponentAction.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/SetAnalysisLineStyleAction.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/SetAxisStyleAction.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/SetChartStyleAciton.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/SetDataLabelStyleAction.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSeriesAttrAction.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSheetAction.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/SetLegendStyleAction.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/SetPlotStyleAction.java -text +designer_chart/src/com/fr/design/chart/gui/active/action/SetTitleStyleAction.java -text +designer_chart/src/com/fr/design/chart/javascript/ChartEmailPane.java -text +designer_chart/src/com/fr/design/chart/report/GisMapDataPane.java -text +designer_chart/src/com/fr/design/chart/report/GisMapDataPane4Chart.java -text +designer_chart/src/com/fr/design/chart/report/GisMapReportDataContentPane.java -text +designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java -text +designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane4Chart.java -text +designer_chart/src/com/fr/design/chart/report/MapCubeDataPane.java -text +designer_chart/src/com/fr/design/chart/report/MapCubeDataPane4Chart.java -text +designer_chart/src/com/fr/design/chart/report/MapCubeLayerPane.java -text +designer_chart/src/com/fr/design/chart/report/MapCubeSetDataPane.java -text +designer_chart/src/com/fr/design/chart/report/MapDataPane.java -text +designer_chart/src/com/fr/design/chart/report/MapDataPane4Chart.java -text +designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane.java -text +designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane4Chart.java -text +designer_chart/src/com/fr/design/chart/report/MapMoreReportIndexPane.java -text +designer_chart/src/com/fr/design/chart/report/MapMoreTableIndexPane.java -text +designer_chart/src/com/fr/design/chart/report/MapReportCubeDataPane.java -text +designer_chart/src/com/fr/design/chart/report/MapReportDataSinglePane.java -text +designer_chart/src/com/fr/design/chart/report/MapReportEditor.java -text +designer_chart/src/com/fr/design/chart/report/MapReportRenderer.java -text +designer_chart/src/com/fr/design/chart/report/MapSinglePane.java -text +designer_chart/src/com/fr/design/chart/report/MapSinglePane4Chart.java -text +designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane.java -text +designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane4Chart.java -text +designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane.java -text +designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane4Chart.java -text +designer_chart/src/com/fr/design/chart/series/PlotSeries/AbstrctMapAttrEditPane.java -text +designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java -text +designer_chart/src/com/fr/design/chart/series/PlotSeries/MapDefiAreaNamePane.java -text +designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java -text +designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java -text +designer_chart/src/com/fr/design/chart/series/PlotSeries/MapSelectShape.java -text +designer_chart/src/com/fr/design/chart/series/PlotSeries/UIGroupExtensionPane.java -text +designer_chart/src/com/fr/design/chart/series/PlotStyle/ChartSelectDemoPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/BubblePlotChartConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPaneFactory.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/ConditionTrendLinePane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelContentsPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrCustomPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesCustomConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/GanttPlotChartConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAxisPositionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBackgroundPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderAttrPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelColorPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelContentsPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelLineStylePane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/LineMarkerTypePane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/MapPlotChartConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/PiePlotChartConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/TooltipContentsPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLineControlPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLinePane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/XYPlotChartConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/AreaDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar2DDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar3DDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/BubbleDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/GanttDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/LineDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MapDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MeterDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/PieDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RadarDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RangeDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/StockDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/XYDataLabelPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Area3DPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/AreaPlotDataSeriesCondtionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar2DTrendLineDSConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar3DPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BarPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BubblePlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4AreaConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarNoTrendLineConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarTrendLineConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4LineConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/DataSeriesConditionPaneFactory.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Donut2DPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkNorthPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/GanttPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/LinePlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MapPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MeterPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Pie3DPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/PiePlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/RadarPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/StockPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/XYScatterPlotDataSeriesConditionPane.java -text +designer_chart/src/com/fr/design/chartinterface/AreaIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/BarIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/BubbleIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/ColumnIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/CustomIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/DonutIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/FunnelIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/GanttIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/GisMapIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/LineIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/MapIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/MeterIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/PieIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/RadarIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/RangeIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/StockIndependentChartInterface.java -text +designer_chart/src/com/fr/design/chartinterface/XYScatterIndependentChartInterface.java -text +designer_chart/src/com/fr/design/gui/xcombox/ComboBoxUseEditor.java -text +designer_chart/src/com/fr/design/gui/xcombox/MarkerComboBox.java -text +designer_chart/src/com/fr/design/images/add.png -text +designer_chart/src/com/fr/design/images/chart.png -text +designer_chart/src/com/fr/design/images/copyjs.png -text +designer_chart/src/com/fr/design/images/del.png -text +designer_chart/src/com/fr/design/images/exportimg.png -text +designer_chart/src/com/fr/design/images/newchart_normal.png -text +designer_chart/src/com/fr/design/images/newchart_over.png -text +designer_chart/src/com/fr/design/images/newchart_press.png -text +designer_chart/src/com/fr/design/images/splash4Chart.png -text +designer_chart/src/com/fr/design/images/toolbar/area/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/area/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/area/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/area/1_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/area/1_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/area/1_over.png -text +designer_chart/src/com/fr/design/images/toolbar/area/2_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/area/2_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/area/2_over.png -text +designer_chart/src/com/fr/design/images/toolbar/area/3_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/area/3_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/area/3_over.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/1_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/1_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/1_over.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/2_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/2_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/2_over.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/3_gary.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/3_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/3_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/3_over.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/4_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/4_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/4_over.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/5_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/5_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/5_over.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/6_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/6_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/bar/6_over.png -text +designer_chart/src/com/fr/design/images/toolbar/border.png -text +designer_chart/src/com/fr/design/images/toolbar/bubble/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/bubble/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/bubble/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/column/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/column/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/column/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/column/1_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/column/1_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/column/1_over.png -text +designer_chart/src/com/fr/design/images/toolbar/column/2_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/column/2_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/column/2_over.png -text +designer_chart/src/com/fr/design/images/toolbar/column/3_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/column/3_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/column/3_over.png -text +designer_chart/src/com/fr/design/images/toolbar/column/4_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/column/4_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/column/4_over.png -text +designer_chart/src/com/fr/design/images/toolbar/column/5_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/column/5_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/column/5_over.png -text +designer_chart/src/com/fr/design/images/toolbar/column/6_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/column/6_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/column/6_over.png -text +designer_chart/src/com/fr/design/images/toolbar/custom/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/custom/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/custom/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/donut/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/donut/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/donut/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/donut/1_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/donut/1_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/donut/1_over.png -text +designer_chart/src/com/fr/design/images/toolbar/funnel/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/funnel/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/funnel/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/gantt/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/gantt/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/gantt/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/gis/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/gis/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/gis/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/gis/1_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/gis/1_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/gis/1_over.png -text +designer_chart/src/com/fr/design/images/toolbar/line/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/line/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/line/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/map/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/map/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/map/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/meter/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/meter/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/meter/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/meter/1_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/meter/1_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/meter/1_over.png -text +designer_chart/src/com/fr/design/images/toolbar/meter/2_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/meter/2_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/meter/2_over.png -text +designer_chart/src/com/fr/design/images/toolbar/pie/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/pie/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/pie/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/pie/1_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/pie/1_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/pie/1_over.png -text +designer_chart/src/com/fr/design/images/toolbar/radar/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/radar/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/radar/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/range/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/range/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/range/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/stock/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/stock/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/stock/0_over.png -text +designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_gray.png -text +designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_normal.png -text +designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_over.png -text +designer_chart/src/com/fr/design/mainframe/AbstractChartDataPane4Chart.java -text +designer_chart/src/com/fr/design/mainframe/AbstractMapPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/ChartAndWidgetPropertyPane.java -text +designer_chart/src/com/fr/design/mainframe/ChartArea.java -text +designer_chart/src/com/fr/design/mainframe/ChartDesigner.java -text +designer_chart/src/com/fr/design/mainframe/ChartDesignerPropertyPane.java -text +designer_chart/src/com/fr/design/mainframe/ChartDesignerUI.java -text +designer_chart/src/com/fr/design/mainframe/ChartPropertyPane.java -text +designer_chart/src/com/fr/design/mainframe/ChartToolBarPane.java -text +designer_chart/src/com/fr/design/mainframe/ChartUndoState.java -text +designer_chart/src/com/fr/design/mainframe/DesignerFrame4Chart.java -text +designer_chart/src/com/fr/design/mainframe/GisMapPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/JChart.java -text +designer_chart/src/com/fr/design/mainframe/MapArrayPane.java -text +designer_chart/src/com/fr/design/mainframe/MapEditPane.java -text +designer_chart/src/com/fr/design/mainframe/MapPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java -text +designer_chart/src/com/fr/design/mainframe/PlotToolBarFactory.java -text +designer_chart/src/com/fr/design/mainframe/TargetComponentContainer.java -text +designer_chart/src/com/fr/design/mainframe/ToolTip4Chart.java -text +designer_chart/src/com/fr/design/mainframe/actions/AbstractExportAction4JChart.java -text +designer_chart/src/com/fr/design/mainframe/actions/ChartDownLoadWorker.java -text +designer_chart/src/com/fr/design/mainframe/actions/ChartFeedBackAciton.java -text +designer_chart/src/com/fr/design/mainframe/actions/ChartUpdateAction.java -text +designer_chart/src/com/fr/design/mainframe/actions/ChartWebAction.java -text +designer_chart/src/com/fr/design/mainframe/actions/ExcelExportAction4Chart.java -text +designer_chart/src/com/fr/design/mainframe/actions/JChartAction.java -text +designer_chart/src/com/fr/design/mainframe/actions/NewChartAction.java -text +designer_chart/src/com/fr/design/mainframe/actions/OpenChartAction.java -text +designer_chart/src/com/fr/design/mainframe/actions/PDFExportAction4Chart.java -text +designer_chart/src/com/fr/design/mainframe/actions/PNGExportAction4Chart.java -text +designer_chart/src/com/fr/design/mainframe/actions/UpdateOnlineAction.java -text +designer_chart/src/com/fr/design/mainframe/actions/UpdateVersion.java -text +designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/AttributeChange.java -text +designer_chart/src/com/fr/design/mainframe/chart/ChartDesignEditPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/PaneTitleConstants.java -text +designer_chart/src/com/fr/design/mainframe/chart/UpdateOnLinePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerOtherPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/ChartOtherPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/ChartStylePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/StylePane4Chart.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/CalculateComboBox.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDesignDataLoadPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/DataContentsPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/EmbbeddDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/ExcelDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/ImportSetChartDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/JSONDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/PresentComboBox.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/GanttPlotReportDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/PiePlotReportDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/StockPlotReportDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/XYScatterPlotReportDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/Factory4TableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/PiePlotTableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/StockPlotTableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/XYScatterPlotTableDataContentPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartConditionAttrPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerConditionAttrPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartSwitchPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/other/TimeSwitchPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/AbstractChartTabPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAccColorPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisLabelPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisLineStylePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisTitleNoFormulaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisTitlePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartAxisValueTypePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartBackgroundNoImagePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartBackgroundPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartBeautyPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartBorderPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDataPointLabel4GisPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDataPointLabel4MapPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartFillStylePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartPreFillStylePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrNoColorPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrNoFontSizePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/DateAxisValuePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/analysisline/ChartAnalysisLinePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/ChartAreaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/ChartAxisAreaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/ChartPlotAreaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/ChartWholeAreaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/DefaultAxisAreaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/Plot3DAxisAreaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/area/RadarAxisAreaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartAxisNoFormulaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartAxisPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartAxisUsePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryNoFormulaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartCategoryPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartPercentValueNoFormulaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartPercentValuePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartRadarPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartSecondValueNoFormulaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartSecondValuePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValueNoFormulaPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/datalabel/ChartDataLabelPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/datalabel/ChartLabelFontPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/datasheet/ChartDatasheetPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/legend/AutoSelectedPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/legend/ChartLegendPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/AbstractPlotSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Area3DSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/AreaSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Bar2DSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Bar3DSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/BubbleSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneWithFormula.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedBar2DSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedBubbleSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CombinedPie2DSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CustomDefaultSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CustomSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/CustomTypeConditionSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Donut2DSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/FunnelSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/LineSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MapColorPickerPaneWithFormula.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MapSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MapSeriesPane4ChartDesigner.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MeterSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/MeterSeriesPane4ChartDesigner.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Pie2DSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/Pie3DSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/RadarSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/RangeSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/SeriesPane4ChartDesigner.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/StockSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane4Map.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/XYScatterSeriesPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/title/ChartTitlePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/style/title/ChartTitlePaneNoFormula.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/BarPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/BarPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/BubblePlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/BubblePlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartDesignerImagePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/ChartTabPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/ColumnPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/ColumnPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/CustomPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/CustomPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/FunnelPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/GanttPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/GanttPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/GisMapPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/LinePlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/LinePlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/MeterPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/MeterPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/PlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/RadarPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/RadarPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/RangePlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/RangePlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/StockPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/StockPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/UserDefinedChartTypePane.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/XYSCatterPlotPane4ToolBar.java -text +designer_chart/src/com/fr/design/mainframe/chart/gui/type/XYScatterPlotPane.java -text +designer_chart/src/com/fr/design/mainframe/exporter/ExcelExporter4Chart.java -text +designer_chart/src/com/fr/design/mainframe/exporter/Exporter4Chart.java -text +designer_chart/src/com/fr/design/mainframe/exporter/ImageExporter4Chart.java -text +designer_chart/src/com/fr/design/mainframe/exporter/PdfExporter4Chart.java -text +designer_chart/src/com/fr/design/module/ChartDesignerModule.java -text +designer_chart/src/com/fr/design/module/ChartHyperlinkGroup.java -text +designer_chart/src/com/fr/design/module/ChartPreStyleAction.java -text +designer_chart/src/com/fr/design/module/ChartPreStyleManagerPane.java -text +designer_chart/src/com/fr/design/module/ChartPreStylePane.java -text +designer_chart/src/com/fr/design/module/ChartStartModule.java -text +designer_chart/src/com/fr/design/module/FormHyperlinkGroup.java -text +designer_chart/src/com/fr/file/FILEChooserPane4Chart.java -text +designer_chart/src/com/fr/start/ChartSplashPane.java -text +designer_chart/src/com/fr/start/Designer4Chart.java -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..d61aea28b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +designer_chart/bin diff --git a/designer_chart/.classpath b/designer_chart/.classpath new file mode 100644 index 000000000..9cb17f77c --- /dev/null +++ b/designer_chart/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/designer_chart/.project b/designer_chart/.project new file mode 100644 index 000000000..b539f4c45 --- /dev/null +++ b/designer_chart/.project @@ -0,0 +1 @@ + designer_chart org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature \ No newline at end of file diff --git a/designer_chart/designer_chart.iml b/designer_chart/designer_chart.iml new file mode 100644 index 000000000..cde6262d7 --- /dev/null +++ b/designer_chart/designer_chart.iml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/ChartEnvManager.java b/designer_chart/src/com/fr/design/ChartEnvManager.java new file mode 100644 index 000000000..0f32ed408 --- /dev/null +++ b/designer_chart/src/com/fr/design/ChartEnvManager.java @@ -0,0 +1,188 @@ +package com.fr.design; + +import com.fr.base.FRContext; +import com.fr.base.Utils; +import com.fr.general.ComparatorUtils; +import com.fr.general.DateUtils; +import com.fr.general.IOUtils; +import com.fr.stable.ProductConstants; +import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; +import com.fr.stable.project.ProjectConstants; +import com.fr.stable.xml.*; + +import java.io.*; +import java.util.Date; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class ChartEnvManager implements XMLReadable, XMLWriter { + public static final String ACTIVE_KEY = "RXWY-A25421-K58F47757-7373"; + private static final int ONE_MONTH_SECOND = 30*24*60*60;//30天,以秒为单位 + private static final int MS =1000; + + boolean isPushUpdateAuto = true; //是否自动推送更新 + + private String activationKey = null; + + private static ChartEnvManager chartEnvManager; + + private Date lastCheckDate; + + private long checkTimeSpan =ONE_MONTH_SECOND; + + /** + * DesignerEnvManager. + */ + public static ChartEnvManager getEnvManager() { + if(chartEnvManager == null){ + chartEnvManager = new ChartEnvManager(); + try { + XMLTools.readFileXML(chartEnvManager, chartEnvManager.getDesignerEnvFile()); + }catch (Exception exp){ + FRContext.getLogger().error(exp.getMessage(), exp); + } + } + return chartEnvManager; + } + + private static File envFile = new File(ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "ChartEnv.xml"); + + private File getEnvFile() { + return envFile; + } + + + private File getDesignerEnvFile() { + File envFile = getEnvFile(); + if (!envFile.exists()) { + createEnvFile(envFile); + } + + return envFile; + } + + + private void createEnvFile(File envFile) { + try { + FileWriter fileWriter = new FileWriter(envFile); + StringReader stringReader = new StringReader(""); + Utils.copyCharTo(stringReader, fileWriter); + stringReader.close(); + fileWriter.close(); + } catch (IOException e) { + FRContext.getLogger().error(e.getMessage(), e); + } + } + + /** + * 返回激活码 + */ + public String getActivationKey() { + return activationKey; + } + + /** + * 设置激活码 + */ + public void setActivationKey(String activationKey) { + this.activationKey = activationKey; + } + + public void setPushUpdateAuto(boolean isPushUpdateAuto){ + this.isPushUpdateAuto = isPushUpdateAuto; + if(!this.isPushUpdateAuto){ + lastCheckDate = new Date(); + } + } + + /** + * 是否设置了自动推送图表设计器在线更行 + * @return 是则返回true + */ + public boolean isPushUpdateAuto(){ + return isPushUpdateAuto; + } + + /** + *在设置不自动推送在线更新的情况下,每30天自动检测一次 + * @return 是否需要检测 + */ + public boolean isOverOneMonth(){ + return !isPushUpdateAuto && ((new Date().getTime()-lastCheckDate.getTime())/MS>=checkTimeSpan); + } + + /*** + * 重新设置最新检查的日期 + */ + public void resetCheckDate(){ + this.lastCheckDate = new Date(); + } + + @Override + public void readXML(XMLableReader reader) { + if (reader.isChildNode()) { + String name = reader.getTagName(); + if(ComparatorUtils.equals(name,"ChartAttributes")){ + activationKey = reader.getAttrAsString("activationKey",null); + isPushUpdateAuto = reader.getAttrAsBoolean("isPushUpdateAuto",true); + checkTimeSpan = reader.getAttrAsLong("checkTimeSpan",ONE_MONTH_SECOND); + String date = reader.getAttrAsString("lastCheckDate", null); + if(!StringUtils.isEmpty(date)){ + lastCheckDate = DateUtils.string2Date(date,true); + } else { + lastCheckDate = new Date(); + } + } + } + + } + + @Override + public void writeXML(XMLPrintWriter writer) { + writer.startTAG("ChartDesigner"); + writer.startTAG("ChartAttributes").attr("activationKey",activationKey) + .attr("isPushUpdateAuto",isPushUpdateAuto) + .attr("checkTimeSpan",checkTimeSpan) + .attr("lastCheckDate", DateUtils.getDate2LStr(lastCheckDate)) + .end(); + writer.end(); + } + + /** + * 保存设计器的配置文件, 该文件不在env的resource目录下 + * 而是在Consts.getEnvHome() + File.separator + Consts.APP_NAME + * + * + * @date 2014-9-29-上午11:04:23 + */ + public void saveXMLFile() { + File xmlFile = this.getDesignerEnvFile(); + if (xmlFile == null) { + return; + } + if (!xmlFile.getParentFile().exists()) {//建立目录. + StableUtils.mkdirs(xmlFile.getParentFile()); + } + + String tempName = xmlFile.getName() + ProjectConstants.TEMP_SUFFIX; + File tempFile = new File(xmlFile.getParentFile(), tempName); + + writeTempFile(tempFile); + IOUtils.renameTo(tempFile, xmlFile); + } + + private void writeTempFile(File tempFile){ + try{ + OutputStream fout = new FileOutputStream(tempFile); + XMLTools.writeOutputStreamXML(this, fout); + fout.flush(); + fout.close(); + }catch (Exception e) { + FRContext.getLogger().error(e.getMessage()); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java new file mode 100644 index 000000000..a4947058d --- /dev/null +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -0,0 +1,211 @@ +package com.fr.design; + +import com.fr.chart.base.ChartConstants; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.chart.fun.IndependentChartUIProvider; +import com.fr.design.chartinterface.*; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.file.XMLFileManager; +import com.fr.general.FRLogger; +import com.fr.general.GeneralContext; +import com.fr.plugin.PluginCollector; +import com.fr.plugin.PluginLicenseManager; +import com.fr.plugin.PluginMessage; +import com.fr.stable.EnvChangedListener; +import com.fr.stable.StringUtils; +import com.fr.stable.fun.Authorize; +import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; +import com.fr.stable.plugin.PluginSimplify; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLableReader; + +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * Created by eason on 14/12/29. + */ +public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraChartDesignClassManagerProvider { + + private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); + + private static ChartTypeInterfaceManager classManager = null; + + private static LinkedHashMap chartTypeInterfaces = new LinkedHashMap(); + + public synchronized static ChartTypeInterfaceManager getInstance() { + if (classManager == null) { + classManager = new ChartTypeInterfaceManager(); + chartTypeInterfaces.clear(); + classManager.readDefault(); + classManager.readXMLFile(); + } + return classManager; + } + + static { + GeneralContext.addEnvChangedListener(new EnvChangedListener() { + public void envChanged() { + ChartTypeInterfaceManager.envChanged(); + } + }); + } + + private synchronized static void envChanged() { + classManager = null; + } + + private static void readDefault() { + + chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.PIE_CHART, new PieIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.AREA_CHART, new AreaIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.SCATTER_CHART, new XYScatterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.BUBBLE_CHART, new BubbleIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RADAR_CHART, new RadarIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.STOCK_CHART, new StockIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.METER_CHART, new MeterIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.RANGE_CHART, new RangeIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.CUSTOM_CHART, new CustomIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GANTT_CHART, new GanttIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.DONUT_CHART, new DonutIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); + chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); + + + } + + public String getIconPath(String plotID) { + return chartTypeInterfaces.get(plotID).getIconPath(); + } + + /** + * 增加界面接口定义 + * + * @param className 类名 + * @param plotID 标志ID + */ + public void addChartInterface(String className, String plotID, PluginSimplify simplify) { + if (StringUtils.isNotBlank(className)) { + try { + Class clazz = loader.loadClass(className); + Authorize authorize = clazz.getAnnotation(Authorize.class); + if (authorize != null) { + PluginLicenseManager.getInstance().registerPaid(authorize, simplify); + } + IndependentChartUIProvider provider = (IndependentChartUIProvider) clazz.newInstance(); + if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName()) || !containsChart(plotID)) { + PluginMessage.remindUpdate(className); + } else if (!chartTypeInterfaces.containsKey(plotID)) { + chartTypeInterfaces.put(plotID, provider); + } + } catch (ClassNotFoundException e) { + FRLogger.getLogger().error("class not found:" + e.getMessage()); + } catch (IllegalAccessException | InstantiationException e) { + FRLogger.getLogger().error("object create error:" + e.getMessage()); + } + } + } + + //UI对应的chart如果没有加载,UI也不必加进去了 + private boolean containsChart(String plotID) { + return ChartTypeManager.getInstance().containsPlot(plotID); + } + + /** + * 把所有的pane加到list里 + * + * @param paneList pane容器 + */ + public void addPlotTypePaneList(List> paneList) { + + Iterator iterator = chartTypeInterfaces.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = (Map.Entry) iterator.next(); + IndependentChartUIProvider creator = (IndependentChartUIProvider) entry.getValue(); + paneList.add(creator.getPlotTypePane()); + } + + } + + public AbstractChartAttrPane[] getAttrPaneArray(String plotID, AttributeChangeListener listener) { + return chartTypeInterfaces.get(plotID).getAttrPaneArray(listener); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { + return chartTypeInterfaces.get(plot.getPlotID()).getTableDataSourcePane(plot, parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { + return chartTypeInterfaces.get(plot.getPlotID()).getReportDataSourcePane(plot, parent); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot) { + return chartTypeInterfaces.get(plot.getPlotID()).getPlotConditionPane(plot); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot) { + return chartTypeInterfaces.get(plot.getPlotID()).getPlotSeriesPane(parent, plot); + } + + /** + * 是否使用默认的界面,为了避免界面来回切换 + * + * @param plotID 序号 + * @return 是否使用默认的界面 + */ + public boolean isUseDefaultPane(String plotID) { + + if (chartTypeInterfaces.containsKey(plotID)) { + return chartTypeInterfaces.get(plotID).isUseDefaultPane(); + } + + return true; + } + + public void readXML(XMLableReader reader) { + readXML(reader, null, PluginSimplify.NULL); + } + + @Override + public void readXML(XMLableReader reader, List extraChartDesignInterfaceList, PluginSimplify simplify) { + if (reader.isChildNode()) { + String tagName = reader.getTagName(); + if (extraChartDesignInterfaceList != null) { + extraChartDesignInterfaceList.add(tagName); + } + if (IndependentChartUIProvider.XML_TAG.equals(tagName)) { + addChartInterface(reader.getAttrAsString("class", ""), reader.getAttrAsString("plotID", ""), simplify); + } + } + } + + /** + * 文件名 + * + * @return 文件名 + */ + public String fileName() { + return "chart.xml"; + } + + @Override + public void writeXML(XMLPrintWriter writer) { + + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/ChartAxisFactory.java b/designer_chart/src/com/fr/design/chart/ChartAxisFactory.java new file mode 100644 index 000000000..52233bb6d --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/ChartAxisFactory.java @@ -0,0 +1,55 @@ +package com.fr.design.chart; + +import com.fr.base.FRContext; +import com.fr.chart.chartattr.Axis; +import com.fr.chart.chartattr.CategoryAxis; +import com.fr.chart.chartattr.RadarAxis; +import com.fr.chart.chartattr.ValueAxis; +import com.fr.design.mainframe.chart.gui.style.axis.*; +import com.fr.general.ComparatorUtils; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-6 + * Time : 上午11:19 + */ +public class ChartAxisFactory { + private static final String PERCENT = "Percent"; + private static final String SECOND = "Second"; + + private static Map> map = new HashMap>(); + + static { + map.put(ValueAxis.class.getName(), ChartValuePane.class); + map.put(RadarAxis.class.getName(), ChartRadarPane.class); + map.put(CategoryAxis.class.getName(), ChartCategoryPane.class); + map.put(ValueAxis.class.getName() + PERCENT, ChartPercentValuePane.class); + map.put(ValueAxis.class.getName() + SECOND, ChartSecondValuePane.class); + } + private ChartAxisFactory() { + + } + + public static ChartAxisUsePane createAxisStylePane(Axis axis, String axisType) { + String clsName = axis.getClass().getName(); + if (axis.isPercentage()) { + clsName += PERCENT; + } else if(ComparatorUtils.equals(axisType, "secondAxis")) { + clsName += SECOND; + } + Class cls = map.get(clsName); + try { + return cls.newInstance(); + } catch (InstantiationException e) { + FRContext.getLogger().error(e.getMessage(), e); + } catch (IllegalAccessException e) { + FRContext.getLogger().error(e.getMessage(), e); + } + return new ChartCategoryPane(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/ChartCommonWizardPane.java b/designer_chart/src/com/fr/design/chart/ChartCommonWizardPane.java new file mode 100644 index 000000000..2698398d0 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/ChartCommonWizardPane.java @@ -0,0 +1,22 @@ +package com.fr.design.chart; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; + +public abstract class ChartCommonWizardPane extends ChartWizardPane { + private static final long serialVersionUID = 2467967841657570498L; + + @Override + public void populate(ChartCollection cc) { + if (cc == null) { + return; + } + + populate(cc.getSelectedChart()); + } + + public abstract void populate(Chart chart); + + public abstract void update(Chart oldChart); + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/ChartComponentPane.java b/designer_chart/src/com/fr/design/chart/ChartComponentPane.java new file mode 100644 index 000000000..40a96f21c --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/ChartComponentPane.java @@ -0,0 +1,170 @@ +package com.fr.design.chart; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Insets; +import java.awt.Rectangle; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.JPanel; +import javax.swing.border.AbstractBorder; +import javax.swing.border.Border; + +import com.fr.stable.core.PropertyChangeAdapter; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.layout.FRGUIPaneFactory; + +/** + * 存放ChartComponent, 可调整大小的Pane. + */ +public class ChartComponentPane extends JPanel implements MouseMotionListener, MouseListener { + private static final long serialVersionUID = -77093070905580457L; + + // 给设计界面加一个边框,方便拖拽 + private static final int BORDER_STYLE = 10; + + private List listeners = new ArrayList(); + private List slisteners = new ArrayList(); + + private ChartComponent chartComponent; + + private boolean select = false; + + public ChartComponentPane(ChartComponent chartComponent) { + initComponents(chartComponent); + } + + private void initComponents(ChartComponent chartComponent) { + this.chartComponent = chartComponent; + this.chartComponent.setLocation(this.getLocation()); + + this.setBorder(designBorder); + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.chartComponent.addStopEditingListener(new PropertyChangeAdapter() { + @Override + public void propertyChange() { + stopEditing(); + } + }); + this.add(chartComponent); + + this.addMouseListener(this); + this.addMouseMotionListener(this); + } + + public void addSizeChangedListener(PropertyChangeAdapter l) { + slisteners.add(l); + } + + public void addStopListener(PropertyChangeAdapter l) { + listeners.add(l); + } + + private void stopEditing() { + fireChanged(listeners); + } + + private Border designBorder = new AbstractBorder() { + private static final long serialVersionUID = 1802897702350872754L; + + @Override + public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { + Color oldColor = g.getColor(); + g.setColor(new Color(157, 228, 245)); + for (int i = 0; i < BORDER_STYLE; i++) { + g.drawRect(x + i, y + i, width - i - i - 1, height - i - i - 1); + } + g.setColor(oldColor); + } + + @Override + public Insets getBorderInsets(Component c) { + return new Insets(0, 0, BORDER_STYLE, BORDER_STYLE); + } + }; + + @Override + public void mouseDragged(MouseEvent e) { + if (select) { + if (this.getCursor() == Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR)) { + this.setSize(e.getX(), getSize().height); + this.setPreferredSize(new Dimension(e.getX(), getSize().height)); + } else if (this.getCursor() == Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR)) { + this.setSize(getSize().width, e.getY()); + this.setPreferredSize(new Dimension(getSize().width, e.getY())); + } else if (this.getCursor() == Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR)) { + this.setSize(e.getX(), e.getY()); + this.setPreferredSize(new Dimension(e.getX(), e.getY())); + } + } + fireSizeChanged(); + super.repaint(); + } + + public void mouseMoved(MouseEvent e) { + Rectangle rect = this.getBounds(); + if (atCorner(e, rect)) { + setCursor(Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR)); + } else if (atBottomLine(e, rect)) { + setCursor(Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR)); + } else if (atRightLine(e, rect)) { + setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR)); + } else { + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + } + + private boolean atBottomLine(MouseEvent e, Rectangle rect) { + return e.getY() < rect.height && e.getY() > rect.height - BORDER_STYLE; + } + + private boolean atRightLine(MouseEvent e, Rectangle rect) { + return e.getX() < rect.width && e.getX() > rect.width - BORDER_STYLE; + } + + private boolean atCorner(MouseEvent e, Rectangle rect) { + return atBottomLine(e, rect) && atRightLine(e, rect); + } + + public void mouseClicked(MouseEvent e) { + + } + + public void mouseEntered(MouseEvent e) { + + } + + public void mouseExited(MouseEvent e) { + + } + + public void mousePressed(MouseEvent e) { + if (this.getCursor() == Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR) + || this.getCursor() == Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR) + || this.getCursor() == Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR)) { + this.select = true; + } + } + + public void mouseReleased(MouseEvent e) { + this.select = false; + this.repaint(); + } + + private void fireSizeChanged() { + fireChanged(slisteners); + } + + private void fireChanged(List ls) { + for (int len = ls.size(), i = len; i > 0; i--) { + ls.get(i - 1).propertyChange(); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/ChartControlPane.java b/designer_chart/src/com/fr/design/chart/ChartControlPane.java new file mode 100644 index 000000000..390d780fb --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/ChartControlPane.java @@ -0,0 +1,128 @@ +package com.fr.design.chart; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.JControlPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; +import com.fr.general.NameObject; +import com.fr.stable.Nameable; + +import java.awt.*; +import java.util.HashMap; + +/** + * 管理图表类型Pane + * @author kunsnat: ChartComponent移出. + */ +public class ChartControlPane extends JControlPane { + private static final long serialVersionUID = 7336270815128413184L; + + public ChartControlPane() { + super(); + // 重新设定大小. 因为JControlPane默认的(450,450) 不适合图表这边 @ChartSize +// this.setPreferredSize(new Dimension(770, 520)); + } + + @Override + public NameableCreator[] createNameableCreators() { + return new NameableCreator[] { + new NameObjectCreator(Inter.getLocText("Chart"), Chart.class, ChartTypeUpdatePane.class) + }; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("Chart-Manage_Chart_Type"); + } + + public void populate(ChartCollection cc) { + if(cc == null)return; + + NameObject[] nameObjects = new NameObject[cc.getChartCount()]; + for (int i = 0; i < nameObjects.length; i++) { + nameObjects[i] = new NameObject(cc.getChartName(i), cc.getChart(i)); + } + + populate(nameObjects); + // kunsnat: 选中当前图表选中的name + String chartSelectedName = cc.getChartName(cc.getSelectedIndex() < cc.getChartCount() ? cc.getSelectedIndex() : 0); + setSelectedName(chartSelectedName); + } + + public void update(ChartCollection cc) { + HashMap namesChart = new HashMap();// 暂存判断是否有必要更新 + for(int i = 0; i < cc.getChartCount(); i++) { + try { + namesChart.put(cc.getChartName(i), cc.getChart(i).clone()); + } catch (CloneNotSupportedException e) { + + } + } + + Nameable[] nameables = update(); + if (nameables.length == 0 || cc == null) { + return; + } + + cc.removeAllNameObject(); + String select = getSelectedName(); + for (int i = 0; i < nameables.length; i++) { + if (nameables[i] instanceof NameObject && ((NameObject)nameables[i]).getObject() instanceof Chart) { + NameObject no = (NameObject)nameables[i]; + + String name = no.getName(); + Chart chart = (Chart)no.getObject(); + if(namesChart.containsKey(name)) { + Chart tmpChart = (Chart)namesChart.get(name); + if(chart.getPlot() != null && tmpChart.getPlot() != null + && chart.getPlot().match4GUI(tmpChart.getPlot())) { + chart = tmpChart;// 代替之前做过编辑的Chart + } + } + cc.addNamedChart(name, chart); + if(no.getName().equals(select)) { + cc.setSelectedIndex(i); + } + } + } + } + + /* + * alex:继承UpdatePane的ChartTypePane + */ + public static class ChartTypeUpdatePane extends BasicBeanPane { + private static final long serialVersionUID = -7058348930816218415L; + private Chart editing; + + private ChartTypePane typePane; + + public ChartTypeUpdatePane() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + typePane = new ChartTypePane(); + this.add(typePane, BorderLayout.CENTER); + } + + @Override + protected String title4PopupWindow() { + return "Chart Type"; + } + + @Override + public void populateBean(Chart ob) { + editing = ob; + typePane.populate(ob); + } + + @Override + public Chart updateBean() { + typePane.update(editing); + + return editing; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/ChartDialog.java b/designer_chart/src/com/fr/design/chart/ChartDialog.java new file mode 100644 index 000000000..d4f3b4781 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/ChartDialog.java @@ -0,0 +1,102 @@ +package com.fr.design.chart; + +import java.awt.BorderLayout; +import java.awt.Dialog; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JPanel; + +import com.fr.base.chart.BaseChartCollection; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.gui.chart.MiddleChartDialog; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.dialog.BasicDialog; +import com.fr.general.Inter; +import com.fr.design.utils.gui.GUICoreUtils; + +/** + * 封装一层 图表新建的对话框, 配合属性表确定: 先单独只要一种图表类型的对话框. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-1-7 下午07:29:15 + */ +public class ChartDialog extends MiddleChartDialog { + + private BaseChartCollection cc; + + private UIButton ok; + private UIButton cancel; + + public ChartDialog(Frame owner) { + super(owner); + initComponent(); + } + + public ChartDialog(Dialog owner) { + super(owner); + initComponent(); + } + + private void initComponent() { + this.setLayout(new BorderLayout()); + final ChartTypePane chartTypePane = new ChartTypePane(); + setTitle(Inter.getLocText("M-Popup_ChartType")); + + this.applyClosingAction(); + this.applyEscapeAction(); + this.setBasicDialogSize(BasicDialog.DEFAULT); + this.add(chartTypePane, BorderLayout.CENTER); + + JPanel buttonPane = new JPanel(); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + + this.add(buttonPane, BorderLayout.SOUTH); + + ok = new UIButton(Inter.getLocText("OK")); + cancel = new UIButton(Inter.getLocText("Cancel")); + + buttonPane.add(ok); + buttonPane.add(cancel); + + ok.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + chartTypePane.update((ChartCollection)cc); + doOK(); + } + }); + + cancel.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + doCancel(); + } + }); + + GUICoreUtils.setWindowCenter(getOwner(), this); + } + + /** + * 不处理 + */ + public void checkValid() throws Exception { + + } + + /** + * 更新新建的图表 ChartCollection + */ + public void populate(BaseChartCollection cc) { + if (cc == null) { + return; + } + this.cc = cc; + } + + /** + * 返回当前正在编辑的图表ChartCollection + */ + public BaseChartCollection getChartCollection() { + return this.cc; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/ChartPlotFactory.java b/designer_chart/src/com/fr/design/chart/ChartPlotFactory.java new file mode 100644 index 000000000..48e018a59 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/ChartPlotFactory.java @@ -0,0 +1,132 @@ +package com.fr.design.chart; + +import com.fr.base.FRContext; +import com.fr.chart.chartattr.*; +import com.fr.design.chart.axis.*; +import com.fr.design.chart.series.SeriesCondition.dlp.*; +import com.fr.design.mainframe.chart.gui.style.axis.*; + +import java.lang.reflect.Constructor; +import java.util.HashMap; +import java.util.Map; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-2 + * Time : 上午11:27 + */ +public class ChartPlotFactory { + + private static Map map = new HashMap(); + + private static Map axisPane = new HashMap(){ + { + put(ChartValuePane.class.getName(), ChartValueNoFormulaPane.class); + put(ChartSecondValuePane.class.getName(), ChartSecondValueNoFormulaPane.class); + put(ChartPercentValuePane.class.getName(), ChartPercentValueNoFormulaPane.class); + put(ChartCategoryPane.class.getName(), ChartCategoryNoFormulaPane.class); + } + }; + + static { + map.put(AreaPlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(AreaDataLabelPane.class)); + map.put(Area3DPlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(AreaDataLabelPane.class)); + map.put(Bar2DPlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(Bar2DDataLabelPane.class)); + map.put(Bar3DPlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(Bar2DDataLabelPane.class)); + map.put(BubblePlot.class.getName(), new FactoryObject() + .setAxisPaneCls(XYChartStyleAxisPane.class) + .setDataLabelPaneClass(BubbleDataLabelPane.class)); + map.put(CustomPlot.class.getName(), new FactoryObject() + .setAxisPaneCls(CustomChartStyleAxisPane.class) + .setDataLabelPaneClass(Bar2DDataLabelPane.class)); + map.put(GanttPlot.class.getName(), new FactoryObject() + .setAxisPaneCls(GanntChartStyleAxisPane.class)); + map.put(LinePlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(LineDataLabelPane.class)); + map.put(MapPlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(MapDataLabelPane.class)); + map.put(MeterBluePlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(MeterDataLabelPane.class)); + map.put(MeterPlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(MeterDataLabelPane.class)); + map.put(PiePlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(PieDataLabelPane.class)); + map.put(Pie3DPlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(PieDataLabelPane.class)); + map.put(RadarPlot.class.getName(), new FactoryObject() + .setAxisPaneCls(RadarChartStyleAxisPane.class) + .setDataLabelPaneClass(RadarDataLabelPane.class)); + map.put(StockPlot.class.getName(), new FactoryObject() + .setAxisPaneCls(TernaryChartStyleAxisPane.class) + .setDataLabelPaneClass(StockDataLabelPane.class)); + map.put(RangePlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(RangeDataLabelPane.class) + .setAxisPaneCls(ValueChartStyleAxisPane.class)); + map.put(XYScatterPlot.class.getName(), new FactoryObject() + .setAxisPaneCls(XYChartStyleAxisPane.class) + .setDataLabelPaneClass(XYDataLabelPane.class)); + map.put(FunnelPlot.class.getName(), new FactoryObject() + .setDataLabelPaneClass(PieDataLabelPane.class)); + } + + private ChartPlotFactory() { + + } + + /** + * 创建对应的坐标轴界面 + * @param plot plot类型 + * @return 返回坐标轴界面 + */ + public static ChartStyleAxisPane createChartStyleAxisPaneByPlot(Plot plot) { + FactoryObject factoryObject = map.get(plot.getClass().getName()); + if (factoryObject != null && factoryObject.getAxisPaneClass() != null) { + try { + Constructor c = factoryObject.getAxisPaneClass().getConstructor(Plot.class); + return c.newInstance(plot); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + } + return new BinaryChartStyleAxisPane(plot); + } + + /** + * 创建对应的标签Plot + * @param plotClass plot的类 + * @return 对应的标签界面 + */ + public static DataLabelPane createDataLabelPane4Plot(Class plotClass) { + FactoryObject factoryObject = map.get(plotClass.getName()); + if (factoryObject != null && factoryObject.getDataLabelPaneClass() != null) { + try { + Constructor c = factoryObject.getDataLabelPaneClass().getConstructor(); + return (DataLabelPane) c.newInstance(); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + } + return new DataLabelPane(); + } + + public static ChartAxisUsePane getNoFormulaPane(ChartAxisUsePane pane){ + Class aClass = axisPane.get(pane.getClass().getName()); + if(aClass != null){ + try { + Constructor c = aClass.getConstructor(); + return (ChartAxisUsePane) c.newInstance(); + }catch (Exception e){ + FRContext.getLogger().error(e.getMessage(), e); + } + } + + return pane; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/ChartSwingUtils.java b/designer_chart/src/com/fr/design/chart/ChartSwingUtils.java new file mode 100644 index 000000000..0f60814cc --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/ChartSwingUtils.java @@ -0,0 +1,76 @@ +package com.fr.design.chart; + +import com.fr.base.Formula; +import com.fr.base.Utils; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.formula.FormulaFactory; +import com.fr.design.formula.UIFormula; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; + +import javax.swing.*; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +/** + * 这里打算是放一些图表用的界面控件的. + */ +public class ChartSwingUtils { + + + public static void addListener(final UICheckBox box, final UITextField textField) { + textField.addMouseListener(new MouseAdapter() { + public void mousePressed(MouseEvent e) { + if (box.isSelected()) { + showFormulaPane(textField, null); + } + } + }); + textField.addKeyListener(new KeyAdapter() { + public void keyTyped(KeyEvent e) { + if(box.isSelected()) { + e.consume(); + showFormulaPane(textField, null); + } + } + }); + } + + public static UITextField createFormulaUITextField(final OKListener l) { + final UITextField textField = new UITextField(); + textField.addMouseListener(new MouseAdapter() { + public void mousePressed(MouseEvent e) { + showFormulaPane(textField, l); + } + }); + textField.addKeyListener(new KeyAdapter() { + public void keyTyped(KeyEvent e) { + e.consume(); + showFormulaPane(textField, l); + } + }); + + return textField; + } + + private static void showFormulaPane(final UITextField jTextField, final OKListener l) { + final UIFormula formulaPane = FormulaFactory.createFormulaPane(); + formulaPane.populate(new Formula(jTextField.getText())); + formulaPane.showLargeWindow(SwingUtilities.getWindowAncestor(FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane()), new DialogActionAdapter(){ + public void doOk() { + Formula formula = formulaPane.update(); + jTextField.setText(Utils.objectToString(formula)); + if (l != null) { + l.action(); + } + } + }).setVisible(true); + } + + public interface OKListener { + public void action(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/ChartTypePane.java b/designer_chart/src/com/fr/design/chart/ChartTypePane.java new file mode 100644 index 000000000..5a1e0ead4 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/ChartTypePane.java @@ -0,0 +1,186 @@ +package com.fr.design.chart; +/** + * the Pane of the Chart + * + */ + +import com.fr.base.FRContext; +import com.fr.chart.base.ChartInternationalNameContentBean; +import com.fr.chart.chartattr.*; +import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; +import com.fr.general.RegistEditionException; +import com.fr.general.VT4FR; +import com.fr.stable.StableUtils; + +import javax.swing.*; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; +import java.awt.*; + +public class ChartTypePane extends ChartCommonWizardPane { + private static final long serialVersionUID = -1175602484968520546L; + + private ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); + private Chart[][] charts4Icon = null; + + { + charts4Icon = new Chart[this.typeName.length][]; + for (int i = 0; i < this.typeName.length; i++) { + Chart[] rowCharts = ChartTypeManager.getInstance().getChartTypes(this.typeName[i].getPlotID()); + charts4Icon[i] = new Chart[1]; + for (int j = 0; j < 1; j++) { + try { + charts4Icon[i][j] = (Chart) rowCharts[j].clone(); + charts4Icon[i][j].setTitle(null); + if(charts4Icon[i][j].getPlot() != null){ + charts4Icon[i][j].getPlot().setLegend(null); + } + } catch (CloneNotSupportedException e) { + FRContext.getLogger().error(e.getMessage(), e); + } + } + } + } + + private JList mainTypeList = null; + private JList iconViewList = null; + private DefaultListModel iconListModel = null; + + public ChartTypePane() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + DefaultListModel defaultListModel = new DefaultListModel(); + mainTypeList = new JList(defaultListModel); + + for (int i = 0; i < typeName.length; i++) { + defaultListModel.insertElementAt(Inter.getLocText(typeName[i].getName()), i); + } + mainTypeList.addListSelectionListener(listSelectionListener); + + JScrollPane typeScrollPane = new JScrollPane(mainTypeList); + typeScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); + + iconViewList = new JList(); + + iconListModel = new DefaultListModel(); + iconViewList.setModel(iconListModel); + iconViewList.setVisibleRowCount(0); + iconViewList.setLayoutOrientation(JList.HORIZONTAL_WRAP); + iconViewList.setCellRenderer(iconCellRenderer); + + JScrollPane subListPane = new JScrollPane(iconViewList); + //iconPane.add + mainTypeList.setSelectedIndex(0); + + JSplitPane spane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, typeScrollPane, subListPane); + spane.setDividerLocation(120); + spane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("M-Popup_ChartType"))); + this.add(spane); + + iconViewList.setSelectedIndex(0); + } + + ListCellRenderer iconCellRenderer = new DefaultListCellRenderer() { + private static final long serialVersionUID = 956888843609479566L; + + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + this.setText(""); + if (value instanceof ChartIcon) { + this.setIcon((ChartIcon) value); + setHorizontalAlignment(UILabel.CENTER); + if (isSelected) { + // 深蓝色. + this.setBackground(new Color(57, 107, 181)); + } + ChartIcon chartIcon = (ChartIcon) value; + this.setBorder(GUICoreUtils.createTitledBorder(getChartName(chartIcon), null)); + } + return this; + } + }; + + protected ListSelectionListener listSelectionListener = new ListSelectionListener() { + public void valueChanged(ListSelectionEvent e) { + int main_index = mainTypeList.getSelectedIndex(); + Chart[] sub_charts = ChartTypePane.this.charts4Icon[main_index]; + ChartTypePane.this.iconListModel.clear(); + for (int i = 0; i < sub_charts.length; i++) { + ChartTypePane.this.iconListModel.addElement(new ChartIcon(sub_charts[i])); + } + iconViewList.setSelectedIndex(0); + } + }; + + public String getChartName(ChartIcon chartIcon) { + Chart chart = (Chart)chartIcon.getChart(); + return chart.getChartName(); + } + + public void populate(Chart chart) { + if (chart == null) { + return; + } + Plot plot = chart.getPlot(); + + int mainIndex = 0; + int subIndex = 0; + + for (int i = 0; i < typeName.length; i++) { + Chart [] charts = ChartTypeManager.getInstance().getChartTypes(typeName[i].getPlotID()); + for (int j = 0; j < charts.length; j++) { + if (charts[j].getPlot().match4GUI(plot)) { + mainIndex = i; + subIndex = j; + // 一旦匹配 立马中断 + break; + } + } + } + + mainTypeList.setSelectedIndex(mainIndex); + iconViewList.setSelectedIndex(subIndex); + } + + public void update(Chart oldChart) { + String plotID = typeName[mainTypeList.getSelectedIndex()].getPlotID(); + Chart chart = ChartTypeManager.getInstance().getChartTypes(plotID)[iconViewList.getSelectedIndex()]; + if(chart.getPlot() != null){ + if(chart.getPlot() instanceof MapPlot && !(VT4FR.isLicAvailable(StableUtils.getBytes()) && VT4FR.CHART_MAP.support())){ + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Chart-Map_Not_Supported")); + throw new RegistEditionException(VT4FR.CHART_MAP); + } + + if (chart.getPlot() != null) { + try { + oldChart.changePlotInNewType((Plot) chart.getPlot().clone()); + } catch (CloneNotSupportedException e) { + FRContext.getLogger().error(e.getMessage(), e); + } + } + } + } + + public void update(ChartCollection cc) { + if (cc == null) { + return; + } + + Chart chart4Update = cc.getSelectedChart(); + if (chart4Update == null) { + String plotID = typeName[mainTypeList.getSelectedIndex()].getPlotID(); + Chart chart = ChartTypeManager.getInstance().getChartTypes(plotID)[iconViewList.getSelectedIndex()]; + try{ + chart4Update = (Chart)chart.clone(); + cc.addChart(chart4Update); + }catch (CloneNotSupportedException ex){ + FRContext.getLogger().error(ex.getMessage(), ex); + } + } + + update(chart4Update); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/ChartWizardPane.java b/designer_chart/src/com/fr/design/chart/ChartWizardPane.java new file mode 100644 index 000000000..640ddecd0 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/ChartWizardPane.java @@ -0,0 +1,20 @@ +package com.fr.design.chart; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.dialog.JWizardPanel; + +/** +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2012-4-23 下午03:07:52 +* 类说明: 图表向导界面 + */ +public abstract class ChartWizardPane extends JWizardPanel { + + public ChartWizardPane() { + super(); + } + + public abstract void update(ChartCollection cc); + + public abstract void populate(ChartCollection cc); +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/FactoryObject.java b/designer_chart/src/com/fr/design/chart/FactoryObject.java new file mode 100644 index 000000000..2fb898f98 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/FactoryObject.java @@ -0,0 +1,40 @@ +package com.fr.design.chart; + +import com.fr.design.chart.axis.ChartStyleAxisPane; +import com.fr.design.chart.series.SeriesCondition.dlp.DataLabelPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-5 + * Time : 下午5:29 + */ +public class FactoryObject { + private Class axisPaneClass; + private Class dataLabelPaneClass; + + public FactoryObject() { + + } + + public Class getAxisPaneClass() { + return axisPaneClass; + } + + public FactoryObject setAxisPaneCls(Class axisPaneClass) { + this.axisPaneClass = axisPaneClass; + return this; + } + + public Class getDataLabelPaneClass() { + return dataLabelPaneClass; + } + + public FactoryObject setDataLabelPaneClass(Class dataLabelPaneClass) { + this.dataLabelPaneClass = dataLabelPaneClass; + return this; + } + + public static FactoryObject EMPTY = new FactoryObject(); +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/AxisStyleObject.java b/designer_chart/src/com/fr/design/chart/axis/AxisStyleObject.java new file mode 100644 index 000000000..dd70ec5f7 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/AxisStyleObject.java @@ -0,0 +1,29 @@ +package com.fr.design.chart.axis; + +import com.fr.design.mainframe.chart.gui.style.axis.ChartAxisUsePane; + + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-2 + * Time : 下午2:40 + */ +public class AxisStyleObject { + private String name; + private ChartAxisUsePane axisStylePane; + + public AxisStyleObject(String name, ChartAxisUsePane axisStylePane) { + this.name = name; + this.axisStylePane = axisStylePane; + } + + public String getName() { + return name; + } + + public ChartAxisUsePane getAxisStylePane() { + return axisStylePane; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/AxisStylePane.java b/designer_chart/src/com/fr/design/chart/axis/AxisStylePane.java new file mode 100644 index 000000000..94c413879 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/AxisStylePane.java @@ -0,0 +1,17 @@ +package com.fr.design.chart.axis; + +import com.fr.general.Inter; +import com.fr.design.dialog.BasicPane; + +public abstract class AxisStylePane extends BasicPane { + private static final long serialVersionUID = 8969849654720197617L; + + public abstract void populate(T axis); + + public abstract void update(T axis); + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Set", "ChartF-Axis", "Format"}); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/BinaryChartStyleAxisPane.java b/designer_chart/src/com/fr/design/chart/axis/BinaryChartStyleAxisPane.java new file mode 100644 index 000000000..6e80df06d --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/BinaryChartStyleAxisPane.java @@ -0,0 +1,63 @@ +package com.fr.design.chart.axis; + +import com.fr.chart.chartattr.Axis; +import com.fr.chart.chartattr.CategoryPlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.mainframe.chart.gui.style.axis.ChartAxisUsePane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartCategoryPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartPercentValuePane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartValuePane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-6 + * Time : 上午8:57 + */ +public class BinaryChartStyleAxisPane extends ChartStyleAxisPane { + + public BinaryChartStyleAxisPane(Plot plot) { + super(plot); + } + + /** + * 创建坐标轴样式面板 + * @param plot 图表 + * @return 面板 + */ + public final AxisStyleObject[] createAxisStyleObjects(Plot plot) { + return new AxisStyleObject[]{ + getXAxisPane(plot), + getYAxisPane(plot) + }; + } + + protected AxisStyleObject getXAxisPane(final Plot plot) { + //是否支持坐标轴轴样式 + return new AxisStyleObject(CATE_AXIS, new ChartCategoryPane(){ + protected boolean isSupportLineStyle(){ + return plot.isSupportAxisLineStyle(); + } + }); + } + + protected AxisStyleObject getYAxisPane(final Plot plot) { + Axis axis = plot.getyAxis(); + // 堆积情况时 + boolean isStack = false; + if(plot instanceof CategoryPlot) { + isStack = ((CategoryPlot)plot).isStacked(); + } + + ChartValuePane valuePane = new ChartValuePane(){ + protected boolean isSupportLineStyle(){ + return plot.isSupportAxisLineStyle(); + } + }; + boolean usePercentPane = axis.isPercentage() && isStack; + ChartAxisUsePane p = usePercentPane ? new ChartPercentValuePane() : valuePane; + + return new AxisStyleObject(VALUE_AXIS, p); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/ChartAlertLinePane.java b/designer_chart/src/com/fr/design/chart/axis/ChartAlertLinePane.java new file mode 100644 index 000000000..28a06e22a --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/ChartAlertLinePane.java @@ -0,0 +1,63 @@ +package com.fr.design.chart.axis; + +import com.fr.general.Inter; +import com.fr.general.NameObject; +import com.fr.stable.Nameable; +import com.fr.chart.chartattr.ChartAlertValue; +import com.fr.design.gui.controlpane.JControlPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; + +import java.util.ArrayList; +import java.util.List; + +public class ChartAlertLinePane extends JControlPane { + + public NameableCreator[] createNameableCreators() { + return new NameableCreator[]{ + new NameObjectCreator(Inter.getLocText("ChartF-Alert-Line"), + ChartAlertValue.class, ChartAlertValuePane.class) + }; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Edit", "ChartF-Alert-Line"}); + } + + public void populate(ChartAlertValue[] alertList) { + if (alertList == null) { + alertList = new ChartAlertValue[0]; + } + List nameObjectList = new ArrayList(); + + for (int i = 0; i < alertList.length; i++) { + ChartAlertValue value = alertList[i]; + nameObjectList.add(new NameObject(value.getAlertPaneSelectName(), value)); + } + + if (!nameObjectList.isEmpty()) { + populate(nameObjectList.toArray(new NameObject[nameObjectList.size()])); + } + } + + public ChartAlertValue[] updateAlertValues() { + Nameable[] res = update(); + + NameObject[] res_array = new NameObject[res.length]; + java.util.Arrays.asList(res).toArray(res_array); + + if (res_array.length < 1) { + return new ChartAlertValue[0]; + } + + List alertValueList = new ArrayList(); + for (int i = 0; i < res_array.length; i++) { + NameObject nameObject = res_array[i]; + ChartAlertValue chartAlertValue = (ChartAlertValue) nameObject.getObject(); + chartAlertValue.setAlertPaneSelectName(nameObject.getName()); + alertValueList.add(chartAlertValue); + } + return (ChartAlertValue[]) alertValueList.toArray(new ChartAlertValue[alertValueList.size()]); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/ChartAlertValueInTopBottomPane.java b/designer_chart/src/com/fr/design/chart/axis/ChartAlertValueInTopBottomPane.java new file mode 100644 index 000000000..f94968882 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/ChartAlertValueInTopBottomPane.java @@ -0,0 +1,20 @@ +package com.fr.design.chart.axis; + +import com.fr.general.Inter; + + +/** + * 警戒线 居上 居下界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-5-22 上午09:53:28 + */ +public class ChartAlertValueInTopBottomPane extends ChartAlertValuePane { + + protected String getLeftName() { + return Inter.getLocText("Chart_Alert_Bottom"); + } + + protected String getRightName() { + return Inter.getLocText("Chart_Alert_Top"); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/ChartAlertValuePane.java b/designer_chart/src/com/fr/design/chart/axis/ChartAlertValuePane.java new file mode 100644 index 000000000..c38d2eb73 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/ChartAlertValuePane.java @@ -0,0 +1,229 @@ +package com.fr.design.chart.axis; + +import com.fr.base.Formula; +import com.fr.base.Utils; +import com.fr.chart.chartattr.ChartAlertValue; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.formula.FormulaFactory; +import com.fr.design.formula.UIFormula; +import com.fr.design.gui.ibutton.UIRadioButton; +import com.fr.design.gui.icombobox.LineComboBox; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.AlphaPane; +import com.fr.design.style.FRFontPane; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.FRFont; +import com.fr.general.Inter; +import com.fr.stable.Constants; +import com.fr.stable.CoreConstants; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +/** + * 图表 坐标轴 警戒线值 编辑界面. (默认 位置居左居右) +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2013-5-22 上午09:49:54 + */ +public class ChartAlertValuePane extends BasicBeanPane { + private static final int DE_FONT = 9; + private static final double ALPH_PER = 100; + + private UITextField textField; + private LineComboBox lineCombo; + private ColorSelectBox colorBox; + private AlphaPane alphaPane; + + private UITextField contentField; + private UIComboBox fontNameBox; + private UIComboBox fontSizeBox; + + private UIRadioButton leftButton; + private UIRadioButton rightButton; + + public ChartAlertValuePane() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + JPanel pane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + this.add(pane, BorderLayout.CENTER); + + JPanel alertLinePane =FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + pane.add(alertLinePane); + + alertLinePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"ChartF-Alert-Line", "Set"}))); + + JPanel valuePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + alertLinePane.add(valuePane); + + valuePane.add(new UILabel(Inter.getLocText(new String[]{"ChartF_Alert", "Value"}) + ":")); + + textField = new UITextField(); + textField.setColumns(4); + valuePane.add(textField); + + textField.addMouseListener(new MouseAdapter() { + public void mousePressed(MouseEvent e) { + showFormulaPane(); + } + }); + + textField.addKeyListener(new KeyAdapter() { + public void keyTyped(KeyEvent e) { + e.consume(); + showFormulaPane(); + } + }); + + JPanel lineStylePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + alertLinePane.add(lineStylePane); + + lineStylePane.add(new UILabel(Inter.getLocText("Line-Style") + ":")); + lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART); + lineStylePane.add(lineCombo); + + JPanel lineColorPane =FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + alertLinePane.add(lineColorPane); + + lineColorPane.add(new UILabel(Inter.getLocText(new String[]{"ChartF-Alert-Line", "Color"}) + ":")); + colorBox = new ColorSelectBox(80); + lineColorPane.add(colorBox); + + alphaPane = new AlphaPane(); + alertLinePane.add(alphaPane); + + JPanel tipPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + pane.add(tipPane); + + tipPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Chart_Alert_Tip") + ":", null)); + + JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + tipPane.add(centerPane); + + fontNameBox = new UIComboBox(); + fontNameBox.setPreferredSize(new Dimension(80,20)); + + fontNameBox.addItem("SimSun"); // TODO 这边字体中没有在列表内 + String[] names = Utils.getAvailableFontFamilyNames4Report(); + for(int i = 0; i < names.length; i++) { + fontNameBox.addItem(names[i]); + } + + fontSizeBox = new UIComboBox(); + fontSizeBox.setPreferredSize(new Dimension(80,20)); + Integer[] sizes = FRFontPane.Font_Sizes; + for(int i = 0; i < sizes.length; i++) { + fontSizeBox.addItem(sizes[i]); + } + + double t = TableLayout.FILL; + double[] rowSize = {t, t, t, t, t}; + double[] columnSize = {0.1, 0.2, 0.5, 0.2}; + Component[][] components= { + {null, new UILabel(Inter.getLocText("Content") + ":"), contentField = new UITextField(3)}, + {null, new UILabel(Inter.getLocText("FRFont") + ":"), fontNameBox}, + {null, new UILabel(Inter.getLocText("FRFont-Size") + ":"), fontSizeBox}, + {null, new UILabel(Inter.getLocText("Layout") + ": "), leftButton = new UIRadioButton(getLeftName())}, + {null, null, rightButton = new UIRadioButton(getRightName())}, + + }; + JPanel tablePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + centerPane.add(tablePane); + + ButtonGroup bg = new ButtonGroup(); + bg.add(leftButton); + bg.add(rightButton); + + leftButton.setSelected(true); + } + + protected String getLeftName() {// 居左 居右 + return Inter.getLocText("Chart_Alert_Left"); + } + + protected String getRightName() { + return Inter.getLocText("Chart_Alert_Right"); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("ChartF-Alert-Line"); + } + + private void showFormulaPane() { + final UIFormula formulaPane = FormulaFactory.createFormulaPane(); + formulaPane.populate(new Formula(textField.getText())); + formulaPane.showLargeWindow(SwingUtilities.getWindowAncestor(ChartAlertValuePane.this), new DialogActionAdapter(){ + public void doOk() { + Formula formula = formulaPane.update(); + textField.setText(Utils.objectToString(formula)); + } + }).setVisible(true); + } + + @Override + public void populateBean(ChartAlertValue ob) { + //兼容以前设置的虚线 + if (ob.getLineStyle().getLineStyle() != Constants.LINE_NONE + && ob.getLineStyle().getLineStyle() != Constants.LINE_THIN + && ob.getLineStyle().getLineStyle() != Constants.LINE_MEDIUM + && ob.getLineStyle().getLineStyle() != Constants.LINE_THICK) { + ob.getLineStyle().setLineStyle(Constants.LINE_THIN); + } + textField.setText(Utils.objectToString(ob.getAlertValueFormula())); + lineCombo.setSelectedLineStyle(ob.getLineStyle().getLineStyle()); + colorBox.setSelectObject(ob.getLineColor().getSeriesColor()); + alphaPane.populate((int)(ob.getAlertLineAlpha() * ALPH_PER)); + + contentField.setText(ob.getAlertContent()); + fontNameBox.setSelectedItem(ob.getAlertFont().getName()); + fontSizeBox.setSelectedItem(ob.getAlertFont().getSize()); + + if(ob.getAlertPosition() == Constants.LEFT) { + leftButton.setSelected(true); + } else { + rightButton.setSelected(true); + } + } + + @Override + public ChartAlertValue updateBean() { + ChartAlertValue chartAlertValue = new ChartAlertValue(); + + updateBean(chartAlertValue); + return chartAlertValue; + } + + public void updateBean(ChartAlertValue chartAlertValue) { + + chartAlertValue.setAlertValueFormula(new Formula(textField.getText())); + chartAlertValue.getLineColor().setSeriesColor(colorBox.getSelectObject()); + chartAlertValue.getLineStyle().setLineStyle(lineCombo.getSelectedLineStyle()); + chartAlertValue.setAlertLineAlpha(alphaPane.update()); + chartAlertValue.setAlertContent(contentField.getText()); + + String fontName = Utils.objectToString(fontNameBox.getSelectedItem()); + int fontSize = DE_FONT; + Number number = Utils.objectToNumber(fontSizeBox.getSelectedItem(), true); + if(number != null) { + fontSize = number.intValue(); + } + chartAlertValue.setAlertFont(FRFont.getInstance(fontName, Font.PLAIN, fontSize)); + + if(leftButton.isSelected()) { + chartAlertValue.setAlertPosition(Constants.LEFT); + } else if(rightButton.isSelected()) { + chartAlertValue.setAlertPosition(Constants.RIGHT); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/ChartStyleAxisPane.java b/designer_chart/src/com/fr/design/chart/axis/ChartStyleAxisPane.java new file mode 100644 index 000000000..4a8d84cc4 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/ChartStyleAxisPane.java @@ -0,0 +1,87 @@ +package com.fr.design.chart.axis; + +import java.awt.CardLayout; +import java.util.ArrayList; + +import javax.swing.DefaultListModel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JSplitPane; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; + +import com.fr.chart.chartattr.Axis; +import com.fr.chart.chartattr.Plot; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.chart.gui.style.axis.ChartAxisUsePane; +import com.fr.design.dialog.BasicPane; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-2 + * Time : 上午8:48 + */ +public abstract class ChartStyleAxisPane extends BasicPane implements ListSelectionListener { + protected static final String CATE_AXIS = Inter.getLocText("ChartF-Category_Axis"); + protected static final String VALUE_AXIS = Inter.getLocText("Chart_F_Radar_Axis"); + protected static final String SECOND_AXIS = Inter.getLocText(new String[]{"Second", "Chart_F_Radar_Axis"}); + private JList mainList; + private CardLayout cardLayout; + private JPanel cardDisplayPane = null; + private java.util.List axisStylePaneList = new ArrayList(); + + public ChartStyleAxisPane(Plot plot) { + initComponents(plot); + } + + private void initComponents(Plot plot) { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + DefaultListModel listModel = new DefaultListModel(); + mainList = new JList(listModel); + AxisStyleObject[] axisStyleObjects = createAxisStyleObjects(plot); + cardLayout = new CardLayout(); + cardDisplayPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + cardDisplayPane.setLayout(cardLayout); + for (int i = 0; i < axisStyleObjects.length; i ++) { + AxisStyleObject as = axisStyleObjects[i]; + listModel.addElement(as.getName()); + ChartAxisUsePane axisStylePane = as.getAxisStylePane(); + axisStylePaneList.add(axisStylePane); + cardDisplayPane.add(axisStylePane, as.getName()); + } + mainList.setSelectedIndex(0); + mainList.addListSelectionListener(this); + this.add(new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, mainList, cardDisplayPane)); + } + + @Override + protected String title4PopupWindow() { + return "Axis"; + } + + public void valueChanged(ListSelectionEvent e) { + cardLayout.show(cardDisplayPane, (String)mainList.getSelectedValue()); + } + + public abstract AxisStyleObject[] createAxisStyleObjects(Plot plot); + + public void populate(Plot plot) { + for (int i = 0, len = axisStylePaneList.size(); i < len; i++) { +// axisStylePaneList.get(i).populate(getAxisFromPlotByListIndex(plot, i)); + } + } + + public void update(Plot plot) { + for (int i = 0, len = axisStylePaneList.size(); i < len; i++) { +// axisStylePaneList.get(i).update(getAxisFromPlotByListIndex(plot, i)); + } + } + + private Axis getAxisFromPlotByListIndex(Plot plot, int index) { + return plot.getAxis(index); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/CustomChartStyleAxisPane.java b/designer_chart/src/com/fr/design/chart/axis/CustomChartStyleAxisPane.java new file mode 100644 index 000000000..e10895e89 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/CustomChartStyleAxisPane.java @@ -0,0 +1,19 @@ +package com.fr.design.chart.axis; + +import com.fr.chart.chartattr.Plot; +import com.fr.general.Inter; + +public class CustomChartStyleAxisPane extends TernaryChartStyleAxisPane { + + public CustomChartStyleAxisPane(Plot plot) { + super(plot); + } + + protected String getValueAxisName() { + return Inter.getLocText("Main_Axis"); + } + + protected String getSecondValueAxisName() { + return Inter.getLocText("Second_Axis"); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/GanntChartStyleAxisPane.java b/designer_chart/src/com/fr/design/chart/axis/GanntChartStyleAxisPane.java new file mode 100644 index 000000000..f15b46457 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/GanntChartStyleAxisPane.java @@ -0,0 +1,28 @@ +package com.fr.design.chart.axis; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.mainframe.chart.gui.style.axis.ChartCategoryPane; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-6 + * Time : 上午9:50 + */ +public class GanntChartStyleAxisPane extends BinaryChartStyleAxisPane { + public GanntChartStyleAxisPane(Plot plot) { + super(plot); + } + + protected AxisStyleObject getXAxisPane(Plot plot) { + ChartCategoryPane categoryPane = new ChartCategoryPane(); + categoryPane.getAxisValueTypePane().removeTextAxisPane(); + return new AxisStyleObject(Inter.getLocText("Chart_Date_Axis"), categoryPane); + } + + protected AxisStyleObject getYAxisPane(Plot plot) { + return new AxisStyleObject(CATE_AXIS, new ChartCategoryPane()); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java new file mode 100644 index 000000000..d717d31a8 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java @@ -0,0 +1,193 @@ +package com.fr.design.chart.axis; + +import com.fr.base.Formula; +import com.fr.chart.base.ChartBaseUtils; +import com.fr.chart.chartattr.Axis; +import com.fr.design.chart.ChartSwingUtils; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +public class MinMaxValuePane extends JPanel { + private static final long serialVersionUID = 3353266754022091576L; + protected UICheckBox maxCheckBox; + protected UITextField maxValueField; + protected UICheckBox minCheckBox; + protected UITextField minValueField; + + // 主次要刻度单位 + protected UICheckBox isCustomMainUnitBox; + protected UITextField mainUnitField; + + protected UICheckBox isCustomSecUnitBox; + protected UITextField secUnitField; + + public MinMaxValuePane() { + minCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Min_Value"})); + minValueField = new UITextField(6); + maxCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Max_Value"})); + maxValueField = new UITextField(6); + isCustomMainUnitBox = new UICheckBox(Inter.getLocText("FR-Chart_MainGraduationUnit")); + mainUnitField = new UITextField(6); + isCustomSecUnitBox = new UICheckBox(Inter.getLocText("FR-Chart_SecondGraduationUnit")); + secUnitField = new UITextField(6); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p, f }; + double[] rowSize = { p, p, p, p}; + + Component[][] components = getPanelComponents(); + JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize); + this.setLayout(new BorderLayout()); + this.add(panel,BorderLayout.CENTER); + + for(int i = 0; i < components.length; i++) { + ((UICheckBox)components[i][0]).addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + checkBoxUse(); + } + }); + ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i][1]); + } + } + + protected Component[][] getPanelComponents() { + return new Component[][]{ + new Component[]{minCheckBox, minValueField}, + new Component[]{maxCheckBox, maxValueField}, + new Component[]{isCustomMainUnitBox, mainUnitField}, + new Component[]{isCustomSecUnitBox, secUnitField}, + }; + } + + private void checkBoxUse() { + minValueField.setEnabled(minCheckBox.isSelected()); + maxValueField.setEnabled(maxCheckBox.isSelected()); + + mainUnitField.setEnabled(isCustomMainUnitBox.isSelected()); + secUnitField.setEnabled(isCustomSecUnitBox.isSelected()); + } + + public void setPaneEditable(boolean isEditable) { + minCheckBox.setEnabled(isEditable); + maxCheckBox.setEnabled(isEditable); + minValueField.setEnabled(isEditable); + maxValueField.setEnabled(isEditable); + + mainUnitField.setEnabled(isEditable); + secUnitField.setEnabled(isEditable); + isCustomMainUnitBox.setEnabled(isEditable); + isCustomSecUnitBox.setEnabled(isEditable); + checkBoxUse(); + } + + public void populate(Axis axis) { + if(axis == null) { + return; + } + + if (axis.isCustomMinValue()) { + minCheckBox.setSelected(true); + if(axis.getMinValue() != null) { + minValueField.setText(axis.getMinValue().toString()); + } + } + + // 最大值 + if (axis.isCustomMaxValue()) { + maxCheckBox.setSelected(true); + if(axis.getMaxValue() != null) { + maxValueField.setText(axis.getMaxValue().toString()); + } + } + + // 主次刻度单位 + if (axis.isCustomMainUnit()) { + isCustomMainUnitBox.setSelected(true); + if(axis.getMainUnit() != null) { + mainUnitField.setText(axis.getMainUnit().toString()); + } + } + + if(axis.isCustomSecUnit()) { + isCustomSecUnitBox.setSelected(true); + if(axis.getSecUnit() != null) { + secUnitField.setText(axis.getSecUnit().toString()); + } + } + + checkBoxUse(); + } + + public void update(Axis axis) { + if (axis == null) { + return; + } + // 最大最小值 + if (minCheckBox.isSelected()) { + axis.setCustomMinValue(StringUtils.isNotEmpty(minValueField.getText())); + axis.setMinValue(new Formula(minValueField.getText())); + } else { + axis.setCustomMinValue(false); + } + if (maxCheckBox.isSelected()) { + axis.setCustomMaxValue(StringUtils.isNotEmpty(maxValueField.getText())); + axis.setMaxValue(new Formula(maxValueField.getText())); + } else { + axis.setCustomMaxValue(false); + } + + updateUnit(axis); + } + + private void updateUnit(Axis axis) { + // 主要刻度 + if (isCustomMainUnitBox.isSelected()){ + String increment = mainUnitField.getText(); + if(StringUtils.isEmpty(increment)) { + axis.setCustomMainUnit(false); + axis.setMainUnit(null); + } else { + axis.setCustomMainUnit(true); + Formula formula = new Formula(increment); + Number number = ChartBaseUtils.formula2Number(formula); + if(number != null && number.doubleValue() < 0) { + axis.setMainUnit(new Formula("10")); + } else { + axis.setMainUnit(formula); + } + } + } else { + axis.setCustomMainUnit(false); + } + + if (isCustomSecUnitBox.isSelected()){ + String increment = secUnitField.getText(); + if(StringUtils.isEmpty(increment)) { + axis.setCustomSecUnit(false); + axis.setSecUnit(null); + } else { + axis.setCustomSecUnit(true); + Formula formula = new Formula(increment); + Number number = ChartBaseUtils.formula2Number(formula); + if(number != null && number.doubleValue() < 0) { + axis.setSecUnit(new Formula("10")); + } else { + axis.setSecUnit(formula); + } + } + } else { + axis.setCustomSecUnit(false); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/RadarChartStyleAxisPane.java b/designer_chart/src/com/fr/design/chart/axis/RadarChartStyleAxisPane.java new file mode 100644 index 000000000..ec240525c --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/RadarChartStyleAxisPane.java @@ -0,0 +1,26 @@ +package com.fr.design.chart.axis; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.mainframe.chart.gui.style.axis.ChartRadarPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-5 + * Time : 下午7:18 + * 雷达图的图表样式--> 坐标轴界面 + */ +public class RadarChartStyleAxisPane extends ChartStyleAxisPane { + private static final long serialVersionUID = 8919941507725513032L; + + public RadarChartStyleAxisPane(Plot plot) { + super(plot); + } + + public final AxisStyleObject[] createAxisStyleObjects(Plot plot) { + return new AxisStyleObject[]{new AxisStyleObject( + CATE_AXIS, + new ChartRadarPane())}; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/TernaryChartStyleAxisPane.java b/designer_chart/src/com/fr/design/chart/axis/TernaryChartStyleAxisPane.java new file mode 100644 index 000000000..fdfb25ef5 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/TernaryChartStyleAxisPane.java @@ -0,0 +1,42 @@ +package com.fr.design.chart.axis; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.mainframe.chart.gui.style.axis.ChartCategoryPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartSecondValuePane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartValuePane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-6 + * Time : 上午8:58 + * 三元坐标设置界面 + */ +public class TernaryChartStyleAxisPane extends ChartStyleAxisPane { + private static final long serialVersionUID = 539802340384090324L; + + public TernaryChartStyleAxisPane(Plot plot) { + super(plot); + } + + @Override + public AxisStyleObject[] createAxisStyleObjects(Plot plot) { + return new AxisStyleObject[]{ + new AxisStyleObject(CATE_AXIS, + new ChartCategoryPane()), + new AxisStyleObject(getValueAxisName(), + new ChartValuePane()), + new AxisStyleObject(getSecondValueAxisName(), + new ChartSecondValuePane()) + }; + } + + protected String getValueAxisName() { + return VALUE_AXIS; + } + + protected String getSecondValueAxisName() { + return SECOND_AXIS; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/ValueChartStyleAxisPane.java b/designer_chart/src/com/fr/design/chart/axis/ValueChartStyleAxisPane.java new file mode 100644 index 000000000..9320e1c25 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/ValueChartStyleAxisPane.java @@ -0,0 +1,25 @@ +package com.fr.design.chart.axis; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.mainframe.chart.gui.style.axis.ChartValuePane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-6 + * Time : 上午9:02 + */ +public class ValueChartStyleAxisPane extends ChartStyleAxisPane { + private static final long serialVersionUID = 8513685484255363315L; + + public ValueChartStyleAxisPane(Plot plot) { + super(plot); + } + + public final AxisStyleObject[] createAxisStyleObjects(Plot plot) { + return new AxisStyleObject[]{new AxisStyleObject( + CATE_AXIS, + new ChartValuePane())}; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/axis/XYChartStyleAxisPane.java b/designer_chart/src/com/fr/design/chart/axis/XYChartStyleAxisPane.java new file mode 100644 index 000000000..6730962ac --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/axis/XYChartStyleAxisPane.java @@ -0,0 +1,26 @@ +package com.fr.design.chart.axis; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.mainframe.chart.gui.style.axis.ChartValuePane; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-6 + * Time : 上午9:51 + */ +public class XYChartStyleAxisPane extends BinaryChartStyleAxisPane { + public XYChartStyleAxisPane(Plot plot) { + super(plot); + } + + protected AxisStyleObject getXAxisPane(Plot plot) { + return new AxisStyleObject(Inter.getLocText("ChartF-X_Axis"), new ChartValuePane()); + } + + protected AxisStyleObject getYAxisPane(Plot plot) { + return new AxisStyleObject(Inter.getLocText("ChartF-Y_Axis"), new ChartValuePane()); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/comp/BorderAttriPane.java b/designer_chart/src/com/fr/design/chart/comp/BorderAttriPane.java new file mode 100644 index 000000000..6eae928c7 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/comp/BorderAttriPane.java @@ -0,0 +1,59 @@ +package com.fr.design.chart.comp; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.general.Inter; +import com.fr.stable.Constants; +import com.fr.stable.CoreConstants; +import com.fr.design.gui.icombobox.LineComboBox; +import com.fr.design.dialog.BasicPane; +import com.fr.design.style.color.ColorSelectBox; + +import java.awt.*; + +public class BorderAttriPane extends BasicPane { + + private LineComboBox lineCombo; + private ColorSelectBox colorSelectBox; + + public BorderAttriPane() { + this(Inter.getLocText("Line-Style"), Inter.getLocText("Color")); + } + + public BorderAttriPane(String lineString, String colorSting) { + this.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 0)); + + this.add(new UILabel(lineString + ":")); + this.add(lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART)); + lineCombo.setPreferredSize(new Dimension(60, 18)); + + this.add(new UILabel(colorSting + ":")); + this.add(colorSelectBox = new ColorSelectBox(80)); + colorSelectBox.setPreferredSize(new Dimension(60, 18)); + colorSelectBox.setSelectObject(null); + } + + public void setLineColor(Color color) { + this.colorSelectBox.setSelectObject(color); + } + + public Color getLineColor() { + return this.colorSelectBox.getSelectObject(); + } + + public void setLineStyle(int style) { + if (style != Constants.LINE_NONE && style != Constants.LINE_THICK + && style != Constants.LINE_THIN && style != Constants.LINE_MEDIUM) { + style = Constants.LINE_THIN; + } + this.lineCombo.setSelectedLineStyle(style); + } + + public int getLineStyle() { + return lineCombo.getSelectedLineStyle(); + } + + @Override + protected String title4PopupWindow() { + return "Border"; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/demo/GlyphDemo.java b/designer_chart/src/com/fr/design/chart/demo/GlyphDemo.java new file mode 100644 index 000000000..feced08a4 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/demo/GlyphDemo.java @@ -0,0 +1,123 @@ +package com.fr.design.chart.demo; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.charttypes.*; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.gui.frpane.UITabbedPane; +import com.fr.design.layout.FRGUIPaneFactory; + +import javax.swing.*; +import java.awt.*; + +public class GlyphDemo extends JFrame { + private static final long serialVersionUID = -3174315376448330927L; + + /** + * 主函数 + * @param args 参数 + */ + public static void main(String[] args) { + new GlyphDemo(); + } + + public GlyphDemo() { + JPanel contentPane = (JPanel)this.getContentPane(); + contentPane.setLayout(FRGUIPaneFactory.createBorderLayout()); + UITabbedPane tab = new UITabbedPane(); + contentPane.add(tab, BorderLayout.CENTER); + + tab.add("Line", createGlyphLinePanel()); + tab.add("Bar", createBarPanel()); + tab.add("Area", createAreaPanel()); + tab.add("Meter", createMeterPanel()); + tab.add("Pie", createPiePanel()); + tab.add("Radar", createRadarPanel()); + tab.add("Stock", createStockPanel()); + tab.add("XYScatter", createXYScatterPanel()); + tab.add("Range", createRangePanel()); + tab.add("Mix", createCustomPanel()); + tab.add("Gantt", createGanttPanel()); + tab.add("Bubble", createBubblePane()); + + setSize(1200, 600); + // 关闭时退出 + setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + + setTitle("Line Glyph Demo"); + setVisible(true); + } + + private JPanel createGlyphLinePanel() { + Chart[] chr = LineIndependentChart.lineChartTypes; + + return contentPane(chr,2,4); + } + + private JPanel createBarPanel() { + Chart[] chr= ColumnIndependentChart.columnChartTypes; + return contentPane(chr,2,4); + } + + private JPanel createAreaPanel() { + Chart[] chr= AreaIndependentChart.areaChartTypes; + return contentPane(chr,2,4); + } + + private JPanel createMeterPanel() { + Chart[] chr= MeterIndependentChart.meterChartTypes; + return contentPane(chr,2,4); + } + + private JPanel createPiePanel() { + Chart[] chr = PieIndependentChart.pieChartTypes; + JPanel contentPane = contentPane(chr,2,4); + + return contentPane; + } + + private JPanel createRadarPanel() { + Chart[] chr = RadarIndependentChart.radarChartTypes; + return contentPane(chr,2,4); + } + + private JPanel createStockPanel() { + Chart[] chr = StockIndependentChart.stockChartTypes; + return contentPane(chr,2,4); + } + + private JPanel createXYScatterPanel() { + Chart[] chr = XYScatterIndependentChart.XYScatterChartTypes; + return contentPane(chr,2,4); + } + + private JPanel createRangePanel() { + Chart[] chr = RangeIndependentChart.rangeChartTypes; + return contentPane(chr,2,4); + } + + private JPanel createCustomPanel() { + Chart[] chr = CustomIndependentChart.combChartTypes; + return contentPane(chr,2,4); + } + + private JPanel createGanttPanel() { + Chart[] chr = GanttIndependentChart.ganttChartTypes; + return contentPane(chr,2,4); + } + + private JPanel createBubblePane() { + Chart[] chr = BubbleIndependentChart.bubbleChartTypes; + return contentPane(chr,2,4); + } + + private JPanel contentPane(Chart[] chr,int x,int y){ + JPanel contentPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + contentPane.setLayout(new /**/ GridLayout(x, y)); + for(int i=0;i getPlotSeriesPane(ChartStylePane parent, Plot plot); + + + /** + * 图表的属性界面数组 + * + * @return 属性界面 + */ + AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener); + + /** + * 是否使用默认的界面,为了避免界面来回切换 + * + * @return 是否使用默认的界面 + */ + boolean isUseDefaultPane(); + + /** + * 图标路径 + * + * @return 图标路径 + */ + String getIconPath(); + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java new file mode 100644 index 000000000..8322bdba4 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUI.java @@ -0,0 +1,52 @@ +package com.fr.design.chart.fun.impl; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.IndependentChartUIProvider; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.general.ComparatorUtils; + + +/** + * Created by eason on 15/4/23. + */ +@Deprecated +public abstract class AbstractIndependentChartUI implements IndependentChartUIProvider { + + @Override + public int currentAPILevel() { + return -1; + } + + public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){ + return new AbstractChartAttrPane[0]; + } + + /** + * 是否使用默认的界面,为了避免界面来回切换 + * @return 是否使用默认的界面 + */ + public boolean isUseDefaultPane(){ + return true; + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return getPlotSeriesPane(); + } + + public BasicBeanPane getPlotSeriesPane(){ + return null; + } + + public boolean equals(Object obj) { + return obj != null && ComparatorUtils.equals(obj.getClass(), this.getClass()); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return new DataSeriesConditionPane(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java new file mode 100644 index 000000000..e0e5e8f7d --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java @@ -0,0 +1,49 @@ +package com.fr.design.chart.fun.impl; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.IndependentChartUIProvider; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.general.ComparatorUtils; + +/** + * Created by Mitisky on 16/3/7. + */ +public abstract class AbstractIndependentChartUIWithAPILevel implements IndependentChartUIProvider { + @Override + public int currentAPILevel() { + return CURRENT_API_LEVEL; + } + + public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){ + return new AbstractChartAttrPane[0]; + } + + /** + * 是否使用默认的界面,为了避免界面来回切换 + * @return 是否使用默认的界面 + */ + public boolean isUseDefaultPane(){ + return true; + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return getPlotSeriesPane(); + } + + public BasicBeanPane getPlotSeriesPane(){ + return null; + } + + public boolean equals(Object obj) { + return obj != null && ComparatorUtils.equals(obj.getClass(), this.getClass()); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return new DataSeriesConditionPane(); + } +} diff --git a/designer_chart/src/com/fr/design/chart/gui/ActiveGlyphFactory.java b/designer_chart/src/com/fr/design/chart/gui/ActiveGlyphFactory.java new file mode 100644 index 000000000..873a9ed40 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/ActiveGlyphFactory.java @@ -0,0 +1,97 @@ +package com.fr.design.chart.gui; + +import java.util.HashMap; +import java.util.Map; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.CategoryAxisGlyph; +import com.fr.chart.chartglyph.ChartAlertValueGlyph; +import com.fr.chart.chartglyph.ChartGlyph; +import com.fr.chart.chartglyph.DataSeries; +import com.fr.chart.chartglyph.DataSheetGlyph; +import com.fr.chart.chartglyph.DateAxisGlyph; +import com.fr.chart.chartglyph.LegendGlyph; +import com.fr.chart.chartglyph.PlotGlyph; +import com.fr.chart.chartglyph.RadarAxisGlyph; +import com.fr.chart.chartglyph.RangeAxisGlyph; +import com.fr.chart.chartglyph.TextGlyph; +import com.fr.chart.chartglyph.TitleGlyph; +import com.fr.chart.chartglyph.TrendLineGlyph; +import com.fr.chart.chartglyph.ValueAxisGlyph; +import com.fr.design.chart.gui.active.ActiveGlyph; +import com.fr.design.chart.gui.active.AlertValueActiveGlyph; +import com.fr.design.chart.gui.active.CategoryAxisActiveGlyph; +import com.fr.design.chart.gui.active.ChartActiveGlyph; +import com.fr.design.chart.gui.active.DataLabelActiveGlyph; +import com.fr.design.chart.gui.active.DataSeriesActiveGlyph; +import com.fr.design.chart.gui.active.DataSheetActiveGlyph; +import com.fr.design.chart.gui.active.DateAxisActiveGlyph; +import com.fr.design.chart.gui.active.LegendActiveGlyph; +import com.fr.design.chart.gui.active.PlotActiveGlyph; +import com.fr.design.chart.gui.active.RadarAxisActiveGlyph; +import com.fr.design.chart.gui.active.RangeAxisActiveGlyph; +import com.fr.design.chart.gui.active.TextActiveGlyph; +import com.fr.design.chart.gui.active.TrendLineActiveGlyph; +import com.fr.design.chart.gui.active.ValueAxisActiveGlyph; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-23 + * Time : 上午9:08 + */ +public class ActiveGlyphFactory { + private static Map glyphMap = new HashMap(); + + static { + glyphMap.put(DataSeries.class.getName(), DataSeriesActiveGlyph.class); + glyphMap.put(RadarAxisGlyph.class.getName(), RadarAxisActiveGlyph.class); + glyphMap.put(RangeAxisGlyph.class.getName(), RangeAxisActiveGlyph.class); + glyphMap.put(TitleGlyph.class.getName(), TextActiveGlyph.class); + glyphMap.put(DateAxisGlyph.class.getName(), DateAxisActiveGlyph.class); + glyphMap.put(ValueAxisGlyph.class.getName(), ValueAxisActiveGlyph.class); + glyphMap.put(CategoryAxisGlyph.class.getName(), CategoryAxisActiveGlyph.class); + glyphMap.put(ChartGlyph.class.getName(), ChartActiveGlyph.class); + glyphMap.put(DataSheetGlyph.class.getName(), DataSheetActiveGlyph.class); + glyphMap.put(LegendGlyph.class.getName(), LegendActiveGlyph.class); + glyphMap.put(TextGlyph.class.getName(), DataLabelActiveGlyph.class); + glyphMap.put(TrendLineGlyph.class.getName(), TrendLineActiveGlyph.class); + glyphMap.put(ChartAlertValueGlyph.class.getName(), AlertValueActiveGlyph.class); + } + + private ActiveGlyphFactory() { + + } + + public static ActiveGlyph createActiveGlyph(ChartComponent chartComponent, Object glyph) { + return createActiveGlyph(chartComponent, glyph, null); + } + + public static ActiveGlyph createActiveGlyph(ChartComponent chartComponent, Object glyph, Glyph parentGlyph) { + if (glyph == null) { + return null; + } + String clsName = glyph.getClass().getName(); + Class cls = glyphMap.get(clsName); + Class parameterCls = glyph.getClass(); + if (cls == null) { + if (clsName.endsWith("PlotGlyph")) { + cls = PlotActiveGlyph.class; + parameterCls = PlotGlyph.class; + } else if (clsName.endsWith("DataSeries4Area")) { + cls = DataSeriesActiveGlyph.class; + parameterCls = DataSeries.class; + } else { + cls = ChartActiveGlyph.class; + parameterCls = ChartGlyph.class; + } + } + try { + Class[] argsClass = new Class[]{ChartComponent.class, parameterCls, Glyph.class}; + return (ActiveGlyph) cls.getConstructor(argsClass).newInstance(new Object[]{chartComponent, glyph, parentGlyph}); + } catch (Exception e) { + return null; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java b/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java new file mode 100644 index 000000000..3700299c0 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java @@ -0,0 +1,322 @@ +package com.fr.design.chart.gui; + +import com.fr.base.FRContext; +import com.fr.base.ScreenResolution; +import com.fr.base.chart.BaseChart; +import com.fr.base.chart.BaseChartCollection; +import com.fr.base.chart.BaseChartGlyph; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.chartattr.Axis; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartglyph.AxisGlyph; +import com.fr.design.chart.gui.active.ActiveGlyph; +import com.fr.design.chart.gui.active.ChartActiveGlyph; +import com.fr.design.gui.chart.MiddleChartComponent; +import com.fr.stable.ArrayUtils; +import com.fr.stable.core.PropertyChangeListener; + +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.awt.geom.Rectangle2D; +import java.awt.geom.RoundRectangle2D; +import java.util.ArrayList; +import java.util.List; + +/** +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2012-7-3 下午02:46:45 +* 类说明: 事件说明: 工具栏编辑--> 是刷新ChartComponent 然后响应整个设计块的改变事件 + 右键编辑 ---> 刷新ChartCompment 刷新对应的工具栏(加入事件) 然后响应整个设计块的改变事件 + */ +public class ChartComponent extends MiddleChartComponent implements MouseListener, MouseMotionListener { + private static final long serialVersionUID = 744164838619052097L; + private final List listeners = new ArrayList(); + private ChartCollection chartCollection4Design; + private Chart editingChart; + private BaseChartGlyph chartGlyph; + private int chartWidth = -1; + private int chartHeight = -1; + private Point point; + + private ActiveGlyph activeGlyph; + + private boolean supportEdit = true; + + private final int[] resizeCursors = new int[]{ + Cursor.NW_RESIZE_CURSOR, Cursor.N_RESIZE_CURSOR, Cursor.NE_RESIZE_CURSOR, + Cursor.E_RESIZE_CURSOR, Cursor.W_RESIZE_CURSOR, + Cursor.SE_RESIZE_CURSOR, Cursor.S_RESIZE_CURSOR, Cursor.SW_RESIZE_CURSOR + }; + + public ChartComponent() { + super(); + addMouseListener(this); + addMouseMotionListener(this); + } + + /** + * 必须加入 响应事件, 停止当前的选中元素编辑 && 获取焦点 + * @author kunsnat E-mail kunsnat@gmail.com + * @param cc + */ + public ChartComponent(ChartCollection cc) { + this(); + populate(cc); + } + + public ChartComponent(BaseChartCollection cc) { + this(); + populate(cc); + } + + public ChartComponent(ChartCollection cc, PropertyChangeListener l) { + this(); + populate(cc); + addStopEditingListener(l); + } + + + /** + * 右键编辑 图表编辑层的监听事件, 在停止编辑时 响应整个编辑模板(form, sheet)的改变. + * @param l 监听事件 + */ + public void addStopEditingListener(PropertyChangeListener l) { + if (!listeners.contains(l)) { + listeners.add(l); + } + } + + private void fireStopEditing() { + for (int len = listeners.size(), i = len; i > 0; i--) { + listeners.get(i - 1).propertyChange(); + } + } + + /** + * 停止编辑, 通知事情, 刷新画出新界面. + */ + public void reset() { + fireStopEditing(); + + this.editingChart = null; + this.chartGlyph = null; + this.activeGlyph = null; + this.point = null; + this.chartHeight = this.chartWidth = -1; + + this.editingChart = this.chartCollection4Design.getSelectedChart(); + + refreshChartGlyph(); + this.activeGlyph = ActiveGlyphFactory.createActiveGlyph(this, chartGlyph); + + repaint(); + } + + public void populate(BaseChartCollection cc) { // kunsnat_bug: 5471 实现设置的即时预览 + try {// clone 为了判断编辑前后的值. + this.chartCollection4Design = (ChartCollection)cc; +// this.chartCollection4Design = (ChartCollection)cc.clone(); + } catch (Exception e) { + FRContext.getLogger().error("ChartCollection clone is Error"); + } + reset(); + } + + public BaseChartCollection update() { + return this.chartCollection4Design; + } + + /** + * 设置是否支持编辑, 如:弹出对话框, 右键选中列表 + */ + public void setSupportEdit(boolean supportEdit) { + this.supportEdit = supportEdit; + } + + /** + * 返回是否支持编辑, 如:弹出对话框, 右键选中列表 + * @return 返回是否支持编辑. + */ + public boolean isSupportEdit() { + return supportEdit; + } + + public ChartCollection getChartCollection() { + return chartCollection4Design; + } + + public int getChartSize() { + return (this.chartCollection4Design == null) ? 0 : this.chartCollection4Design.getChartCount(); + } + + public BaseChart getEditingChart() { + return editingChart; + } + + public BaseChartGlyph getChartGlyph() { + return chartGlyph; + } + + public void paintComponent(Graphics g) { // + super.paintComponent(g); + + Graphics2D g2d = (Graphics2D) g; + + Paint oldPaint = g2d.getPaint(); + + g2d.setPaint(Color.white); + g2d.fillRect(0, 0, this.getBounds().width, this.getBounds().height); + g2d.setPaint(oldPaint); + + g2d.translate(ChartConstants.PREGAP4BOUNDS/2, ChartConstants.PREGAP4BOUNDS/2); + + if (needRefreshChartGlyph()) { + refreshChartGlyph(); + } + + Object lastHint = g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING); + // 反锯齿 + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + + drawChartGlyph(g2d); + + ActiveGlyph ag = this.getActiveGlyph(); + if (ag != null) { + ag.paint4ActiveGlyph(g2d, chartGlyph); + } + + g2d.translate(-ChartConstants.PREGAP4BOUNDS/2, -ChartConstants.PREGAP4BOUNDS/2); + if (lastHint == null) { + lastHint = RenderingHints.VALUE_ANTIALIAS_OFF; + } + + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, lastHint); + } + + /* + * ChartGlyph改变大小的时候做的操作 + */ + private void refreshChartGlyph() { + Dimension d = getBounds().getSize(); + this.editingChart = this.chartCollection4Design.getSelectedChart();// kunsnat: 切换选中时 同步切换Plot + if (editingChart != null) { + this.chartGlyph = editingChart.createGlyph(editingChart.defaultChartData()); + this.activeGlyph = ActiveGlyphFactory.createActiveGlyph(this, chartGlyph); + } + this.chartWidth = d.width - ChartConstants.PREGAP4BOUNDS; + this.chartHeight = d.height - ChartConstants.PREGAP4BOUNDS; + } + + private ActiveGlyph getActiveGlyph() { + if (point == null) { + this.activeGlyph = new ChartActiveGlyph(this, chartGlyph); + } else { + this.activeGlyph = new ChartActiveGlyph(this, chartGlyph).findActionGlyphFromChildren(point.x, point.y); + } + return this.activeGlyph; + } + + /** + * 鼠标点击 + * @param event 鼠标事件 + */ + public void mouseClicked(MouseEvent event) { + int click = event.getClickCount(); + if (click >= 1 && activeGlyph != null && this.isSupportEdit()) { + activeGlyph.goRightPane(); + } + } + + /** + * 鼠标按压 + * @param e 鼠标事件 + */ + public void mousePressed(MouseEvent e) { + point = new Point(e.getX(),e.getY()); + if (!ArrayUtils.contains(resizeCursors, this.getCursor().getType())) { + this.activeGlyph = new ChartActiveGlyph(this, chartGlyph).findActionGlyphFromChildren(point.x, point.y); + } + + if (this.activeGlyph == null) { + return; + } + + repaint(); + + } + + /** + * 鼠标松开 + * @param e 鼠标事件 + */ + public void mouseReleased(MouseEvent e) { + } + + /** + * 鼠标进入 + * @param e 鼠标事件 + */ + public void mouseEntered(MouseEvent e) { + + } + + /** + * 鼠标退出 + * @param e 鼠标事件 + */ + public void mouseExited(MouseEvent e) { + + } + + /** + * 鼠标拖拽 + * @param e 鼠标事件 + */ + public void mouseDragged(MouseEvent e) { + } + + /** + * 鼠标移动 + * @param e 鼠标事件 + */ + public void mouseMoved(MouseEvent e) { + ActiveGlyph ag = this.getActiveGlyph(); + if (ag != null) { + ag.onMouseMove(e); + } + } + + public AxisGlyph getActiveAxisGlyph() { + return (AxisGlyph) activeGlyph.getGlyph(); + } + + public Axis getActiveAxis() { + AxisGlyph axisGlyph = getActiveAxisGlyph(); + if (editingChart.getPlot() != null) { + return editingChart.getPlot().getAxis(axisGlyph.getAxisType()); + } + return null; + } + + private boolean needRefreshChartGlyph() { + return chartGlyph == null || chartWidth != this.getBounds().width || chartHeight != this.getBounds().height; + } + + private void drawChartGlyph(Graphics2D g2d) { + if (chartGlyph != null) { + if (chartGlyph.isRoundBorder()) { + chartGlyph.setBounds(new RoundRectangle2D.Double(0, 0, chartWidth, chartHeight, 10, 10)); + } else { + chartGlyph.setBounds(new Rectangle2D.Double(0, 0, chartWidth, chartHeight)); + } + // chartGlyph.draw(g2d, ScreenResolution.getScreenResolution()); + //不直接画chartGlyph而画image的原因是表单的柱形图会溢出表单 + //其他图都ok,其实感觉应该是柱形图画的不对,应该也可以改那边 + Image chartImage = chartGlyph.toImage(chartWidth,chartHeight,ScreenResolution.getScreenResolution()); + g2d.drawImage(chartImage, 0, 0, chartWidth, chartHeight, null); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/ChartWidgetOption.java b/designer_chart/src/com/fr/design/chart/gui/ChartWidgetOption.java new file mode 100644 index 000000000..a740a202a --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/ChartWidgetOption.java @@ -0,0 +1,79 @@ +package com.fr.design.chart.gui; + +import com.fr.base.FRContext; +import com.fr.chart.chartattr.Chart; +import com.fr.design.gui.core.WidgetOption; +import com.fr.form.ui.ChartEditor; +import com.fr.form.ui.Widget; + +import javax.swing.*; + +/** + * 表单中 图表控件信息, 名称, class, form中通过XcreatorUtils反射类 实现XChartEditor的初始化. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-7-5 上午09:59:39 + */ +public class ChartWidgetOption extends WidgetOption { + private static final long serialVersionUID = -6576352405047132226L; + private String optionName; + private Icon optionIcon; + private Class widgetClass; + private Chart chart; + + public ChartWidgetOption(String optionName, Icon optionIcon, Class widgetClass, Chart chart) { + this.optionName = optionName; + this.optionIcon = optionIcon; + this.widgetClass = widgetClass; + this.chart = chart; + } + + /** + * 通过类 信息等 创建对应的控件编辑器. + * + * @return 返回控件编辑器. + */ + public Widget createWidget() { + Class clz = widgetClass(); + try { + ChartEditor widget = clz.newInstance(); + widget.addChart((Chart) chart.clone()); + return widget; + } catch (InstantiationException e) { + FRContext.getLogger().error(e.getMessage(), e); + } catch (IllegalAccessException e) { + FRContext.getLogger().error(e.getMessage(), e); + } catch (CloneNotSupportedException e) { + FRContext.getLogger().error(e.getMessage(), e); + } + + return null; + } + + /** + * 信息名称, 一般是图表的类型名称. + * + * @return 返回名称. + */ + public String optionName() { + return this.optionName; + } + + /** + * 信息图片, 一般是图表按钮的缩略图. + * + * @return 信息图片. + */ + public Icon optionIcon() { + return this.optionIcon; + } + + /** + * 图表控件对应Editor的类. + * + * @return 返回类. + */ + public Class widgetClass() { + return this.widgetClass; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/ActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/ActiveGlyph.java new file mode 100644 index 000000000..c0fa1e193 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/ActiveGlyph.java @@ -0,0 +1,161 @@ +package com.fr.design.chart.gui.active; + +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.Composite; +import java.awt.Graphics2D; +import java.awt.Paint; +import java.awt.Shape; +import java.awt.event.MouseEvent; +import java.awt.geom.Point2D; + +import com.fr.base.ScreenResolution; +import com.fr.base.chart.BaseChartGlyph; +import com.fr.base.chart.Glyph; +import com.fr.design.chart.gui.ActiveGlyphFactory; +import com.fr.design.chart.gui.ChartComponent; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午3:51 + * 选中的Glyph + */ +public abstract class ActiveGlyph { + protected Glyph parentGlyph; + protected ChartComponent chartComponent; + + public ActiveGlyph(ChartComponent chartComponent, Glyph parentGlyph) { + this.chartComponent = chartComponent; + this.parentGlyph = parentGlyph; + } + + public abstract Glyph getGlyph(); + + public void drawAllGlyph(Graphics2D g2d, int resolution){ + Point2D offset4Paint = offset4Paint(); + g2d.translate(offset4Paint.getX(), offset4Paint.getY()); + this.getGlyph().draw(g2d, resolution); + g2d.translate(-offset4Paint.getX(), -offset4Paint.getY()); + }; + + /** + * 属性表中, 通过点击 展开到对应的界面. + */ + public abstract void goRightPane(); + + /** + * 画的偏移的 + * @return 偏移的 + */ + public Point2D offset4Paint() { + return new Point2D.Double( + this.parentGlyph.getShape().getBounds().getX(), + this.parentGlyph.getShape().getBounds().getY() + ); + } + + public void paint4ActiveGlyph(Graphics2D g2d, BaseChartGlyph chartGlyph) { + if(this.parentGlyph == null) { + return; + } + + Paint oldPaint = g2d.getPaint(); + Composite oldComposite = g2d.getComposite(); + g2d.setPaint(Color.white); + g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f)); + + g2d.fill(chartGlyph.getShape()); + drawAllGlyph(g2d, ScreenResolution.getScreenResolution()); + + g2d.setPaint(oldPaint); + g2d.setComposite(oldComposite); + } + + protected void drawSelectedBounds4Active(Graphics2D g2d) { + if (this.getGlyph() != null) { + Shape shape = this.getGlyph().getShape(); + if (shape != null) { + g2d.draw(shape); + } + } + } + + + /** + *当前的ActiveGlyph是否包含坐标mouseX, mouseY + * @param mouseX 坐标X + * @param mouseY 坐标Y + * @return 包含则返回true + */ + public boolean contains(int mouseX, int mouseY) { + if (getGlyph() == null || getGlyph().getShape() == null){ + return false; + } + + Point2D offset = this.offset4Paint(); + + /* + * alex:因为Line2D.contains(x, y)必然返回false + * 所以用intersect一个区域,这个区域大小用4 * 4的,区域大一些,就灵敏一些 + */ + return getGlyph().getShape().intersects(mouseX - offset.getX() - 2, mouseY - offset.getY() - 2, 4, 4); + } + + /** + * 在当前选中的ActiveGlyph中,仅仅在其Children中找与mouseX, mouseY匹配的ActiveGlyph + * @param mouseX 坐标X + * @param mouseY 坐标Y + * @return 当前ativeGlyph + */ + public ActiveGlyph findActionGlyphFromChildren(int mouseX, int mouseY) { + Glyph currentGlyph = getGlyph(); + // 报错应对. + if (currentGlyph == null) { + return null; + } + java.util.Iterator selectableChildren = currentGlyph.selectableChildren(); + + ActiveGlyph resAG = null; + while (selectableChildren.hasNext() && resAG == null) { + ActiveGlyph childActiveGlyph = ActiveGlyphFactory.createActiveGlyph(chartComponent, selectableChildren.next(), currentGlyph); + + // 如果childActiveGlyph不为null,找一下其子辈有没有符合条件 + if (childActiveGlyph != null) { + resAG = childActiveGlyph.findActionGlyphFromChildren(mouseX, mouseY); + } + + // 如果childActiveGlyph的子辈没有符合条件的,就看一下这个childGlyph是否符合条件 + if (resAG == null && childActiveGlyph != null && childActiveGlyph.contains(mouseX, mouseY)) { + resAG = childActiveGlyph; + } + } + + // 如果当前ActiveGlyph的所有子辈都没有与mouseX, mouseY相匹配的,看一下它自己是否匹配 + if (resAG == null) { + if (this.contains(mouseX, mouseY)) { + resAG = this; + } + } + + return resAG; + } + + /** + * 拖拽 + * @param e 事件 + */ + public void onMouseDragged(MouseEvent e) { + + } + + /** + * 移动事件 + * @param e 事件 + */ + public void onMouseMove(MouseEvent e) { + + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/AlertValueActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/AlertValueActiveGlyph.java new file mode 100644 index 000000000..dacf9e773 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/AlertValueActiveGlyph.java @@ -0,0 +1,38 @@ +package com.fr.design.chart.gui.active; + +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.ChartAlertValueGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.gui.active.action.SetAnalysisLineStyleAction; + +public class AlertValueActiveGlyph extends ActiveGlyph{ + ChartAlertValueGlyph alertValueGlyph; + + public AlertValueActiveGlyph(ChartComponent chartComponent,ChartAlertValueGlyph alertLine, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.alertValueGlyph = alertLine; + } + + public Point2D offset4Paint() { + Rectangle2D valueAxisBoudns = this.alertValueGlyph.getValueAxisGlyph().getBounds(); + + return new Point2D.Double( + this.parentGlyph.getShape().getBounds().getX() + valueAxisBoudns.getX(), + this.parentGlyph.getShape().getBounds().getY() + valueAxisBoudns.getY() + ); + } + + @Override + public Glyph getGlyph() { + return this.alertValueGlyph; + } + + @Override + public void goRightPane() { + new SetAnalysisLineStyleAction(chartComponent).showAnalysisLineStylePane(); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/AxisActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/AxisActiveGlyph.java new file mode 100644 index 000000000..4ddcc02cc --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/AxisActiveGlyph.java @@ -0,0 +1,43 @@ +package com.fr.design.chart.gui.active; + +import java.awt.Graphics2D; +import java.awt.geom.Point2D; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.AxisGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.gui.active.action.SetAxisStyleAction; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:00 + */ +public abstract class AxisActiveGlyph extends ActiveGlyph { + protected AxisGlyph axis; + + public AxisActiveGlyph(ChartComponent chartComponent, AxisGlyph axis, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.axis = axis; + } + + public void drawAllGlyph(Graphics2D g2d, int resolution){ + Point2D offset4Paint = offset4Paint(); + g2d.translate(offset4Paint.getX(), offset4Paint.getY()); + this.axis.drawWithOutAlert(g2d, resolution); + g2d.translate(-offset4Paint.getX(), -offset4Paint.getY()); + }; + + public void goRightPane() { + new SetAxisStyleAction(chartComponent).showAxisStylePane(); + } + + /** + * 返回 对应的属性Axis + */ + public Glyph getGlyph() { + return this.axis; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/CategoryAxisActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/CategoryAxisActiveGlyph.java new file mode 100644 index 000000000..c7028f6d5 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/CategoryAxisActiveGlyph.java @@ -0,0 +1,19 @@ +package com.fr.design.chart.gui.active; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.CategoryAxisGlyph; +import com.fr.design.chart.gui.ChartComponent; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:01 + */ +public class CategoryAxisActiveGlyph extends AxisActiveGlyph { + + public CategoryAxisActiveGlyph(ChartComponent chartComponent, CategoryAxisGlyph axis, Glyph parentGlyph) { + super(chartComponent, axis, parentGlyph); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/ChartActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/ChartActiveGlyph.java new file mode 100644 index 000000000..6fa626ce1 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/ChartActiveGlyph.java @@ -0,0 +1,39 @@ +package com.fr.design.chart.gui.active; + +import java.awt.geom.Point2D; + +import com.fr.base.chart.BaseChartGlyph; +import com.fr.base.chart.Glyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.gui.active.action.SetChartStyleAciton; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午3:54 + */ +public class ChartActiveGlyph extends ActiveGlyph { + private BaseChartGlyph glyphChart; + + public ChartActiveGlyph(ChartComponent chartComponent, BaseChartGlyph chart) { + this(chartComponent, chart, null); + } + public ChartActiveGlyph(ChartComponent chartComponent, BaseChartGlyph chart, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.glyphChart = chart; + } + + public Glyph getGlyph() { + return this.glyphChart; + } + + public Point2D offset4Paint() { + return new java.awt.Point(0, 0); + } + + public void goRightPane() { + new SetChartStyleAciton(chartComponent).showChartStylePane(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/DataLabelActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/DataLabelActiveGlyph.java new file mode 100644 index 000000000..6603ba4e0 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/DataLabelActiveGlyph.java @@ -0,0 +1,44 @@ +package com.fr.design.chart.gui.active; + +import java.awt.Graphics2D; +import java.awt.geom.Point2D; +import java.util.ArrayList; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.PlotGlyph; +import com.fr.chart.chartglyph.TextGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.gui.active.action.SetDataLabelStyleAction; + +public class DataLabelActiveGlyph extends ActiveGlyph{ + private TextGlyph dataLabel; + + public DataLabelActiveGlyph(ChartComponent chartComponent, TextGlyph dataLabel, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.dataLabel = dataLabel; + } + + public void drawAllGlyph(Graphics2D g2d, int resolution){ + Point2D offset4Paint = offset4Paint(); + g2d.translate(offset4Paint.getX(), offset4Paint.getY()); + + ArrayList allDataPointLableGlyph = new ArrayList(); + PlotGlyph plotGlyph = (PlotGlyph)(this.parentGlyph); + plotGlyph.getAllDataPointGlyph(allDataPointLableGlyph); + for(int index = 0; index < allDataPointLableGlyph.size(); index++){ + allDataPointLableGlyph.get(index).draw(g2d, resolution); + } + g2d.translate(-offset4Paint.getX(), -offset4Paint.getY()); + }; + + @Override + public Glyph getGlyph() { + return this.dataLabel; + } + + @Override + public void goRightPane() { + new SetDataLabelStyleAction(chartComponent).showDataLabelStylePane(); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/DataSeriesActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/DataSeriesActiveGlyph.java new file mode 100644 index 000000000..0543764e3 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/DataSeriesActiveGlyph.java @@ -0,0 +1,53 @@ +package com.fr.design.chart.gui.active; + +import java.awt.Graphics2D; +import java.awt.geom.Point2D; +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.DataSeries; +import com.fr.chart.chartglyph.PlotGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午3:59 + */ +public class DataSeriesActiveGlyph extends ActiveGlyph { + private DataSeries series; + + public DataSeriesActiveGlyph(ChartComponent chartComponent, DataSeries series, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.series = series; + } + + public Glyph getGlyph() { + return this.series; + } + + /** + * 界面条状 + */ + public void goRightPane() { + if(chartComponent.getEditingChart() == null) { + return; + } + + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_SERIES_TITLE); + } + + @Override + public void drawAllGlyph(Graphics2D g2d, int resolution) { + Point2D offset4Paint = offset4Paint(); + g2d.translate(offset4Paint.getX(), offset4Paint.getY()); + if(this.parentGlyph != null && this.parentGlyph instanceof PlotGlyph){ + PlotGlyph plotGlyph = (PlotGlyph)this.parentGlyph; + plotGlyph.drawShape4Series(g2d, resolution); + } + g2d.translate(-offset4Paint.getX(), -offset4Paint.getY()); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/DataSheetActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/DataSheetActiveGlyph.java new file mode 100644 index 000000000..c74d07770 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/DataSheetActiveGlyph.java @@ -0,0 +1,30 @@ +package com.fr.design.chart.gui.active; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.DataSheetGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.gui.active.action.SetDataSheetAction; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午3:57 + */ +public class DataSheetActiveGlyph extends ActiveGlyph { + private DataSheetGlyph dataSheetGlyph; + + public DataSheetActiveGlyph(ChartComponent chartComponent, DataSheetGlyph dataSheetGlyph, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.dataSheetGlyph = dataSheetGlyph; + } + + public Glyph getGlyph() { + return this.dataSheetGlyph; + } + + public void goRightPane() { + new SetDataSheetAction(chartComponent).showDataSheetStylePane(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/DateAxisActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/DateAxisActiveGlyph.java new file mode 100644 index 000000000..22d145d9e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/DateAxisActiveGlyph.java @@ -0,0 +1,18 @@ +package com.fr.design.chart.gui.active; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.DateAxisGlyph; +import com.fr.design.chart.gui.ChartComponent; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:03 + */ +public class DateAxisActiveGlyph extends AxisActiveGlyph { + public DateAxisActiveGlyph(ChartComponent chartComponent, DateAxisGlyph axis, Glyph parentGlyph) { + super(chartComponent, axis, parentGlyph); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/LegendActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/LegendActiveGlyph.java new file mode 100644 index 000000000..496009923 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/LegendActiveGlyph.java @@ -0,0 +1,30 @@ +package com.fr.design.chart.gui.active; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.LegendGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.gui.active.action.SetLegendStyleAction; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午3:58 + */ +public class LegendActiveGlyph extends ActiveGlyph { + private LegendGlyph legendGlyph; + + public LegendActiveGlyph(ChartComponent chartComponent, LegendGlyph legendGlyph, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.legendGlyph = legendGlyph; + } + + public Glyph getGlyph() { + return this.legendGlyph; + } + + public void goRightPane() { + new SetLegendStyleAction(chartComponent).showLegendStylePane(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/PlotActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/PlotActiveGlyph.java new file mode 100644 index 000000000..bf23cc839 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/PlotActiveGlyph.java @@ -0,0 +1,34 @@ +package com.fr.design.chart.gui.active; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.PlotGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.gui.active.action.SetPlotStyleAction; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午3:55 + */ +public class PlotActiveGlyph extends ActiveGlyph { + private PlotGlyph plotGlyph; + + public PlotActiveGlyph(ChartComponent chartComponent, PlotGlyph plotGlyph, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.plotGlyph = plotGlyph; + } + + public Glyph getGlyph() { + return this.plotGlyph; + } + + public void goRightPane() { + new SetPlotStyleAction(chartComponent).showPlotPane(); + } + + public java.awt.Point offset4Paint() { + return new java.awt.Point(0, 0); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/RadarAxisActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/RadarAxisActiveGlyph.java new file mode 100644 index 000000000..682a0ae3b --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/RadarAxisActiveGlyph.java @@ -0,0 +1,18 @@ +package com.fr.design.chart.gui.active; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.RadarAxisGlyph; +import com.fr.design.chart.gui.ChartComponent; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:03 + */ +public class RadarAxisActiveGlyph extends AxisActiveGlyph { + public RadarAxisActiveGlyph(ChartComponent chartComponent, RadarAxisGlyph axis, Glyph parentGlyph) { + super(chartComponent, axis, parentGlyph); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/RangeAxisActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/RangeAxisActiveGlyph.java new file mode 100644 index 000000000..071d42ab5 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/RangeAxisActiveGlyph.java @@ -0,0 +1,18 @@ +package com.fr.design.chart.gui.active; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.ValueAxisGlyph; +import com.fr.design.chart.gui.ChartComponent; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:02 + */ +public class RangeAxisActiveGlyph extends AxisActiveGlyph { + public RangeAxisActiveGlyph(ChartComponent chartComponent, ValueAxisGlyph axis, Glyph parentGlyph) { + super(chartComponent, axis, parentGlyph); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/TextActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/TextActiveGlyph.java new file mode 100644 index 000000000..9c989ea45 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/TextActiveGlyph.java @@ -0,0 +1,35 @@ +package com.fr.design.chart.gui.active; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.TitleGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.gui.active.action.SetTitleStyleAction; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午3:57 + */ +public class TextActiveGlyph extends ActiveGlyph { + private TitleGlyph titleGlyph; + + public TextActiveGlyph(ChartComponent chartComponent, TitleGlyph titleGlyph, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.titleGlyph = titleGlyph; + } + + public Glyph getGlyph() { + return this.titleGlyph; + } + + public java.awt.Point offset4Paint() { + return new java.awt.Point(0, 0); + } + + public void goRightPane() { + new SetTitleStyleAction(chartComponent).showTitlePane(); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/TrendLineActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/TrendLineActiveGlyph.java new file mode 100644 index 000000000..9bd457d68 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/TrendLineActiveGlyph.java @@ -0,0 +1,43 @@ +package com.fr.design.chart.gui.active; + +import java.awt.Graphics2D; +import java.awt.geom.Point2D; +import java.util.ArrayList; +import java.util.List; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.PlotGlyph; +import com.fr.chart.chartglyph.TrendLineGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.gui.active.action.SetAnalysisLineStyleAction; + +public class TrendLineActiveGlyph extends ActiveGlyph{ + private TrendLineGlyph trendLine; + public TrendLineActiveGlyph(ChartComponent chartComponent,TrendLineGlyph trendLine, Glyph parentGlyph) { + super(chartComponent, parentGlyph); + this.trendLine = trendLine; + } + + @Override + public Glyph getGlyph() { + return this.trendLine; + } + + public void drawAllGlyph(Graphics2D g2d, int resolution){ + Point2D offset4Paint = offset4Paint(); + g2d.translate(offset4Paint.getX(), offset4Paint.getY()); + PlotGlyph plotGlyph = (PlotGlyph)this.parentGlyph; + List list = new ArrayList(); + plotGlyph.getAllTrendLineGlyph(list); + for(int index = 0; index < list.size(); index++){ + list.get(index).draw(g2d, resolution); + } + g2d.translate(-offset4Paint.getX(), -offset4Paint.getY()); + }; + + @Override + public void goRightPane() { + new SetAnalysisLineStyleAction(chartComponent).showAnalysisLineStylePane(); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/ValueAxisActiveGlyph.java b/designer_chart/src/com/fr/design/chart/gui/active/ValueAxisActiveGlyph.java new file mode 100644 index 000000000..cc37df5ca --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/ValueAxisActiveGlyph.java @@ -0,0 +1,19 @@ +package com.fr.design.chart.gui.active; + +import com.fr.base.chart.Glyph; +import com.fr.chart.chartglyph.ValueAxisGlyph; +import com.fr.design.chart.gui.ChartComponent; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:02 + */ +public class ValueAxisActiveGlyph extends AxisActiveGlyph { + + public ValueAxisActiveGlyph(ChartComponent chartComponent, ValueAxisGlyph axis, Glyph parentGlyph) { + super(chartComponent, axis, parentGlyph); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/ChartComponentAction.java b/designer_chart/src/com/fr/design/chart/gui/active/action/ChartComponentAction.java new file mode 100644 index 000000000..061f87cd6 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/ChartComponentAction.java @@ -0,0 +1,47 @@ +package com.fr.design.chart.gui.active.action; + +import com.fr.base.chart.BaseChart; +import com.fr.chart.chartattr.Axis; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartglyph.AxisGlyph; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.actions.UpdateAction; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午5:05 + */ +public abstract class ChartComponentAction extends UpdateAction { + protected ChartComponent chartComponent; + + public ChartComponentAction(ChartComponent chartComponent) { + this.chartComponent = chartComponent; + } + + public void reset() { + chartComponent.reset(); + } + + public void repaint() { + chartComponent.repaint(); + } + + public BaseChart getEditingChart() { + return chartComponent.getEditingChart(); + } + + public ChartCollection getChartCollection() { + return chartComponent.getChartCollection(); + } + + public Axis getActiveAxis() { + return chartComponent.getActiveAxis(); + } + + public AxisGlyph getActiveAxisGlyph() { + return chartComponent.getActiveAxisGlyph(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/SetAnalysisLineStyleAction.java b/designer_chart/src/com/fr/design/chart/gui/active/action/SetAnalysisLineStyleAction.java new file mode 100644 index 000000000..b4ca9a1c8 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/SetAnalysisLineStyleAction.java @@ -0,0 +1,27 @@ +package com.fr.design.chart.gui.active.action; + +import java.awt.event.ActionEvent; + +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.general.Inter; + +public class SetAnalysisLineStyleAction extends ChartComponentAction{ + + public SetAnalysisLineStyleAction(ChartComponent chartComponent) { + super(chartComponent); + this.setName(Inter.getLocText(new String[]{"Set", "AnalysisLine"})); + } + + @Override + public void actionPerformed(ActionEvent e) { + showAnalysisLineStylePane(); + } + + public void showAnalysisLineStylePane(){ + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_LINE_TITLE); + } + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/SetAxisStyleAction.java b/designer_chart/src/com/fr/design/chart/gui/active/action/SetAxisStyleAction.java new file mode 100644 index 000000000..26484bfb5 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/SetAxisStyleAction.java @@ -0,0 +1,33 @@ +package com.fr.design.chart.gui.active.action; + +import java.awt.event.ActionEvent; + +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午5:10 + */ +public class SetAxisStyleAction extends ChartComponentAction { + public SetAxisStyleAction(ChartComponent chartComponent) { + super(chartComponent); + this.setName(Inter.getLocText(new String[]{"Set", "ChartF-Axis", "Format"})); + } + + public void actionPerformed(ActionEvent e) { + showAxisStylePane(); + } + + public void showAxisStylePane() { + String axisType = getActiveAxisGlyph() == null ? StringUtils.EMPTY : getActiveAxisGlyph().getAxisType(); + + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_AXIS_TITLE, axisType); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/SetChartStyleAciton.java b/designer_chart/src/com/fr/design/chart/gui/active/action/SetChartStyleAciton.java new file mode 100644 index 000000000..b3effe37a --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/SetChartStyleAciton.java @@ -0,0 +1,31 @@ +package com.fr.design.chart.gui.active.action; + +import java.awt.event.ActionEvent; + +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午5:00 + */ +public class SetChartStyleAciton extends ChartComponentAction { + + public SetChartStyleAciton(ChartComponent chartComponent) { + super(chartComponent); + this.setName(Inter.getLocText(new String[]{"DashBoard-ChartFloat", "Style"})); + } + + public void actionPerformed(ActionEvent e) { + showChartStylePane(); + } + + public void showChartStylePane() { + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_AREA_TITLE, PaneTitleConstants.CHART_STYLE_AREA_AREA_TITLE); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/SetDataLabelStyleAction.java b/designer_chart/src/com/fr/design/chart/gui/active/action/SetDataLabelStyleAction.java new file mode 100644 index 000000000..e565d8e16 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/SetDataLabelStyleAction.java @@ -0,0 +1,26 @@ +package com.fr.design.chart.gui.active.action; + +import java.awt.event.ActionEvent; + +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.general.Inter; + +public class SetDataLabelStyleAction extends ChartComponentAction{ + + public SetDataLabelStyleAction(ChartComponent chartComponent) { + super(chartComponent); + this.setName(Inter.getLocText(new String[]{"Set", "Data-Label"})); + } + + @Override + public void actionPerformed(ActionEvent e) { + showDataLabelStylePane(); + } + + public void showDataLabelStylePane() { + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_LABEL_TITLE); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSeriesAttrAction.java b/designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSeriesAttrAction.java new file mode 100644 index 000000000..96480ebd8 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSeriesAttrAction.java @@ -0,0 +1,26 @@ +package com.fr.design.chart.gui.active.action; + +import java.awt.event.ActionEvent; + +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午5:28 + */ +public class SetDataSeriesAttrAction extends ChartComponentAction { + public SetDataSeriesAttrAction(ChartComponent chartComponent) { + super(chartComponent); + this.setName(Inter.getLocText(new String[]{"Set", "ChartF-Series", "Format"})); + } + + public void actionPerformed(ActionEvent e) { + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_SERIES_TITLE); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSheetAction.java b/designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSheetAction.java new file mode 100644 index 000000000..6aedd01b1 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/SetDataSheetAction.java @@ -0,0 +1,33 @@ +package com.fr.design.chart.gui.active.action; + +import java.awt.event.ActionEvent; + +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:49 + */ +public class SetDataSheetAction extends ChartComponentAction { + + private static final long serialVersionUID = -4763886493273213850L; + + public SetDataSheetAction(ChartComponent chartComponent) { + super(chartComponent); + this.setName(Inter.getLocText("Chart_Set_Data_Sheet")); + } + + public void actionPerformed(ActionEvent e) { + showDataSheetStylePane(); + } + + public void showDataSheetStylePane() { + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_DATA_TITLE); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/SetLegendStyleAction.java b/designer_chart/src/com/fr/design/chart/gui/active/action/SetLegendStyleAction.java new file mode 100644 index 000000000..0a203db88 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/SetLegendStyleAction.java @@ -0,0 +1,32 @@ +package com.fr.design.chart.gui.active.action; + +import java.awt.event.ActionEvent; + +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:56 + */ +public class SetLegendStyleAction extends ChartComponentAction { + private static final long serialVersionUID = 3253190503195130478L; + + public SetLegendStyleAction(ChartComponent chartComponent) { + super(chartComponent); + this.setName(Inter.getLocText("Set_Legend_Sytle")); + } + + public void actionPerformed(ActionEvent e) { + showLegendStylePane(); + } + + public void showLegendStylePane() { + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_LEGNED_TITLE); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/SetPlotStyleAction.java b/designer_chart/src/com/fr/design/chart/gui/active/action/SetPlotStyleAction.java new file mode 100644 index 000000000..b49fb6ac6 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/SetPlotStyleAction.java @@ -0,0 +1,32 @@ +package com.fr.design.chart.gui.active.action; + +import java.awt.event.ActionEvent; + +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:58 + */ +public class SetPlotStyleAction extends ChartComponentAction { + private static final long serialVersionUID = 2894127568015714372L; + + public SetPlotStyleAction(ChartComponent chartComponent) { + super(chartComponent); + this.setName(Inter.getLocText(new String[]{"Set", "ChartF-Plot"})); + } + + public void actionPerformed(ActionEvent e) { + showPlotPane(); + } + + public void showPlotPane() { + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_AREA_TITLE, PaneTitleConstants.CHART_STYLE_AREA_PLOT_TITLE); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/gui/active/action/SetTitleStyleAction.java b/designer_chart/src/com/fr/design/chart/gui/active/action/SetTitleStyleAction.java new file mode 100644 index 000000000..f86f302a5 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/gui/active/action/SetTitleStyleAction.java @@ -0,0 +1,32 @@ +package com.fr.design.chart.gui.active.action; + +import java.awt.event.ActionEvent; + +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-22 + * Time : 下午4:52 + */ +public class SetTitleStyleAction extends ChartComponentAction { + private static final long serialVersionUID = -4763886493273213850L; + + public SetTitleStyleAction(ChartComponent chartComponent) { + super(chartComponent); + this.setName(Inter.getLocText(new String[]{"Set", "Title", "Style"})); + } + + public void actionPerformed(ActionEvent e) { + showTitlePane(); + } + + public void showTitlePane() { + ChartEditPane.getInstance().GoToPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_TITLE_TITLE); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/javascript/ChartEmailPane.java b/designer_chart/src/com/fr/design/chart/javascript/ChartEmailPane.java new file mode 100644 index 000000000..040a24fed --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/javascript/ChartEmailPane.java @@ -0,0 +1,81 @@ +package com.fr.design.chart.javascript; + +import javax.swing.JComponent; +import javax.swing.JScrollPane; +import javax.swing.SwingConstants; + +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.javascript.EmailPane; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.JTemplate; +import com.fr.general.Inter; +import com.fr.js.EmailJavaScript; + +/** + * + * @author jim + * + */ +public class ChartEmailPane extends EmailPane{ + + private UITextField itemNameTextField; + + @Override + protected void initCenterPane(UILabel mainTextLabel, JScrollPane scrollPane, double fill, double preferred) { + double[] columnSize = { preferred, fill}; + itemNameTextField = new UITextField(); + JTemplate jTemplate = DesignerContext.getDesignerFrame().getSelectedJTemplate(); + // 是否支持导出控制图表的超链邮件是否显示showTplContent + boolean supportExport = jTemplate.isJWorkBook(); + if (supportExport) { + double[] rSizes = { preferred, preferred, preferred, preferred, preferred, preferred, fill, preferred, preferred}; + showTplContent = new UICheckBox(Inter.getLocText("Email-Can_Preview_Report_Content")); + centerPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ + {new UILabel(Inter.getLocText("Name") + ":", SwingConstants.RIGHT), itemNameTextField}, + {new UILabel(), tipsPane1}, + createLinePane(Inter.getLocText("HJS-Mail_to"), maitoEditor = new UITextField()), + createLinePane(Inter.getLocText("HJS-CC_to"), ccEditor = new UITextField()), + createLinePane(Inter.getLocText("EmailPane-BCC"), bccEditor = new UITextField()), + createLinePane(Inter.getLocText("EmailPane-mailSubject"), titleEditor = new UITextField()), + {mainTextLabel, scrollPane}, + {new UILabel(), showTplContent}, + {new UILabel(), tipsPane2}},rSizes, columnSize, 6); + } else { + double[] rSizes = { preferred, preferred, preferred, preferred, preferred, preferred, fill, preferred}; + centerPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ + {new UILabel(Inter.getLocText("Name") + ":", SwingConstants.RIGHT), itemNameTextField}, + {new UILabel(), tipsPane1}, + createLinePane(Inter.getLocText("HJS-Mail_to"), maitoEditor = new UITextField()), + createLinePane(Inter.getLocText("HJS-CC_to"), ccEditor = new UITextField()), + createLinePane(Inter.getLocText("EmailPane-BCC"), bccEditor = new UITextField()), + createLinePane(Inter.getLocText("EmailPane-mailSubject"), titleEditor = new UITextField()), + {mainTextLabel, scrollPane}, + {new UILabel(), tipsPane2}},rSizes, columnSize, 8); + } + } + + protected void checkEmailConfig(boolean valid) { + super.checkEmailConfig(valid); + if(itemNameTextField != null){ + itemNameTextField.setEnabled(valid); + } + } + + public void populateBean(EmailJavaScript ob) { + if(itemNameTextField != null){ + itemNameTextField.setName(ob == null ? null : ob.getItemName()); + } + super.populateBean(ob); + } + + public void updateBean(EmailJavaScript email) { + if(itemNameTextField != null){ + email.setItemName(itemNameTextField.getText()); + } + super.updateBean(email); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/GisMapDataPane.java b/designer_chart/src/com/fr/design/chart/report/GisMapDataPane.java new file mode 100644 index 000000000..6910681e0 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/GisMapDataPane.java @@ -0,0 +1,155 @@ +package com.fr.design.chart.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.GisMapReportDefinition; +import com.fr.chart.chartdata.GisMapTableDefinition; +import com.fr.chart.chartdata.TopDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.dialog.BasicScrollPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.data.DataContentsPane; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +public class GisMapDataPane extends DataContentsPane{ + private static final long serialVersionUID = -190573722921978406L; + + private UIComboBoxPane dataFromPane;// 数据来源的box界面 + + private GisMapReportDataContentPane reportPane; + private GisMapTableDataContentPane tablePane; + private AttributeChangeListener listener; + + public GisMapDataPane(AttributeChangeListener listener) { + super(); + this.listener = listener; + } + + + /** + * 判断准许的情况 + * @param ob 传入的对象 + * @return 返回是否允许 + */ + public boolean accept(Object ob) { + return ob instanceof TopDefinition; + } + + /** + * 重置 + */ + public void reset() { + + } + + /** + * 界面标题 + * @return 界面标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("ChartF-Gis"); + } + + public void setSupportCellData(boolean surpportCellData) { + dataFromPane.justSupportOneSelect(surpportCellData); + } + + + @Override + public void populate(ChartCollection collection) { + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + + if(definition instanceof GisMapTableDefinition) { + dataFromPane.setSelectedIndex(0); + tablePane.populateBean((GisMapTableDefinition)definition); + }else if(definition instanceof GisMapReportDefinition) { + dataFromPane.setSelectedIndex(1); + reportPane.populateBean((GisMapReportDefinition)definition); + } + + this.initAllListeners(); + this.addAttributeChangeListener(listener); + } + + @Override + public void update(ChartCollection collection) { + if(dataFromPane.getSelectedIndex() == 0){ + collection.getSelectedChart().setFilterDefinition(tablePane.updateBean()); + }else if(dataFromPane.getSelectedIndex() == 1){ + collection.getSelectedChart().setFilterDefinition(reportPane.updateBean()); + } + } + + @Override + protected JPanel createContentPane() { + return new BasicScrollPane() { + + @Override + protected JPanel createContentPane() { + JPanel contentPane = new JPanel(); + contentPane.setLayout(new BorderLayout()); + + contentPane.add(dataFromPane = new UIComboBoxPane() { + protected void initLayout() { + this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p,f }; + double[] rowSize = { p}; + Component[][] components = new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText("ChartF-Data-Resource") + ":"), jcb}, + } ; + + JPanel northPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 0); + + this.add(northPane, BorderLayout.NORTH); + this.add(cardPane, BorderLayout.CENTER); + } + + @Override + protected List> initPaneList() { + List list = new ArrayList(); + + list.add(tablePane = new GisMapTableDataContentPane());// 数据集界面 + list.add(reportPane = new GisMapReportDataContentPane());// 单元格界面 + + return list; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("Data_Setting"); + } + }, BorderLayout.CENTER); + + dataFromPane.setBorder(BorderFactory.createEmptyBorder(10 ,0, 0, 0)); + return contentPane; + } + + @Override + public void populateBean(Chart ob) { + // TODO Auto-generated method stub + + } + + @Override + protected String title4PopupWindow() { + // TODO Auto-generated method stub + return null; + }}; + + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/GisMapDataPane4Chart.java b/designer_chart/src/com/fr/design/chart/report/GisMapDataPane4Chart.java new file mode 100644 index 000000000..00aced486 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/GisMapDataPane4Chart.java @@ -0,0 +1,69 @@ +package com.fr.design.chart.report; + +import com.fr.base.TableData; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.*; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.AbstractChartDataPane4Chart; +import com.fr.design.mainframe.chart.gui.ChartDataPane; + +import javax.swing.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class GisMapDataPane4Chart extends AbstractChartDataPane4Chart { + + private GisMapTableDataContentPane4Chart tablePane = new GisMapTableDataContentPane4Chart(); + + public GisMapDataPane4Chart(AttributeChangeListener listener, ChartDataPane parent) { + super(listener, parent); + } + + protected JPanel getDataContentPane() { + return tablePane; + } + + @Override + public void populate(ChartCollection collection) { + tablePane = new GisMapTableDataContentPane4Chart(); + if (collection != null && collection.getSelectedChart() != null) { + Chart chart = collection.getSelectedChart(); + TopDefinitionProvider definition = chart.getFilterDefinition(); + if (definition instanceof TableDataDefinition) { + TableData tableData = ((TableDataDefinition) definition).getTableData(); + if (tableData != null) { + populateChoosePane(tableData); + fireTableDataChange(); + } + } + if (definition instanceof GisMapTableDefinition) { + tablePane.populateBean((GisMapTableDefinition) definition); + } + } + this.remove(leftContentPane); + this.initContentPane(); + this.validate(); + dataSource.addItemListener(dsListener); + initAllListeners(); + initSelfListener(tablePane); + this.addAttributeChangeListener(attributeChangeListener); + } + + @Override + public void update(ChartCollection collection) { + collection.getSelectedChart().setFilterDefinition(tablePane.updateBean()); + } + + + /** + * 数据集数据改变 + */ + public void fireTableDataChange() { + tablePane.fireTableDataChange(choosePane.getTableDataWrapper()); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/GisMapReportDataContentPane.java b/designer_chart/src/com/fr/design/chart/report/GisMapReportDataContentPane.java new file mode 100644 index 000000000..1c2a97027 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/GisMapReportDataContentPane.java @@ -0,0 +1,301 @@ +package com.fr.design.chart.report; + +import java.awt.*; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JTable; +import javax.swing.SwingConstants; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import com.fr.base.Formula; +import com.fr.base.Utils; +import com.fr.chart.chartdata.BaseSeriesDefinition; +import com.fr.chart.chartdata.GisMapReportDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.constants.UIConstants; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.general.Inter; +import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; + +/** + * 属性表gis地图单元格数据源设置界面 + * + * @author eason + */ +public class GisMapReportDataContentPane extends FurtherBasicBeanPane implements UIObserver { + private UIButtonGroup addressType; + private UIButtonGroup lnglatOrder; + private TinyFormulaPane addressPane; + private TinyFormulaPane addressNamePane; + private UICorrelationPane seriesPane; + private JPanel orderPane; + private ArrayList changeListeners = new ArrayList(); + + public GisMapReportDataContentPane() { + initCom(); + } + + private void initCom() { + this.setLayout(new BorderLayout(0, 0)); + addressType = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Address"), Inter.getLocText("Chart-LngLat")}); + lnglatOrder = new UIButtonGroup(new String[]{Inter.getLocText("Chart-LngFirst"), Inter.getLocText("Chart-LatFirst")}); + addressPane = new TinyFormulaPane(); + addressNamePane = new TinyFormulaPane(); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = new double[]{p, f}; + double[] rowSize = new double[]{p, p, p}; + + orderPane = new JPanel(new BorderLayout(LayoutConstants.VGAP_MEDIUM, 0)) { + @Override + public Dimension getPreferredSize() { + if (this.isVisible()) { + return super.getPreferredSize(); + } else { + return new Dimension(0, 0); + } + } + }; + orderPane.add(new UILabel(Inter.getLocText("Chart-LatLngOrder")), BorderLayout.WEST); + orderPane.add(lnglatOrder, BorderLayout.CENTER); + orderPane.setVisible(false); + lnglatOrder.setSelectedIndex(0); + addressType.setSelectedIndex(0); + Component[][] components = new Component[][]{ + new Component[]{addressType, addressPane}, + new Component[]{orderPane, null}, + new Component[]{new UILabel(" " +Inter.getLocText("Chart-Address-Name")+":", SwingConstants.RIGHT), addressNamePane}, + }; + JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + + this.add(northPane, BorderLayout.NORTH); + + String[] columnNames = new String[]{Inter.getLocText(new String[]{"Filed", "Title"}), Inter.getLocText("Area_Value")}; + seriesPane = new UICorrelationPane(columnNames) { + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + }; + + this.add(seriesPane, BorderLayout.CENTER); + } + + /** + * 界面接入. + * @param ob 对象 + * @return true表示接受 + */ + public boolean accept(Object ob) { + return true; + } + + /** + * 重置 + */ + public void reset() { + + } + + /** + * 界面弹出标题. + * @return 标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("Cell"); + } + + @Override + public void populateBean(GisMapReportDefinition ob) { + if (ob.getCategoryName() != null) { + if (ob.isAddress()) { + addressType.setSelectedIndex(0); + orderPane.setVisible(false); + } else { + addressType.setSelectedIndex(1); + orderPane.setVisible(true); + } + + if (ob.isLngFirst()) { + lnglatOrder.setSelectedIndex(0); + } else { + lnglatOrder.setSelectedIndex(1); + } + + addressPane.populateBean(Utils.objectToString(ob.getCategoryName())); + if (ob.getAddressName() != null) { + addressNamePane.populateBean(Utils.objectToString(ob.getAddressName())); + } + int size = ob.getTitleValueSize(); + List paneList = new ArrayList(); + for (int i = 0; i < size; i++) { + BaseSeriesDefinition first = ob.getTitleValueWithIndex(i); + if (first != null && first.getSeriesName() != null && first.getValue() != null) { + paneList.add(new Object[]{first.getSeriesName(), first.getValue()}); + } + } + if (!paneList.isEmpty()) { + seriesPane.populateBean(paneList); + } + } + } + + @Override + public GisMapReportDefinition updateBean() { + GisMapReportDefinition reportDefinition = new GisMapReportDefinition(); + if (this.addressType.getSelectedIndex() == 0) { + reportDefinition.setAddressType(true); + orderPane.setVisible(false); + } else { + reportDefinition.setAddressType(false); + orderPane.setVisible(true); + } + + if (this.lnglatOrder.getSelectedIndex() == 0) { + reportDefinition.setLnglatOrder(true); + } else { + reportDefinition.setLnglatOrder(false); + } + + String address = addressPane.updateBean(); + if (StringUtils.isBlank(address)) { + return null; + } + if (StableUtils.canBeFormula(address)) { + reportDefinition.setCategoryName(new Formula(address)); + } else { + reportDefinition.setCategoryName(address); + } + + String addressName = addressNamePane.updateBean(); + if (addressName != null && !StringUtils.isBlank(addressName)) { + if (StableUtils.canBeFormula(addressName)) { + reportDefinition.setAddressName(addressName); + } else { + reportDefinition.setAddressName(addressName); + } + } + List values = seriesPane.updateBean(); + if (values != null && !values.isEmpty()) { + for (int i = 0, size = values.size(); i < size; i++) { + Object[] objects = (Object[]) values.get(i); + Object name = objects[0]; + Object value = objects[1]; + + if (StableUtils.canBeFormula(value)) { + value = new Formula(Utils.objectToString(value)); + } + SeriesDefinition definition = new SeriesDefinition(name, value); + reportDefinition.addTitleValue(definition); + } + } + return reportDefinition; + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(final UIObserverListener listener) { + changeListeners.add(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } + + private class InnerTableEditor extends UITableEditor { + private JComponent editorComponent; + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + if (editorComponent instanceof TinyFormulaPane) { + return ((TinyFormulaPane) editorComponent).getUITextField().getText(); + } else if (editorComponent instanceof UITextField) { + return ((UITextField) editorComponent).getText(); + } + + return super.getCellEditorValue(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == table.getModel().getColumnCount()) { + return null; + } + return getEditorComponent(column, value); + } + + private JComponent getEditorComponent(int column, Object value) { + if (column == 0) { + UITextField field = new UITextField(); + addListener4UITextFiled(field); + + if (value != null) { + field.setText(Utils.objectToString(value)); + } + editorComponent = field; + } else { + TinyFormulaPane tinyPane = new TinyFormulaPane() { + @Override + public void okEvent() { + seriesPane.stopCellEditing(); + seriesPane.fireTargetChanged(); + } + }; + tinyPane.setBackground(UIConstants.FLESH_BLUE); + + addListener4UITextFiled(tinyPane.getUITextField()); + + if (value != null) { + tinyPane.getUITextField().setText(Utils.objectToString(value)); + } + + editorComponent = tinyPane; + } + return editorComponent; + } + + private void addListener4UITextFiled(UITextField textField) { + + textField.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent e) { +// seriesPane.stopCellEditing(); //kunsnat: 不stop是因为可能直接点击公式编辑按钮, 否则需要点击两次才能弹出. + seriesPane.fireTargetChanged(); + } + }); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java b/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java new file mode 100644 index 000000000..4e0443c9f --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java @@ -0,0 +1,350 @@ +package com.fr.design.chart.report; + +import com.fr.base.Utils; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.chartdata.GisMapTableDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.design.constants.LayoutConstants; +import com.fr.data.impl.NameTableData; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.ArrayList; +import java.util.List; + +/** + * 属性表gis地图数据集数据源定义面板 + * @author eason + * + */ +public class GisMapTableDataContentPane extends FurtherBasicBeanPane implements UIObserver { + + private DatabaseTableDataPane fromTableData; + + private ArrayList changeListeners = new ArrayList(); + private String[] initNames = {""}; + + private UIButtonGroup addressType; + private UIButtonGroup lnglatOrder; + private UIComboBox addressBox; + private UIComboBox addressNameBox; + private UICorrelationPane titleValuePane; + private JPanel orderPane; + + public GisMapTableDataContentPane() { + this.setLayout(new BorderLayout()); + + JPanel northPane = new JPanel(); + this.add(northPane, BorderLayout.NORTH); + + northPane.setLayout(new FlowLayout(FlowLayout.LEFT)); + + UILabel label = new UILabel(Inter.getLocText("Chart-Select_Data_Set") + ":", SwingConstants.LEFT); + + northPane.add(fromTableData = new DatabaseTableDataPane(label) { + @Override + protected void userEvent() { + refresh2ComboBox(); + } + }); + fromTableData.setPreferredSize(new Dimension(218, 20)); + northPane.add(fromTableData); + + addressType = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Gis_Address"), Inter.getLocText("Chart-Gis_LatLng")}); + lnglatOrder = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Lng_First"),Inter.getLocText("Chart-Lat_First")}); + addressBox = new UIComboBox(); + addressNameBox = new UIComboBox(); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = new double[]{p, f}; + double[] rowSize = new double[]{p, p, p}; + orderPane = new JPanel(new BorderLayout(LayoutConstants.VGAP_MEDIUM,0)){ + @Override + public Dimension getPreferredSize() { + if(this.isVisible()){ + return super.getPreferredSize(); + }else{ + return new Dimension(0,0); + } + } + }; + orderPane.add(new UILabel(Inter.getLocText("Chart-LatLng_Order")), BorderLayout.WEST); + orderPane.add(lnglatOrder, BorderLayout.CENTER); + orderPane.setVisible(false); + lnglatOrder.setSelectedIndex(0); + addressType.setSelectedIndex(0); + + addressNameBox.removeAllItems(); + addressNameBox.addItem(Inter.getLocText("Chart-Use_None")); + + Component[][] components = new Component[][]{ + new Component[]{addressType, addressBox}, + new Component[]{orderPane,null}, + new Component[]{new UILabel(Inter.getLocText("Chart-Address_Name") + ":", SwingConstants.RIGHT), addressNameBox}, + }; + JPanel centerPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.CENTER); + pane.setLayout(new BorderLayout()); + + pane.add(centerPane, BorderLayout.NORTH); + + String[] titles = {Inter.getLocText("Chart-Area_Title"), Inter.getLocText("Chart-Area_Value")}; + titleValuePane = new UICorrelationPane(titles){ + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + }; + + pane.add(titleValuePane, BorderLayout.CENTER); + } + + private void refresh2ComboBox() {// 刷新地址 地址名 名称列表 + TableDataWrapper tableDataWrappe = fromTableData.getTableDataWrapper(); + if (tableDataWrappe == null) { + return; + } + List columnNameList = tableDataWrappe.calculateColumnNameList(); + initNames = columnNameList.toArray(new String[columnNameList.size()]); + + addressBox.removeAllItems(); + addressNameBox.removeAllItems(); + addressNameBox.addItem(Inter.getLocText("Chart-Use_None")); + + for(int i = 0, size = initNames.length; i < size; i++) { + addressBox.addItem(initNames[i]); + addressNameBox.addItem(initNames[i]); + } + + addressBox.getModel().setSelectedItem(null); + addressNameBox.getModel().setSelectedItem(null); + + stopEditing(); + } + /** + * 界面接入 + * @param ob 对象 + * @return true表示接受 + */ + public boolean accept(Object ob) { + return false; + } + + /** + * 界面重置 + */ + public void reset() { + + } + + /** + * 界面弹出标题 + * @return 标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("Chart-DS_TableData"); + } + + private void stopEditing() { + } + + @Override + public void populateBean(GisMapTableDefinition ob) { + stopEditing(); + if (ob instanceof GisMapTableDefinition) { + GisMapTableDefinition mapDefinition = (GisMapTableDefinition) ob; + fromTableData.populateBean(((NameTableData) mapDefinition.getTableData())); + + if(ob.isAddress()){ + addressType.setSelectedIndex(0); + orderPane.setVisible(false); + }else{ + addressType.setSelectedIndex(1); + orderPane.setVisible(true); + } + + if(ob.isLngFirst()){ + lnglatOrder.setSelectedIndex(0); + }else{ + lnglatOrder.setSelectedIndex(1); + } + + addressBox.setSelectedItem(mapDefinition.getAddress()); + + if(StringUtils.isEmpty(mapDefinition.getAddressName())) { + addressNameBox.setSelectedItem(Inter.getLocText("Chart-Use_None")); + } else { + addressNameBox.setSelectedItem(mapDefinition.getAddressName()); + } + + List paneList = new ArrayList(); + int titleValueSize = mapDefinition.getTittleValueSize(); + for(int i = 0; i < titleValueSize; i++) { + SeriesDefinition definition = mapDefinition.getTittleValueWithIndex(i); + if(definition != null && definition.getSeriesName() != null && definition.getValue() != null) { + paneList.add(new Object[]{definition.getSeriesName(), definition.getValue()}); + } + } + + if(!paneList.isEmpty()) { + titleValuePane.populateBean(paneList); + } + } + } + + @Override + public GisMapTableDefinition updateBean() {// 从一行内容中update + stopEditing(); + + GisMapTableDefinition definition = new GisMapTableDefinition(); + + TableDataWrapper tableDataWrappe = fromTableData.getTableDataWrapper(); + if (tableDataWrappe == null || addressBox.getSelectedItem() == null) { + return null; + } + + definition.setTableData(new NameTableData(tableDataWrappe.getTableDataName())); + definition.setAddress(Utils.objectToString(addressBox.getSelectedItem())); + + if(this.addressType.getSelectedIndex() == 0){ + definition.setAddressType(true); + lnglatOrder.setVisible(false); + }else{ + definition.setAddressType(false); + lnglatOrder.setVisible(true); + } + + if(this.lnglatOrder.getSelectedIndex() == 0){ + definition.setLnglatOrder(true); + }else{ + definition.setLnglatOrder(false); + } + + if(addressNameBox.getSelectedItem() != null){ + String adName = Utils.objectToString(addressNameBox.getSelectedItem()); + if(ArrayUtils.contains(ChartConstants.NONE_KEYS, adName)) { + definition.setAddressName(StringUtils.EMPTY); + } else { + definition.setAddressName(adName); + } + } + + List paneList = titleValuePane.updateBean(); + for(int i = 0, size = paneList.size(); i < size; i++) { + Object[] values = (Object[])paneList.get(i); + if(values.length == 2) { + SeriesDefinition seriesDefinition = new SeriesDefinition(); + seriesDefinition.setSeriesName(values[0]); + seriesDefinition.setValue(values[1]); + definition.addTittleValue(seriesDefinition); + } + } + + return definition; + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(final UIObserverListener listener) { + changeListeners.add(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } + + private class InnerTableEditor extends UITableEditor { + private JComponent editorComponent; + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + if(editorComponent instanceof UITextField) { + UITextField textField = (UITextField)editorComponent; + return textField.getText(); + } else if(editorComponent instanceof UIComboBox) { + UIComboBox boxPane = (UIComboBox)editorComponent; + return boxPane.getSelectedItem(); + } + return super.getCellEditorValue(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == table.getModel().getColumnCount()) { + return null; + } + if(column == 0 ) { + UITextField text = new UITextField(); + if(value != null) { + text.setText(Utils.objectToString(value)); + } + + text.addFocusListener(new FocusAdapter() { + public void focusLost(FocusEvent e) { + titleValuePane.stopCellEditing(); + titleValuePane.fireTargetChanged(); + } + }); + + this.editorComponent = text; + } else { + UIComboBox box = new UIComboBox(initNames); + box.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + titleValuePane.fireTargetChanged(); + titleValuePane.stopCellEditing(); + } + }); + + if (value != null && StringUtils.isNotEmpty(value.toString())) { + box.setSelectedItem(value); + } else { + box.setSelectedItem(value); + } + + this.editorComponent = box; + } + return this.editorComponent; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane4Chart.java b/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane4Chart.java new file mode 100644 index 000000000..2f2f869b9 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane4Chart.java @@ -0,0 +1,341 @@ +package com.fr.design.chart.report; + +import com.fr.base.Utils; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.chartdata.GisMapTableDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class GisMapTableDataContentPane4Chart extends FurtherBasicBeanPane implements UIObserver { + + private ArrayList changeListeners = new ArrayList(); + private String[] initNames = {""}; + + private UIButtonGroup addressType; + private UIButtonGroup lnglatOrder; + private UIComboBox addressBox; + private UIComboBox addressNameBox; + private UICorrelationPane titleValuePane; + private JPanel orderPane; + private TableDataWrapper tableDataWrapper; + + public GisMapTableDataContentPane4Chart() { + this.setLayout(new BorderLayout()); + + addressType = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Gis_Address"), Inter.getLocText("Chart-Gis_LatLng")}); + lnglatOrder = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Lng_First"), Inter.getLocText("Chart-Lat_First")}); + addressBox = new UIComboBox(); + addressNameBox = new UIComboBox(); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = new double[]{p, f}; + double[] rowSize = new double[]{p, p, p}; + orderPane = new JPanel(new BorderLayout(LayoutConstants.VGAP_MEDIUM, 0)) { + @Override + public Dimension getPreferredSize() { + if (this.isVisible()) { + return super.getPreferredSize(); + } else { + return new Dimension(0, 0); + } + } + }; + orderPane.add(new UILabel(Inter.getLocText("Chart-LatLng_Order")), BorderLayout.WEST); + orderPane.add(lnglatOrder, BorderLayout.CENTER); + orderPane.setVisible(false); + lnglatOrder.setSelectedIndex(0); + addressType.setSelectedIndex(0); + + addressNameBox.removeAllItems(); + addressNameBox.addItem(Inter.getLocText("Chart-Use_None")); + + Component[][] components = new Component[][]{ + new Component[]{addressType, addressBox}, + new Component[]{orderPane, null}, + new Component[]{new UILabel(Inter.getLocText("Chart-Address_Name") + ":", SwingConstants.RIGHT), addressNameBox}, + }; + JPanel centerPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.CENTER); + pane.setLayout(new BorderLayout()); + + pane.add(centerPane, BorderLayout.NORTH); + + String[] titles = {Inter.getLocText("Chart-Area_Title"), Inter.getLocText("Chart-Area_Value")}; + titleValuePane = new UICorrelationPane(titles) { + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + }; + + pane.add(titleValuePane, BorderLayout.CENTER); + } + + private void refresh2ComboBox() {// 刷新地址 地址名 名称列表 + TableDataWrapper tableDataWrappe =tableDataWrapper; + if (tableDataWrappe == null) { + return; + } + java.util.List columnNameList = tableDataWrappe.calculateColumnNameList(); + initNames = columnNameList.toArray(new String[columnNameList.size()]); + + addressBox.removeAllItems(); + addressNameBox.removeAllItems(); + addressNameBox.addItem(Inter.getLocText("Chart-Use_None")); + + for (int i = 0, size = initNames.length; i < size; i++) { + addressBox.addItem(initNames[i]); + addressNameBox.addItem(initNames[i]); + } + if(initNames.length > 0){ + addressBox.setSelectedIndex(0); + } + addressNameBox.setSelectedIndex(0); + stopEditing(); + } + + /** + * 界面接入 + * + * @param ob 对象 + * @return true表示接受 + */ + public boolean accept(Object ob) { + return false; + } + + /** + * 界面重置 + */ + public void reset() { + + } + + /** + * 界面弹出标题 + * + * @return 标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("Chart-DS_TableData"); + } + + private void stopEditing() { + } + + @Override + public void populateBean(GisMapTableDefinition ob) { + stopEditing(); + if (ob instanceof GisMapTableDefinition) { + GisMapTableDefinition mapDefinition = (GisMapTableDefinition) ob; + if (ob.isAddress()) { + addressType.setSelectedIndex(0); + orderPane.setVisible(false); + } else { + addressType.setSelectedIndex(1); + orderPane.setVisible(true); + } + + if (ob.isLngFirst()) { + lnglatOrder.setSelectedIndex(0); + } else { + lnglatOrder.setSelectedIndex(1); + } + + addressBox.setSelectedItem(mapDefinition.getAddress()); + + if (StringUtils.isEmpty(mapDefinition.getAddressName())) { + addressNameBox.setSelectedItem(Inter.getLocText("Chart-Use_None")); + } else { + addressNameBox.setSelectedItem(mapDefinition.getAddressName()); + } + + java.util.List paneList = new ArrayList(); + int titleValueSize = mapDefinition.getTittleValueSize(); + for (int i = 0; i < titleValueSize; i++) { + SeriesDefinition definition = mapDefinition.getTittleValueWithIndex(i); + if (definition != null && definition.getSeriesName() != null && definition.getValue() != null) { + paneList.add(new Object[]{definition.getSeriesName(), definition.getValue()}); + } + } + + if (!paneList.isEmpty()) { + titleValuePane.populateBean(paneList); + } + } + } + + @Override + public GisMapTableDefinition updateBean() {// 从一行内容中update + stopEditing(); + + GisMapTableDefinition definition = new GisMapTableDefinition(); + + TableDataWrapper tableDataWrappe = tableDataWrapper; + if (tableDataWrappe == null || addressBox.getSelectedItem() == null) { + return null; + } + + definition.setTableData(tableDataWrapper.getTableData()); + definition.setAddress(Utils.objectToString(addressBox.getSelectedItem())); + + if (this.addressType.getSelectedIndex() == 0) { + definition.setAddressType(true); + lnglatOrder.setVisible(false); + } else { + definition.setAddressType(false); + lnglatOrder.setVisible(true); + } + + if (this.lnglatOrder.getSelectedIndex() == 0) { + definition.setLnglatOrder(true); + } else { + definition.setLnglatOrder(false); + } + + if (addressNameBox.getSelectedItem() != null) { + String adName = Utils.objectToString(addressNameBox.getSelectedItem()); + if (ArrayUtils.contains(ChartConstants.NONE_KEYS, adName)) { + definition.setAddressName(StringUtils.EMPTY); + } else { + definition.setAddressName(adName); + } + } + + java.util.List paneList = titleValuePane.updateBean(); + for (int i = 0, size = paneList.size(); i < size; i++) { + Object[] values = (Object[]) paneList.get(i); + if (values.length == 2) { + SeriesDefinition seriesDefinition = new SeriesDefinition(); + seriesDefinition.setSeriesName(values[0]); + seriesDefinition.setValue(values[1]); + definition.addTittleValue(seriesDefinition); + } + } + + return definition; + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(final UIObserverListener listener) { + changeListeners.add(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } + + private class InnerTableEditor extends UITableEditor { + private JComponent editorComponent; + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + if (editorComponent instanceof UITextField) { + UITextField textField = (UITextField) editorComponent; + return textField.getText(); + } else if (editorComponent instanceof UIComboBox) { + UIComboBox boxPane = (UIComboBox) editorComponent; + return boxPane.getSelectedItem(); + } + return super.getCellEditorValue(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == table.getModel().getColumnCount()) { + return null; + } + if (column == 0) { + UITextField text = new UITextField(); + if (value != null) { + text.setText(Utils.objectToString(value)); + } + + text.addFocusListener(new FocusAdapter() { + public void focusLost(FocusEvent e) { + titleValuePane.stopCellEditing(); + titleValuePane.fireTargetChanged(); + } + }); + + this.editorComponent = text; + } else { + UIComboBox box = new UIComboBox(initNames); + box.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + titleValuePane.fireTargetChanged(); + titleValuePane.stopCellEditing(); + } + }); + + if (value != null && StringUtils.isNotEmpty(value.toString())) { + box.setSelectedItem(value); + } else { + box.setSelectedItem(value); + } + + this.editorComponent = box; + } + return this.editorComponent; + } + } + + /** + * 出发数据集改变 + * @param wrapper 数据集 + */ + public void fireTableDataChange(TableDataWrapper wrapper){ + this.tableDataWrapper = wrapper; + refresh2ComboBox(); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapCubeDataPane.java b/designer_chart/src/com/fr/design/chart/report/MapCubeDataPane.java new file mode 100644 index 000000000..fa75392b5 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapCubeDataPane.java @@ -0,0 +1,76 @@ +package com.fr.design.chart.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartdata.MapMoreLayerReportDefinition; +import com.fr.chart.chartdata.MapMoreLayerTableDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +/** + * 钻取数据 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-21 下午11:02:02 + */ +public class MapCubeDataPane extends UIComboBoxPane { + + private MapReportCubeDataPane reportPane; + private MapTableCubeDataPane tablePane; + + protected void initLayout() { + this.setLayout(new BorderLayout(0, 0)); + JPanel northPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); + northPane.add(new BoldFontTextLabel(Inter.getLocText("ChartF-Data-Resource") + ":")); + northPane.add(jcb); + + this.add(northPane, BorderLayout.NORTH); + this.add(cardPane, BorderLayout.CENTER); + } + + @Override + protected List> initPaneList() { + List list = new ArrayList(); + + list.add(tablePane = new MapTableCubeDataPane()); + list.add(reportPane = new MapReportCubeDataPane()); + + return list; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("LayerData"); + } + + /** + * 对数据集或者单元格数据加载界面 + */ + public void populateBean(TopDefinitionProvider definition) { + if(definition instanceof MapMoreLayerReportDefinition) { + this.setSelectedIndex(1); + MapMoreLayerReportDefinition reportDefinition = (MapMoreLayerReportDefinition)definition; + reportPane.populateBean(reportDefinition); + } else if(definition instanceof MapMoreLayerTableDefinition) { + MapMoreLayerTableDefinition tableDefinition = (MapMoreLayerTableDefinition)definition; + this.setSelectedIndex(0); + tablePane.populateBean(tableDefinition); + } + } + + /** + * 根据界面 下载保存数据 + */ + public TopDefinitionProvider update() { + if(this.getSelectedIndex() == 0) { + return tablePane.updateBean(); + } else { + return reportPane.updateBean(); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapCubeDataPane4Chart.java b/designer_chart/src/com/fr/design/chart/report/MapCubeDataPane4Chart.java new file mode 100644 index 000000000..96c659d50 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapCubeDataPane4Chart.java @@ -0,0 +1,68 @@ +package com.fr.design.chart.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartdata.MapMoreLayerTableDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.general.Inter; + +import java.awt.*; +import java.util.*; +import java.util.List; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class MapCubeDataPane4Chart extends UIComboBoxPane { + private MapTableCubeDataPane4Chart tablePane; + + protected void initLayout() { + this.setLayout(new BorderLayout(0, 0)); + this.add(cardPane, BorderLayout.CENTER); + } + + @Override + protected List> initPaneList() { + List list = new ArrayList(); + + list.add(tablePane = new MapTableCubeDataPane4Chart()); + + return list; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Map_LayerData"); + } + + /** + * 对数据集或者单元格数据加载界面 + */ + public void populateBean(TopDefinitionProvider definition) { + if(definition instanceof MapMoreLayerTableDefinition) { + MapMoreLayerTableDefinition tableDefinition = (MapMoreLayerTableDefinition)definition; + this.setSelectedIndex(0); + tablePane.populateBean(tableDefinition); + } + } + + /** + * 根据界面 下载保存数据 + */ + public TopDefinitionProvider update() { + return tablePane.updateBean(); + } + + /** + * 出发数据集改变 + * @param tableDataWrapper 数据集 + */ + public void fireTableDataChanged(TableDataWrapper tableDataWrapper) { + tablePane.setTableDataWrapper(tableDataWrapper); + tablePane.refreshAreaNameBox(); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapCubeLayerPane.java b/designer_chart/src/com/fr/design/chart/report/MapCubeLayerPane.java new file mode 100644 index 000000000..cffddfd67 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapCubeLayerPane.java @@ -0,0 +1,309 @@ +package com.fr.design.chart.report; + +import com.fr.base.MapXMLHelper; +import com.fr.base.Utils; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.base.MapSvgAttr; +import com.fr.chart.base.MapSvgXMLHelper; +import com.fr.chart.chartglyph.MapAttr; +import com.fr.design.DesignerEnvManager; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.dialog.UIDialog; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.FRLogger; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.TreePath; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.*; +import java.util.List; + +/** + * 地图钻取层级界面, 默认钻取到同名的地图 +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2012-11-20 下午03:39:08 + */ +public class MapCubeLayerPane extends BasicBeanPane{ + + private JTree mapTree; + private DefaultMutableTreeNode root; + + private String editingMap = ""; + + private Set editedMap = new HashSet(); + + private List fireWhenTreeChange = new ArrayList(); + + private List hasDealNames = new ArrayList(); + + private boolean isSvg = true; + + public MapCubeLayerPane() { + initCom(); + } + + private void initCom() { + this.setLayout(new BorderLayout()); + + root = new DefaultMutableTreeNode(); + + mapTree = new JTree(root); + mapTree.setRootVisible(false); + mapTree.addMouseListener(mapListener); + + JScrollPane treePane = new JScrollPane(mapTree); + treePane.setPreferredSize(new Dimension(100, 100)); + this.add(treePane, BorderLayout.CENTER); + } + + public void setSvg(boolean isSvg) { + this.isSvg = isSvg; + } + + /** + * 返回节点路径 + */ + public int getTreeDepth() { + return root.getDepth(); + } + + /** + * 初始化节点界面. + * @param mapName 地图名称. + */ + public void initRootTree(String mapName) { + editingMap = mapName; + + root.removeAllChildren(); + + DefaultMutableTreeNode node = new DefaultMutableTreeNode(mapName); + + root.add(node); + + // 每个节点都要去判断是否有地图再包含 默认钻取到同名的地图 + if(isSvg) { + MapSvgAttr mapAttr = MapSvgXMLHelper.getInstance().getMapAttr(mapName); + hasDealNames.clear(); + add4Node(mapAttr, node, mapName); + } else { + MapAttr mapAttr = (MapAttr)MapXMLHelper.getInstance().getMapAttr(mapName); + hasDealNames.clear(); + addBitMap4Node(mapAttr, node, mapName); + } + + mapTree.doLayout(); + mapTree.validate(); + + ((DefaultTreeModel)mapTree.getModel()).reload(); + + for(int i = 0; i < fireWhenTreeChange.size(); i++) { + fireWhenTreeChange.get(i).stateChanged(new ChangeEvent(this)); + } + } + + /** + * 添加响应事件. + * @param change 改变的事件. + */ + public void addChangeListener(ChangeListener change) { + fireWhenTreeChange.add(change); + } + + private void addBitMap4Node(MapAttr editingMapAttr, DefaultMutableTreeNode node, String mapName) { + MapAttr mapAttr = (MapAttr)MapXMLHelper.getInstance().getMapAttr(mapName); + if(mapAttr != null) { + Iterator namesValue = mapAttr.shapeValuesIterator(); + while(namesValue.hasNext()) { + Object names = namesValue.next(); + String nextToName = Utils.objectToString(editingMapAttr.getLayerTo(Utils.objectToString(names))); + + MapAttr tmpAttr = (MapAttr)MapXMLHelper.getInstance().getMapAttr(nextToName); + if(tmpAttr != null) { + DefaultMutableTreeNode currentName = new DefaultMutableTreeNode(names); + node.add(currentName);// 有钻取内容的地图才添加节点 + + if(!hasDealNames.contains(Utils.objectToString(currentName.getUserObject()))) { + hasDealNames.add(Utils.objectToString(currentName.getUserObject())); + addBitMap4Node(editingMapAttr, currentName, nextToName); + } + } + } + } + } + + private void add4Node(MapSvgAttr editingMapAttr, DefaultMutableTreeNode node, String mapName) { + MapSvgAttr mapAttr = MapSvgXMLHelper.getInstance().getMapAttr(mapName); + if(mapAttr != null) { + Iterator namesValue = mapAttr.shapeValuesIterator(); + while(namesValue.hasNext()) { + Object names = namesValue.next(); + String nextToName = Utils.objectToString(editingMapAttr.getLayerTo(Utils.objectToString(names))); + + MapSvgAttr tmpAttr = MapSvgXMLHelper.getInstance().getMapAttr(nextToName); + if(tmpAttr != null) { + DefaultMutableTreeNode currentName = new DefaultMutableTreeNode(names); + node.add(currentName);// 有钻取内容的地图才添加节点 + + if(!hasDealNames.contains(Utils.objectToString(currentName.getUserObject()))) { + hasDealNames.add(Utils.objectToString(currentName.getUserObject())); + add4Node(editingMapAttr, currentName, nextToName); + } + } + } + } + } + + MouseListener mapListener = new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + final TreePath visiblePath = mapTree.getSelectionPath(); // 取得当前选中的节点 selectTreeName + if(visiblePath == null) { + return; + } + final String selectTreeName = Utils.objectToString(((DefaultMutableTreeNode)visiblePath.getLastPathComponent()).getUserObject()); + if(SwingUtilities.isRightMouseButton(e)) { + if(!isSvg){ + popBitMapDialog(e, selectTreeName); + return; + } + final MapSvgAttr editingAttr = MapSvgXMLHelper.getInstance().getMapAttr(editingMap); + editedMap.add(editingMap); + final MapCubeSetDataPane setDataPane = new MapCubeSetDataPane(); + setDataPane.freshComboxNames(); + MapSvgAttr mapAttr = MapSvgXMLHelper.getInstance().getMapAttr(selectTreeName); + editedMap.add(selectTreeName); + if(mapAttr != null) {// 从中取出对应关系 // 取出当前节点名称所对应的地图 + List list = new ArrayList(); + Iterator names = mapAttr.shapeValuesIterator();//行: 地图区域名(String) + 对应地图名(String) + while(names.hasNext()) { + Object name = names.next(); + String layName = editingAttr.getLayerTo(Utils.objectToString(name)); + if(ArrayUtils.contains(ChartConstants.NONE_KEYS, layName)) {// kunsnat: 考虑切换设计器语言. + layName = StringUtils.EMPTY; + } + list.add(new Object[]{name, layName}); + } + setDataPane.populateBean(list); + } + + int x = (int)(mapTree.getLocationOnScreen().getX() + mapTree.getWidth()); + int y = (int)e.getLocationOnScreen().getY(); + + UIDialog dialog = setDataPane.showUnsizedWindow(SwingUtilities.getWindowAncestor(setDataPane), new DialogActionAdapter() { + public void doOk() { + List list = setDataPane.updateBean(); // 更新当前的 地图名所对应的 区域名钻取关系 重新inittree + for(int i = 0; i < list.size(); i++) { + Object[] values = (Object[])list.get(i); + editingAttr.putLayerTo(Utils.objectToString(values[0]), Utils.objectToString(values[1])); + } + initRootTree(editingMap); + saveMapInfo(); + } + }); + dialog.setSize(300, 300); + GUICoreUtils.centerWindow(dialog); + dialog.setVisible(true); + } + } + }; + + + private void popBitMapDialog(MouseEvent e, final String selectTreeName) { + final MapAttr editingAttr = (MapAttr)MapXMLHelper.getInstance().getMapAttr(editingMap); + editedMap.add(editingMap); + final MapCubeSetDataPane setDataPane = new MapCubeSetDataPane(); + setDataPane.freshBitMapComboxNames(); + MapAttr mapAttr = (MapAttr)MapXMLHelper.getInstance().getMapAttr(selectTreeName); + if(mapAttr != null) {// 从中取出对应关系 // 取出当前节点名称所对应的地图 + List list = new ArrayList(); + Iterator names = mapAttr.shapeValuesIterator();//行: 地图区域名(String) + 对应地图名(String) + while(names.hasNext()) { + Object name = names.next(); + String layName = editingAttr.getLayerTo(Utils.objectToString(name)); + if(ArrayUtils.contains(ChartConstants.NONE_KEYS, layName)) {// kunsnat: 考虑切换设计器语言. + layName = StringUtils.EMPTY; + } + list.add(new Object[]{name, layName}); + } + setDataPane.populateBean(list); + } + + int x = (int)(mapTree.getLocationOnScreen().getX() + mapTree.getWidth()); + int y = (int)e.getLocationOnScreen().getY(); + + UIDialog dialog = setDataPane.showUnsizedWindow(SwingUtilities.getWindowAncestor(setDataPane), new DialogActionAdapter() { + public void doOk() { + List list = setDataPane.updateBean(); // 更新当前的 地图名所对应的 区域名钻取关系 重新inittree + for(int i = 0; i < list.size(); i++) { + Object[] values = (Object[])list.get(i); + editingAttr.putLayerTo(values[0], values[1]); + } + initRootTree(editingMap); + saveMapInfo(); + } + }); + dialog.setSize(300, 300); + GUICoreUtils.centerWindow(dialog); + dialog.setVisible(true); + } + + private void saveMapInfo() { + final String[] mapNames = editedMap.toArray(new String[0]); + if(isSvg){ + editedMap.clear(); + } + SwingWorker worker = new SwingWorker() { + @Override + protected Integer doInBackground() throws Exception { + if(isSvg){ + MapSvgXMLHelper.getInstance().saveEditedMaps(mapNames); + } else { + MapXMLHelper.getInstance().writerMapSourceWhenEditMap(); + } + return 0; + } + + @Override + protected void done() { + FRLogger.getLogger().info("Map Save End"); + } + + }; + worker.execute(); + DesignerEnvManager.addWorkers(worker); + } + + @Override + public void populateBean(String rootMapName) {// 更节点的地图名称 只有根节点是确定的 + // 从数据库中取出地图名称 和 层级关系 刷新列表 + initRootTree(rootMapName); + } + + public void updateBean(String rootMapName) {// HashMap --> 对应层级的 地图名称 + // 刷新列表, 更新数据库中的地图名称 + + } + + @Override + public String updateBean() { + return ""; + } + + /** + * 返回界面标题. + */ + protected String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Map_Drill"); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapCubeSetDataPane.java b/designer_chart/src/com/fr/design/chart/report/MapCubeSetDataPane.java new file mode 100644 index 000000000..4c175500e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapCubeSetDataPane.java @@ -0,0 +1,130 @@ +package com.fr.design.chart.report; + +import com.fr.base.MapXMLHelper; +import com.fr.chart.base.MapSvgXMLHelper; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.editor.ValueEditorPane; +import com.fr.design.editor.ValueEditorPaneFactory; +import com.fr.design.editor.editor.Editor; +import com.fr.design.editor.editor.TextEditor; +import com.fr.design.gui.itableeditorpane.UIArrayTableModel; +import com.fr.design.gui.itableeditorpane.UITableEditorPane; +import com.fr.design.gui.xcombox.ComboBoxUseEditor; +import com.fr.general.Inter; + +import javax.swing.*; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.TableCellEditor; +import java.awt.*; +import java.util.List; + +/** + * 地图, 下层钻取设置 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-19 下午03:19:53 + */ +public class MapCubeSetDataPane extends BasicBeanPane{ + + private UITableEditorPane tableEditorPane;// 地图名称 + 地图类型列表 + + private String[] initNames = new String[]{""}; + + public MapCubeSetDataPane() { + initCom(); + } + + private void initCom() { + this.setLayout(new BorderLayout(0, 0)); + + UIArrayTableModel model = new UIArrayTableModel(new String[]{Inter.getLocText("FR-Chart-Area_Name"), Inter.getLocText("FR-Chart-Drill_Map")}, new int[] {}) { + public boolean isCellEditable(int row, int col) { + return col != 0; + } + }; + model.setDefaultEditor(Object.class, new DefaultComboBoxEditor()); + model.setDefaultRenderer(Object.class, new DefaultComboBoxRenderer()); + + tableEditorPane = new UITableEditorPane(model); + this.add(tableEditorPane); + + model.addRow(new Object[]{"", ""}); + } + + /** + * 刷新下拉列表 + */ + public void freshComboxNames() { + initNames = MapSvgXMLHelper.getInstance().mapAllNames(); + } + + /** + * 位图地图刷新下拉列表 + */ + public void freshBitMapComboxNames() { + initNames = MapXMLHelper.getInstance().mapAllNames(); + } + + // 需要得到地图 所有区域名称. 以及对应好的名字. + @Override + public void populateBean(List ob) { + tableEditorPane.populate(ob.toArray()); + } + + @Override + public List updateBean() { + return tableEditorPane.update(); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Drill_Setting"); + } + + /** + * refresh TODO 只是需要随时更新initNames + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-11-20 下午05:12:20 + */ + + private class DefaultComboBoxEditor extends AbstractCellEditor implements TableCellEditor { + private static final long serialVersionUID = -3239789564820528730L; + private ValueEditorPane cellEditor; + + public DefaultComboBoxEditor() { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ComboBoxUseEditor(initNames)}); + } + + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if(column == 0) { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new TextEditor()}); + } else { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ComboBoxUseEditor(initNames)}); + } + cellEditor.populate(value == null ? "" : value); + return cellEditor; + } + + public Object getCellEditorValue() { + return cellEditor.update(); + } + } + + private class DefaultComboBoxRenderer extends DefaultTableCellRenderer { + private static final long serialVersionUID = -695450455731718014L; + private ValueEditorPane cellEditor; + + public DefaultComboBoxRenderer() { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ComboBoxUseEditor(initNames)}); + } + + public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { + if(column == 0) { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new TextEditor()}); + } else { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ComboBoxUseEditor(initNames)}); + } + cellEditor.populate(value == null ? "" : value); + return cellEditor; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapDataPane.java b/designer_chart/src/com/fr/design/chart/report/MapDataPane.java new file mode 100644 index 000000000..26842d83e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapDataPane.java @@ -0,0 +1,139 @@ +package com.fr.design.chart.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartdata.TopDefinition; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.MapMoreLayerReportDefinition; +import com.fr.chart.chartdata.MapMoreLayerTableDefinition; +import com.fr.chart.chartdata.MapSingleLayerReportDefinition; +import com.fr.chart.chartdata.MapSingleLayerTableDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.mainframe.chart.gui.data.DataContentsPane; +import com.fr.design.dialog.BasicScrollPane; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +/** + * 选择地图类型后 使用的地图数据界面 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-21 下午10:49:13 + */ +public class MapDataPane extends DataContentsPane { + + private UIComboBoxPane mainPane; + private MapMoreCubeLayerPane morePane; + private MapSinglePane singlePane; + + private AttributeChangeListener listener; + + public MapDataPane(AttributeChangeListener listener) { + super(); + this.listener = listener; + } + + /** + * 加载界面, 更新地图数据 + */ + public void populate(ChartCollection collection) { + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + + morePane.init4PopuMapTree(collection); + + if(definition instanceof MapSingleLayerTableDefinition) { + mainPane.setSelectedIndex(0); + singlePane.populateBean(definition); + } + else if(definition instanceof MapMoreLayerTableDefinition) { + mainPane.setSelectedIndex(1); + morePane.populateBean(collection); + } else if(definition instanceof MapMoreLayerReportDefinition) { + mainPane.setSelectedIndex(1); + morePane.populateBean(collection); + } else if(definition instanceof MapSingleLayerReportDefinition) { + mainPane.setSelectedIndex(0); + singlePane.populateBean(definition); + } + + this.initAllListeners(); + this.addAttributeChangeListener(listener); + } + + /** + * 下载保存数据 + */ + public void update(ChartCollection collection) { + if(mainPane.getSelectedIndex() == 0) { + collection.getSelectedChart().setFilterDefinition(singlePane.updateBean()); + } else { + morePane.updateBean(collection); + } + } + + @Override + protected JPanel createContentPane() { + BasicScrollPane scroll = new BasicScrollPane() { + + protected JPanel createContentPane() { + JPanel pane = new JPanel(); + pane.setLayout(new BorderLayout()); + mainPane = new UIComboBoxPane() { + protected void initLayout() { + this.setLayout(new BorderLayout(0, 6)); + JPanel northPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); + northPane.add(new BoldFontTextLabel(Inter.getLocText("Map Show Type") + ":")); + northPane.add(jcb); + this.add(northPane, BorderLayout.NORTH); + this.add(cardPane, BorderLayout.CENTER); + } + protected List> initPaneList() { + List list = new ArrayList(); + list.add(singlePane = new MapSinglePane()); + list.add(morePane = new MapMoreCubeLayerPane()); + return list; + } + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Chart-Map", "Data"}); + } + }; + pane.add(mainPane, BorderLayout.CENTER); + return pane; + } + public void populateBean(Chart ob) { + } + protected String title4PopupWindow() { + return null; + } + }; + return scroll; + } + + + /** + * 返回界面使用图标路径 + */ + public String getIconPath() { + return "com/fr/design/images/chart/ChartData.png"; + } + + /** + * 返回界面标题 + * @return 标题 + */ + public String title4PopupWindow() { + return Inter.getLocText(new String[]{"Chart-Map", "Data"}); + } + + @Override + public void setSupportCellData(boolean surpportCellData) { + morePane.setSurpportCellData(surpportCellData); + singlePane.setSurpportCellData(surpportCellData); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapDataPane4Chart.java b/designer_chart/src/com/fr/design/chart/report/MapDataPane4Chart.java new file mode 100644 index 000000000..d7329b3c9 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapDataPane4Chart.java @@ -0,0 +1,133 @@ +package com.fr.design.chart.report; + +import com.fr.base.TableData; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.*; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.mainframe.AbstractChartDataPane4Chart; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * Date: 14/12/3 + * Time: 下午6:49 + */ +public class MapDataPane4Chart extends AbstractChartDataPane4Chart { + private UIComboBoxPane dataContentPane; + private MapMoreCubeLayerPane4Chart morePane = new MapMoreCubeLayerPane4Chart(); + private MapSinglePane4Chart singlePane = new MapSinglePane4Chart(); + private ChartCollection currentCollection; + private ItemListener itemListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + fireTableDataChange(); + } + }; + + public MapDataPane4Chart(AttributeChangeListener listener, ChartDataPane parent) { + super(listener, parent); + dataContentPane = new UIComboBoxPane() { + protected void initLayout() { + this.setLayout(new BorderLayout(0, 6)); + JPanel northPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); + northPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Map_ShowWay") + ":")); + northPane.add(jcb); + this.add(northPane, BorderLayout.NORTH); + this.add(cardPane, BorderLayout.CENTER); + } + protected java.util.List> initPaneList() { + java.util.List list = new ArrayList(); + list.add(singlePane); + list.add(morePane); + return list; + } + + protected void comboBoxItemStateChanged() { + if(currentCollection == null){ + return; + } + fireTableDataChange(); + morePane.init4PopuMapTree(currentCollection); + } + + + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Chart-Map", "Data"}); + } + }; + } + + + protected JPanel getDataContentPane(){ + return dataContentPane; + } + + @Override + public void populate(ChartCollection collection) { + currentCollection = collection; + morePane.init4PopuMapTree(collection); + if (collection != null && collection.getSelectedChart() != null) { + Chart chart = collection.getSelectedChart(); + TopDefinitionProvider definition = chart.getFilterDefinition(); + if (definition instanceof TableDataDefinition) { + TableData tableData = ((TableDataDefinition) definition).getTableData(); + if(tableData != null){ + populateChoosePane(tableData); + fireTableDataChange(); + } + } + if(definition instanceof MapSingleLayerTableDefinition) { + singlePane.populateBean(definition); + } else if(definition instanceof MapMoreLayerTableDefinition) { + morePane.populateBean(collection); + } + } + this.remove(leftContentPane); + this.initContentPane(); + this.validate(); + dataSource.addItemListener(dsListener); + initAllListeners(); + initSelfListener(dataContentPane); + this.addAttributeChangeListener(attributeChangeListener); + } + + @Override + public void update(ChartCollection collection) { + if(dataContentPane.getSelectedIndex() == 0) { + collection.getSelectedChart().setFilterDefinition(singlePane.updateBean()); + } else { + morePane.updateBean(collection); + } + currentCollection = collection; + } + + /** + * 数据集数据改变 + */ + public void fireTableDataChange() { + if (dataContentPane == null) { + return; + } + if(dataContentPane.getSelectedIndex() == 0) { + singlePane.fireTableDataChanged(choosePane.getTableDataWrapper()); + } else { + morePane.fireTableDataChanged(choosePane.getTableDataWrapper()); + } + + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane.java b/designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane.java new file mode 100644 index 000000000..56e32d8b5 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane.java @@ -0,0 +1,106 @@ +package com.fr.design.chart.report; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.MapPlot; +import com.fr.design.dialog.BasicPane; +import com.fr.design.dialog.MultiTabPane; +import com.fr.general.Inter; + +import java.util.ArrayList; +import java.util.List; + +/** + * 地图多层钻取界面, 就是一个多层Tab切换界面 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-22 上午10:23:37 + */ +public class MapMoreCubeLayerPane extends MultiTabPane{ + private static final long serialVersionUID = -174286187746442527L; + + private MapCubeLayerPane layerPane; + private MapCubeDataPane dataPane; + + @Override + protected List initPaneList() { + List paneList = new ArrayList(); + + paneList.add(layerPane = new MapCubeLayerPane()); + paneList.add(dataPane = new MapCubeDataPane()); + + return paneList; + } + + public ChartCollection updateBean() { + return null;// do nothing + } + + public void populateBean(ChartCollection collection) { + Chart selectChart = collection.getSelectedChart(); + if(selectChart != null && selectChart.getPlot() instanceof MapPlot) { + MapPlot map = (MapPlot)selectChart.getPlot(); + layerPane.setSvg(map.isSvgMap()); + layerPane.populateBean(map.getMapName()); + } + + // 确认层级关系 + dataPane.populateBean(collection.getSelectedChart().getFilterDefinition()); + } + + public void updateBean(ChartCollection collection) { + + collection.getSelectedChart().setFilterDefinition(dataPane.update()); + + Chart selectChart = collection.getSelectedChart(); + if(selectChart != null && selectChart.getPlot() instanceof MapPlot) { + MapPlot map = (MapPlot)selectChart.getPlot(); + layerPane.updateBean(map.getMapName());// 确定更新地图名称所对应的层级关系 + } + } + + /** + * 刷新层级树 和 数据中populate 数据的层数 + * @param collection 图表收集器. + */ + public void init4PopuMapTree(ChartCollection collection) { + Chart selectChart = collection.getSelectedChart(); + if(selectChart != null && selectChart.getPlot() instanceof MapPlot) { + MapPlot map = (MapPlot)selectChart.getPlot(); + if(layerPane != null) { + layerPane.setSvg(map.isSvgMap()); + layerPane.initRootTree(map.getMapName()); + } + } + } + + /** + * 判断是否合格 + * @param ob 参数判断 + * @return 默认合格. + */ + public boolean accept(Object ob) { + return true; + } + + /** + * 界面标题 + * @return 返回标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Muiti_In"); + } + + /** + * 重置 + */ + public void reset() { + + } + + /** + * 设置是否支持单元格数据. + */ + public void setSurpportCellData(boolean surpportCellData) { + dataPane.justSupportOneSelect(surpportCellData); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane4Chart.java b/designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane4Chart.java new file mode 100644 index 000000000..7a13e17a4 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapMoreCubeLayerPane4Chart.java @@ -0,0 +1,113 @@ +package com.fr.design.chart.report; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.MapPlot; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.dialog.BasicPane; +import com.fr.design.dialog.MultiTabPane; +import com.fr.general.Inter; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class MapMoreCubeLayerPane4Chart extends MultiTabPane { + private static final long serialVersionUID = -174286187746442527L; + + private MapCubeLayerPane layerPane; + private MapCubeDataPane4Chart dataPane; + + @Override + protected List initPaneList() { + List paneList = new ArrayList(); + + paneList.add(layerPane = new MapCubeLayerPane()); + paneList.add(dataPane = new MapCubeDataPane4Chart()); + + return paneList; + } + + public ChartCollection updateBean() { + return null;// do nothing + } + + public void populateBean(ChartCollection collection) { + Chart selectChart = collection.getSelectedChart(); + if(selectChart != null && selectChart.getPlot() instanceof MapPlot) { + MapPlot map = (MapPlot)selectChart.getPlot(); + layerPane.populateBean(map.getMapName()); + } + + // 确认层级关系 + dataPane.populateBean(collection.getSelectedChart().getFilterDefinition()); + } + + public void updateBean(ChartCollection collection) { + + collection.getSelectedChart().setFilterDefinition(dataPane.update()); + + Chart selectChart = collection.getSelectedChart(); + if(selectChart != null && selectChart.getPlot() instanceof MapPlot) { + MapPlot map = (MapPlot)selectChart.getPlot(); + layerPane.updateBean(map.getMapName());// 确定更新地图名称所对应的层级关系 + } + } + + /** + * 刷新层级树 和 数据中populate 数据的层数 + * @param collection 图表收集器. + */ + public void init4PopuMapTree(ChartCollection collection) { + Chart selectChart = collection.getSelectedChart(); + if(selectChart != null && selectChart.getPlot() instanceof MapPlot) { + MapPlot map = (MapPlot)selectChart.getPlot(); + if(layerPane != null) { + layerPane.initRootTree(map.getMapName()); + } + } + } + + /** + * 判断是否合格 + * @param ob 参数判断 + * @return 默认合格. + */ + public boolean accept(Object ob) { + return true; + } + + /** + * 界面标题 + * @return 返回标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Map_Multilayer"); + } + + /** + * 重置 + */ + public void reset() { + + } + + /** + * 设置是否支持单元格数据. + */ + public void setSurpportCellData(boolean surpportCellData) { + dataPane.justSupportOneSelect(surpportCellData); + } + + /** + * 出发数据集改变 + * @param tableDataWrapper 数据集 + */ + public void fireTableDataChanged(TableDataWrapper tableDataWrapper) { + dataPane.fireTableDataChanged(tableDataWrapper); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapMoreReportIndexPane.java b/designer_chart/src/com/fr/design/chart/report/MapMoreReportIndexPane.java new file mode 100644 index 000000000..70f11f8b4 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapMoreReportIndexPane.java @@ -0,0 +1,202 @@ +package com.fr.design.chart.report; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JTable; + +import com.fr.base.Formula; +import com.fr.base.Utils; +import com.fr.chart.chartdata.BaseSeriesDefinition; +import com.fr.chart.chartdata.MapSingleLayerReportDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.design.constants.UIConstants; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.general.Inter; +import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; + +/** + * 多层地图, 单元格, 多层切换 单界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-4-22 下午04:26:10 + */ +public class MapMoreReportIndexPane extends BasicBeanPane implements UIObserver{ + private String title = StringUtils.EMPTY; + + private TinyFormulaPane areaNamePane; + private UICorrelationPane tabPane; + + public MapMoreReportIndexPane() { + initPane(); + } + + public MapMoreReportIndexPane(String titleName) { + title = titleName; + initPane(); + } + + private void initPane() { + this.setLayout(new BorderLayout(0, 0)); + + JPanel northPane = new JPanel(); + this.add(northPane, BorderLayout.NORTH); + northPane.setLayout(new FlowLayout(FlowLayout.LEFT)); + + northPane.add(new UILabel(Inter.getLocText("Area_Name") + ":")); + + areaNamePane = new TinyFormulaPane(); + areaNamePane.setPreferredSize(new Dimension(120, 20)); + northPane.add(areaNamePane); + + tabPane = new UICorrelationPane(new String[]{Inter.getLocText(new String[]{"Filed", "Title"}), Inter.getLocText("Area_Value")}){ + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + }; + + this.add(tabPane, BorderLayout.CENTER); + } + + @Override + public void populateBean(MapSingleLayerReportDefinition definition) { + if(definition != null && definition.getCategoryName() != null) { + areaNamePane.populateBean(Utils.objectToString(definition.getCategoryName())); + + List paneList = new ArrayList(); + int titleValueSize = definition.getTitleValueSize(); + for(int i = 0; i < titleValueSize; i++) { + BaseSeriesDefinition sd = definition.getTitleValueWithIndex(i); + if(sd != null && sd.getSeriesName() != null && sd.getValue() != null) { + paneList.add(new Object[]{sd.getSeriesName(), sd.getValue()}); + } + } + + if(!paneList.isEmpty()) { + tabPane.populateBean(paneList); + } + } + } + + public MapSingleLayerReportDefinition updateBean() { + MapSingleLayerReportDefinition definition = new MapSingleLayerReportDefinition(); + + String areaName = areaNamePane.updateBean(); + if(StableUtils.canBeFormula(areaName)) { + definition.setCategoryName(new Formula(areaName)); + } else { + definition.setCategoryName(areaName); + } + + List paneList = tabPane.updateBean(); + for(int i = 0, size = paneList.size(); i < size; i++) { + Object[] values = (Object[])paneList.get(i); + if(values.length == 2) { + SeriesDefinition seriesDefinition = new SeriesDefinition(); + seriesDefinition.setSeriesName(values[0]); + seriesDefinition.setValue(values[1]); + definition.addTitleValue(seriesDefinition); + } + } + + return definition; + } + + @Override + protected String title4PopupWindow() { + return title; + } + + private class InnerTableEditor extends UITableEditor { + private JComponent editorComponent; + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + if(editorComponent instanceof TinyFormulaPane) { + return ((TinyFormulaPane)editorComponent).getUITextField().getText(); + } else if(editorComponent instanceof UITextField) { + return ((UITextField)editorComponent).getText(); + } + + return super.getCellEditorValue(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == table.getModel().getColumnCount()) { + return null; + } + return getEditorComponent(column, value); + } + + private JComponent getEditorComponent(int column, Object value) { + if(column == 0) { + UITextField field = new UITextField(); + editorComponent = field; + + if(value != null) { + field.setText(Utils.objectToString(value)); + } + } else { + TinyFormulaPane tinyPane = new TinyFormulaPane() { + @Override + public void okEvent() { + tabPane.stopCellEditing(); + tabPane.fireTargetChanged(); + } + }; + tinyPane.setBackground(UIConstants.FLESH_BLUE); + + tinyPane.getUITextField().addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent e) { +// tabPane.stopCellEditing();//kunsnat: 不stop是因为可能直接点击公式编辑按钮, 否则需要点击两次才能弹出. + tabPane.fireTargetChanged(); + } + }); + + if(value != null) { + tinyPane.getUITextField().setText(Utils.objectToString(value)); + } + + editorComponent = tinyPane; + } + return editorComponent; + } + } + + @Override + public void registerChangeListener(UIObserverListener listener) { + if(tabPane != null) { + tabPane.registerChangeListener(listener); + } + if(areaNamePane != null) { + areaNamePane.registerChangeListener(listener); + } + } + + @Override + public boolean shouldResponseChangeListener() { + return true; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapMoreTableIndexPane.java b/designer_chart/src/com/fr/design/chart/report/MapMoreTableIndexPane.java new file mode 100644 index 000000000..05d09bdd3 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapMoreTableIndexPane.java @@ -0,0 +1,209 @@ +package com.fr.design.chart.report; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JTable; + +import com.fr.base.Utils; +import com.fr.chart.chartdata.MapSingleLayerTableDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +/** + * 多层地图, 数据集定义, 多层切换 界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-4-22 下午03:27:51 + */ +public class MapMoreTableIndexPane extends BasicBeanPane implements UIObserver{ + private static final long serialVersionUID = 8135457041761804584L; + + private String title = StringUtils.EMPTY; + + private UIComboBox areaNameBox; + private UICorrelationPane tabPane;// 文本框 + 下拉框 + + private Object[] boxItems = new Object[]{""}; + + public MapMoreTableIndexPane() { + initPane(); + } + + public MapMoreTableIndexPane(String titleName) { + title = titleName; + initPane(); + } + + @Override + protected String title4PopupWindow() { + return title; + } + + private void initPane() { + this.setLayout(new BorderLayout()); + + JPanel northPane = new JPanel(); + this.add(northPane, BorderLayout.NORTH); + northPane.setLayout(new FlowLayout(FlowLayout.LEFT)); + + northPane.add(new UILabel(Inter.getLocText("Area_Name") + ":")); + + areaNameBox = new UIComboBox(); + areaNameBox.setPreferredSize(new Dimension(120, 20)); + northPane.add(areaNameBox); + + tabPane = new UICorrelationPane(new String[]{Inter.getLocText(new String[]{"Filed", "Title"}), Inter.getLocText("Area_Value")}){ + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + }; + + this.add(tabPane, BorderLayout.CENTER); + } + + /** + * 初始化 Box的选项. + */ + public void initAreaComBox(Object[] values) { + Object oldSelected = areaNameBox.getSelectedItem(); + areaNameBox.removeAllItems(); + boxItems = values; + if(values != null) { + for(int i = 0, size = values.length; i < size; i++) { + areaNameBox.addItem(values[i]); + } + } + areaNameBox.getModel().setSelectedItem(oldSelected); + } + + @Override + public void populateBean(MapSingleLayerTableDefinition ob) { + if(ob != null) { + areaNameBox.setSelectedItem(ob.getAreaName()); + + List paneList = new ArrayList(); + int titleValueSize = ob.getTitleValueSize(); + for(int i = 0; i < titleValueSize; i++) { + SeriesDefinition definition = ob.getTitleValueWithIndex(i); + if(definition != null && definition.getSeriesName() != null && definition.getValue() != null) { + paneList.add(new Object[]{definition.getSeriesName(), definition.getValue()}); + } + } + + if(!paneList.isEmpty()) { + tabPane.populateBean(paneList); + } + } + } + + public MapSingleLayerTableDefinition updateBean() {// 不需要数据集, + MapSingleLayerTableDefinition definition = new MapSingleLayerTableDefinition(); + + if(areaNameBox.getSelectedItem() != null) { + definition.setAreaName(Utils.objectToString(areaNameBox.getSelectedItem())); + } + + List paneList = tabPane.updateBean(); + for(int i = 0, size = paneList.size(); i < size; i++) { + Object[] values = (Object[])paneList.get(i); + if(values.length == 2) { + SeriesDefinition seriesDefinition = new SeriesDefinition(); + seriesDefinition.setSeriesName(values[0]); + seriesDefinition.setValue(values[1]); + definition.addTitleValue(seriesDefinition); + } + } + + return definition; + } + + private class InnerTableEditor extends UITableEditor {// 文本框 + 下拉框 + private JComponent editorComponent; + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + if(editorComponent instanceof UIComboBox) { + return ((UIComboBox)editorComponent).getSelectedItem(); + } else if(editorComponent instanceof UITextField) { + return ((UITextField)editorComponent).getText(); + } + + return super.getCellEditorValue(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == table.getModel().getColumnCount()) { + return null; + } + return getEditorComponent(column, value); + } + + private JComponent getEditorComponent(int column, Object value) { + if(column == 0) { + UITextField field = new UITextField(); + editorComponent = field; + + if(value != null) { + field.setText(value.toString()); + } + } else { + UIComboBox box = new UIComboBox(boxItems); + + box.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + tabPane.fireTargetChanged(); + tabPane.stopCellEditing(); + } + }); + + if (value != null && StringUtils.isNotEmpty(value.toString())) { + box.setSelectedItem(value); + } else { + box.setSelectedItem(value); + } + + editorComponent = box; + } + return editorComponent; + } + } + + @Override + public void registerChangeListener(UIObserverListener listener) { + if(areaNameBox != null) { + areaNameBox.registerChangeListener(listener); + } + if(tabPane != null) { + tabPane.registerChangeListener(listener); + } + } + + @Override + public boolean shouldResponseChangeListener() { + return true; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapReportCubeDataPane.java b/designer_chart/src/com/fr/design/chart/report/MapReportCubeDataPane.java new file mode 100644 index 000000000..e4620fd36 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapReportCubeDataPane.java @@ -0,0 +1,74 @@ +package com.fr.design.chart.report; + +import com.fr.chart.chartdata.MapMoreLayerReportDefinition; +import com.fr.chart.chartdata.MapSingleLayerReportDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.general.Inter; + +import java.awt.*; + +/** + * 多层钻取 单元格的数据设置界面 + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-23 上午10:07:41 + */ +public class MapReportCubeDataPane extends FurtherBasicBeanPane { + + private MapMoreReportIndexPane reportPane; + + public MapReportCubeDataPane() { + this.setLayout(new BorderLayout(0, 0)); + + reportPane = new MapMoreReportIndexPane(); + this.add(reportPane, BorderLayout.CENTER); + } + + /** + * 能够展示界面的判断. + * @param ob 界面类型 + * @return 返回是否符合. + */ + public boolean accept(Object ob) { + return ob instanceof MapMoreLayerReportDefinition; + } + + /** + * 界面重置 + */ + public void reset() { + + } + + /** + * 界面弹出标题 + * @return 返回标题. + */ + public String title4PopupWindow() { + return Inter.getLocText("Cell"); + } + + @Override + public void populateBean(MapMoreLayerReportDefinition ob) {// 根据Populate 决定层级的个数, 表现为row的个数 + + if (ob != null) { + + MapSingleLayerReportDefinition[] values = ob.getNameValues(); + + if(values != null && values.length > 0) { + reportPane.populateBean(values[0]); + } + } + } + + @Override + public MapMoreLayerReportDefinition updateBean() { + MapMoreLayerReportDefinition reportDefinition = new MapMoreLayerReportDefinition(); + + reportDefinition.clearNameValues(); + reportDefinition.addNameValue(reportPane.updateBean()); + + return reportDefinition; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapReportDataSinglePane.java b/designer_chart/src/com/fr/design/chart/report/MapReportDataSinglePane.java new file mode 100644 index 000000000..c8f1b4f1e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapReportDataSinglePane.java @@ -0,0 +1,233 @@ +package com.fr.design.chart.report; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JTable; +import javax.swing.SwingConstants; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import com.fr.base.Formula; +import com.fr.base.Utils; +import com.fr.chart.chartdata.BaseSeriesDefinition; +import com.fr.chart.chartdata.MapSingleLayerReportDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.design.constants.UIConstants; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.general.Inter; +import com.fr.stable.StableUtils; + +/** + * 地图 单元格数据 单层地图 界面 + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-22 下午05:16:23 + */ +public class MapReportDataSinglePane extends FurtherBasicBeanPane implements UIObserver { + + private TinyFormulaPane areaNamePane; + private UICorrelationPane seriesPane; + private ArrayList changeListeners = new ArrayList(); + + public MapReportDataSinglePane() { + initCom(); + } + + private void initCom() { + this.setLayout(new BorderLayout(0, 0)); + + JPanel northPane = new JPanel(); + this.add(northPane, BorderLayout.NORTH); + + northPane.setLayout(new FlowLayout(FlowLayout.CENTER)); + + northPane.add(new UILabel(Inter.getLocText("Area_Name") + ":", SwingConstants.RIGHT)); + areaNamePane = new TinyFormulaPane(); + areaNamePane.setPreferredSize(new Dimension(120, 20)); + northPane.add(areaNamePane); + + String[] columnNames = new String[]{Inter.getLocText(new String[]{"Filed", "Title"}), Inter.getLocText("Area_Value")}; + seriesPane = new UICorrelationPane(columnNames) { + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + }; + + this.add(seriesPane, BorderLayout.CENTER); + } + + /** + * 界面接入. + */ + public boolean accept(Object ob) { + return true; + } + + /** + * 重置 + */ + public void reset() { + + } + + /** + * 界面弹出标题. + */ + public String title4PopupWindow() { + return Inter.getLocText("Cell"); + } + + @Override + public void populateBean(MapSingleLayerReportDefinition ob) { + if(ob.getCategoryName() != null) { + areaNamePane.populateBean(Utils.objectToString(ob.getCategoryName())); + + int size = ob.getTitleValueSize(); + List paneList = new ArrayList(); + for(int i = 0; i < size; i++) { + BaseSeriesDefinition first = ob.getTitleValueWithIndex(i); + if (first != null && first.getSeriesName() != null && first.getValue() != null) { + paneList.add(new Object[]{first.getSeriesName(), first.getValue()}); + } + } + if (!paneList.isEmpty()) { + seriesPane.populateBean(paneList); + } + } + } + + @Override + public MapSingleLayerReportDefinition updateBean() { + MapSingleLayerReportDefinition reportDefinition = new MapSingleLayerReportDefinition(); + + String areaName = areaNamePane.updateBean(); + if(StableUtils.canBeFormula(areaName)) { + reportDefinition.setCategoryName(new Formula(areaName)); + } else { + reportDefinition.setCategoryName(areaName); + } + + List values = seriesPane.updateBean(); + if(values != null && !values.isEmpty() ) { + for (int i = 0, size = values.size(); i < size; i++) { + Object[] objects = (Object[]) values.get(i); + Object name = objects[0]; + Object value = objects[1]; + + if (StableUtils.canBeFormula(value)) { + value = new Formula(Utils.objectToString(value)); + } + SeriesDefinition definition = new SeriesDefinition(name, value); + reportDefinition.addTitleValue(definition); + } + } + + return reportDefinition; + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(final UIObserverListener listener) { + changeListeners.add(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } + + private class InnerTableEditor extends UITableEditor { + private JComponent editorComponent; + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + if(editorComponent instanceof TinyFormulaPane) { + return ((TinyFormulaPane)editorComponent).getUITextField().getText(); + } else if(editorComponent instanceof UITextField) { + return ((UITextField)editorComponent).getText(); + } + + return super.getCellEditorValue(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == table.getModel().getColumnCount()) { + return null; + } + return getEditorComponent(column, value); + } + + private JComponent getEditorComponent(int column, Object value) { + if(column == 0) { + UITextField field = new UITextField(); + addListener4UITextFiled(field); + + if(value != null) { + field.setText(Utils.objectToString(value)); + } + editorComponent = field; + } else { + TinyFormulaPane tinyPane = new TinyFormulaPane() { + @Override + public void okEvent() { + seriesPane.stopCellEditing(); + seriesPane.fireTargetChanged(); + } + }; + tinyPane.setBackground(UIConstants.FLESH_BLUE); + + addListener4UITextFiled(tinyPane.getUITextField()); + + if(value != null) { + tinyPane.getUITextField().setText(Utils.objectToString(value)); + } + + editorComponent = tinyPane; + } + return editorComponent; + } + + private void addListener4UITextFiled(UITextField textField) { + + textField.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent e) { +// seriesPane.stopCellEditing(); //kunsnat: 不stop是因为可能直接点击公式编辑按钮, 否则需要点击两次才能弹出. + seriesPane.fireTargetChanged(); + } + }); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapReportEditor.java b/designer_chart/src/com/fr/design/chart/report/MapReportEditor.java new file mode 100644 index 000000000..82eb68a59 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapReportEditor.java @@ -0,0 +1,62 @@ +package com.fr.design.chart.report; + +import java.awt.Component; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.AbstractCellEditor; +import javax.swing.JTable; +import javax.swing.event.ChangeListener; +import javax.swing.table.TableCellEditor; + +import com.fr.design.editor.ValueEditorPane; +import com.fr.design.editor.ValueEditorPaneFactory; +import com.fr.design.editor.editor.Editor; +import com.fr.design.editor.editor.FormulaEditor; +import com.fr.design.editor.editor.TextEditor; +import com.fr.general.Inter; + +/** + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-23 上午10:31:22 + */ +public class MapReportEditor extends AbstractCellEditor implements TableCellEditor { + private ValueEditorPane cellEditor; + + private List list = new ArrayList(); + + public MapReportEditor() { + } + + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + cellEditor = createPane(); + cellEditor.populate(value == null ? "" : value); + return cellEditor; + } + + public Object getCellEditorValue() { + return cellEditor.update(); + } + + public void addChangeListener(ChangeListener l) { + list.add(l); + } + + private ValueEditorPane createPane() { + TextEditor textEidtor = new TextEditor(); + initListeners(textEidtor); + + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + initListeners(formulaEditor); + + Editor[] editors = new Editor[]{textEidtor, formulaEditor}; + cellEditor = ValueEditorPaneFactory.createValueEditorPane(editors); + return cellEditor; + } + + private void initListeners(Editor editor) { + for(int i = 0; i < list.size(); i++) { + editor.addChangeListener(list.get(i)); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapReportRenderer.java b/designer_chart/src/com/fr/design/chart/report/MapReportRenderer.java new file mode 100644 index 000000000..2571906cc --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapReportRenderer.java @@ -0,0 +1,32 @@ +package com.fr.design.chart.report; + +import java.awt.Component; + +import javax.swing.JTable; +import javax.swing.table.DefaultTableCellRenderer; + +import com.fr.design.editor.ValueEditorPane; +import com.fr.design.editor.ValueEditorPaneFactory; +import com.fr.design.editor.editor.Editor; +import com.fr.design.editor.editor.FormulaEditor; +import com.fr.design.editor.editor.TextEditor; +import com.fr.general.Inter; + +/** + * 简要提供 文本和公式两种编辑器 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-23 上午10:30:16 + */ +public class MapReportRenderer extends DefaultTableCellRenderer { + private ValueEditorPane cellEditor; + + public MapReportRenderer() { + Editor[] editors = new Editor[]{new TextEditor(), new FormulaEditor(Inter.getLocText("Parameter-Formula"))}; + cellEditor = ValueEditorPaneFactory.createValueEditorPane(editors); + } + + public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { + cellEditor.populate(value == null ? "" : value); + return cellEditor; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapSinglePane.java b/designer_chart/src/com/fr/design/chart/report/MapSinglePane.java new file mode 100644 index 000000000..635382910 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapSinglePane.java @@ -0,0 +1,113 @@ +package com.fr.design.chart.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartdata.MapSingleLayerReportDefinition; +import com.fr.chart.chartdata.MapSingleLayerTableDefinition; +import com.fr.chart.chartdata.TopDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +/** + * 数据定义: 地图单层设置 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-22 上午10:41:03 + */ +public class MapSinglePane extends FurtherBasicBeanPane { + + private UIComboBoxPane dataFromPane;// 数据来源的box界面 + + private MapReportDataSinglePane reportSinglePane; + private MapTableDataSinglePane tableSinglePane; + + public MapSinglePane() { + initCom(); + } + + private void initCom() { + this.setLayout(new BorderLayout()); + + this.add(dataFromPane = new UIComboBoxPane() { + protected void initLayout() { + this.setLayout(new BorderLayout(0, 6)); + JPanel northPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); + northPane.add(new BoldFontTextLabel(Inter.getLocText("ChartF-Data-Resource") + ":")); + northPane.add(jcb); + + this.add(northPane, BorderLayout.NORTH); + this.add(cardPane, BorderLayout.CENTER); + } + + @Override + protected List> initPaneList() { + List list = new ArrayList(); + + list.add(tableSinglePane = new MapTableDataSinglePane());// 数据集界面 + list.add(reportSinglePane = new MapReportDataSinglePane());// 单元格界面 + + return list; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("Data_Setting"); + } + }, BorderLayout.CENTER); + } + + /** + * 判断准许的情况 + */ + public boolean accept(Object ob) { + return ob instanceof TopDefinition; + } + + /** + * 重置 + */ + public void reset() { + + } + + /** + * 界面标题 + */ + public String title4PopupWindow() { + return Inter.getLocText(new String[]{"SingleLayer", "Chart-Map"}); + } + + /** + * 加载单层地图时的 数据来源界面 + */ + public void populateBean(TopDefinitionProvider ob) { + if(ob instanceof MapSingleLayerReportDefinition) { + dataFromPane.setSelectedIndex(1); + reportSinglePane.populateBean((MapSingleLayerReportDefinition)ob); + } else if(ob instanceof MapSingleLayerTableDefinition) { + dataFromPane.setSelectedIndex(0); + tableSinglePane.populateBean((MapSingleLayerTableDefinition)ob); + } + } + + /** + * 保存下载 单层数据界面 + */ + public TopDefinitionProvider updateBean() { + if(dataFromPane.getSelectedIndex() == 0) { + return tableSinglePane.updateBean(); + } else { + return reportSinglePane.updateBean(); + } + } + + public void setSurpportCellData(boolean surpportCellData) { + dataFromPane.justSupportOneSelect(surpportCellData); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapSinglePane4Chart.java b/designer_chart/src/com/fr/design/chart/report/MapSinglePane4Chart.java new file mode 100644 index 000000000..46a4ba223 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapSinglePane4Chart.java @@ -0,0 +1,79 @@ +package com.fr.design.chart.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartdata.MapSingleLayerTableDefinition; +import com.fr.chart.chartdata.TopDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.general.Inter; + +import java.awt.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class MapSinglePane4Chart extends FurtherBasicBeanPane { + + private MapTableDataSinglePane4Chart tableSinglePane; + + public MapSinglePane4Chart() { + initCom(); + } + + private void initCom() { + this.setLayout(new BorderLayout()); + + this.add(tableSinglePane = new MapTableDataSinglePane4Chart(), BorderLayout.CENTER); + } + + /** + * 判断准许的情况 + * @param ob 数据集 + * @return 是不是顶层数据 + */ + public boolean accept(Object ob) { + return ob instanceof TopDefinition; + } + + /** + * 重置 + */ + public void reset() { + + } + + /** + *界面标题 + * @return 界面标题 + */ + public String title4PopupWindow() { + return Inter.getLocText(new String[]{"SingleLayer", "Chart-Map"}); + } + + /** + * 加载单层地图时的 数据来源界面 + */ + public void populateBean(TopDefinitionProvider ob) { + if(ob instanceof MapSingleLayerTableDefinition) { + tableSinglePane.populateBean((MapSingleLayerTableDefinition)ob); + } + } + + /** + * 保存下载 单层数据界面 + */ + public TopDefinitionProvider updateBean() { + return tableSinglePane.updateBean(); + } + + /** + * 出发数据集改变 + * @param tableDataWrapper 数据集 + */ + public void fireTableDataChanged(TableDataWrapper tableDataWrapper) { + tableSinglePane.setTableDataWrapper(tableDataWrapper); + tableSinglePane.refreshAreaNameBox(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane.java b/designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane.java new file mode 100644 index 000000000..62221b73a --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane.java @@ -0,0 +1,110 @@ +package com.fr.design.chart.report; + +import com.fr.chart.chartdata.MapMoreLayerTableDefinition; +import com.fr.chart.chartdata.MapSingleLayerTableDefinition; +import com.fr.data.impl.NameTableData; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.List; + +/** + * 地图 多层钻取 数据集定义界面 + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-23 上午10:55:39 + */ +public class MapTableCubeDataPane extends FurtherBasicBeanPane { + + private DatabaseTableDataPane dataFromBox; + + private MapMoreTableIndexPane tablePane; + + public MapTableCubeDataPane() { + this.setLayout(new BorderLayout()); + + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.NORTH); + + pane.setLayout(new FlowLayout(FlowLayout.LEFT)); + + UILabel label = new UILabel(Inter.getLocText("Select_Data_Set") + ":", SwingConstants.RIGHT); + + dataFromBox = new DatabaseTableDataPane(label) { + protected void userEvent() { + refreshAreaNameBox(); + } + }; + dataFromBox.setPreferredSize(new Dimension(180, 20)); + pane.add(dataFromBox); + + tablePane = new MapMoreTableIndexPane(); + this.add(tablePane, BorderLayout.CENTER); + } + + private void refreshAreaNameBox() {// 刷新区域名称列表 + TableDataWrapper tableDataWrappe = dataFromBox.getTableDataWrapper(); + if (tableDataWrappe == null) { + return; + } + + List columnNameList = tableDataWrappe.calculateColumnNameList(); + tablePane.initAreaComBox(columnNameList.toArray(new String[columnNameList.size()])); + } + + /** + * 界面接入 + * @param ob 界面 + * @return 返回接入. + */ + public boolean accept(Object ob) { + return true; + } + + /** + * 重置 + */ + public void reset() { + } + + /** + * 界面弹出标题 + * @return 返回标题. + */ + public String title4PopupWindow() { + return Inter.getLocText("DS-TableData"); + } + + @Override + public void populateBean(MapMoreLayerTableDefinition tableDefinition) {// editingLayerCout + + if (tableDefinition != null) { + dataFromBox.populateBean(tableDefinition.getTableData()); + + MapSingleLayerTableDefinition[] values = tableDefinition.getNameValues(); + if(values != null && values.length > 0) { + tablePane.populateBean(values[0]); + } + } + } + + @Override + public MapMoreLayerTableDefinition updateBean() { + MapMoreLayerTableDefinition tableDefinition = new MapMoreLayerTableDefinition(); + + TableDataWrapper tableDataWrappe = dataFromBox.getTableDataWrapper(); + if (tableDataWrappe != null) { + tableDefinition.setTableData(new NameTableData(tableDataWrappe.getTableDataName())); + + tableDefinition.clearNameValues(); + tableDefinition.addNameValue(tablePane.updateBean()); + } + + return tableDefinition; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane4Chart.java b/designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane4Chart.java new file mode 100644 index 000000000..2da1d6840 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapTableCubeDataPane4Chart.java @@ -0,0 +1,93 @@ +package com.fr.design.chart.report; + +import com.fr.chart.chartdata.MapMoreLayerTableDefinition; +import com.fr.chart.chartdata.MapSingleLayerTableDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.general.Inter; + +import java.awt.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class MapTableCubeDataPane4Chart extends FurtherBasicBeanPane { + + private MapMoreTableIndexPane tablePane; + private TableDataWrapper tableDataWrapper; + + public MapTableCubeDataPane4Chart() { + this.setLayout(new BorderLayout()); + tablePane = new MapMoreTableIndexPane(); + this.add(tablePane, BorderLayout.CENTER); + } + + /** + * 刷新区域名称列表 + */ + public void refreshAreaNameBox() { + TableDataWrapper tableDataWrappe = tableDataWrapper; + if (tableDataWrappe == null) { + return; + } + + java.util.List columnNameList = tableDataWrappe.calculateColumnNameList(); + tablePane.initAreaComBox(columnNameList.toArray(new String[columnNameList.size()])); + } + + public void setTableDataWrapper(TableDataWrapper wrapper){ + this.tableDataWrapper = wrapper; + } + + /** + * 界面接入 + * @param ob 界面 + * @return 返回接入. + */ + public boolean accept(Object ob) { + return true; + } + + /** + * 重置 + */ + public void reset() { + } + + /** + * 界面弹出标题 + * @return 返回标题. + */ + public String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Table_Data"); + } + + @Override + public void populateBean(MapMoreLayerTableDefinition tableDefinition) { + + if (tableDefinition != null) { + MapSingleLayerTableDefinition[] values = tableDefinition.getNameValues(); + if(values != null && values.length > 0) { + tablePane.populateBean(values[0]); + } + } + } + + @Override + public MapMoreLayerTableDefinition updateBean() { + MapMoreLayerTableDefinition tableDefinition = new MapMoreLayerTableDefinition(); + + TableDataWrapper tableDataWrappe =tableDataWrapper; + if (tableDataWrappe != null) { + tableDefinition.setTableData(tableDataWrappe.getTableData()); + + tableDefinition.clearNameValues(); + tableDefinition.addNameValue(tablePane.updateBean()); + } + + return tableDefinition; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane.java b/designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane.java new file mode 100644 index 000000000..1f9463e7c --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane.java @@ -0,0 +1,271 @@ +package com.fr.design.chart.report; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JTable; +import javax.swing.SwingConstants; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import com.fr.base.Utils; +import com.fr.chart.chartdata.MapSingleLayerTableDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.data.impl.NameTableData; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +/** + * 单层地图时: 数据集 定义界面 + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-22 上午11:14:59 + */ +public class MapTableDataSinglePane extends FurtherBasicBeanPane implements UIObserver { + + private DatabaseTableDataPane fromTableData; + + private ArrayList changeListeners = new ArrayList(); + private String[] initNames = {""}; + + private UIComboBox areaNameBox; + private UICorrelationPane titleValuePane; + + public MapTableDataSinglePane() { + this.setLayout(new BorderLayout()); + + JPanel northPane = new JPanel(); + this.add(northPane, BorderLayout.NORTH); + + northPane.setLayout(new FlowLayout(FlowLayout.LEFT)); + + UILabel label = new UILabel(Inter.getLocText("Select_Data_Set") + ":", SwingConstants.RIGHT); + + northPane.add(fromTableData = new DatabaseTableDataPane(label) { + @Override + protected void userEvent() { + refreshAreaNameBox(); + } + }); + fromTableData.setPreferredSize(new Dimension(180, 20)); + northPane.add(fromTableData); + + UILabel nameLabel = new UILabel(" " + Inter.getLocText("Area_Name") + ":", SwingConstants.RIGHT); + areaNameBox = new UIComboBox(); + areaNameBox.setPreferredSize(new Dimension(80, 20)); + + JPanel areaNamePane = new JPanel(); + areaNamePane.setLayout(new FlowLayout(FlowLayout.LEFT, 3, 0)); + + areaNamePane.add(nameLabel); + areaNamePane.add(areaNameBox); + + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.CENTER); + pane.setLayout(new BorderLayout()); + + pane.add(areaNamePane, BorderLayout.NORTH); + + String[] titles = {Inter.getLocText(new String[]{"Filed", "Title"}), Inter.getLocText("Area_Value")}; + titleValuePane = new UICorrelationPane(titles){ + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + }; + + pane.add(titleValuePane, BorderLayout.CENTER); + } + + private void refreshAreaNameBox() {// 刷新区域名称列表 + TableDataWrapper tableDataWrappe = fromTableData.getTableDataWrapper(); + if (tableDataWrappe == null) { + return; + } + List columnNameList = tableDataWrappe.calculateColumnNameList(); + initNames = columnNameList.toArray(new String[columnNameList.size()]); + + Object oldSelected = areaNameBox.getSelectedItem(); + areaNameBox.removeAllItems(); + for(int i = 0, size = initNames.length; i < size; i++) { + areaNameBox.addItem(initNames[i]); + } + areaNameBox.getModel().setSelectedItem(oldSelected); + stopEditing(); + } + + /** + * 界面接入 + */ + public boolean accept(Object ob) { + return false; + } + + /** + * 界面重置 + */ + public void reset() { + + } + + /** + * 界面弹出标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("DS-TableData"); + } + + private void stopEditing() { + } + + @Override + public void populateBean(MapSingleLayerTableDefinition ob) { + stopEditing(); + if (ob instanceof MapSingleLayerTableDefinition) { + MapSingleLayerTableDefinition mapDefinition = (MapSingleLayerTableDefinition) ob; + + fromTableData.populateBean(((NameTableData) mapDefinition.getTableData())); + areaNameBox.setSelectedItem(mapDefinition.getAreaName()); + + List paneList = new ArrayList(); + int titleValueSize = mapDefinition.getTitleValueSize(); + for(int i = 0; i < titleValueSize; i++) { + SeriesDefinition definition = mapDefinition.getTitleValueWithIndex(i); + if(definition != null && definition.getSeriesName() != null && definition.getValue() != null) { + paneList.add(new Object[]{definition.getSeriesName(), definition.getValue()}); + } + } + + if(!paneList.isEmpty()) { + titleValuePane.populateBean(paneList); + } + } + } + + @Override + public MapSingleLayerTableDefinition updateBean() {// 从一行内容中update + stopEditing(); + + MapSingleLayerTableDefinition definition = new MapSingleLayerTableDefinition(); + + TableDataWrapper tableDataWrappe = fromTableData.getTableDataWrapper(); + if (tableDataWrappe == null || areaNameBox.getSelectedItem() == null) { + return null; + } + + definition.setTableData(new NameTableData(tableDataWrappe.getTableDataName())); + definition.setAreaName(Utils.objectToString(areaNameBox.getSelectedItem())); + + List paneList = titleValuePane.updateBean(); + for(int i = 0, size = paneList.size(); i < size; i++) { + Object[] values = (Object[])paneList.get(i); + if(values.length == 2) { + SeriesDefinition seriesDefinition = new SeriesDefinition(); + seriesDefinition.setSeriesName(values[0]); + seriesDefinition.setValue(values[1]); + definition.addTitleValue(seriesDefinition); + } + } + + return definition; + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(final UIObserverListener listener) { + changeListeners.add(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } + + private class InnerTableEditor extends UITableEditor { + private JComponent editorComponent; + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + if(editorComponent instanceof UITextField) { + UITextField textField = (UITextField)editorComponent; + return textField.getText(); + } else if(editorComponent instanceof UIComboBox) { + UIComboBox boxPane = (UIComboBox)editorComponent; + return boxPane.getSelectedItem(); + } + return super.getCellEditorValue(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == table.getModel().getColumnCount()) { + return null; + } + if(column == 0 ) { + UITextField text = new UITextField(); + if(value != null) { + text.setText(Utils.objectToString(value)); + } + + text.registerChangeListener(new UIObserverListener() { + @Override + public void doChange() { + titleValuePane.fireTargetChanged(); + } + }); + + this.editorComponent = text; + } else { + UIComboBox box = new UIComboBox(initNames); + box.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + titleValuePane.fireTargetChanged(); + titleValuePane.stopCellEditing(); + } + }); + + if (value != null && StringUtils.isNotEmpty(value.toString())) { + box.setSelectedItem(value); + } else { + box.setSelectedItem(value); + } + + this.editorComponent = box; + } + return this.editorComponent; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane4Chart.java b/designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane4Chart.java new file mode 100644 index 000000000..df0dca928 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/report/MapTableDataSinglePane4Chart.java @@ -0,0 +1,268 @@ +package com.fr.design.chart.report; + +import com.fr.base.Utils; +import com.fr.chart.chartdata.MapSingleLayerTableDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class MapTableDataSinglePane4Chart extends FurtherBasicBeanPane implements UIObserver { + + private static final int LABEL_WIDTH_GAP = 5; + private static final int COM_HEIGHT = 20; + private ArrayList changeListeners = new ArrayList(); + private String[] initNames = {""}; + + private UIComboBox areaNameBox; + private UICorrelationPane titleValuePane; + private TableDataWrapper tableDataWrapper; + + public MapTableDataSinglePane4Chart() { + this.setLayout(new BorderLayout()); + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.CENTER); + pane.setLayout(new BorderLayout()); + + pane.add(getAreaNamePane(), BorderLayout.NORTH); + + String[] titles = {Inter.getLocText("FR-Chart-Area_Title"), Inter.getLocText("FR-Chart-Area_Value")}; + titleValuePane = new UICorrelationPane(titles){ + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + }; + + pane.add(titleValuePane, BorderLayout.CENTER); + } + + + private JPanel getAreaNamePane(){ + final UILabel label = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Map_ShowWay") + ":"); + UILabel nameLabel = new UILabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT){ + public Dimension getPreferredSize() { + return new Dimension(label.getPreferredSize().width+LABEL_WIDTH_GAP,COM_HEIGHT); + } + }; + areaNameBox = new UIComboBox(); + areaNameBox.setPreferredSize(new Dimension(80, 20)); + double p =TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p}; + Component[][] components = new Component[][]{ + new Component[]{nameLabel, areaNameBox}, + }; + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + /** + *刷新区域名称列表 + */ + public void refreshAreaNameBox() {// 刷新区域名称列表 + TableDataWrapper tableDataWrappe = tableDataWrapper; + if (tableDataWrappe == null) { + return; + } + java.util.List columnNameList = tableDataWrappe.calculateColumnNameList(); + initNames = columnNameList.toArray(new String[columnNameList.size()]); + + Object oldSelected = areaNameBox.getSelectedItem(); + areaNameBox.removeAllItems(); + for(int i = 0, size = initNames.length; i < size; i++) { + areaNameBox.addItem(initNames[i]); + } + areaNameBox.getModel().setSelectedItem(oldSelected); + stopEditing(); + } + + + /** + * 是否接受数据集 + * @param ob 具体变量 + * @return 不是 + */ + public boolean accept(Object ob) { + return false; + } + + /** + * 界面重置 + */ + public void reset() { + + } + + /** + * 界面弹出标题 + * @return 标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Table_Data"); + } + + private void stopEditing() { + } + + @Override + public void populateBean(MapSingleLayerTableDefinition ob) { + stopEditing(); + if (ob instanceof MapSingleLayerTableDefinition) { + MapSingleLayerTableDefinition mapDefinition = (MapSingleLayerTableDefinition) ob; + +// fromTableData.populateBean(((NameTableData) mapDefinition.getTableData())); + areaNameBox.setSelectedItem(mapDefinition.getAreaName()); + + java.util.List paneList = new ArrayList(); + int titleValueSize = mapDefinition.getTitleValueSize(); + for(int i = 0; i < titleValueSize; i++) { + SeriesDefinition definition = mapDefinition.getTitleValueWithIndex(i); + if(definition != null && definition.getSeriesName() != null && definition.getValue() != null) { + paneList.add(new Object[]{definition.getSeriesName(), definition.getValue()}); + } + } + + if(!paneList.isEmpty()) { + titleValuePane.populateBean(paneList); + } + } + } + + @Override + public MapSingleLayerTableDefinition updateBean() {// 从一行内容中update + stopEditing(); + + MapSingleLayerTableDefinition definition = new MapSingleLayerTableDefinition(); + + TableDataWrapper tableDataWrappe = tableDataWrapper; +// = fromTableData.getTableDataWrapper(); + if (tableDataWrappe == null || areaNameBox.getSelectedItem() == null) { + return null; + } + + definition.setTableData(tableDataWrapper.getTableData()); + definition.setAreaName(Utils.objectToString(areaNameBox.getSelectedItem())); + + java.util.List paneList = titleValuePane.updateBean(); + for(int i = 0, size = paneList.size(); i < size; i++) { + Object[] values = (Object[])paneList.get(i); + if(values.length == 2) { + SeriesDefinition seriesDefinition = new SeriesDefinition(); + seriesDefinition.setSeriesName(values[0]); + seriesDefinition.setValue(values[1]); + definition.addTitleValue(seriesDefinition); + } + } + + return definition; + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(final UIObserverListener listener) { + changeListeners.add(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } + + private class InnerTableEditor extends UITableEditor { + private JComponent editorComponent; + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + if(editorComponent instanceof UITextField) { + UITextField textField = (UITextField)editorComponent; + return textField.getText(); + } else if(editorComponent instanceof UIComboBox) { + UIComboBox boxPane = (UIComboBox)editorComponent; + return boxPane.getSelectedItem(); + } + return super.getCellEditorValue(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == table.getModel().getColumnCount()) { + return null; + } + if(column == 0 ) { + UITextField text = new UITextField(); + if(value != null) { + text.setText(Utils.objectToString(value)); + } + + text.registerChangeListener(new UIObserverListener() { + @Override + public void doChange() { + titleValuePane.fireTargetChanged(); + } + }); + + this.editorComponent = text; + } else { + UIComboBox box = new UIComboBox(initNames); + box.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + titleValuePane.fireTargetChanged(); + titleValuePane.stopCellEditing(); + } + }); + + if (value != null && StringUtils.isNotEmpty(value.toString())) { + box.setSelectedItem(value); + } else { + box.setSelectedItem(value); + } + + this.editorComponent = box; + } + return this.editorComponent; + } + } + + public void setTableDataWrapper(TableDataWrapper wrapper){ + this.tableDataWrapper = wrapper; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/AbstrctMapAttrEditPane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/AbstrctMapAttrEditPane.java new file mode 100644 index 000000000..d2d61909b --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/AbstrctMapAttrEditPane.java @@ -0,0 +1,23 @@ +package com.fr.design.chart.series.PlotSeries; + +import com.fr.chart.base.MapSvgAttr; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public interface AbstrctMapAttrEditPane { + + /** + * 更新界面 + * @param attr 地图属性 + */ + public void populateMapAttr(MapSvgAttr attr); + + /** + * 更新MapSvgAttr + * @return 返回属性 + */ + public MapSvgAttr updateCurrentAttr(); +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java new file mode 100644 index 000000000..0a922d34e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapCustomPane.java @@ -0,0 +1,217 @@ +package com.fr.design.chart.series.PlotSeries; + +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.JFileChooser; +import javax.swing.JPanel; +import javax.swing.SwingConstants; + +import com.fr.base.Utils; +import com.fr.chart.base.MapSvgAttr; +import com.fr.design.data.DesignTableDataManager; +import com.fr.data.TableDataSource; +import com.fr.data.core.DataCoreUtils; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.FilterComboBox; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; +import org.apache.batik.swing.svg.SVGFileFilter; + +/** + * 自定义地图界面. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-15 下午03:38:15 + */ +public class MapCustomPane extends BasicBeanPane implements AbstrctMapAttrEditPane{ // 储存地图对应的字段. 名称, 类型. shape (点 用圆形代替) + + private FilterComboBox areaString;// 区域字段 + private DatabaseTableDataPane tableDataNameBox;// 数据集名称 + 后面跟随预览按钮 + private MapImageEditPane imageShowPane; // 图片展示编辑的界面 + private String lastSelectPath; + private boolean isNeedDataSource = true; + + public MapCustomPane() { + initComp(); + } + + public MapCustomPane(boolean isNeedDataSource){ + this.isNeedDataSource = isNeedDataSource; + initComp(); + } + + private void initComp() { + this.setLayout(new BorderLayout(0, 0)); + + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.NORTH); + + pane.setLayout(new BorderLayout()); + + pane.add(northPaneCreate(), BorderLayout.NORTH); + + imageShowPane = new MapImageEditPane(); + + pane.add(imageShowPane, BorderLayout.CENTER); + } + + private JPanel northPaneCreate() { + JPanel northPane = new JPanel(); + + northPane.setLayout(new FlowLayout(FlowLayout.LEFT)); + + UIButton loadMap = new UIButton(Inter.getLocText("FR-Chart-Import_Map")); + loadMap.setPreferredSize(new Dimension(160, 20)); + northPane.add(loadMap); + + loadMap.addActionListener(selectPictureActionListener); + + if(isNeedDataSource){ + UILabel label =new UILabel(Inter.getLocText("FR-Chart-Table_Data") + ":", SwingConstants.RIGHT) ; + + tableDataNameBox = new DatabaseTableDataPane(label) { + protected void userEvent() { +refreshAreaNameBox(); +} + }; + tableDataNameBox.setPreferredSize(new Dimension(200, 20)); + northPane.add(tableDataNameBox); + + northPane.add(new BoldFontTextLabel(Inter.getLocText(new String[]{"Filed", "Field"}) + ":")); + + areaString = new FilterComboBox(); + areaString.setPreferredSize(new Dimension(120, 20)); + areaString.addItemListener(areaChange); + northPane.add(areaString); + } + + + return northPane; + } + + private ActionListener selectPictureActionListener = new ActionListener() { + + public void actionPerformed(ActionEvent evt) { + JFileChooser svgFileChooser = new JFileChooser(); + svgFileChooser.addChoosableFileFilter(new SVGFileFilter()); + if (StringUtils.isNotBlank(lastSelectPath)) { + svgFileChooser.setSelectedFile(new File(lastSelectPath)); + } + int returnVal = svgFileChooser.showOpenDialog(DesignerContext.getDesignerFrame()); + if (returnVal != JFileChooser.CANCEL_OPTION) { + File selectedFile = svgFileChooser.getSelectedFile(); + lastSelectPath = selectedFile.getAbsolutePath(); + if (selectedFile != null && selectedFile.isFile()) { + imageShowPane.setSvgMap(selectedFile.getPath()); + imageShowPane.repaint(); + } + } + } + }; + + private ItemListener areaChange = new ItemListener() { + public void itemStateChanged(ItemEvent e) { + Object select = areaString.getSelectedItem(); + if (select != null) { + String colName = Utils.objectToString(areaString.getSelectedItem()); + + TableDataWrapper tableDataWrappe = tableDataNameBox.getTableDataWrapper(); + TableDataSource source = DesignTableDataManager.getEditingTableDataSource(); + if (tableDataWrappe == null || source == null) { + return; + } + + String[] values = DataCoreUtils.getColValuesInData(source, tableDataWrappe.getTableDataName(), colName); + ArrayList list = new ArrayList(); + for(int i = 0; i < values.length; i++) { + list.add(values[i]); + } + + imageShowPane.refreshFromDataList(list); + } + } + }; + + /** + * 选中方式: 区域或者点 + */ + public void setImageSelectType(int selectType) { + if (imageShowPane != null) { + imageShowPane.setEditType(selectType); + } + } + + private void refreshAreaNameBox() {// 刷新区域名称列表 + if(!isNeedDataSource){ + return; + } + TableDataWrapper tableDataWrappe = tableDataNameBox.getTableDataWrapper(); + if (tableDataWrappe == null) { + return; + } + List columnNameList = tableDataWrappe.calculateColumnNameList(); + + areaString.removeAllItems(); + areaString.setItemList(columnNameList); + } + + /** + * 当前正在编辑的条目的类别(国家,省市)名和地图名 + * @param typeName 类别名 + * @param mapName 地图名 + */ + public void setTypeNameAndMapName(String typeName, String mapName){ + imageShowPane.setTypeNameAndMapName(typeName, mapName); + } + + /** + * 根据地图名称 加载信息 + */ + public void populateBean(String list) { + imageShowPane.populateBean(list); + } + + /** + * 根据地图名称 保存信息 + */ + public String updateBean() { + // 地图类型等 加入Helper + return imageShowPane.updateBean(); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Datasource-User_Defined", "Chart-Map"}); + } + + /** + * 更新界面 + * @param attr 地图属性 + */ + public void populateMapAttr(MapSvgAttr attr) { + imageShowPane.populateMapSvgAttr(attr); + } + + /** + * 更新MapSvgAttr + * @return 返回属性 + */ + public MapSvgAttr updateCurrentAttr() { + return imageShowPane.updateWithOutSave(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapDefiAreaNamePane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapDefiAreaNamePane.java new file mode 100644 index 000000000..515527eaf --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapDefiAreaNamePane.java @@ -0,0 +1,250 @@ +package com.fr.design.chart.series.PlotSeries; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import javax.swing.AbstractCellEditor; +import javax.swing.JPanel; +import javax.swing.JTable; +import javax.swing.SwingConstants; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.TableCellEditor; + +import com.fr.chart.base.MapSvgAttr; +import com.fr.chart.base.MapSvgXMLHelper; +import com.fr.base.Utils; +import com.fr.design.data.DesignTableDataManager; +import com.fr.data.TableDataSource; +import com.fr.data.core.DataCoreUtils; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.icombobox.FilterComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itableeditorpane.UIArrayTableModel; +import com.fr.design.gui.itableeditorpane.UITableEditorPane; +import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane; +import com.fr.design.editor.ValueEditorPane; +import com.fr.design.editor.ValueEditorPaneFactory; +import com.fr.design.gui.xcombox.ComboBoxUseEditor; +import com.fr.design.editor.editor.Editor; +import com.fr.design.editor.editor.TextEditor; +import com.fr.general.Inter; +import com.fr.third.org.apache.poi.hssf.record.formula.functions.T; + +/** + * 地图, 定义区域名. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-19 下午03:19:53 + */ +public class MapDefiAreaNamePane extends BasicBeanPane implements AbstrctMapAttrEditPane{ + + private DatabaseTableDataPane tableDataBox; + private FilterComboBox columnBox; + + // 双列: 左侧Label, 数据列表(全部都是UIComboBox, 支持自定义). + private UITableEditorPane tableEditorPane; + private UIArrayTableModel tableEditorModel; + + private String[] initNames = new String[]{}; + + private String editName = ""; + private boolean isNeedDataSource = true; + private MapSvgAttr currentSvg; + + public MapDefiAreaNamePane(boolean isNeedDataSource){ + this.isNeedDataSource = isNeedDataSource; + initCom(); + } + + public MapDefiAreaNamePane() { + initCom(); + } + + private void initCom() { + this.setLayout(new BorderLayout(0, 0)); + + JPanel northPane = new JPanel(); + if(this.isNeedDataSource){ + this.add(northPane, BorderLayout.NORTH); + } + + northPane.setLayout(new FlowLayout(FlowLayout.LEFT)); + + UILabel lable = new UILabel(Inter.getLocText("Chart-DS_TableData") + ":", SwingConstants.RIGHT); + + // 数据集, 字段, 数据列表, 使用该数据进行自动命名 + tableDataBox = new DatabaseTableDataPane(lable) { + protected void userEvent() { + refreshAreaNameBox(); + } + }; + + tableDataBox.setPreferredSize(new Dimension(200, 20)); + northPane.add(tableDataBox); + + columnBox = new FilterComboBox(); + columnBox.setPreferredSize(new Dimension(40, 20)); + columnBox.addItemListener(columnChange); + + northPane.add(new UILabel(Inter.getLocText("FR-Chart-Map_Field")+":")); + northPane.add(columnBox); + + tableEditorModel = new UIArrayTableModel(new String[]{Inter.getLocText("FR-Chart-Map_Use_Field"), Inter.getLocText("FR-Chart-Area_Name")}, new int[]{}) { + public boolean isCellEditable(int row, int col) { + return col != 0; + } + }; + tableEditorModel.setDefaultEditor(Object.class, new DefaultComboBoxEditor()); + tableEditorModel.setDefaultRenderer(Object.class, new DefaultComboBoxRenderer()); + tableEditorPane = new UITableEditorPane(tableEditorModel); + this.add(tableEditorPane); + } + + ItemListener columnChange = new ItemListener() { + public void itemStateChanged(ItemEvent e) { + if (columnBox.getSelectedItem() != null) { + String columnName = Utils.objectToString(columnBox.getSelectedItem()); + + TableDataWrapper tableDataWrappe = tableDataBox.getTableDataWrapper(); + TableDataSource source = DesignTableDataManager.getEditingTableDataSource(); + if (tableDataWrappe == null || source == null) { + return; + } + + initNames = DataCoreUtils.getColValuesInData(source, tableDataWrappe.getTableDataName(), columnName); + + if (tableEditorModel != null) { + tableEditorModel.stopCellEditing();// 只是用来刷新列表的combox + } + } + } + }; + + private void refreshAreaNameBox() {// 刷新区域名称列表 + TableDataWrapper tableDataWrappe = tableDataBox.getTableDataWrapper(); + if (tableDataWrappe == null) { + return; + } + List columnNameList = tableDataWrappe.calculateColumnNameList(); + + columnBox.setItemList(columnNameList); + } + + // 对应地图的名称 + public void populateBean(String mapName) { + if (MapSvgXMLHelper.getInstance().containsMapName(mapName)) { + MapSvgAttr editingMapAttr = MapSvgXMLHelper.getInstance().getMapAttr(mapName); + this.editName = mapName; + this.populateMapAttr(editingMapAttr); + } + } + + @Override + public String updateBean() { + // 固定存储 下 区域名 对应值 列表 MapHelper + updateMapAttr(); + MapSvgXMLHelper.getInstance().removeMapAttr(currentSvg.getName()); + MapSvgXMLHelper.getInstance().pushMapAttr(currentSvg.getName(),currentSvg); + return ""; + } + + private void updateMapAttr(){ + if(currentSvg != null){ + tableEditorModel.stopCellEditing(); + List list = tableEditorPane.update(); + for(int i = 0, size = list.size(); i < size; i++) { + Object[] tmp = (Object[]) list.get(i); + String name = Utils.objectToString(tmp[0]); + String nameTo = Utils.objectToString(tmp[1]); + currentSvg.setNameTo(name, nameTo); + } + } + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Define", "Area_Name"}); + } + + /** + * 更新界面 + * @param editingMapAttr 地图属性 + */ + public void populateMapAttr(MapSvgAttr editingMapAttr) { + List popuValues = new ArrayList(); + if(editingMapAttr == null) { + currentSvg = null; + tableEditorPane.populate(popuValues.toArray()); + return; + } + currentSvg =editingMapAttr; + List namesList = new ArrayList(); + Iterator shapeNames = editingMapAttr.shapeValuesIterator(); + while (shapeNames.hasNext()) { + namesList.add(shapeNames.next());// 先得到所有的处理名字, 然后再处理对应关系 + } + for (int i = 0; i < namesList.size(); i++) { + Object name = namesList.get(i); + Object value = editingMapAttr.getNameToValue(Utils.objectToString(name)); + popuValues.add(new Object[]{name, value}); + } + tableEditorPane.populate(popuValues.toArray()); + } + + /** + * 更新MapSvgAttr + * @return 返回属性 + */ + public MapSvgAttr updateCurrentAttr() { + updateMapAttr(); + return currentSvg; + } + + private class DefaultComboBoxEditor extends AbstractCellEditor implements TableCellEditor { + private ValueEditorPane cellEditor; + + public DefaultComboBoxEditor() { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ComboBoxUseEditor(initNames)}); + } + + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == 0) { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new TextEditor()}); + } else { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ComboBoxUseEditor(initNames)}); + } + cellEditor.populate(value == null ? "" : value); + return cellEditor; + } + + public Object getCellEditorValue() { + return cellEditor.update(); + } + } + + private class DefaultComboBoxRenderer extends DefaultTableCellRenderer { + private ValueEditorPane cellEditor; + + public DefaultComboBoxRenderer() { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ComboBoxUseEditor(initNames)}); + } + + public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { + if (column == 0) { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new TextEditor()}); + } else { + cellEditor = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ComboBoxUseEditor(initNames)}); + } + cellEditor.populate(value == null ? "" : value); + return cellEditor; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java new file mode 100644 index 000000000..f1f1b3deb --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java @@ -0,0 +1 @@ +package com.fr.design.chart.series.PlotSeries; import com.fr.base.*; import com.fr.chart.base.MapSvgAttr; import com.fr.chart.base.MapSvgXMLHelper; import com.fr.chart.chartattr.MapPlot; import com.fr.chart.chartglyph.MapShapeValue; import com.fr.design.constants.UIConstants; import com.fr.design.DesignerEnvManager; import com.fr.design.event.ChangeEvent; import com.fr.design.event.ChangeListener; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrame; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.stable.CoreConstants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.SvgProvider; import javax.swing.*; import javax.swing.event.ListSelectionEvent; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.geom.RoundRectangle2D; import java.util.ArrayList; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 12-12-29 * Time: 下午2:41 */ public class MapGroupExtensionPane extends BasicPane implements UIObserver { private static final String[] TYPE_NAMES = new String[]{ Inter.getLocText("FR-Chart-World_Map"), Inter.getLocText("FR-Chart-State_Map"), Inter.getLocText("FR-Chart-Province_Map"), Inter.getLocText("FR-Chart-Custom_Map")}; private static final int WORD = 0; private static final int NATION = 1; private static final int STATE = 2; private static final int USER = 3; private static final int OFFSET_X = 800; private static final int OFFSET_Y = 200; private UIGroupExtensionPane groupExtensionPane; private UIButton addButton; private JPopupMenu popupMenu; private ArrayList changeListeners = new ArrayList(); private boolean hasPopulated = false; @Override protected String title4PopupWindow() { return "Map"; } public MapGroupExtensionPane() { setLayout(new BorderLayout()); groupExtensionPane = new UIGroupExtensionPane(TYPE_NAMES){ /** * 新添加的数据的序号 * @param data 数据 */ protected void dealNewAddedDataIndex(Object data){ String newName = (String)data; MapSvgXMLHelper helper = MapSvgXMLHelper.getInstance(); if(helper.getNewMapAttr(newName) != null){ return; } MapSvgAttr attr = new MapSvgAttr(); attr.setFilePath(MapSvgXMLHelper.customMapPath() + CoreConstants.SEPARATOR + newName + ".svg"); helper.addNewSvgMaps(attr.getName(), attr); } /** * 一次鼠标的点击会有两次事件响应(按下和释放)。前者的事件属性中getValueIsAdjusting()=true,后者是false。 * 是否响应list值改变 * @return 鼠标按下时不响应,先响应mousePress事件,在鼠标释放是再响应list值改编的事件,并且点击删除不触发更新,并且populate后触发更新 */ protected boolean isRespondToValueChange(ListSelectionEvent e){ return !e.getValueIsAdjusting() && !this.isPressOnDelete() && hasPopulated; } }; groupExtensionPane.addSelectionChangeListener(new ChangeListener() { @Override public void fireChanged(ChangeEvent event) { fireStateChange(); } }); groupExtensionPane.addItemEditListener(new ChangeListener() { @Override public void fireChanged(ChangeEvent event) { doEdit(event); } }); groupExtensionPane.addDeleteListener(new ChangeListener() { @Override public void fireChanged(ChangeEvent event) { //这么写有点问题 String oldName = Utils.objectToString(groupExtensionPane.getSelectedObject()); saveMapInfo(oldName); } }); setPreferredSize(new Dimension(400, 210)); add(groupExtensionPane, BorderLayout.CENTER); addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")) { @Override protected void paintBorder(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.setStroke(UIConstants.BS); Shape shape = new RoundRectangle2D.Float(0.5f, 0.5f, getWidth() - 1, getHeight() - 1, UIConstants.ARC, UIConstants.ARC); g2d.setColor(UIConstants.LINE_COLOR); g2d.draw(shape); } }; addButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { popupMenu.show(MapGroupExtensionPane.this, addButton.getX() + 1, addButton.getY() + addButton.getHeight()); } }); add(addButton, BorderLayout.SOUTH); initPopupMenu(); } private void initPopupMenu() { popupMenu = new JPopupMenu() { @Override public Dimension getPreferredSize() { Dimension dimension = new Dimension(); dimension.height = super.getPreferredSize().height; dimension.width = addButton.getWidth() - 2; return dimension; } }; JMenuItem worldMap = new JMenuItem(TYPE_NAMES[WORD]); popupMenu.add(worldMap); worldMap.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { groupExtensionPane.addData(TYPE_NAMES[WORD], TYPE_NAMES[WORD], true); } }); JMenuItem countMap = new JMenuItem(TYPE_NAMES[NATION]); popupMenu.add(countMap); countMap.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { groupExtensionPane.addData(TYPE_NAMES[NATION], TYPE_NAMES[NATION], true); } }); JMenuItem proMap = new JMenuItem(TYPE_NAMES[STATE]); popupMenu.add(proMap); proMap.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { groupExtensionPane.addData(TYPE_NAMES[STATE], TYPE_NAMES[STATE], true); } }); JMenuItem menu = new JMenuItem(TYPE_NAMES[USER]); popupMenu.add(menu); menu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { groupExtensionPane.addData(TYPE_NAMES[USER], TYPE_NAMES[USER], true); } }); } private void doEdit(ChangeEvent e) { MouseEvent event = (MouseEvent) e.getSource(); JPopupMenu editPopMenu = new JPopupMenu(); final String oldName = Utils.objectToString(groupExtensionPane.getSelectedObject()); editPopMenu.add(createAreaItem(oldName)); editPopMenu.add(createMarkerItem(oldName)); editPopMenu.add(createLayerItem(oldName)); editPopMenu.add(createRenameItem()); editPopMenu.show(MapGroupExtensionPane.this, event.getXOnScreen() - OFFSET_X, event.getYOnScreen() - OFFSET_Y); } private void mapCheckBeforeEdit(String name){ if(MapSvgXMLHelper.getInstance().containsMapName(name) || MapSvgXMLHelper.getInstance().getNewMapAttr(name)!=null){ return; } MapSvgAttr attr = new MapSvgAttr(); attr.setFilePath(MapSvgXMLHelper.customMapPath() + CoreConstants.SEPARATOR + name + ".svg"); MapSvgXMLHelper.getInstance().addNewSvgMaps(name,attr); } private JMenuItem createAreaItem(final String oldName) { JMenuItem editFileItem = new JMenuItem(Inter.getLocText(new String[]{"Edit", "Image", "Filed"})); editFileItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { final MapCustomPane image = new MapCustomPane(); image.setImageSelectType(MapShapeValue.AREA); image.populateBean(oldName); image.setTypeNameAndMapName(groupExtensionPane.getSelectedType(), Utils.objectToString(groupExtensionPane.getSelectedObject())); mapCheckBeforeEdit(oldName); final Image oldImage = getMapImage(oldName); BasicDialog dialog = image.showMediumWindow(SwingUtilities.getWindowAncestor(MapGroupExtensionPane.this), new DialogActionAdapter() { public void doOk() { image.updateBean(); // 比较两个前后的名字是否相同, 是图片 如果图片不同, 则直接比较 Image newImage = getMapImage(oldName); if(!ComparatorUtils.equals(oldImage, newImage)) { fireStateChange(); } //versionID递增 MapSvgAttr old = MapSvgXMLHelper.getInstance().getMapAttr(oldName); if(old != null) { old.addVersionID(); } saveMapInfo(oldName); refresh(); } }); dialog.setVisible(true); } }); return editFileItem; } //根据地图的名字返回地图的图片 private Image getMapImage(String mapName) { if (MapSvgXMLHelper.getInstance().containsMapName(mapName)) { MapSvgAttr mapAttr = MapSvgXMLHelper.getInstance().getMapAttr(mapName); if(mapAttr == null) { return null; } return mapAttr.getMapImage(); } return null; } private JMenuItem createMarkerItem(final String oldName) { JMenuItem editMarkerItem = new JMenuItem(Inter.getLocText(new String[]{"Edit", "Image", "Marker"})); editMarkerItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { final MapCustomPane image = new MapCustomPane(); image.setImageSelectType(MapShapeValue.POINT); image.populateBean(oldName); mapCheckBeforeEdit(oldName); final Image oldImage = getMapImage(oldName); BasicDialog dialog = image.showMediumWindow(SwingUtilities.getWindowAncestor(image), new DialogActionAdapter() { public void doOk() { image.updateBean(); Image newImage = getMapImage(oldName); if(!ComparatorUtils.equals(oldImage, newImage)) { fireStateChange(); } //versionID递增 MapSvgAttr old = MapSvgXMLHelper.getInstance().getMapAttr(oldName); if(old != null) { old.addVersionID(); } saveMapInfo(oldName); refresh(); } }); dialog.setVisible(true); } }); return editMarkerItem; } private JMenuItem createLayerItem(final String oldName) { JMenuItem corrItem = new JMenuItem(Inter.getLocText(new String[]{"Filed", "Corresponding_Fields"})); corrItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { final MapDefiAreaNamePane namedPane = new MapDefiAreaNamePane(); namedPane.populateBean(oldName); mapCheckBeforeEdit(oldName); BasicDialog dialog = namedPane.showMediumWindow(SwingUtilities.getWindowAncestor(namedPane), new DialogActionAdapter() { public void doOk() { namedPane.updateBean();// 地图的名称 value对应情况 MapSvgAttr old = MapSvgXMLHelper.getInstance().getMapAttr(oldName); if(old != null) { old.addVersionID(); } saveMapInfo(oldName); } }); dialog.setVisible(true); refresh(); } }); return corrItem; } private void showRenameWaring(String newName){ JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), "\"" + newName + "\"" + Inter.getLocText("Utils-has_been_existed") + "!", Inter.getLocText("FR-Designer_Alert"), JOptionPane.WARNING_MESSAGE); } private JMenuItem createRenameItem() { JMenuItem renameItem = new JMenuItem(Inter.getLocText("FR-Chart-Map_Rename")); renameItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String newName = JOptionPane.showInputDialog(DesignerContext.getDesignerFrame().getContentPane(), Inter.getLocText("FR-Chart-Map_Rename"), groupExtensionPane.getSelectedObject()); if (StringUtils.isNotBlank(newName)) { String oldName = Utils.objectToString(groupExtensionPane.getSelectedObject()); if(ComparatorUtils.equals(oldName, newName)){ return; } //本地在看看临时的helper里面有没有 if(MapSvgXMLHelper.getInstance().getNewMapAttr(newName) != null){ showRenameWaring(newName); return; } try{//提醒名字已存在 if(FRContext.getCurrentEnv().fileExists(StableUtils.pathJoin( new String[]{MapSvgXMLHelper.relativeDefaultMapPath(),newName+SvgProvider.EXTENSION}))){ showRenameWaring(newName); return; } if(FRContext.getCurrentEnv().fileExists(StableUtils.pathJoin( new String[]{MapSvgXMLHelper.relativeCustomMapPath(), newName + SvgProvider.EXTENSION}))){ showRenameWaring(newName); return; } MapSvgAttr editingAttr = MapSvgXMLHelper.getInstance().getMapAttr(oldName); if(editingAttr == null){ editingAttr = MapSvgXMLHelper.getInstance().getNewMapAttr(oldName); } if( editingAttr == null) { return; } editingAttr.renameMap(newName); groupExtensionPane.setValueAtCurrentSelectIndex(newName); fireStateChange(); saveMapInfo(newName); FRContext.getCurrentEnv().deleteFile( StableUtils.pathJoin(new String[]{MapSvgXMLHelper.relativeDefaultMapPath(),oldName+SvgProvider.EXTENSION})); FRContext.getCurrentEnv().deleteFile( StableUtils.pathJoin(new String[]{MapSvgXMLHelper.relativeCustomMapPath(),oldName+SvgProvider.EXTENSION})); refresh(); }catch (Exception exp){ FRLogger.getLogger().error(exp.getMessage()); } } } }); return renameItem; } private void refresh() { this.validate(); this.repaint(); DesignerFrame frame = DesignerContext.getDesignerFrame(); if(frame != null) { frame.repaint();//kunsnat: 图表属性没变, 只是读取时 内容变化. } } //保存修改过的地图信息 private void saveMapInfo(final String mapName) { SwingWorker worker = new SwingWorker() { @Override protected Integer doInBackground() throws Exception { MapSvgAttr attr = MapSvgXMLHelper.getInstance().getMapAttr(mapName);// 只有在编辑地图时才需要储存相关数据 @kuns if(attr != null){ attr.writeBack(mapName); } return 0; } @Override protected void done() { FRLogger.getLogger().info(Inter.getLocText("FR-Chart-Map_Saved")); // 地图已经保存. } }; worker.execute(); DesignerEnvManager.addWorkers(worker); } private void fireStateChange() { for (int i = changeListeners.size(); i > 0; i--) { changeListeners.get(i - 1).stateChanged(new javax.swing.event.ChangeEvent(this)); } } /** * 更新地图属性 * @return 返回地图名称. */ public String updateBean(MapPlot plot) { if(!hasPopulated){ this.populateBean(plot); hasPopulated = true; } MapHelper helper = plot.isSvgMap() ? MapSvgXMLHelper.getInstance() : MapXMLHelper.getInstance(); helper.clearCateNames(); for (String type : TYPE_NAMES) { Object[] datas = groupExtensionPane.getData(type); for (Object name : datas) { helper.addCateNames(type, name); } } return Utils.objectToString(groupExtensionPane.getSelectedObject()); } /** * 更新地图名称 * @param mapPlot 地图 */ public void populateBean(MapPlot mapPlot) { hasPopulated = false; groupExtensionPane.clearData(); for (String type : TYPE_NAMES) { MapHelper helper = mapPlot.isSvgMap() ? MapSvgXMLHelper.getInstance() : MapXMLHelper.getInstance(); java.util.List list = helper.getNamesListWithCateName(type); for (Object name : list) { groupExtensionPane.addData(name, type); } } groupExtensionPane.setSelectedObject(mapPlot.getMapName()); hasPopulated = true; } /** * 给组件登记一个观察者监听事件 * * @param listener 观察者监听事件 */ public void registerChangeListener(final UIObserverListener listener) { changeListeners.add(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { listener.doChange(); } }); } /** * 组件是否需要响应添加的观察者事件 * * @return 如果需要响应观察者事件则返回true,否则返回false */ public boolean shouldResponseChangeListener() { return true; } public void setEnabled(boolean isEnabled){ super.setEnabled(isEnabled); addButton.setEnabled(isEnabled); popupMenu.setEnabled(isEnabled); groupExtensionPane.setEnabled(isEnabled); } } \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java new file mode 100644 index 000000000..6f9c15c55 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapImageEditPane.java @@ -0,0 +1,763 @@ +package com.fr.design.chart.series.PlotSeries; + +import java.awt.AlphaComposite; +import java.awt.BasicStroke; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.awt.geom.GeneralPath; +import java.util.*; + +import javax.swing.BoxLayout; +import javax.swing.DefaultListModel; +import javax.swing.JComponent; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.SwingUtilities; + +import com.fr.base.*; +import com.fr.chart.base.MapSvgAttr; +import com.fr.chart.base.MapSvgXMLHelper; +import com.fr.chart.chartglyph.MapShapeValue; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.event.ChangeEvent; +import com.fr.design.event.ChangeListener; +import com.fr.design.gui.icontainer.UIScrollPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.UISelectTable; +import com.fr.design.gui.itable.UITableNoOptionUI; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.dialog.UIDialog; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.CoreGraphHelper; +import com.fr.stable.StringUtils; +import com.fr.design.utils.gui.GUICoreUtils; + +/** + * 地图 图片编辑界面 选中图片 编辑. 支持鼠标选中等事件 + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-15 下午04:17:28 + */ +public class MapImageEditPane extends BasicBeanPane { + private static final long serialVersionUID = -5925535686784344616L; + private static final double ARCSIZE = 7; + private static final int LOCATIONOFFSET = 10; + private static final int NAME_EDIT_PANE_WIDTH = 130; + private static final int NAME_EDIT_PANE_HEIGHT = 225; + + private ImageEditPane imageEditPane; + private UISelectTable recordTable; + private int editType = 0;// 只标记mark或者标记出路径 + private List fromDataList = new ArrayList();// 编辑时从数据集中取出的使用字段. + + private HashMap> resultAreaShape = new HashMap>();// 名字 对应图形 // 已编辑区全都用指定颜色 + private String currentNodeName ; //当前选中的节点的名字 + private String typeName = ""; + private String mapName = ""; + + private String mouseSelectListName = ""; + private String editMapName = ""; + + public MapImageEditPane() { + initCom(); + } + + private void initCom() { + this.setLayout(new BorderLayout(0, 0)); + + imageEditPane = new ImageEditPane(); + this.add(imageEditPane, BorderLayout.CENTER); + + recordTable = new UISelectTable(1){ + public int columnAtPoint(Point point) { + //只有一列 + return 0; + } + }; + recordTable.addSelectionChangeListener(new ChangeListener() { + @Override + public void fireChanged(ChangeEvent event) { + mouseSelectListName = Utils.objectToString(event.getSource()); + + imageEditPane.repaint(); + MapImageEditPane.this.repaint(); + } + }); + + recordTable.setUI(new UITableNoOptionUI()); + + recordTable.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent e) { + List names = recordTable.updateBean();// 得到所有的List + + List test = new ArrayList(); + for (int i = 0; i < names.size(); i++) { + test.add(Utils.objectToString(recordTable.getValueAt(i, 0))); + } + + Iterator keys = resultAreaShape.keySet().iterator(); + while (keys.hasNext()) { + String key = keys.next(); + if (!test.contains(key)) { + keys.remove(); + } + } + recordTable.revalidate(); + repaint(); + } + }); + + UIScrollPane pane = new UIScrollPane(recordTable); + pane.setPreferredSize(new Dimension(150, 320)); + pane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Filed", "WF-Name"}))); + + this.add(pane, BorderLayout.EAST); + } + + /** + * 设置编辑的类型: 区域 或者 点 + */ + public void setEditType(int editType) { + this.editType = editType; + } + + /** + * 返回编辑的类型: 区域 或者 点 + */ + public int getEditType() { + return editType; + } + + /** + * 设置正在编辑的svg文件 + */ + public void setSvgMap(String filePath){ + resultAreaShape.clear(); + mouseSelectListName = StringUtils.EMPTY; + recordTable.populateBean(new ArrayList()); + recordTable.revalidate(); + + imageEditPane.setSvgMap(filePath); + + repaint(); + } + + /** + * 清空图片内容 + */ + public void clearSvgMap(){ + resultAreaShape.clear(); + mouseSelectListName = StringUtils.EMPTY; + recordTable.populateBean(new ArrayList()); + recordTable.revalidate(); + + imageEditPane.clearSvgMap(); + + repaint(); + } + + /** + * 设置正在编辑的svg文件 + * @param attr 已经读取过的文件 + */ + public void setSvgMap(MapSvgAttr attr){ + resultAreaShape.clear(); + mouseSelectListName = StringUtils.EMPTY; + recordTable.populateBean(new ArrayList()); + recordTable.revalidate(); + + imageEditPane.setSvgMap(attr); + + repaint(); + } + + /** + * 刷新数据列表中的数据 + * @param list 列表 + */ + public void refreshFromDataList(List list) { + fromDataList.clear(); + + for (Object aList : list) { + fromDataList.add(Utils.objectToString(aList)); + } + } + + /** + * 当前正在编辑的条目的类别(国家,省市)名和地图名 + * @param typeName 类别名 + * @param mapName 地图名 + */ + public void setTypeNameAndMapName(String typeName, String mapName){ + this.typeName = typeName; + this.mapName = mapName; + } + + private class ImageEditPane extends JComponent implements MouseListener, MouseMotionListener { + + private MapSvgAttr currentSvgMap;//当前选中的svg地图 + private GeneralPath selectedShape; // 当前选中的Shape + private Image image = BaseUtils.readImage("");// 所选择的图片 + + //平移的位置 + private double moveLeft = 0; + private double moveTop = 0; + + //鼠标落点的位置 + private double mouseStartX; + private double mouseStartY; + + private boolean dragged = false; + + public ImageEditPane() { + this.addMouseListener(this); + this.addMouseMotionListener(this); + } + + public void paintComponent(Graphics g) {// 选中图片之后, 记录选中的区域, 点中的 标记点 + Rectangle bounds = this.getBounds(); + if (bounds == null || this.image == null) { + return; + } + + dealReady4Paint(g, bounds); + + int imageWidth = this.image.getWidth(new JPanel()); + int imageHeight = this.image.getHeight(new JPanel()); + + Graphics2D g2d = (Graphics2D) g; + if (this.image != null) {// 太小会放大, 太大, 则默认拖动 + g2d.drawImage(this.image, (int) moveLeft, (int) moveTop, imageWidth, imageHeight, new JPanel()); // 只是移动起始位置 + } + + g2d.translate(moveLeft, moveTop); + g2d.setStroke(new BasicStroke(1)); + if (resultAreaShape != null && !resultAreaShape.isEmpty()) { + for (String key : resultAreaShape.keySet()) { + + GeneralPath selectShape = getSelectedNodePath(key); + g2d.setColor(Color.green); + g2d.draw(selectShape); + } + } + + g2d.setColor(Color.blue); + if (StringUtils.isNotEmpty(mouseSelectListName) && resultAreaShape.containsKey(mouseSelectListName)) {// 当前悬浮选中的 list, 自己画的悬浮提示, 背景 边框, 文字 + GeneralPath highSelect = getSelectedNodePath(mouseSelectListName); + if (highSelect != null) { + g2d.fill(highSelect); + } + } else if (selectedShape != null) { + g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f)); + g2d.fill(selectedShape); + } + + g2d.translate(-moveLeft, -moveTop); + } + + private void dealReady4Paint(Graphics g, Rectangle bounds) { + super.paintComponent(g); + + int x = (int) bounds.getX(); + int y = (int) bounds.getY(); + int width = (int) bounds.getWidth(); + int height = (int) bounds.getHeight(); + g.clipRect(x, y, width, height); + } + + + //初始化下图片的状态 + private void initImage() { + this.image = currentSvgMap.getMapImage(); + CoreGraphHelper.waitForImage(this.image); + + this.selectedShape = null; + this.moveLeft = 0; + this.moveTop = 0; + } + + /** + * 设置当前正在编辑的文件 + * @param filePath 文件路径 + */ + public void setSvgMap(String filePath){ + currentSvgMap = new MapSvgAttr(filePath); + currentSvgMap.setMapTypeAndName(typeName, mapName); + initImage(); + } + + /** + * 设置当前正在编辑的文件 + * @param attr 读取过的文件 + */ + public void setSvgMap(MapSvgAttr attr){ + currentSvgMap = attr; + + initImage(); + } + + public void clearSvgMap(){ + currentSvgMap = null; + this.image = BaseUtils.readImage("");; + this.selectedShape = null; + this.moveLeft = 0; + this.moveTop = 0; + this.dragged = false; + this.mouseStartX = 0; + this.mouseStartY = 0; + } + + + public Image getImage() { + return this.image; + } + + @Override + public void mouseClicked(MouseEvent e) { + drawSelectShape(e); + if (e.getClickCount() == 2) {// 2次编辑, 不然很容易错乱 和 update 错误 + showEditNamePane(e); + } + } + + @Override + public void mouseEntered(MouseEvent e) { + } + + @Override + public void mouseExited(MouseEvent e) { + } + + @Override + public void mousePressed(MouseEvent e) { + this.mouseStartX = e.getPoint().getX(); + this.mouseStartY = e.getPoint().getY(); + } + + @Override + public void mouseReleased(MouseEvent e) { + drawWhenDragEnd(e); + } + + public void mouseDragged(MouseEvent e) { + this.dragged = true; + } + + public void mouseMoved(MouseEvent e) { + + } + + private void drawWhenDragEnd(MouseEvent e) { + if (this.image == null || this.getBounds() == null) { + return; + } + + if (dragged) { + double endX = e.getPoint().getX(); + double endY = e.getPoint().getY(); + + int imageWidth = image.getWidth(new JPanel()); + int imageHeight = image.getHeight(new JPanel()); + + int paneWidth = (int) this.getBounds().getWidth(); + int paneHeight = (int) this.getBounds().getHeight(); + + if (imageWidth > paneWidth) { + double offX = endX - this.mouseStartX; + this.moveLeft += offX; + + this.moveLeft = Math.max(this.moveLeft, paneWidth - imageWidth); + this.moveLeft = Math.min(0, this.moveLeft); + } else { + this.moveLeft = 0; + } + + if (imageHeight > paneHeight) { + double offY = endY - this.mouseStartY; + this.moveTop += offY; + + this.moveTop = Math.max(this.moveTop, paneHeight - imageHeight); + this.moveTop = Math.min(0, this.moveTop); + } else { + this.moveTop = 0; + } + this.repaint(); + } + + this.dragged = false; + } + + //画鼠标点击的区域 + private void drawSelectShape(MouseEvent e) { + selectedShape = null; + mouseSelectListName = StringUtils.EMPTY; + if (this.image == null) { + return; + } + + Point ePoint = e.getPoint(); + Point select = new Point((int) (ePoint.getX() - moveLeft), (int) (ePoint.getY() - moveTop));// 支持ctrl 选定时的多选.. 只是记录多个鼠标位置 然后shape合并 + boolean gotSelectedShape = false; + for (String key : resultAreaShape.keySet()) { + GeneralPath mapSelect = getSelectedNodePath(key); + if (mapSelect.contains(select)) { + selectedShape = mapSelect; + currentNodeName = currentSvgMap.getSelectedPathName(select); + gotSelectedShape = true; + break; + } + } + + if (!gotSelectedShape) {// 根据坐标重新在图片中选取Shape + + if (getEditType() == MapShapeValue.AREA) { + selectedShape = currentSvgMap.getSelectPath(select); + currentNodeName = currentSvgMap.getSelectedPathName(select); + } else { + //标记点类型的要不要待定 + + } + } + this.repaint(); + } + + private void showEditNamePane(MouseEvent e) { + if (this.image == null || selectedShape == null) { + return; + } + final EditNamePane namePane = new EditNamePane(); + Point ePoint = e.getPoint(); + final Point select = new Point((int) (ePoint.getX() - moveLeft), (int) (ePoint.getY() - moveTop)); + namePane.setEditViewRow(getEditViewRow(select)); + String isSelectName = StringUtils.EMPTY; + for (String name : resultAreaShape.keySet()) { + GeneralPath shape = getSelectedNodePath(name); + if (shape.contains(select)) { + isSelectName = name; + break; + } + } + namePane.populateBean(isSelectName); + namePane.resetPaneWithNewNameList(fromDataList); + UIDialog bg = namePane.showUnsizedWindow(SwingUtilities.getWindowAncestor(ImageEditPane.this), new DialogActionAdapter() { + public void doOk() { + namePane.changeList(); + String endName = namePane.updateBean(); + if (resultAreaShape.containsKey(endName)) { + if(ComparatorUtils.equals(endName,namePane.startName)) { + return; + } + ArrayList pathID = resultAreaShape.get(endName); + if(!pathID.contains(currentNodeName)){ + pathID.add(currentNodeName); + } + }else{ + ArrayList paths = new ArrayList(); + resultAreaShape.put(endName,paths); + paths.add(currentNodeName); + ArrayList exists = resultAreaShape.get(namePane.startName); + if(exists!= null){ + for(String id:exists){ + paths.add(id); + } + resultAreaShape.remove(namePane.startName); + } + } + } + }); + bg.setSize(NAME_EDIT_PANE_WIDTH, NAME_EDIT_PANE_HEIGHT); + bg.setLocation((int) (e.getLocationOnScreen().getX()) + LOCATIONOFFSET, (int) e.getLocationOnScreen().getY()); + bg.setTitle(Inter.getLocText(new String[]{"Edit", "Filed", "WF-Name"})); + bg.setVisible(true); + } + + // viewList 根据内容名称 得到是哪一行. + public int getEditViewRow(Point point) { + int rowIndex = recordTable.getRowCount();// 最差 没有找到应该也是返回 row + 1 + + // 根据编辑的位置, 是否有shape对应, 有则找出, 没有则是新的行 + String isSelectName = StringUtils.EMPTY; + for (String name : resultAreaShape.keySet()) { + GeneralPath shape = getSelectedNodePath(name); + if (shape.contains(point)) { + isSelectName = name; + break; + } + } + + if (resultAreaShape.containsKey(isSelectName)) { + for (int i = 0; i < recordTable.getRowCount(); i++) { + String tmp = (String) recordTable.getValueAt(i, 0); + if (ComparatorUtils.equals(isSelectName, tmp)) { + rowIndex = i; + break; + } + } + }// 没有则添加一行 + + return rowIndex; + } + } + + // 图片界面 悬浮点击弹出的名称列表 + private class EditNamePane extends BasicBeanPane {// 点击编辑名称 + + private UITextField nameText; // 文本框 + private JList dataList; + private String startName; + + private JList hasNamedList; + + private int editViewRow = -1;// 所对应的view的index行 , 确定当前正在编辑的viewList的行, 然后改变值 + + private UILabel namedLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Pre_Defined") + "------"); + private JPanel listPane = new JPanel(); + + public EditNamePane() { + initCom(); + } + + public void setEditViewRow(int index) { + this.editViewRow = index; + } + + private void initCom() { + this.setLayout(new BorderLayout(0, 0)); + + nameText = new UITextField(); + nameText.setPreferredSize(new Dimension(100, 20)); + + this.add(nameText, BorderLayout.NORTH); + + listPane.setLayout(new BoxLayout(listPane, BoxLayout.Y_AXIS)); + this.add(listPane, BorderLayout.CENTER); + + listPane.add(new UIScrollPane(dataList = new JList(new DefaultListModel()))); + dataList.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + if (e.getClickCount() >= 2 && dataList.getSelectedValue() != null) { + String value = Utils.objectToString(dataList.getSelectedValue()); + nameText.setText(value);// 直接对文本值改变, 让文本去触发事件 + } + } + }); + + listPane.add(namedLabel); + listPane.add(new UIScrollPane(hasNamedList = new JList(new DefaultListModel()))); + + hasNamedList.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + if (e.getClickCount() >= 2 && hasNamedList.getSelectedValue() != null) { + nameText.setText(Utils.objectToString(hasNamedList.getSelectedValue())); + } + } + }); + } + + private void relayoutList() { + listPane.removeAll(); + + listPane.setLayout(new BoxLayout(listPane, BoxLayout.Y_AXIS)); + listPane.add(new UIScrollPane(dataList)); + + if (hasNamedList.getModel().getSize() > 0) { + listPane.add(namedLabel); + listPane.add(new UIScrollPane(hasNamedList)); + } + } + + + //列表改变,选中的时候添加shape信息 + private void changeList() { + String textValue = nameText.getText(); + if (editViewRow >= recordTable.getRowCount()) {// 添加一行 确定的行数 即时大于viewCount + recordTable.addLine(new String[]{textValue}); + } else if (editViewRow > -1) { + recordTable.setValueAt(textValue, editViewRow, 0); + } + recordTable.revalidate(); + recordTable.repaint(); + + resetPaneWithNewNameList(fromDataList); + } + + public void resetPaneWithNewNameList(List list) {// 界面不变, 只是刷新重置list + DefaultListModel model = (DefaultListModel) dataList.getModel(); + model.removeAllElements(); + + DefaultListModel hasNameModel = (DefaultListModel) hasNamedList.getModel(); + hasNameModel.removeAllElements(); + + for (int i = 0; list != null && i < list.size(); i++) { + String value = list.get(i); + if (!resultAreaShape.containsKey(value)) { + model.addElement(value); + } + } + + for (String name : resultAreaShape.keySet()) { + if (!hasNameModel.contains(name)) { + hasNameModel.addElement(name); + } + } + + relayoutList(); + } + + public void populateBean(String list) { + nameText.setText(list); + startName = list; + nameText.setCaretPosition(list == null ? 0 : list.length()); + } + + @Override + public String updateBean() { + return nameText.getText(); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Edit", "Image"}); + } + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Edit", "Image"}); + } + + /** + * 更新地图 名称列表以及正在编辑的图片 + */ + public void populateBean(String ob) {// 确定要编辑的地图名称 + this.editMapName = ob;// 当前编辑的地图名称 + MapSvgXMLHelper mapHelper = MapSvgXMLHelper.getInstance(); + if (mapHelper.containsMapName(editMapName)) { + MapSvgAttr svgAttr = mapHelper.getMapAttr(editMapName); + populateMapSvgAttr(svgAttr); + }else if(mapHelper.getNewMapAttr(editMapName) != null ){ + clearSvgMap(); + imageEditPane.currentSvgMap = mapHelper.getMapAttr(editMapName); + }else { + clearSvgMap(); + } + } + + /** + * 保存编辑的地图 形状等信息. + */ + public String updateBean() { + if(imageEditPane.currentSvgMap !=null){ + this.editMapName = imageEditPane.currentSvgMap.getName(); + } + // 将地图加入helper 固定存储 记录固定的hShape 原图片的坐标位置, 然后在根据现在现实的 实际坐标 展示 + if (StringUtils.isNotEmpty(editMapName) && this.imageEditPane.getImage() != null) { + MapSvgXMLHelper mapHelper = MapSvgXMLHelper.getInstance(); + MapSvgAttr mapAttr = imageEditPane.currentSvgMap; + if(mapHelper.getNewMapAttr(editMapName)!=null){ + mapHelper.removeNewMapAttr(editMapName); + mapHelper.pushMapAttr(editMapName,mapAttr); + } + if(mapHelper.containsMapName(editMapName)){ + //处理下mapAttr存节点name属性 + updateMapShapePath(mapAttr); + mapHelper.addCustomSvgMap(editMapName, mapAttr); + + //设置以后要写回 + mapAttr.writeBack(editMapName); + } + } + + return editMapName; + } + + /** + * 更新界面 + * @param svgAttr 地图属性 + * */ + public void populateMapSvgAttr(MapSvgAttr svgAttr){ + if(svgAttr == null || svgAttr.getMapImage() == null){ + clearSvgMap(); + return; + } + setSvgMap(svgAttr); + Iterator names = svgAttr.shapeValuesIterator(); + while (names.hasNext()) { + String name = Utils.objectToString(names.next()); + ArrayList pathIDs= svgAttr.getExistedShapePathID(name); + if (name != null) { + resultAreaShape.put(name,pathIDs); + recordTable.addLine(new String[]{name}); + } + } + recordTable.revalidate(); + } + + /** + * 更新MapSvgAttr + * @return 返回属性 + * */ + public MapSvgAttr updateWithOutSave(){ + if(imageEditPane.currentSvgMap !=null){ + this.editMapName = imageEditPane.currentSvgMap.getName(); + } + // 将地图加入helper 固定存储 记录固定的hShape 原图片的坐标位置, 然后在根据现在现实的 实际坐标 展示 + if (StringUtils.isNotEmpty(editMapName) && this.imageEditPane.getImage() != null) { + MapSvgXMLHelper mapHelper = MapSvgXMLHelper.getInstance(); + MapSvgAttr mapAttr = imageEditPane.currentSvgMap; + if(mapHelper.getNewMapAttr(editMapName)!=null){ + mapHelper.removeNewMapAttr(editMapName); + mapHelper.pushMapAttr(editMapName,mapAttr); + } + if(mapHelper.containsMapName(editMapName)){ + //处理下mapAttr存节点name属性 + updateMapShapePath(mapAttr); + mapHelper.addCustomSvgMap(editMapName, mapAttr); + } + return mapAttr; + } + return null; + } + + private void updateMapShapePath(MapSvgAttr mapSvgAttr){ + mapSvgAttr.clearExistShape(); + for(String key : resultAreaShape.keySet()){ + ArrayList nodeName = resultAreaShape.get(key); + if(nodeName == null){ + continue; + } + for(String node :nodeName){ + mapSvgAttr.setNodeName(node, key); + } + } + } + + private GeneralPath getSelectedNodePath(String nodeName){ + if(imageEditPane.currentSvgMap == null){ + return new GeneralPath(); + } + MapSvgAttr attr = imageEditPane.currentSvgMap; + ArrayList pathsID = resultAreaShape.get(nodeName); + GeneralPath unionPath =new GeneralPath(); + //这边必须在新建的一个path上append,不然直接在存的path上append,不然后面删除组合了,也不能正常的选单个 + for(String id :pathsID){ + unionPath.append(attr.getPath4PathID(id),false); + + } + return unionPath; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapSelectShape.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapSelectShape.java new file mode 100644 index 000000000..c27af5c23 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/MapSelectShape.java @@ -0,0 +1,86 @@ +package com.fr.design.chart.series.PlotSeries; + +import java.awt.Point; +import java.awt.Shape; +import java.util.ArrayList; +import java.util.List; + +/** + * 地图选中的shape, 封装选中的点, GeneralPath 做处理 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-11-12 下午05:00:34 + */ +public class MapSelectShape { + + private List selectPoint = new ArrayList(); + private List selectShape = new ArrayList(); + + private int selectType; + + public MapSelectShape(Shape[] shape, Point[] point, int selectType) { + + for(int i = 0; i < shape.length; i++) { + this.selectShape.add(shape[i]); + } + for(int i = 0; i < point.length; i++) { + this.selectPoint.add(point[i]); + } + this.selectType = selectType; + } + + /** + * 判断多个区域中 是否包含Point + */ + public boolean containsPoint(Point point) { + boolean contains = false; + for(int i = 0; selectShape != null && i < selectShape.size(); i++) { + Shape shape = (Shape)selectShape.get(i); + contains = shape.contains(point); + if(contains) { + break; + } + } + + return contains; + } + + /** + * 添加对应的选中点和选中的区域 + */ + public void addSelectValue(Point point, Shape shape) { + if(!selectShape.contains(shape)) { + this.selectShape.add(shape); + } + if(!this.selectPoint.contains(point)) { + this.selectPoint.add(point); + } + } + + /** + * 返回选中的点 数组 + */ + public Point[] getSelectPoints() { + return (Point[])this.selectPoint.toArray(new Point[selectPoint.size()]); + } + + /** + * 返回选中的区域 数组 + */ + public Shape[] getSelectShapes() { + return (Shape[])this.selectShape.toArray(new Shape[selectShape.size()]); + } + + /** + * 设置选中的类型: 区域 或者点 + */ + public void setSelectType(int selectType) { + this.selectType = selectType; + } + + /** + * 返回选中的类型: 区域 或者点 + */ + public int getSelectType() { + return selectType; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/PlotSeries/UIGroupExtensionPane.java b/designer_chart/src/com/fr/design/chart/series/PlotSeries/UIGroupExtensionPane.java new file mode 100644 index 000000000..2ad670341 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/PlotSeries/UIGroupExtensionPane.java @@ -0,0 +1 @@ +package com.fr.design.chart.series.PlotSeries; import com.fr.chart.base.MapSvgXMLHelper; import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.UIDialog; import com.fr.design.event.ChangeEvent; import com.fr.design.event.ChangeListener; import com.fr.design.gui.frpane.UIExtensionPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UISearchTextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.GeneralUtils; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import javax.swing.*; import javax.swing.border.Border; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; import java.util.ArrayList; import java.util.List; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 12-12-29 * Time: 上午11:14 * 可收缩的面板,只有两层 */ public class UIGroupExtensionPane extends BasicPane { public static final String EDIT = "edit"; public static final String DELETE = "delete"; private static final int BUTTONWIDTH = 16; private static final int DIALOG_WIDTH = 140; private static final int DIALOG_HEIGHT = 100; private UISearchTextField searchTextFiled; private JList[] contentViews; private Component[][] components; private String[] titles; private java.util.List selectionListeners = new ArrayList(); private java.util.List editListeners = new ArrayList(); private List deleteListeners = new ArrayList(); private boolean isPressOnDelete = false; // 是否点击在删除按钮上 @Override protected String title4PopupWindow() { return "group"; } public UIGroupExtensionPane(String[] titles) { this.titles = titles; if (ArrayUtils.isEmpty(titles)) { return; } initComponents(titles); } private void initComponents(String[] titles) { setBackground(null); searchTextFiled = initSearchTextField(); int count = titles.length; contentViews = new JList[count]; components = new Component[count + 1][]; double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] rowSize = new double[count + 1]; double[] columnSize = {f}; for (int i = 0; i < count + 1; i++) { rowSize[i] = p; if (i == 0) { components[i] = new Component[]{searchTextFiled}; } else if (i > 0 && i < count + 1) { JList li = new JList(new DefaultListModel()); li.addListSelectionListener(listSelectionListener); li.addMouseListener(mouseListener); li.setCellRenderer(listCellRenderer); li.setBackground(null); contentViews[i - 1] = li; components[i] = new UIExtensionPane[]{new UIExtensionPane(titles[i - 1], li, false)}; } } JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 0); setLayout(new BorderLayout()); add(new UIScrollPane(centerPane), BorderLayout.CENTER); } private UISearchTextField initSearchTextField() { UISearchTextField searchTextFiled = new UISearchTextField() { public Dimension getPreferredSize() { return new Dimension(120, 22); } }; searchTextFiled.setIconPosition(SwingConstants.RIGHT); searchTextFiled.getDocument().addDocumentListener(new DocumentListener() { @Override public void insertUpdate(DocumentEvent e) { doFilter(); } @Override public void removeUpdate(DocumentEvent e) { doFilter(); } @Override public void changedUpdate(DocumentEvent e) { doFilter(); } }); return searchTextFiled; } /** * 返回index列表的数据 */ public Object[] getData(int index) { if (index < 0 || index > contentViews.length) { return ArrayUtils.EMPTY_OBJECT_ARRAY; } ListModel model = contentViews[index].getModel(); Object[] items = new Object[model.getSize()]; for (int i = 0, len = model.getSize(); i < len; i++) { items[i] = model.getElementAt(i); } return items; } /** * 返回对应Title的列表数组 */ public Object[] getData(String title) { int dataIndex = ArrayUtils.indexOf(titles, title); if (dataIndex != ArrayUtils.INDEX_NOT_FOUND) { return getData(dataIndex); } return ArrayUtils.EMPTY_OBJECT_ARRAY; } private void doFilter() { for (JList list : contentViews) { ListDataListener[] ls = ((DefaultListModel) list.getModel()).getListDataListeners(); for (ListDataListener l : ls) { l.contentsChanged(new ListDataEvent(l, ListDataEvent.CONTENTS_CHANGED, 0, list.getModel().getSize())); } } for (int i = 1, len = components.length; i < len; i++) { ((UIExtensionPane) components[i][0]).setExpand(true); } } /** * 获取选中的值 * * @return 选中的值 */ public Object getSelectedObject() { for (JList list : contentViews) { if (list.getSelectedValue() != null) { return list.getSelectedValue(); } } return null; } /** * 返回选中的类别 * @return 类别 */ public String getSelectedType(){ for (int i = 0, len = contentViews.length; i < len; i++) { if(contentViews[i].getSelectedValue() != null){ return titles[i]; } } return ""; } /** * 设置选中的数据 */ public void setSelectedObject(Object value) { for (int i = 0, len = contentViews.length; i < len; i++) { UIExtensionPane extensionPane = (UIExtensionPane) components[i + 1][0]; JList list = contentViews[i]; DefaultListModel model = (DefaultListModel) list.getModel(); extensionPane.setExpand(model.contains(value)); if (model.contains(value)) { list.setSelectedValue(value, true); } } } /** * 设置数据选中的序号. */ public void setValueAtCurrentSelectIndex(Object value) { for (JList list : contentViews) { if (list.getSelectedIndex() != -1) { ((DefaultListModel) list.getModel()).setElementAt(value, list.getSelectedIndex()); } } } /** * 根据索引来添加数据 * * @param data 要添加的数据 * @param index 要添加的数据向的索引 */ public void addData(Object data, int index) { addData(data, index, false); } /** * 根据索引来添加数据 * * @param data 要添加的数据 * @param index 要添加的数据向的索引 * @param checkRepeat 是否检查名字重复 */ public void addData(Object data, int index, boolean checkRepeat) { if (contentViews == null || index < 0 || index > contentViews.length - 1) { return; } JList list = contentViews[index]; DefaultListModel model = (DefaultListModel) list.getModel(); if (data instanceof String) { model.addElement(createUnrepeatedName(model, (String) data, checkRepeat)); } if (checkRepeat) { // 将添加类型以外的其他类型都收起来 for (int i = 1, len = components.length; i < len; i++) { ((UIExtensionPane) components[i][0]).setExpand(false); } ((UIExtensionPane) components[index + 1][0]).setExpand(true); int selectedIndex = list.getModel().getSize() - 1; list.setSelectedIndex(selectedIndex); dealNewAddedDataIndex(((DefaultListModel) list.getModel()).elementAt(selectedIndex)); } } /** * 新添加的数据的序号 * @param data 数据 */ protected void dealNewAddedDataIndex(Object data){ } /** * 根据标题来添加数据 * * @param data 要添加的数据 * @param title 要添加数据的项的标题文字 */ public void addData(Object data, String title) { addData(data, title, false); } /** * 根据标题来添加数据 * * @param data 要添加的数据 * @param title 要添加数据的项的标题文字 * @param checkRepeat 是否检查名字重复 */ public void addData(Object data, String title, boolean checkRepeat) { int addIndex = ArrayUtils.indexOf(titles, title); if (addIndex != ArrayUtils.INDEX_NOT_FOUND) { addData(data, addIndex, checkRepeat); } } /** * 清除所有的数据 */ public void clearData() { for (JList list : contentViews) { ((DefaultListModel) list.getModel()).clear(); } } private String createUnrepeatedName(DefaultListModel model, String name, boolean checkRepeat) { if (!checkRepeat) { return name; } int count = model.getSize(); int extra = 1; String newName = name + (count + extra); boolean hasRepeated = false; do { hasRepeated = false; newName = name + (count + extra); for (int i = 0; i < count; i++) { if (ComparatorUtils.equals(model.getElementAt(i), newName)) { hasRepeated = true; extra++; } } } while (hasRepeated); return name + (count + extra); } /** * 判断该控件是否应该有编辑操作 * * @param list 列表组件 * @return 如果有编辑操作则需要显示相应的图标 */ private boolean hasEditOperation(JList list) { return true; } private DefaultListCellRenderer listCellRenderer = new DefaultListCellRenderer() { public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JComponent c = (JComponent) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (!hasEditOperation(list)) { return c; } Border border = null; c.setBorder(border); UILabel editLabel = new UILabel(UIConstants.EDIT_ICON); UILabel deleteLabel = new UILabel(UIConstants.DELETE_ICON); JPanel editPane = GUICoreUtils.createFlowPane(new Component[]{editLabel, deleteLabel}, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE); editPane.setBackground(isSelected ? c.getBackground() : null); editPane.setBorder(border); JPanel renderPane = GUICoreUtils.createBorderLayoutPane(c, BorderLayout.CENTER, editPane, BorderLayout.EAST); if (shouldFilter(value)) { renderPane.setPreferredSize(new Dimension(0, 0)); } return renderPane; } }; //事件发生的顺序是ListSelection、MousePressed、ListSelection、MouseReleased private ListSelectionListener listSelectionListener = new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { //在鼠标按下的时候的值改变事件,重置属性 if(e.getValueIsAdjusting()){ isPressOnDelete = false; } if(!isRespondToValueChange(e)){ return; } fireSelectionChangeListener(new ChangeEvent(e.getSource())); if (((JList) e.getSource()).getSelectedIndex() == -1) { return; } for (JList list : contentViews) { if (list.getSelectedIndex() != -1 && !ComparatorUtils.equals(list, e.getSource())) { try { list.setSelectedIndices(null); } catch (Exception ee) { } } } } }; /** * 是否响应list值改变 * @return 响应 */ protected boolean isRespondToValueChange(ListSelectionEvent e){ return true; } private boolean shouldFilter(Object value) { return !GeneralUtils.objectToString(value).toLowerCase().contains(searchTextFiled.getText().toLowerCase()); } private MouseListener mouseListener = new MouseAdapter() { /** * {@inheritDoc} */ @Override public void mousePressed(final MouseEvent e) { isPressOnDelete = false; final JList list = (JList) e.getSource(); Point point = e.getPoint(); final int index = list.locationToIndex(point); int width = list.getWidth(); if (hasEditOperation(list)) { // 删除按钮 if (point.x > width - (BUTTONWIDTH + LayoutConstants.HGAP_LARGE)) { BasicPane bp = new BasicPane() { protected String title4PopupWindow() { return ""; } }; isPressOnDelete = true; bp.setLayout(new BorderLayout()); bp.add(new BoldFontTextLabel(Inter.getLocText(new String[]{"Delete", "Chart-Map"}) + "?", SwingConstants.CENTER)); clearLastListSelection(list); final String selectedType = UIGroupExtensionPane.this.getSelectedType(); UIDialog dialog = bp.showUnsizedWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { public void doOk() { Object name = getSelectedObject(); ((DefaultListModel) list.getModel()).removeElementAt(index); MapSvgXMLHelper.getInstance().removeMapAttr(GeneralUtils.objectToString(name)); MapSvgXMLHelper.getInstance().removeCateNames(selectedType,GeneralUtils.objectToString(name)); fireDeleteListener(new ChangeEvent(e)); } }); dialog.setResizable(true); dialog.setSize(DIALOG_WIDTH, DIALOG_HEIGHT); dialog.setResizable(false); GUICoreUtils.centerWindow(dialog); dialog.setVisible(true); } // 编辑按钮 else if (point.x > width - (BUTTONWIDTH * 2 + 2 * LayoutConstants.HGAP_LARGE) && point.x < width - (BUTTONWIDTH + LayoutConstants.HGAP_LARGE)) { fireItemEditListener(new ChangeEvent(e)); } } } public void mouseReleased(MouseEvent e) { isPressOnDelete = false; } }; /** * 直接跨list点击删除按钮,要置之前list的选中项为空(因为删除操作不触发更新) * @param currentList 当前选中的list */ public void clearLastListSelection (JList currentList) { for (JList list : contentViews) { if (list.getSelectedIndex() != -1 && !ComparatorUtils.equals(list, currentList)) { try { list.setSelectedIndices(null); } catch (Exception e) { FRLogger.getLogger().error(e.getMessage()); } } } } /** * 是否点击在删除按钮上 * @return 是则返回true */ public boolean isPressOnDelete(){ return isPressOnDelete; } /** * 添加选中变化监听事件 * @param listener 监听 */ public void addSelectionChangeListener(ChangeListener listener) { selectionListeners.add(listener); } private void fireSelectionChangeListener(ChangeEvent e) { for (int i = selectionListeners.size(); i > 0; i--) { selectionListeners.get(i - 1).fireChanged(e); } } /** * 添加Item的监听事件 * @param listener 监听器 */ public void addItemEditListener(ChangeListener listener) { editListeners.add(listener); } private void fireItemEditListener(ChangeEvent e) { for (int i = editListeners.size(); i > 0; i--) { editListeners.get(i - 1).fireChanged(e); } } /** * 添加删除事件的监听事件 * @param listener 监听 */ public void addDeleteListener(ChangeListener listener) { deleteListeners.add(listener); } private void fireDeleteListener(ChangeEvent e) { for(int i = deleteListeners.size(); i > 0; i--) { deleteListeners.get(i - 1).fireChanged(e); } } public void setEnabled(boolean isEnabled){ super.setEnabled(isEnabled); if(searchTextFiled != null){ searchTextFiled.setEnabled(isEnabled); } if(this.components != null){ for(int i = 0; i < this.components.length; i++){ Component[] comp = this.components[i]; for(int j = 0; j < comp.length; j++){ comp[j].setEnabled(isEnabled); } } } } /** * 测试程序 * @param args 参数 */ public static void main(String[] args) { JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container c = f.getContentPane(); c.setBackground(Color.WHITE); c.setLayout(new BoxLayout(c, BoxLayout.Y_AXIS)); final UIGroupExtensionPane g = new UIGroupExtensionPane(new String[]{"title1", "title2", "title3"}); c.add(g, BorderLayout.CENTER); JPanel pp = new JPanel(new FlowLayout()); c.add(pp, BorderLayout.SOUTH); UIButton test = new UIButton("add1"); test.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { g.addData("test111", 0); } }); pp.add(test); UIButton test2 = new UIButton("add2"); test2.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { g.addData("test222", 1); } }); pp.add(test2); f.setSize(360, 500); f.setLocation(200, 100); f.setVisible(true); } } \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/PlotStyle/ChartSelectDemoPane.java b/designer_chart/src/com/fr/design/chart/series/PlotStyle/ChartSelectDemoPane.java new file mode 100644 index 000000000..37d0758fc --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/PlotStyle/ChartSelectDemoPane.java @@ -0,0 +1,173 @@ +package com.fr.design.chart.series.PlotStyle; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.ArrayList; + +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.dialog.BasicPane; +import com.fr.stable.ArrayUtils; + +/** + * 图表选中demo的类. 用于 选中点击, 悬浮状态, 可以继承, 改变画的内容. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2011-10-27 下午03:50:28 + */ +public class ChartSelectDemoPane extends BasicPane implements UIObserver, MouseListener { + private static final long serialVersionUID = 7715973616632567352L; + + public boolean isPressing; + + // 所有统一参与的点击状态类. 相当于Group + protected ChartSelectDemoPane[] demoList = new ChartSelectDemoPane[0]; + + private boolean isRollOver; + private ArrayList changeListeners = new ArrayList(); + + public void setDemoGroup(ChartSelectDemoPane[] demos) { + this.demoList = demos; + } + + @Override + protected String title4PopupWindow() { + return ""; + } + + /** + * 鼠标点击 + * @param e 事件 + */ + public void mouseClicked(MouseEvent e) { + // list中的所有的都弄成非选中状态. + if(this.isEnabled()){ + for (int i = 0; i < ArrayUtils.getLength(demoList); i++) { + demoList[i].isRollOver = false; + demoList[i].isPressing = false; + } + + this.isPressing = true; + + fireStateChange(); + + for (int i = 0; i < ArrayUtils.getLength(demoList); i++) { + demoList[i].checkBackground(); + demoList[i].repaint(); + } + } + } + + /** + * 注册监听 + * @param l 监听 + */ + public void addChangeListener(ChangeListener l) { + changeListeners.add(l); + } + + private void fireStateChange() { + for (int i = 0; i < changeListeners.size(); i++) { + changeListeners.get(i).stateChanged(new ChangeEvent(this)); + } + } + + /** + * 鼠标按压 + * @param me 事件 + */ + public void mousePressed(MouseEvent me) { + } + + /** + * 鼠标放开 + * @param me 事件 + */ + public void mouseReleased(MouseEvent me) { + } + + /** + * 鼠标进入 + * @param me 事件 + */ + public void mouseEntered(MouseEvent me) { + if(this.isEnabled()){ + for (int i = 0; i < ArrayUtils.getLength(demoList); i++) { + demoList[i].isRollOver = false; + } + isRollOver = true; + + for (int i = 0; i < ArrayUtils.getLength(demoList); i++) { + demoList[i].checkBackground(); + demoList[i].repaint(); + } + } + } + + /** + * 鼠标移出 + * @param me 事件 + */ + public void mouseExited(MouseEvent me) { + // 限制在pane范围内! + if(this.isEnabled()){ + int x = me.getX(); + int y = me.getY(); + + Dimension d = this.getPreferredSize(); + if (inDimension(d, x, y)) { + isRollOver = true; + } else { + isRollOver = false; + } + + for (int i = 0; i < ArrayUtils.getLength(demoList); i++) { + demoList[i].checkBackground(); + demoList[i].repaint(); + } + } + } + + private boolean inDimension(Dimension d, int x, int y) { + return x < d.getWidth() && y < d.getHeight() && x > 0 && y > 0; + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(final UIObserverListener listener) { + changeListeners.add(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } + + /** + * 修改背景颜色 + */ + public void checkBackground() { + if (!isRollOver && !isPressing) { + this.setBackground(null); + } else if(isRollOver && !isPressing){ + this.setBackground(new Color(182, 217, 253)); + } else { + this.setBackground(new Color(164, 192, 220)); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/BubblePlotChartConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/BubblePlotChartConditionPane.java new file mode 100644 index 000000000..06dc7f9d2 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/BubblePlotChartConditionPane.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.ChartConstants; + +/** + * 气泡图 条件显示 参数 控制界面. + * Created by kunsnat on 14-3-11. + * kunsnat@gmail.com + */ +public class BubblePlotChartConditionPane extends ChartConditionPane{ + + /** + * 界面条件序号 列表 + * @return 返回条件列表. + */ + public String[] columns2Populate() { + return new String[]{ + ChartConstants.SERIES_INDEX, + ChartConstants.SERIES_NAME, + ChartConstants.VALUE + }; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPane.java new file mode 100644 index 000000000..5857249a8 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPane.java @@ -0,0 +1,25 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.ChartConstants; +import com.fr.design.condition.DSColumnLiteConditionPane; + +public class ChartConditionPane extends DSColumnLiteConditionPane { + + public ChartConditionPane() { + super(); + conditonTypePane.setVisible(false); + + populateColumns(columns2Populate()); + } + + public String[] columns2Populate() { + return new String[]{ + ChartConstants.CATEGORY_INDEX, + ChartConstants.CATEGORY_NAME, + ChartConstants.SERIES_INDEX, + ChartConstants.SERIES_NAME, + ChartConstants.VALUE + }; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPaneFactory.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPaneFactory.java new file mode 100644 index 000000000..b7fa70461 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/ChartConditionPaneFactory.java @@ -0,0 +1,46 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.design.chart.series.SeriesCondition.impl.*; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : ����3:16 + */ +public class ChartConditionPaneFactory { + private static Map> map = new HashMap>(); + + static { + map.put(GanttPlotDataSeriesConditionPane.class.getName(), GanttPlotChartConditionPane.class); + map.put(MapPlotDataSeriesConditionPane.class.getName(), MapPlotChartConditionPane.class); + map.put(PiePlotDataSeriesConditionPane.class.getName(), PiePlotChartConditionPane.class); + map.put(Pie3DPlotDataSeriesConditionPane.class.getName(),PiePlotChartConditionPane.class); + map.put(XYScatterPlotDataSeriesConditionPane.class.getName(), XYPlotChartConditionPane.class); + map.put(BubblePlotDataSeriesConditionPane.class.getName(), BubblePlotChartConditionPane.class); + } + + private ChartConditionPaneFactory() { + + } + + /** + * �������ɶ�Ӧ��������. + * @param clazz ��Ӧ���� + * @return ������������. + */ + public static ChartConditionPane createChartConditionPane(Class clazz) { + String plotClsName = clazz.getName(); + Class cls = map.get(plotClsName); + cls = cls != null ? cls : ChartConditionPane.class; + try { + return cls.newInstance(); + } catch (Exception e) { + return new ChartConditionPane(); + } + } +} diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/ConditionTrendLinePane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/ConditionTrendLinePane.java new file mode 100644 index 000000000..b67929c9a --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/ConditionTrendLinePane.java @@ -0,0 +1,233 @@ +package com.fr.design.chart.series.SeriesCondition; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.text.ParseException; + +import javax.swing.ButtonGroup; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.SpinnerNumberModel; + +import com.fr.base.FRContext; +import com.fr.base.Utils; +import com.fr.chart.base.ChartEquationType; +import com.fr.chart.base.ConditionTrendLine; +import com.fr.design.chart.comp.BorderAttriPane; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.ibutton.UIRadioButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UIBasicSpinner; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; +import com.fr.design.utils.gui.GUICoreUtils; + +public class ConditionTrendLinePane extends BasicBeanPane { + private static final long serialVersionUID = 3867164332100351117L; + + private ConditionTrendLine editing; + + private UITextField nameLabel; + + private BorderAttriPane linePane; + + private UIRadioButton linearButton; + private UIRadioButton polynomialButton; + private UIRadioButton logButton; + private UIRadioButton exponentButton; + private UIRadioButton powerButton; + private UIRadioButton maButton; + private UIBasicSpinner maSpinner; + + private UITextField forwardLabel; + private UITextField backwardLabel; + + public ConditionTrendLinePane() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + JPanel pane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + this.add(pane, BorderLayout.NORTH); + + JPanel namePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + pane.add(namePane); + namePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Chart_TrendLine" , "WF-Name"}), null)); + namePane.add(new UILabel(Inter.getLocText(new String[]{"Define", "WF-Name"}))); + namePane.add(nameLabel = new UITextField("", 6)); + + pane.add(linePane = new BorderAttriPane()); + linePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Chart_Trend", "Line-Style"}), null)); + + JPanel typePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + pane.add(typePane); + + typePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Chart_Trend", "Type"}), null)); + + JPanel buttonPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); + typePane.add(buttonPane); + + buttonPane.add(exponentButton = new UIRadioButton(Inter.getLocText("Chart_Exponent"))); + buttonPane.add(linearButton = new UIRadioButton(Inter.getLocText("Chart_Linear"))); + buttonPane.add(logButton = new UIRadioButton(Inter.getLocText("Chart_Log"))); + buttonPane.add(polynomialButton = new UIRadioButton(Inter.getLocText("Chart_Polynomial"))); + buttonPane.add(powerButton = new UIRadioButton(Inter.getLocText("Chart_Power"))); + + JPanel maPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); + typePane.add(maPane); + + maPane.add(maButton = new UIRadioButton(Inter.getLocText("Chart_Move_Average"))); + maPane.add(new UILabel(Inter.getLocText("cycle") + ":")); + maPane.add(maSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 999, 1))); + maSpinner.setEnabled(false); + + ButtonGroup bg = new ButtonGroup(); + bg.add(exponentButton); + bg.add(linearButton); + bg.add(logButton); + bg.add(polynomialButton); + bg.add(powerButton); + bg.add(maButton); + + pane.add(initExtendsPane()); + + initListeners(); + } + + private JPanel initExtendsPane() { + JPanel extendsPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); // 前推倒推设置 + extendsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Chart_Trend", "Forecast"}), null)); + + extendsPane.add(new UILabel(Inter.getLocText("Chart_TrendLine_Forward") + ":")); + extendsPane.add(forwardLabel = new UITextField("0", 5)); + extendsPane.add(new UILabel(Inter.getLocText("cycle"))); + extendsPane.add(new UILabel(Inter.getLocText("Chart_TrendLine_Backward") + ":")); + extendsPane.add(backwardLabel = new UITextField("0", 5)); + extendsPane.add(new UILabel(Inter.getLocText("cycle"))); + + return extendsPane; + } + + private void initListeners() { + exponentButton.addActionListener(listener); + linearButton.addActionListener(listener); + logButton.addActionListener(listener); + polynomialButton.addActionListener(listener); + powerButton.addActionListener(listener); + + maButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + if(maButton.isSelected()) { + maSpinner.setEnabled(true); + } + } + }); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("Chart_TrendLine"); + } + + ActionListener listener = new ActionListener() { + public void actionPerformed(ActionEvent e) { + if(e.getSource() instanceof JRadioButton) { + JRadioButton selectedButton = (JRadioButton)e.getSource(); + if(selectedButton.isSelected()) { + maSpinner.setEnabled(false); + } + } + } + }; + + @Override + public void populateBean(ConditionTrendLine ob) { + editing = ob; + + nameLabel.setText(ob.getLine().getTrendLineName()); + + forwardLabel.setText(Integer.toString(ob.getForward())); + backwardLabel.setText(Integer.toString(ob.getBackward())); + + if (ob.getLine() != null) { + linePane.setLineStyle(ob.getLine().getLineStyleInfo().getAttrLineStyle().getLineStyle()); + Color trendLineColor = ob.getLine().getLineStyleInfo().getAttrLineColor().getSeriesColor(); + trendLineColor = (trendLineColor == null ? new Color(128,128,128) : trendLineColor); + linePane.setLineColor(trendLineColor); + + ChartEquationType current = ob.getLine().getEquation(); + + maSpinner.setEnabled(false); + + switch (current){ + case EXPONENT: + exponentButton.setSelected(true); + break; + case LINEAR: + linearButton.setSelected(true); + break; + case LOG: + logButton.setSelected(true); + break; + case POLYNOMIAL: + polynomialButton.setSelected(true); + break; + case POWER: + powerButton.setSelected(true); + break; + case MA: + maButton.setSelected(true); + maSpinner.setEnabled(true); + maSpinner.setValue(ob.getLine().getMoveAverage()); + break; + } + + } + } + + @Override + public ConditionTrendLine updateBean() { + updateBean(editing); + + return editing; + } + + public void updateBean(ConditionTrendLine trendLine) { + try { + maSpinner.commitEdit(); + } catch (ParseException e) { + FRContext.getLogger().error(e.getMessage(), e); + } + + trendLine.getLine().setTrendLineName(nameLabel.getText()); + + trendLine.setForward(Utils.string2Number(forwardLabel.getText()).intValue()); + trendLine.setBackward(Utils.string2Number(backwardLabel.getText()).intValue()); + + if(trendLine.getLine() != null) { + if (exponentButton.isSelected()) { + trendLine.getLine().setEquation(ChartEquationType.EXPONENT); + } else if (linearButton.isSelected()) { + trendLine.getLine().setEquation(ChartEquationType.LINEAR); + } + else if (logButton.isSelected()) { + trendLine.getLine().setEquation(ChartEquationType.LOG); + } + else if (polynomialButton.isSelected()) { + trendLine.getLine().setEquation(ChartEquationType.POLYNOMIAL); + } + else if (powerButton.isSelected()) { + trendLine.getLine().setEquation(ChartEquationType.POWER); + } + else if (maButton.isSelected()) { + trendLine.getLine().setEquation(ChartEquationType.MA); + trendLine.getLine().setMoveAverage( + Utils.string2Number(Utils.objectToString(maSpinner.getValue())).intValue()); + } + + trendLine.getLine().getLineStyleInfo().getAttrLineColor().setSeriesColor(linePane.getLineColor()); + trendLine.getLine().getLineStyleInfo().getAttrLineStyle().setLineStyle(linePane.getLineStyle()); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelContentsPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelContentsPane.java new file mode 100644 index 000000000..f02ab3d12 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelContentsPane.java @@ -0,0 +1,53 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.design.chart.ChartPlotFactory; +import com.fr.chart.base.AttrContents; +import com.fr.design.chart.series.SeriesCondition.dlp.DataLabelPane; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.dialog.BasicPane; + +import javax.swing.*; +import java.awt.*; + +public class DataLabelContentsPane extends BasicPane { + private static final long serialVersionUID = -7935543122227508109L; + private DataLabelPane dataLabelPane; + + public DataLabelContentsPane(Class plotClass) { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + JPanel pane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + this.add(pane, BorderLayout.NORTH); + + // 分类, 系列, 值, 百分比 + pane.add(createLabelPane(plotClass), BorderLayout.NORTH); + } + + @Override + protected String title4PopupWindow() { + return "Label"; + } + + /** + * 一般: 分类 系列 值 + * 饼图: 分类 系列 值 百分比 牵引线. + */ + private JPanel createLabelPane(Class plotClass) { + JPanel pane = FRGUIPaneFactory.createBorderLayout_L_Pane();// border 不适合 + pane.setBorder(BorderFactory.createEmptyBorder(2, 0, 10, 10)); + pane.add(dataLabelPane = ChartPlotFactory.createDataLabelPane4Plot(plotClass), BorderLayout.CENTER); + return pane; + } + + public void checkGuidBox() { + dataLabelPane.checkGuidBox(); + } + + public void populate(AttrContents seriesAttrContents) { + dataLabelPane.populate(seriesAttrContents); + } + + public void update(AttrContents seriesAttrContents) { + dataLabelPane.update(seriesAttrContents); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java new file mode 100644 index 000000000..35cb979c9 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java @@ -0,0 +1,121 @@ +package com.fr.design.chart.series.SeriesCondition; + +import java.awt.Color; +import java.awt.Dimension; + +import com.fr.base.Utils; +import com.fr.chart.base.AttrContents; +import com.fr.chart.base.TextAttr; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.dialog.BasicPane; +import com.fr.general.FRFont; +import com.fr.general.Inter; +import com.fr.design.style.FRFontPane; +import com.fr.design.style.color.ColorSelectBox; + +public class DataLabelStylePane extends BasicPane { + private static final long serialVersionUID = 6762567785276287745L; + + private UIComboBox nameBox; + private UIComboBox fontStyleBox; + private UIComboBox sizeBox; + private ColorSelectBox colorBox; + + public DataLabelStylePane() { + this.initPane(true); + } + + /** + * 是否支持字体颜色的设置 + */ + public DataLabelStylePane(boolean isSurpportFontColor) { + this.initPane(isSurpportFontColor); + } + + private void initPane(boolean isSurpportFontColor) { + this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); + + this.add(nameBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report())); + nameBox.setPreferredSize(new Dimension(80, 20)); + + String[] styles = { + Inter.getLocText("FRFont-plain"), + Inter.getLocText("FRFont-bold"), + Inter.getLocText("FRFont-italic"), + Inter.getLocText("FRFont-bolditalic")}; + this.add(fontStyleBox = new UIComboBox(styles)); + fontStyleBox.setPreferredSize(new Dimension(80, 20)); + + this.add(sizeBox = new UIComboBox(FRFontPane.Font_Sizes)); + sizeBox.setPreferredSize(new Dimension(80, 20)); + + if (isSurpportFontColor) { + this.add(colorBox = new ColorSelectBox(60)); + } + + // 默认字体选择. + FRFont defaultFont = FRFont.getInstance(); + nameBox.setSelectedItem(defaultFont.getFontName()); + fontStyleBox.setSelectedIndex(defaultFont.getStyle()); + sizeBox.setSelectedItem(defaultFont.getSize()); + if(colorBox != null) { + colorBox.setSelectObject(defaultFont.getForeground()); + } + } + + @Override + protected String title4PopupWindow() { + return "Label"; + } + + public void populate(AttrContents seriesAttrContents) { + if(seriesAttrContents == null) { + return; + } + + populate(seriesAttrContents.getTextAttr()); + } + + public void populate(TextAttr textAttr) { + if (textAttr == null) { + return; + } + FRFont frFont = textAttr.getFRFont(); + populate(frFont); + } + + public void populate(FRFont frFont) { + if(frFont == null) { + return; + } + nameBox.setSelectedItem(frFont.getFamily()); + fontStyleBox.setSelectedIndex(frFont.getStyle()); + sizeBox.setSelectedItem(frFont.getSize()); + if(colorBox != null) { + colorBox.setSelectObject(frFont.getForeground()); + } + } + + public void update(AttrContents seriesAttrContents) { + if(seriesAttrContents.getTextAttr() == null) { + seriesAttrContents.setTextAttr(new TextAttr()); + } + update(seriesAttrContents.getTextAttr()); + } + + public void update(TextAttr textAttr) { + textAttr.setFRFont(getInstanceFont()); + } + + /** + * 获取当前面板中设置的文本字体样式 + * @return FRFont + */ + public FRFont getInstanceFont() { + float fs = Utils.objectToNumber(sizeBox.getSelectedItem(), false).floatValue(); + String name = Utils.objectToString(nameBox.getSelectedItem()); + Color fontColor = (colorBox != null) ? colorBox.getSelectObject() : Color.black; + return FRFont.getInstance(name, fontStyleBox.getSelectedIndex(), fs, fontColor); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrCustomPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrCustomPane.java new file mode 100644 index 000000000..ea8857824 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrCustomPane.java @@ -0,0 +1,25 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.general.Inter; +import com.fr.chart.chartglyph.CustomAttr; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; + +import java.awt.*; + +public class DataSeriesAttrCustomPane extends DataSeriesAttrPane { + private static final long serialVersionUID = -9046019835977910412L; + + public DataSeriesAttrCustomPane() { + super(); + + // 重新设定大小. JControlPane中的(450, 450) 稍小 @ChartSize + this.setPreferredSize(new Dimension(640,450)); + } + + public NameableCreator[] createNameableCreators() { + return new NameableCreator[] { + new NameObjectCreator(Inter.getLocText("Condition_Attributes"), CustomAttr.class, DataSeriesCustomConditionPane.class) + }; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrPane.java new file mode 100644 index 000000000..7fb006c84 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesAttrPane.java @@ -0,0 +1,80 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.general.Inter; +import com.fr.general.NameObject; +import com.fr.stable.Nameable; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.chart.chartglyph.ConditionCollection; +import com.fr.design.chart.series.SeriesCondition.impl.DataSeriesConditionPaneFactory; +import com.fr.design.gui.controlpane.JControlPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; + +import java.util.ArrayList; +import java.util.List; + +/** + * 系列属性的设置界面. + * 主要是对系列的DataSeriesCondition进行设置. + * + * @see DataSeriesConditionPane + */ +public class DataSeriesAttrPane extends JControlPane { + private static final long serialVersionUID = -7265389532959632525L; + + private Plot plot; + + public DataSeriesAttrPane() { + super(); + } + + public DataSeriesAttrPane(Plot plot) { + this.plot = plot; + this.initComponentPane(); + } + + @Override + public NameableCreator[] createNameableCreators() { + return new NameableCreator[]{ + new NameObjectCreator(Inter.getLocText("Condition_Attributes"), ConditionAttr.class, DataSeriesConditionPaneFactory.findConfitionPane4DataSeries(plot)) + }; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Condition", "Display"}); + } + + public void populate(Plot plot) { + List nameObjectList = new ArrayList(); + + ConditionCollection cc = plot.getConditionCollection(); + for (int i = 0, len = cc.getConditionAttrSize(); i < len; i++) { + ConditionAttr attr = cc.getConditionAttr(i); + nameObjectList.add(new NameObject(attr.getName(), attr)); + } + if (nameObjectList.size() > 0) { + populate(nameObjectList.toArray(new NameObject[nameObjectList.size()])); + } + } + + public void update(Plot plot) { + Nameable[] res = update(); + NameObject[] res_array = new NameObject[res.length]; + java.util.Arrays.asList(res).toArray(res_array); + ConditionCollection cc = plot.getConditionCollection(); + cc.clearConditionAttr(); + + if (res_array.length < 1) { + return; + } + + for (int i = 0; i < res_array.length; i++) { + NameObject nameObject = res_array[i]; + ConditionAttr attr = (ConditionAttr) nameObject.getObject(); + attr.setName(nameObject.getName()); + cc.addConditionAttr(attr); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java new file mode 100644 index 000000000..70c6b3b4f --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java @@ -0,0 +1,177 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.base.FRContext; +import com.fr.chart.base.AttrAlpha; +import com.fr.chart.base.AttrBackground; +import com.fr.chart.base.AttrContents; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.data.condition.AbstractCondition; +import com.fr.data.condition.ListCondition; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.Iterator; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午9:16 + */ +public class DataSeriesConditionPane extends ConditionAttributesPane { + + + public DataSeriesConditionPane() { + initAvailableActionList(); + initComponents(); + } + + private void initAvailableActionList() { + addBasicAction(); + addAxisPositionAction(); + addStyleAction(); + addBorderAction(); + addTrendLineAction(); + addAction2UseAbleActionList(); + } + + protected void initComponents() { + super.initComponents(); + JPanel pane = FRGUIPaneFactory.createBorderLayout_L_Pane(); + this.add(pane); + pane.setBorder(BorderFactory.createEmptyBorder()); + + // 条件界面 + pane.add(liteConditionPane = ChartConditionPaneFactory.createChartConditionPane(getClass()), BorderLayout.CENTER); + // kunsnat_size 加载属性之后 被遮挡, 最少的高度为300, 5个按钮 + liteConditionPane.setPreferredSize(new Dimension(300, 300)); + } + + protected void addBasicAction() { + classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this)); + classPaneMap.put(AttrContents.class, new LabelContentsPane(this, class4Correspond())); + } + + protected void addStyleAction() { + classPaneMap.put(AttrBackground.class, new LabelBackgroundPane(this)); + } + + protected void addAxisPositionAction() { + + } + + protected void addBorderAction() { + + } + + protected void addTrendLineAction() { + + } + + /** + * 返回class对象 + * @return class对象 + */ + public Class class4Correspond() { + return Plot.class; + } + + protected void addAction2UseAbleActionList() { + useAbleActionList.clear(); + Iterator iterator = classPaneMap.values().iterator(); + + while (iterator.hasNext()) { + useAbleActionList.add(iterator.next().getHighLightConditionAction()); + } + } + + /** + * 创建条件单独的属性. + * @param clazz 单独条件属性面板 + * @return 单独条件属性面板 + */ + public ConditionAttrSingleConditionPane createConditionAttrSingleConditionPane(Class clazz) { + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + FRContext.getLogger().error(e.getMessage(), e); + } catch (IllegalAccessException e) { + FRContext.getLogger().error(e.getMessage(), e); + } + return null; + } + + @Override + public void populateBean(ConditionAttr ob) { + this.selectedItemPane.removeAll(); + this.initAvailableActionList(); + + if (ob.getCondition() == null) { + this.liteConditionPane.populateBean(new ListCondition()); + } else { + this.liteConditionPane.populateBean(ob.getCondition()); + } + + for (int i = 0; i < ob.getDataSeriesConditionCount(); i++) { + DataSeriesCondition condition = ob.getDataSeriesCondition(i); + + ConditionAttrSingleConditionPane pane = classPaneMap.get(condition.getClass()); + + if (pane != null && useAbleActionList.contains(pane.getHighLightConditionAction())) { + pane.populate(condition); + this.selectedItemPane.add(pane); + useAbleActionList.remove(pane.getHighLightConditionAction()); + } + } + + updateMenuDef(); + validate(); + repaint(10); + } + + @Override + public ConditionAttr updateBean() { + ConditionAttr ca = new ConditionAttr(); + + updateBeanInvoked(ca); + + return ca; + } + + public void updateBean(ConditionAttr condition) { + condition.removeAll(); + updateBeanInvoked(condition); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Condition", "Display"}); + } + + /** + * 为了给DataSeriesCustomConditionPane调用,不得不加了这么个方法 + * @param ca 条件属性 + */ + public void updateBeanInvoked(ConditionAttr ca) { + ca.removeAll(); + Iterator iterator = this.classPaneMap.values().iterator(); + + while (iterator.hasNext()) { + ConditionAttrSingleConditionPane pane = iterator.next(); + if (pane.getParent() == this.selectedItemPane) { + ca.addDataSeriesCondition(pane.update()); + } + } + + AbstractCondition con = (AbstractCondition) this.liteConditionPane.updateBean(); + ca.setCondition(con); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesCustomConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesCustomConditionPane.java new file mode 100644 index 000000000..91a888a87 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesCustomConditionPane.java @@ -0,0 +1,21 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.chartattr.CustomPlot; +import com.fr.chart.chartattr.Plot; + +/** + * 类说明 组合图 条件属性界面. +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2013-8-19 上午09:50:05 + */ +public class DataSeriesCustomConditionPane extends DataSeriesConditionPane{ + private static final long serialVersionUID = -6568508006201353211L; + + /** + * 返回class对象 + * @return class对象 + */ + public Class class4Correspond() { + return CustomPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/GanttPlotChartConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/GanttPlotChartConditionPane.java new file mode 100644 index 000000000..b78356b54 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/GanttPlotChartConditionPane.java @@ -0,0 +1,21 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.ChartConstants; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 下午3:13 + */ +public class GanttPlotChartConditionPane extends ChartConditionPane { + + public String[] columns2Populate() { + return new String[]{ + ChartConstants.PROJECT_ID, + ChartConstants.STEP_INDEX, + ChartConstants.STEP_NAME + }; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java new file mode 100644 index 000000000..3ba731693 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java @@ -0,0 +1,56 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.AttrAlpha; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.style.AlphaPane; +import com.fr.general.Inter; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public class LabelAlphaPane extends ConditionAttrSingleConditionPane { + private static final int ALPHASIZE = 100; + + private UILabel nameLabel; + private AlphaPane alphaPane; + + private AttrAlpha attrAlpha = new AttrAlpha(); + + public LabelAlphaPane(ConditionAttributesPane conditionAttributesPane) { + super(conditionAttributesPane, true); + + nameLabel = new UILabel(Inter.getLocText("ChartF-Alpha")); + alphaPane = new AlphaPane(); + + this.add(nameLabel); + this.add(alphaPane); + } + + @Override + public String nameForPopupMenuItem() { + return Inter.getLocText("ChartF-Alpha"); + } + + @Override + protected String title4PopupWindow() { + return nameForPopupMenuItem(); + } + + public void populate(DataSeriesCondition condition) { + if (condition instanceof AttrAlpha) { + attrAlpha = (AttrAlpha) condition; + alphaPane.populate((int) (attrAlpha.getAlpha() * ALPHASIZE)); + } + } + + public DataSeriesCondition update() { + attrAlpha.setAlpha(this.alphaPane.update()); + + return attrAlpha; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAxisPositionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAxisPositionPane.java new file mode 100644 index 000000000..bcd6f5e75 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAxisPositionPane.java @@ -0,0 +1,74 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.AttrAxisPosition; +import com.fr.chart.base.ChartAxisPosition; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.UILabel; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public class LabelAxisPositionPane extends ConditionAttrSingleConditionPane { + + private UILabel nameLabel; + private AttrAxisPosition axisPosition = new AttrAxisPosition(); + + private UIButtonGroup positionGroup; + + public LabelAxisPositionPane(ConditionAttributesPane conditionAttributesPane) { + this(conditionAttributesPane, true); + } + + public LabelAxisPositionPane(ConditionAttributesPane conditionAttributesPane, boolean isRemove) { + super(conditionAttributesPane, isRemove); + + nameLabel = new UILabel(Inter.getLocText(new String[]{"ChartF-Axis", "Selection"})); + if (isRemove) { + this.add(nameLabel); + } + + String[] names = new String[]{Inter.getLocText("ChartF-MainAxis"), Inter.getLocText("ChartF-SecondAxis")}; + String[] values = new String[]{ChartAxisPosition.AXIS_LEFT.getAxisPosition(), ChartAxisPosition.AXIS_RIGHT.getAxisPosition()}; + + positionGroup = new UIButtonGroup(names, values); + positionGroup.setAllToolTips(names); + + this.add(positionGroup); + + positionGroup.setSelectedItem(ChartAxisPosition.AXIS_LEFT.getAxisPosition()); + + } + + @Override + public String nameForPopupMenuItem() { + return Inter.getLocText(new String[]{"Owner", "time(s)", "ChartF-Axis"}); + } + + @Override + protected String title4PopupWindow() { + return nameForPopupMenuItem(); + } + + public void populate(DataSeriesCondition condition) { + if (condition instanceof AttrAxisPosition) { + axisPosition = (AttrAxisPosition) condition; + if (ComparatorUtils.equals(axisPosition.getAxisPosition(), ChartAxisPosition.AXIS_LEFT)) { + positionGroup.setSelectedItem(ChartAxisPosition.AXIS_LEFT.getAxisPosition()); + } else { + positionGroup.setSelectedItem(ChartAxisPosition.AXIS_RIGHT.getAxisPosition()); + } + } + } + + public DataSeriesCondition update() { + axisPosition.setAxisPosition(ChartAxisPosition.parse(positionGroup.getSelectedItem())); + return axisPosition; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBackgroundPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBackgroundPane.java new file mode 100644 index 000000000..3e79aca65 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBackgroundPane.java @@ -0,0 +1,83 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.base.background.ColorBackground; +import com.fr.chart.base.AttrBackground; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.style.background.BackgroundPane; +import com.fr.design.style.background.BackgroundPreviewLabel; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public class LabelBackgroundPane extends ConditionAttrSingleConditionPane { + + private UILabel backgroundLabel; + private BackgroundPreviewLabel backgroundPreviewPane; + + private AttrBackground attrBackground = new AttrBackground(); + + public LabelBackgroundPane(final ConditionAttributesPane conditionAttributesPane) { + super(conditionAttributesPane, true); + backgroundLabel = new UILabel(Inter.getLocText("Background")); + this.backgroundPreviewPane = new BackgroundPreviewLabel(); + this.backgroundPreviewPane.setPreferredSize(new Dimension(80, 20)); + UIButton editBackgroundButton = new UIButton(Inter.getLocText("Edit")); + MouseAdapter mouseListener = new MouseAdapter() { + public void mousePressed(MouseEvent evt) { + final BackgroundPane backgroundPane = new BackgroundPane(); + BasicDialog styleDialog = backgroundPane.showWindow( + SwingUtilities.getWindowAncestor(conditionAttributesPane)); // 调整(400,300) 比较合适. + backgroundPane.populate(backgroundPreviewPane.getBackgroundObject()); + styleDialog.addDialogActionListener(new DialogActionAdapter() { + public void doOk() { + backgroundPreviewPane.setBackgroundObject(backgroundPane.update()); + backgroundPreviewPane.repaint(); + } + }); + styleDialog.setVisible(true); + } + }; + editBackgroundButton.addMouseListener(mouseListener); + backgroundPreviewPane.addMouseListener(mouseListener); + this.add(backgroundLabel); + this.add(backgroundPreviewPane); + this.add(editBackgroundButton); + this.backgroundPreviewPane.setBackgroundObject(ColorBackground.getInstance(Color.white)); + } + + @Override + public String nameForPopupMenuItem() { + return Inter.getLocText("ChartF-Background_Color"); + } + + @Override + protected String title4PopupWindow() { + return nameForPopupMenuItem(); + } + + public void populate(DataSeriesCondition condition) { + if (condition instanceof AttrBackground) { + attrBackground = (AttrBackground) condition; + this.backgroundPreviewPane.setBackgroundObject(attrBackground.getSeriesBackground()); + } + } + + public DataSeriesCondition update() { + attrBackground.setSeriesBackground(this.backgroundPreviewPane.getBackgroundObject()); + return attrBackground; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderAttrPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderAttrPane.java new file mode 100644 index 000000000..86e958623 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderAttrPane.java @@ -0,0 +1,40 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.DataSeriesCondition; +import com.fr.design.chart.comp.BorderAttriPane; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.stable.StringUtils; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public abstract class LabelBorderAttrPane extends ConditionAttrSingleConditionPane { + protected UILabel nameLabel; + protected BorderAttriPane linePane; + private String labelName; + + public LabelBorderAttrPane(ConditionAttributesPane conditionAttributesPane) { + this(conditionAttributesPane, false, StringUtils.EMPTY); + } + + public LabelBorderAttrPane(ConditionAttributesPane conditionAttributesPane, boolean isRemove, String label) { + super(conditionAttributesPane, isRemove); + nameLabel = new UILabel(label); + linePane = new BorderAttriPane(); + + if (isRemove) { + this.add(nameLabel); + } + this.add(linePane); + this.labelName = label; + } + + @Override + public String nameForPopupMenuItem() { + return labelName; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderPane.java new file mode 100644 index 000000000..cc9385d3a --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelBorderPane.java @@ -0,0 +1,34 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.AttrBorder; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.general.Inter; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public class LabelBorderPane extends LabelBorderAttrPane { + + private AttrBorder attrBorder = new AttrBorder(); + + public LabelBorderPane(ConditionAttributesPane conditionAttributesPane) { + super(conditionAttributesPane, true, Inter.getLocText(new String[]{"Border", "Format"})); + } + + public void populate(DataSeriesCondition condition) { + if (condition instanceof AttrBorder) { + attrBorder = (AttrBorder) condition; + linePane.setLineColor(attrBorder.getBorderColor()); + linePane.setLineStyle(attrBorder.getBorderStyle()); + } + } + + public DataSeriesCondition update() { + attrBorder.setBorderColor(linePane.getLineColor()); + attrBorder.setBorderStyle(linePane.getLineStyle()); + return attrBorder; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelColorPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelColorPane.java new file mode 100644 index 000000000..30d50b2f0 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelColorPane.java @@ -0,0 +1,63 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.AttrColor; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.general.Inter; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public class LabelColorPane extends ConditionAttrSingleConditionPane { + + protected UILabel nameLabel; + private ColorSelectBox colorSelectionPane; + private AttrColor attrColor = new AttrColor(); + + public LabelColorPane(ConditionAttributesPane conditionAttributesPane) { + this(conditionAttributesPane, true); + } + + public LabelColorPane(ConditionAttributesPane conditionAttributesPane, boolean isRemove) { + super(conditionAttributesPane, isRemove); + nameLabel = new UILabel(Inter.getLocText("ChartF-Background_Color")); + colorSelectionPane = new ColorSelectBox(80); + + if (isRemove) { + this.add(nameLabel); + } + this.add(colorSelectionPane); + + } + + /** + * 条目名称 + * @return 名称 + */ + @Override + public String nameForPopupMenuItem() { + return Inter.getLocText("Color"); + } + + @Override + protected String title4PopupWindow() { + return nameForPopupMenuItem(); + } + + public void populate(DataSeriesCondition condition) { + if (condition instanceof AttrColor) { + attrColor = (AttrColor) condition; + this.colorSelectionPane.setSelectObject(this.attrColor.getSeriesColor()); + } + } + + public DataSeriesCondition update() { + attrColor.setSeriesColor(this.colorSelectionPane.getSelectObject()); + return attrColor; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelContentsPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelContentsPane.java new file mode 100644 index 000000000..b76fc7dc7 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelContentsPane.java @@ -0,0 +1,87 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.AttrContents; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public class LabelContentsPane extends ConditionAttrSingleConditionPane { + + private UILabel nameLabel; + private DataLabelContentsPane dataLabelContentsPane; + + private AttrContents attrContents = new AttrContents(); + + public LabelContentsPane(ConditionAttributesPane conditionAttributesPane, Class plotClass) { + this(conditionAttributesPane, true, plotClass); + } + + public LabelContentsPane(ConditionAttributesPane conditionAttributesPane, boolean isRemove, final Class plotClass) { + super(conditionAttributesPane, isRemove); + nameLabel = new UILabel(Inter.getLocText(new String[]{"Label", "HJS-Message"})); + + JPanel pane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + + if (isRemove) { + this.removeAll(); + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + // 重新布局 + JPanel northPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + northPane.setPreferredSize(new Dimension(300, 30)); + this.add(northPane, BorderLayout.NORTH); + + northPane.add(cancel); + northPane.add(nameLabel); + + pane.setBorder(BorderFactory.createEmptyBorder(6, 25, 0, 0)); + } + + this.dataLabelContentsPane = new DataLabelContentsPane(plotClass); + + pane.add(dataLabelContentsPane); + + this.add(pane); + } + + @Override + public String nameForPopupMenuItem() { + return Inter.getLocText(new String[]{"Label", "HJS-Message"}); + } + + @Override + protected String title4PopupWindow() { + return nameForPopupMenuItem(); + } + + /** + * 检查是否使用牵引线box. + */ + public void checkGuidBox() { + if (this.dataLabelContentsPane != null) { + this.dataLabelContentsPane.checkGuidBox(); + } + } + + public void populate(DataSeriesCondition condition) { + if (condition instanceof AttrContents) { + attrContents = (AttrContents) condition; + this.dataLabelContentsPane.populate(attrContents); + } + } + + public DataSeriesCondition update() { + this.dataLabelContentsPane.update(attrContents); + return attrContents; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelLineStylePane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelLineStylePane.java new file mode 100644 index 000000000..5fe73d631 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelLineStylePane.java @@ -0,0 +1,69 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.AttrLineStyle; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.icombobox.LineComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.general.Inter; +import com.fr.stable.Constants; +import com.fr.stable.CoreConstants; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public class LabelLineStylePane extends ConditionAttrSingleConditionPane { + + private UILabel nameLabel; + private LineComboBox lineCombo; + private AttrLineStyle attrLineStyle = new AttrLineStyle(); + + public LabelLineStylePane(ConditionAttributesPane conditionAttributesPane) { + this(conditionAttributesPane, true); + } + + public LabelLineStylePane(ConditionAttributesPane conditionAttributesPane, boolean isRemove) { + super(conditionAttributesPane, isRemove); + + + nameLabel = new UILabel(Inter.getLocText("Line-Style") + ":"); + if (isRemove) { + this.add(nameLabel); + } + + lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART); + this.add(lineCombo); + } + + @Override + public String nameForPopupMenuItem() { + return Inter.getLocText("Line-Style"); + } + + @Override + protected String title4PopupWindow() { + return nameForPopupMenuItem(); + } + + @Override + public void populate(DataSeriesCondition condition) { + if (condition instanceof AttrLineStyle) { + attrLineStyle = (AttrLineStyle) condition; + int lineStyle = attrLineStyle.getLineStyle(); + if(lineStyle != Constants.LINE_THICK && lineStyle != Constants.LINE_THIN + && lineStyle != Constants.LINE_MEDIUM && lineStyle != Constants.LINE_NONE) { + lineStyle = Constants.LINE_THIN; + } + lineCombo.setSelectedLineStyle(lineStyle); + } + } + + @Override + public DataSeriesCondition update() { + attrLineStyle.setLineStyle(lineCombo.getSelectedLineStyle()); + return attrLineStyle; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LineMarkerTypePane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LineMarkerTypePane.java new file mode 100644 index 000000000..59dcced53 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LineMarkerTypePane.java @@ -0,0 +1,62 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.AttrMarkerType; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.chart.chartglyph.MarkerFactory; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.xcombox.MarkerComboBox; +import com.fr.general.Inter; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public class LineMarkerTypePane extends ConditionAttrSingleConditionPane { + + private UILabel nameLabel; + private MarkerComboBox markerBox; + + private AttrMarkerType markerType = new AttrMarkerType(); + + public LineMarkerTypePane(ConditionAttributesPane conditionAttributesPane) { + this(conditionAttributesPane, true); + } + + public LineMarkerTypePane(ConditionAttributesPane conditionAttributesPane, boolean isRemove) { + super(conditionAttributesPane, isRemove); + + nameLabel = new UILabel(Inter.getLocText(new String[]{"ChartF-Marker", "FS_Report_Type"})); + markerBox = new MarkerComboBox(MarkerFactory.getMarkerArray()); + + if (isRemove) { + this.add(nameLabel); + } + this.add(markerBox); + } + + @Override + public String nameForPopupMenuItem() { + return Inter.getLocText(new String[]{"ChartF-Marker", "FS_Report_Type"}); + } + + @Override + protected String title4PopupWindow() { + return nameForPopupMenuItem(); + } + + public void populate(DataSeriesCondition condition) { + if (condition instanceof AttrMarkerType) { + markerType = (AttrMarkerType) condition; + markerBox.setSelectedMarker(MarkerFactory.createMarker(markerType.getMarkerType())); + } + } + + public DataSeriesCondition update() { + this.markerType.setMarkerType(markerBox.getSelectedMarkder().getMarkerType()); + return this.markerType; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/MapPlotChartConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/MapPlotChartConditionPane.java new file mode 100644 index 000000000..75795ce6f --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/MapPlotChartConditionPane.java @@ -0,0 +1,18 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.ChartConstants; + +/** + * 地图的条件 参数下拉. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-1-11 下午03:44:40 + */ +public class MapPlotChartConditionPane extends ChartConditionPane { + + public String[] columns2Populate() { + return new String[]{ + ChartConstants.AREA_NAME, + ChartConstants.AREA_VALUE + }; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/PiePlotChartConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/PiePlotChartConditionPane.java new file mode 100644 index 000000000..10b11ab95 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/PiePlotChartConditionPane.java @@ -0,0 +1,20 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.ChartConstants; + + +/** + * 饼图 条件显示 参数. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-1-11 下午03:48:32 + */ +public class PiePlotChartConditionPane extends ChartConditionPane { + + public String[] columns2Populate() { + return new String[]{ + ChartConstants.SERIES_INDEX, + ChartConstants.SERIES_NAME, + ChartConstants.VALUE + }; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/TooltipContentsPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/TooltipContentsPane.java new file mode 100644 index 000000000..0be84de39 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/TooltipContentsPane.java @@ -0,0 +1,186 @@ +package com.fr.design.chart.series.SeriesCondition; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.text.Format; + +import javax.swing.JPanel; +import javax.swing.SwingUtilities; + +import com.fr.chart.base.AttrContents; +import com.fr.chart.base.ChartConstants; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.dialog.BasicPane; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; +import com.fr.design.style.FormatPane; + +/** + * 数据点提示内容面板,包含系列值、系列百分比 + * @author jerry + * + */ +public class TooltipContentsPane extends BasicPane{ + protected UICheckBox showValueCB; + protected UICheckBox showPercent; + protected Format format; + protected Format percentFormat; + protected JPanel contentPane; + + + public TooltipContentsPane() { + setLayout(FRGUIPaneFactory.createBorderLayout()); + contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + add(contentPane, BorderLayout.CENTER); + contentPane.add(createJPanel4Label()); + } + + private JPanel createJPanel4Label() { + return createTableLayoutPane(new Component[][]{ + createComponents4Value(), + createComponents4PercentValue(), + new Component[0] + }); + } + + protected Component[] createComponents4Value() { + return new Component[]{null, createJPanel4Value()}; + } + + protected JPanel createJPanel4Value() { + if (showValueCB == null) { + showValueCB = new UICheckBox(Inter.getLocText("Value")); + } + showValueCB.setSelected(true); + + JPanel valuePane = new JPanel(); + valuePane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));// 默认左未0对齐. + + valuePane.add(showValueCB); + + UIButton valueFormatButton = new UIButton(Inter.getLocText("Format")); + valuePane.add(valueFormatButton); + + valueFormatButton.addActionListener(listener); + valueFormatButton.setPreferredSize(new Dimension(60, 20));//默认太高了. + return valuePane; + } + + + + protected Component[] createComponents4PercentValue() { + if (showPercent == null) { + showPercent = new UICheckBox(Inter.getLocText("Chart_ValueIntPercent")); + } + + JPanel percentValuePane = new JPanel(); + percentValuePane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));// 默认左未0对齐. + + percentValuePane.add(showPercent); + + UIButton valueFormatButton = new UIButton(Inter.getLocText("Format")); + percentValuePane.add(valueFormatButton); + + valueFormatButton.addActionListener(percentListener); + valueFormatButton.setPreferredSize(new Dimension(60, 20));//默认太高了. + return new Component[]{null, percentValuePane}; + } + + protected JPanel createTableLayoutPane(Component[][] components) { + double[] colSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}; + double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, + TableLayout.PREFERRED, TableLayout.PREFERRED}; + return TableLayoutHelper.createTableLayoutPane(components, rowSize, colSize); + } + + public String title4PopupWindow() { + return "DataLabel"; + } + + private ActionListener listener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + final FormatPane formatPane = new FormatPane(); + if (format != null) { + formatPane.populate(format); + } + + paneActionPerformed(formatPane, false); + } + }; + + private ActionListener percentListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + final FormatPane percentPane = new FormatPane(); + percentPane.percentFormatPane(); + + if (percentFormat != null) { + percentPane.populate(percentFormat); + } + paneActionPerformed(percentPane, true); + } + }; + + private void paneActionPerformed(final FormatPane formatPane, final boolean isPercent) { + + formatPane.showWindow(SwingUtilities.getWindowAncestor(TooltipContentsPane.this), + new DialogActionAdapter() { + public void doOk() { + if (isPercent) { + percentFormat = formatPane.update(); + } else { + format = formatPane.update(); + } + } + }).setVisible(true); + } + + public void populate(AttrContents seriesAttrContents) { + format = seriesAttrContents.getFormat(); + percentFormat = seriesAttrContents.getPercentFormat(); + String dataLabel = seriesAttrContents.getSeriesLabel(); + if (dataLabel != null) { + if (showValueCB != null) { + showValueCB.setSelected(dataLabel.contains(ChartConstants.VALUE_PARA)); + } + if (showPercent != null) { + showPercent.setSelected(dataLabel.contains(ChartConstants.PERCENT_PARA)); + } + } else { + if (showValueCB != null) { + showValueCB.setSelected(false); + } + if (showPercent != null) { + showPercent.setSelected(false); + } + } + } + + public void update(AttrContents seriesAttrContents) { + String contents = StringUtils.EMPTY; + contents += ChartConstants.SERIES_PARA + ChartConstants.BREAKLINE_PARA + ChartConstants.CATEGORY_PARA; + if (showValueCB.isSelected() && !showPercent.isSelected()) { + contents += ChartConstants.BREAKLINE_PARA + ChartConstants.VALUE_PARA; + } else if (!showValueCB.isSelected() && showPercent.isSelected()){ + contents += ChartConstants.BREAKLINE_PARA + ChartConstants.PERCENT_PARA; + } else if (showValueCB.isSelected() && showPercent.isSelected()) { + contents += ChartConstants.BREAKLINE_PARA + ChartConstants.VALUE_PARA + + ChartConstants.BREAKLINE_PARA + ChartConstants.PERCENT_PARA; + } else { + contents = null; + } + seriesAttrContents.setSeriesLabel(contents); + seriesAttrContents.setFormat(format); + seriesAttrContents.setPercentFormat(percentFormat); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLineControlPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLineControlPane.java new file mode 100644 index 000000000..583d2c3bd --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLineControlPane.java @@ -0,0 +1,64 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.general.Inter; +import com.fr.general.NameObject; +import com.fr.stable.Nameable; +import com.fr.chart.base.AttrTrendLine; +import com.fr.chart.base.ConditionTrendLine; +import com.fr.design.gui.controlpane.JControlPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; + +import java.util.ArrayList; +import java.util.List; + +public class TrendLineControlPane extends JControlPane { + + public NameableCreator[] createNameableCreators() { + return new NameableCreator[] { + new NameObjectCreator( + Inter.getLocText("Chart_TrendLine"), + ConditionTrendLine.class, + ConditionTrendLinePane.class + ) + }; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Edit", "Chart_TrendLine"}); + } + + public void populate(AttrTrendLine trendLineList) { + List nameObjectList = new ArrayList(); + + for(int i = 0; i < trendLineList.size(); i++) { + ConditionTrendLine value = trendLineList.get(i); + nameObjectList.add(new NameObject(value.getPaneName(), value)); + } + + if(nameObjectList.size() > 0) { + populate(nameObjectList.toArray(new NameObject[nameObjectList.size()])); + } + } + + public void update(AttrTrendLine trendLineList) { + Nameable[] res = update(); + NameObject[] res_array = new NameObject[res.length]; + java.util.Arrays.asList(res).toArray(res_array); + + trendLineList.clear(); + + if (res_array.length < 1) { + return; + } + + for (int i = 0; i < res_array.length; i++) { + NameObject nameObject = res_array[i]; + + ConditionTrendLine trendLine = (ConditionTrendLine)nameObject.getObject(); + trendLine.setPaneName(nameObject.getName()); + trendLineList.add(trendLine); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLinePane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLinePane.java new file mode 100644 index 000000000..b0cdd1413 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/TrendLinePane.java @@ -0,0 +1,74 @@ +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.AttrTrendLine; +import com.fr.chart.base.DataSeriesCondition; +import com.fr.design.condition.ConditionAttrSingleConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** +* @author richie +* @date 2015-03-26 +* @since 8.0 +*/ +public class TrendLinePane extends ConditionAttrSingleConditionPane { + + private UILabel nameLabel; + + private UIButton editTrendLineButton; + private AttrTrendLine attrTrendLine = new AttrTrendLine(); + + public TrendLinePane(ConditionAttributesPane conditionAttributesPane) { + this(conditionAttributesPane, true); + } + + public TrendLinePane(ConditionAttributesPane conditionAttributesPane, boolean isRemove) { + super(conditionAttributesPane, isRemove); + nameLabel = new UILabel(Inter.getLocText("Chart_TrendLine")); + + editTrendLineButton = new UIButton(Inter.getLocText(new String[]{"Edit", "Chart_TrendLine"})); + editTrendLineButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + final TrendLineControlPane controlPane = new TrendLineControlPane(); + + controlPane.populate(attrTrendLine); + BasicDialog bg = controlPane.showWindow(SwingUtilities.getWindowAncestor(TrendLinePane.this), + new DialogActionAdapter() { + public void doOk() { + controlPane.update(attrTrendLine); + } + }); + + bg.setVisible(true); + } + }); + if (isRemove) { + this.add(nameLabel); + } + this.add(editTrendLineButton); + } + + @Override + public String nameForPopupMenuItem() { + return Inter.getLocText("Chart_TrendLine"); + } + + public void populate(DataSeriesCondition condition) { + if (condition instanceof AttrTrendLine) { + attrTrendLine = (AttrTrendLine) condition; + } + } + + public DataSeriesCondition update() { + + return attrTrendLine; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/XYPlotChartConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/XYPlotChartConditionPane.java new file mode 100644 index 000000000..9e3fd232a --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/XYPlotChartConditionPane.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.chart.series.SeriesCondition; + +import com.fr.chart.base.ChartConstants; + +/** + * 散点图 条件属性 显示参数 界面. + * Created by kunsnat on 14-3-10. + * kunsnat@gmail.com + */ +public class XYPlotChartConditionPane extends ChartConditionPane { + + /** + * 界面条件序号 列表 + * @return 返回条件列表. + */ + public String[] columns2Populate() { + return new String[]{ + ChartConstants.SERIES_INDEX, + ChartConstants.SERIES_NAME, + ChartConstants.VALUE + }; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/AreaDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/AreaDataLabelPane.java new file mode 100644 index 000000000..1f5641f13 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/AreaDataLabelPane.java @@ -0,0 +1,16 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import javax.swing.*; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 下午2:44 + */ +public class AreaDataLabelPane extends DataLabelPane { + protected JPanel createJPanel4Position() { + return null; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar2DDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar2DDataLabelPane.java new file mode 100644 index 000000000..60cea60b4 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar2DDataLabelPane.java @@ -0,0 +1,70 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import javax.swing.ButtonGroup; +import javax.swing.JPanel; + +import com.fr.chart.base.AttrContents; +import com.fr.design.gui.ibutton.UIRadioButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; +import com.fr.stable.Constants; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 下午2:36 + * + * 柱形和条形图的 图表样式--"标签"界面 + */ +public class Bar2DDataLabelPane extends DataLabelPane { + private static final long serialVersionUID = -1422949139632959981L; + private UIRadioButton insideButton; + private UIRadioButton outSideButton; + + protected JPanel createJPanel4Position() { + centerButton = new UIRadioButton(Inter.getLocText("FR-Designer-StyleAlignment_Center")); + insideButton = new UIRadioButton(Inter.getLocText("FR-Chart_DataLabelInside")); + outSideButton = new UIRadioButton(Inter.getLocText("FR-Chart_DataLabelOutSide")); + + ButtonGroup bg = new ButtonGroup(); + bg.add(insideButton); + bg.add(outSideButton); + bg.add(centerButton); + + outSideButton.setSelected(true); + + JPanel buttonPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); + buttonPane.add(new UILabel(Inter.getLocText(new String[]{"Label", "Layout"}) + ":")); + buttonPane.add(outSideButton); + buttonPane.add(insideButton); + buttonPane.add(centerButton); + + return buttonPane; + } + + public void populate(AttrContents seriesAttrContents) { + super.populate(seriesAttrContents); + int position = seriesAttrContents.getPosition(); + if (insideButton != null && position == Constants.INSIDE) { + insideButton.setSelected(true); + } else if (outSideButton != null && position == Constants.OUTSIDE) { + outSideButton.setSelected(true); + } else if (centerButton != null) { + //柱形图除了内外都是居中。 + //组合图条件显示16.1.4之前是上下左右中,现改为内外中。之前存的上下左右都当做中。 + centerButton.setSelected(true); + } + } + + public void update(AttrContents seriesAttrContents) { + super.update(seriesAttrContents); + if (insideButton != null && insideButton.isSelected()) { + seriesAttrContents.setPosition(Constants.INSIDE); + } else if (outSideButton != null && outSideButton.isSelected()) { + seriesAttrContents.setPosition(Constants.OUTSIDE); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar3DDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar3DDataLabelPane.java new file mode 100644 index 000000000..b9436bc2c --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/Bar3DDataLabelPane.java @@ -0,0 +1,16 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import javax.swing.*; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 下午2:45 + */ +public class Bar3DDataLabelPane extends DataLabelPane { + protected JPanel createJPanel4Position() { + return null; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/BubbleDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/BubbleDataLabelPane.java new file mode 100644 index 000000000..c4618dad0 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/BubbleDataLabelPane.java @@ -0,0 +1,68 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import com.fr.chart.base.AttrContents; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; +import com.fr.stable.Constants; + +import javax.swing.*; +import java.awt.*; + +/** + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-4-13 上午10:08:39 + * 类说明: 气泡系列标签界面 + */ +public class BubbleDataLabelPane extends DataLabelPane { + private static final long serialVersionUID = 6122072293885219893L; + + private UIButton insideButton; + private UIButton outSideButton; + + protected JPanel createJPanel4Position() { + insideButton = new UIButton(Inter.getLocText("Chart_Bubble_Inside")); + outSideButton = new UIButton(Inter.getLocText("Chart_Bubble_Outside")); + + ButtonGroup bg = new ButtonGroup(); + bg.add(insideButton); + bg.add(outSideButton); + + outSideButton.setSelected(true); + + JPanel buttonPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); + buttonPane.add(new UILabel(Inter.getLocText(new String[]{"Label", "Layout"}) + ":")); + buttonPane.add(outSideButton); + buttonPane.add(insideButton); + + return buttonPane; + } + + protected Component[] createComponents4ShowCategoryName() { + return new Component[0]; + } + + protected Component[] createComponents4PercentValue() { + return new Component[0]; + } + + public void populate(AttrContents seriesAttrContents) { + super.populate(seriesAttrContents); + int position = seriesAttrContents.getPosition(); + if (insideButton != null && position == Constants.INSIDE) { + insideButton.setSelected(true); + } else if (outSideButton != null && position == Constants.OUTSIDE) { + outSideButton.setSelected(true); + } + } + + public void update(AttrContents seriesAttrContents) { + super.update(seriesAttrContents); + if (insideButton != null && insideButton.isSelected()) { + seriesAttrContents.setPosition(Constants.INSIDE); + } else if (outSideButton != null && outSideButton.isSelected()) { + seriesAttrContents.setPosition(Constants.OUTSIDE); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java new file mode 100644 index 000000000..33f2dccb7 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/DataLabelPane.java @@ -0,0 +1,243 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; + +import javax.swing.ButtonGroup; +import javax.swing.JPanel; + +import com.fr.base.Utils; +import com.fr.chart.base.AttrContents; +import com.fr.chart.base.ChartConstants; +import com.fr.design.chart.series.SeriesCondition.DataLabelStylePane; +import com.fr.design.chart.series.SeriesCondition.TooltipContentsPane; +import com.fr.design.gui.ibutton.UIRadioButton; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; +import com.fr.stable.Constants; +import com.fr.stable.StringUtils; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 上午9:12 + * + * 系列标签界面 + */ +public class DataLabelPane extends TooltipContentsPane { + private static final int SPACE = 4; + + protected UICheckBox showSeriesNameCB; + protected UICheckBox showCategoryNameCB; + protected UIComboBox delimiterBox; + private DataLabelStylePane stylePane; + private UIRadioButton bottomButton; + private UIRadioButton leftButton; + private UIRadioButton rigtButton; + private UIRadioButton topButton; + protected UIRadioButton centerButton; + + public DataLabelPane() { + setLayout(FRGUIPaneFactory.createBorderLayout()); + contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + add(contentPane, BorderLayout.CENTER); + contentPane.add(createJPanel4Label()); + contentPane.add(createJPanel4Delimiter()); + JPanel jPanel4FontStyle = createJPanel4FontStyle(); + if (jPanel4FontStyle != null) { + contentPane.add(jPanel4FontStyle); + } + JPanel jPanel4Position = createJPanel4Position(); + if (jPanel4Position != null) { + contentPane.add(jPanel4Position); + + } + } + + private JPanel createJPanel4Label() { + return createTableLayoutPane(new Component[][]{ + createComponents4ShowSeriesName(), + createComponents4ShowCategoryName(), + createComponents4Value(), + createComponents4PercentValue(), + createComponents4ShowGuidLine() + }); + + } + + protected Component[] createComponents4ShowSeriesName() { + if (showSeriesNameCB == null) { + showSeriesNameCB = new UICheckBox(Inter.getLocText(new String[]{"ChartF-Series", "WF-Name"})); + } + return new Component[]{new UILabel(Inter.getLocText(new String[]{"Label", "Include"}) + ":"), showSeriesNameCB}; + } + + protected Component[] createComponents4ShowCategoryName() { + if (showCategoryNameCB == null) { + showCategoryNameCB = new UICheckBox(Inter.getLocText(new String[]{"StyleFormat-Category", "WF-Name"})); + } + return new Component[]{null, showCategoryNameCB}; + } + + + + protected Component[] createComponents4ShowGuidLine() { + return new Component[0]; + } + + private JPanel createJPanel4Delimiter() { + if (delimiterBox == null) { + delimiterBox = new UIComboBox(ChartConstants.DELIMITERS); + } + delimiterBox.setPreferredSize(new Dimension(70, 20)); + JPanel boxPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); + boxPane.add(new UILabel(Inter.getLocText("Form-Delimiter") + ":")); + boxPane.add(delimiterBox); + return boxPane; + } + + private JPanel createJPanel4FontStyle() { + JPanel labelStylePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + JPanel westPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); + labelStylePane.add(westPane, BorderLayout.WEST); + westPane.add(new UILabel(Inter.getLocText(new String[]{"Label", "FRFont"}) + ":")); + labelStylePane.add(stylePane = new DataLabelStylePane(), BorderLayout.CENTER); + return labelStylePane; + } + + protected JPanel createJPanel4Position() { + // 标签位置:上下左右中. + bottomButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Bottom")); + leftButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Left")); + rigtButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Right")); + topButton = new UIRadioButton(Inter.getLocText("StyleAlignment-Top")); + centerButton = new UIRadioButton(Inter.getLocText("Center")); + + ButtonGroup bg = new ButtonGroup(); + bg.add(bottomButton); + bg.add(leftButton); + bg.add(rigtButton); + bg.add(topButton); + bg.add(centerButton); + topButton.setSelected(true); + + JPanel buttonPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); + buttonPane.add(new UILabel(Inter.getLocText(new String[]{"Label", "Layout"}) + ":")); + buttonPane.add(bottomButton); + buttonPane.add(leftButton); + buttonPane.add(rigtButton); + buttonPane.add(topButton); + buttonPane.add(centerButton); + + return buttonPane; + } + + + + public void populate(AttrContents seriesAttrContents) { + super.populate(seriesAttrContents); + String dataLabel = seriesAttrContents.getSeriesLabel(); + if (dataLabel != null) { + for (int i = 0; i < ChartConstants.DELIMITERS.length; i++) { + String delimiter = ChartConstants.DELIMITERS[i]; + if (delimiterBox != null && dataLabel.contains(delimiter)) { + delimiterBox.setSelectedItem(delimiter); + break; + } + } + // 以前的换行符 ${BR} + if (delimiterBox != null && dataLabel.contains(ChartConstants.BREAKLINE_PARA)) { + delimiterBox.setSelectedItem(ChartConstants.DELIMITERS[3]); + } + + if (showCategoryNameCB != null) { + showCategoryNameCB.setSelected(dataLabel.contains(ChartConstants.CATEGORY_PARA)); + } + if (showSeriesNameCB != null) { + showSeriesNameCB.setSelected(dataLabel.contains(ChartConstants.SERIES_PARA)); + } + } else { + if (showCategoryNameCB != null) { + showCategoryNameCB.setSelected(false); + } + if (showSeriesNameCB != null) { + showSeriesNameCB.setSelected(false); + } + } + + int position = seriesAttrContents.getPosition(); + if (bottomButton != null && position == Constants.BOTTOM) { + bottomButton.setSelected(true); + } else if (topButton != null && position == Constants.TOP) { + topButton.setSelected(true); + } else if (rigtButton != null && position == Constants.RIGHT) { + rigtButton.setSelected(true); + } else if (leftButton != null && position == Constants.LEFT) { + leftButton.setSelected(true); + } else if (centerButton != null && position == Constants.CENTER) { + centerButton.setSelected(true); + } + + if (stylePane != null) { + stylePane.populate(seriesAttrContents); + } + } + + + + public void update(AttrContents seriesAttrContents) { + String contents = StringUtils.EMPTY; + String delString = Utils.objectToString(delimiterBox.getSelectedItem()); + if (delString.contains(ChartConstants.DELIMITERS[3])) { + delString = ChartConstants.BREAKLINE_PARA; + } else if (delString.contains(ChartConstants.DELIMITERS[SPACE])) { + delString = StringUtils.BLANK; + } + // 处理间隔符 在label中添加 + if ((showCategoryNameCB != null && showCategoryNameCB.isSelected())) { + contents += ChartConstants.CATEGORY_PARA + delString; + } + if (showSeriesNameCB != null && showSeriesNameCB.isSelected()) { + contents += ChartConstants.SERIES_PARA + delString; + } + if (showValueCB != null && showValueCB.isSelected()) { + contents += ChartConstants.VALUE_PARA + delString; + } + if (showPercent != null && showPercent.isSelected()) { + contents += ChartConstants.PERCENT_PARA + delString; + } + if (contents.contains(delString)) { + contents = contents.substring(0, contents.lastIndexOf(delString)); + } + + if (topButton != null && topButton.isSelected()) { + seriesAttrContents.setPosition(Constants.TOP); + } else if (leftButton != null && leftButton.isSelected()) { + seriesAttrContents.setPosition(Constants.LEFT); + } else if (bottomButton != null && bottomButton.isSelected()) { + seriesAttrContents.setPosition(Constants.BOTTOM); + } else if (rigtButton != null && rigtButton.isSelected()) { + seriesAttrContents.setPosition(Constants.RIGHT); + } else if (centerButton != null && centerButton.isSelected()) { + seriesAttrContents.setPosition(Constants.CENTER); + } + + if (stylePane != null) { + stylePane.update(seriesAttrContents); + } + + seriesAttrContents.setSeriesLabel(contents); + seriesAttrContents.setFormat(format); + seriesAttrContents.setPercentFormat(percentFormat); + } + + public void checkGuidBox() { + + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/GanttDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/GanttDataLabelPane.java new file mode 100644 index 000000000..f76eb8c6f --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/GanttDataLabelPane.java @@ -0,0 +1,30 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import java.awt.Component; + +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.general.Inter; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 上午10:35 + * + * 甘特图的标签界面 + */ +public class GanttDataLabelPane extends DataLabelPane { + private static final long serialVersionUID = 5409845868543668181L; + + protected Component[] createComponents4ShowCategoryName() { + if (showCategoryNameCB == null) { + showCategoryNameCB = new UICheckBox(Inter.getLocText("Chart_Step_Name")); + } + return new Component[]{null, showCategoryNameCB}; + } + + protected Component[] createComponents4Value() { + return new Component[0]; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/LineDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/LineDataLabelPane.java new file mode 100644 index 000000000..849153f92 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/LineDataLabelPane.java @@ -0,0 +1,16 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import javax.swing.*; + +/** + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-4-13 上午11:01:35 + * 类说明: 折线的标签界面 + */ +public class LineDataLabelPane extends DataLabelPane { + + protected JPanel createJPanel4Position() { + return null; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MapDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MapDataLabelPane.java new file mode 100644 index 000000000..355ec9eee --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MapDataLabelPane.java @@ -0,0 +1,19 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import javax.swing.*; + + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 上午10:34 + * 地图系列标签界面 + */ +public class MapDataLabelPane extends DataLabelPane { + + protected JPanel createJPanel4Position() { + return null; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MeterDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MeterDataLabelPane.java new file mode 100644 index 000000000..846070d2e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/MeterDataLabelPane.java @@ -0,0 +1,17 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import java.awt.*; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 上午10:37 + */ +public class MeterDataLabelPane extends DataLabelPane { + + protected Component[] createComponents4PercentValue() { + return new Component[0]; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/PieDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/PieDataLabelPane.java new file mode 100644 index 000000000..b8c291670 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/PieDataLabelPane.java @@ -0,0 +1,118 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.general.Inter; +import com.fr.stable.Constants; +import com.fr.chart.base.AttrContents; +import com.fr.design.layout.FRGUIPaneFactory; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 上午10:39 + */ +public class PieDataLabelPane extends DataLabelPane { + private JRadioButton insideButton; + private JRadioButton outSideButton; + private JCheckBox showGuidLine; + + protected Component[] createComponents4ShowGuidLine() { + if (showGuidLine == null) { + showGuidLine = new JCheckBox(Inter.getLocText("ChartF-Show_GuidLine")); + } + return new Component[]{null, showGuidLine}; + } + + private ActionListener getPositionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent e) { + checkGuidBox(); + } + }; + } + + public void checkGuidBox() { + if(insideButton != null && insideButton.isSelected()) { + showGuidLine.setSelected(false); + showGuidLine.setEnabled(false); + } + + if(outSideButton != null && outSideButton.isSelected()) { + showGuidLine.setEnabled(true); + showGuidLine.setSelected(true); + } + } + + protected JPanel createJPanel4Position() { + insideButton = new JRadioButton(Inter.getLocText("Chart_In_Pie")); + outSideButton = new JRadioButton(Inter.getLocText("Chart_Out_Pie")); + outSideButton.addActionListener(getPositionListener()); + insideButton.addActionListener(getPositionListener()); + showPercent.addActionListener(getPieLeadActionListener()); + showSeriesNameCB.addActionListener(getPieLeadActionListener()); + showCategoryNameCB.addActionListener(getPieLeadActionListener()); + showValueCB.addActionListener(getPieLeadActionListener()); + + ButtonGroup bg = new ButtonGroup(); + bg.add(insideButton); + bg.add(outSideButton); + insideButton.setSelected(true); + + JPanel buttonPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); + buttonPane.add(new UILabel(Inter.getLocText(new String[]{"Label", "Layout"}) + ":")); + buttonPane.add(insideButton); + buttonPane.add(outSideButton); + + return buttonPane; + } + + private ActionListener getPieLeadActionListener() { + return new ActionListener() { + public void actionPerformed(ActionEvent e) { + checkShowLineBox(); + } + }; + } + + private void checkShowLineBox() { + if (showGuidLine != null) { + showGuidLine.setEnabled((showCategoryNameCB.isSelected() + || showSeriesNameCB.isSelected() + || showValueCB.isSelected() + || showPercent.isSelected())); + } + } + + public void populate(AttrContents seriesAttrContents) { + super.populate(seriesAttrContents); + if (showGuidLine != null) { + showGuidLine.setSelected(seriesAttrContents.isShowGuidLine()); + showGuidLine.setEnabled(showSeriesNameCB.isSelected() || showCategoryNameCB.isSelected() || showValueCB.isSelected() || showPercent.isSelected()); + } + int position = seriesAttrContents.getPosition(); + if (insideButton != null && position == Constants.INSIDE) { + insideButton.setSelected(true); + } else if (outSideButton != null && position == Constants.OUTSIDE) { + outSideButton.setSelected(true); + } + } + + public void update(AttrContents seriesAttrContents) { + super.update(seriesAttrContents); + if (showGuidLine != null && showGuidLine.isEnabled()) { + seriesAttrContents.setShowGuidLine(showGuidLine.isSelected()); + } + if (insideButton != null && insideButton.isSelected()) { + seriesAttrContents.setPosition(Constants.INSIDE); + } else if (outSideButton != null && outSideButton.isSelected()) { + seriesAttrContents.setPosition(Constants.OUTSIDE); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RadarDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RadarDataLabelPane.java new file mode 100644 index 000000000..ba903b05e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RadarDataLabelPane.java @@ -0,0 +1,17 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import javax.swing.*; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 下午2:45 + */ +public class RadarDataLabelPane extends DataLabelPane { + + protected JPanel createJPanel4Position() { + return null; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RangeDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RangeDataLabelPane.java new file mode 100644 index 000000000..994e5de6e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/RangeDataLabelPane.java @@ -0,0 +1,65 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.stable.Constants; +import com.fr.general.Inter; +import com.fr.chart.base.AttrContents; +import com.fr.design.layout.FRGUIPaneFactory; + +import javax.swing.*; + +/** + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-4-13 上午10:54:56 + * 类说明: 全距图的标签界面 + */ +public class RangeDataLabelPane extends DataLabelPane { + + private JRadioButton topButton; + private JRadioButton centerButton; + private JRadioButton bottomButton; + + protected JPanel createJPanel4Position() { + topButton = new JRadioButton(Inter.getLocText("StyleAlignment-Top")); + bottomButton = new JRadioButton(Inter.getLocText("StyleAlignment-Bottom")); + centerButton = new JRadioButton(Inter.getLocText("Center")); + + ButtonGroup bg = new ButtonGroup(); + bg.add(topButton); + bg.add(bottomButton); + bg.add(centerButton); + + topButton.setSelected(true); + + JPanel buttonPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); + buttonPane.add(new UILabel(Inter.getLocText(new String[]{"Label", "Layout"}) + ":")); + buttonPane.add(topButton); + buttonPane.add(bottomButton); + buttonPane.add(centerButton); + + return buttonPane; + } + + public void populate(AttrContents seriesAttrContents) { + super.populate(seriesAttrContents); + int position = seriesAttrContents.getPosition(); + if (centerButton != null && position == Constants.CENTER) { + centerButton.setSelected(true); + } else if (bottomButton != null && position == Constants.BOTTOM) { + bottomButton.setSelected(true); + } else if(topButton != null){ + topButton.setSelected(true); + } + } + + public void update(AttrContents seriesAttrContents) { + super.update(seriesAttrContents); + if (centerButton != null && centerButton.isSelected()) { + seriesAttrContents.setPosition(Constants.CENTER); + } else if (bottomButton != null && bottomButton.isSelected()) { + seriesAttrContents.setPosition(Constants.BOTTOM); + } else { + seriesAttrContents.setPosition(Constants.TOP); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/StockDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/StockDataLabelPane.java new file mode 100644 index 000000000..0560c181d --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/StockDataLabelPane.java @@ -0,0 +1,29 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import java.awt.*; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-29 + * Time : 上午10:31 + */ +public class StockDataLabelPane extends DataLabelPane { + + protected Component[] createComponents4ShowSeriesName() { + return new Component[0]; + } + + protected Component[] createComponents4ShowCategoryName() { + return new Component[0]; + } + + protected Component[] createComponents4PercentValue() { + return new Component[0]; + } + + protected Component[] createComponents4Value() { + return new Component[0]; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/XYDataLabelPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/XYDataLabelPane.java new file mode 100644 index 000000000..92f428836 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/dlp/XYDataLabelPane.java @@ -0,0 +1,25 @@ +package com.fr.design.chart.series.SeriesCondition.dlp; + +import javax.swing.*; +import java.awt.*; + +/** + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-4-13 上午11:03:35 + * 类说明: 散点的标签界面 + */ +public class XYDataLabelPane extends DataLabelPane { + + protected JPanel createJPanel4Position() { + return null; + } + + protected Component[] createComponents4ShowCategoryName() { + return new Component[0]; + } + + protected Component[] createComponents4PercentValue() { + return new Component[0]; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Area3DPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Area3DPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..22a58aa4b --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Area3DPlotDataSeriesConditionPane.java @@ -0,0 +1,38 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrBorder; +import com.fr.chart.base.AttrColor; +import com.fr.chart.chartattr.Area3DPlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelBorderPane; +import com.fr.design.chart.series.SeriesCondition.LabelColorPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午9:58 + * 三维面积图中的条件属性界面 + */ +public class Area3DPlotDataSeriesConditionPane extends DataSeriesConditionPane { + + private static final long serialVersionUID = -6553187235124152023L; + + protected void addStyleAction() { + classPaneMap.put(AttrColor.class, new LabelColorPane(this)); + } + + protected void addBorderAction() { + classPaneMap.put(AttrBorder.class, new LabelBorderPane(this)); + } + + /** + * 对应的Class + * @return 返回对应的class + */ + public Class class4Correspond() { + return Area3DPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/AreaPlotDataSeriesCondtionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/AreaPlotDataSeriesCondtionPane.java new file mode 100644 index 000000000..32d1ea9e5 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/AreaPlotDataSeriesCondtionPane.java @@ -0,0 +1,25 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.chartattr.AreaPlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午10:00 + * 面积图的条件属性界面 + */ +public class AreaPlotDataSeriesCondtionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = -7003756827950382930L; + + /** + * 返回对应的class + * @return 返回对应的class + */ + public Class class4Correspond() { + return AreaPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar2DTrendLineDSConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar2DTrendLineDSConditionPane.java new file mode 100644 index 000000000..5848ab5e3 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar2DTrendLineDSConditionPane.java @@ -0,0 +1,20 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrTrendLine; +import com.fr.design.chart.series.SeriesCondition.TrendLinePane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午11:19 + * 柱形图 非堆积 带趋势线的 条件属性界面 + */ +public class Bar2DTrendLineDSConditionPane extends BarPlotDataSeriesConditionPane { + private static final long serialVersionUID = -5888582645195218536L; + + protected void addTrendLineAction() { + classPaneMap.put(AttrTrendLine.class, new TrendLinePane(this)); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar3DPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar3DPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..c947322b2 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Bar3DPlotDataSeriesConditionPane.java @@ -0,0 +1,19 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.chartattr.Bar3DPlot; +import com.fr.chart.chartattr.Plot; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-1 + * Time : 上午9:27 + */ +public class Bar3DPlotDataSeriesConditionPane extends BarPlotDataSeriesConditionPane { + private static final long serialVersionUID = -2701123736889274105L; + + public Class class4Correspond() { + return Bar3DPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BarPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BarPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..39c8c4379 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BarPlotDataSeriesConditionPane.java @@ -0,0 +1,27 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrBorder; +import com.fr.chart.chartattr.Bar2DPlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelBorderPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6r + * Date : 11-11-30 + * Time : 上午9:59 + * 柱形图中的条件属性界面 + */ +public class BarPlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = 7887246749323167953L; + + protected void addBorderAction() { + classPaneMap.put(AttrBorder.class, new LabelBorderPane(this)); + } + + public Class class4Correspond() { + return Bar2DPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BubblePlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BubblePlotDataSeriesConditionPane.java new file mode 100644 index 000000000..297a553dd --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/BubblePlotDataSeriesConditionPane.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrColor; +import com.fr.chart.chartattr.BubblePlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelColorPane; + +/** + * 气泡图 条件显示 界面. + * Created by kunsnat on 14-3-11. + * kunsnat@gmail.com + */ +public class BubblePlotDataSeriesConditionPane extends DataSeriesConditionPane { + + protected void addStyleAction() { + classPaneMap.put(AttrColor.class, new LabelColorPane(this)); + } + + /** + * 返回对应的class + * @return 返回class + */ + public Class class4Correspond() { + return BubblePlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java new file mode 100644 index 000000000..14008cf9a --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java @@ -0,0 +1,152 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.util.List; + +import javax.swing.JPanel; +import javax.swing.SwingConstants; + +import com.fr.base.Parameter; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.web.ChartHyperPoplink; +import com.fr.design.gui.frpane.ReportletParameterViewPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.itextfield.UINumberField; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.general.Inter; +import com.fr.stable.ParameterProvider; +import com.fr.stable.StringUtils; +import com.fr.design.utils.gui.GUICoreUtils; + +/** + * 图表弹出超链, 悬浮窗属性设置界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-8-6 上午09:39:22 + */ +public class ChartHyperPopAttrPane extends AbstractChartAttrPane { + + private UITextField titleField; + private UINumberField widthField; + private UINumberField heightField; + private ReportletParameterViewPane parameterViewPane; + + public static final int DEFAULT_H_VALUE = 270; + public static final int DEFAULT_V_VALUE = 500; + + private int paraType; + + public ChartHyperPopAttrPane(int paraType) { + this.paraType = paraType; + + initAll(); + } + + @Override + protected JPanel createContentPane() { + JPanel pane = new JPanel(); + pane.setLayout(FRGUIPaneFactory.createBorderLayout()); + + titleField = new UITextField(15); + titleField.setPreferredSize(new Dimension(200, 20)); + + widthField = new UINumberField(4); + widthField.setColumns(10); + widthField.setPreferredSize(new Dimension(200, 20)); + + heightField = new UINumberField(4); + heightField.setColumns(10); + heightField.setPreferredSize(new Dimension(200, 20)); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + + double[] columnSize = { p,f}; + double[] rowSize = { p,p,p,p,p,p}; + + Component[][] components = new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Designer-Widget-Style_Title") + ":", SwingConstants.RIGHT), titleField}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Designer_Width") + ":", SwingConstants.RIGHT), widthField}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Designer_Height") + ":", SwingConstants.RIGHT), heightField}, + }; + + widthField.setText(String.valueOf(DEFAULT_V_VALUE)); + heightField.setText(String.valueOf(DEFAULT_H_VALUE)); + + JPanel northPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + pane.add(northPane, BorderLayout.NORTH); + + parameterViewPane = new ReportletParameterViewPane(paraType); + parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Parameter"))); + parameterViewPane.setPreferredSize(new Dimension(200, 200)); + pane.add(parameterViewPane, BorderLayout.CENTER); + + return pane; + } + + public void populateBean(ChartHyperPoplink chartHyperlink) { + + titleField.setText(chartHyperlink.getChartDigTitle()); + widthField.setText(String.valueOf(chartHyperlink.getWidth())); + heightField.setText(String.valueOf(chartHyperlink.getHeight())); + + List parameterList = this.parameterViewPane.update(); + parameterList.clear(); + + ParameterProvider[] parameters = chartHyperlink.getParameters(); + parameterViewPane.populate(parameters); + } + + /** + * 属性表 对应update + */ + public void updateBean(ChartHyperPoplink chartHyperlink) { + String title = titleField.getText(); + if (StringUtils.isBlank(title)) { + title = "Chart"; + } + chartHyperlink.setChartDigTitle(title); + chartHyperlink.setWidth((int)widthField.getValue()); + chartHyperlink.setHeight((int)heightField.getValue()); + + List parameterList = this.parameterViewPane.update(); + if (!parameterList.isEmpty()) { + Parameter[] parameters = new Parameter[parameterList.size()]; + parameterList.toArray(parameters); + + chartHyperlink.setParameters(parameters); + } else { + chartHyperlink.setParameters(null); + } + } + + @Override + public void populate(ChartCollection collection) { + // do nothing + } + + @Override + public void update(ChartCollection collection) { + // do nothing + } + + @Override + public String getIconPath() { + return "com/fr/design/images/chart/link.png"; + } + + + /** + * 界面标题 + * @return 标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("FR-Hyperlink_ChartHyperlink"); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java new file mode 100644 index 000000000..c0fe8d914 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -0,0 +1,174 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.base.chart.BaseChartCollection; +import com.fr.chart.chartattr.Bar2DPlot; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.ChartFactory; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.chart.web.ChartHyperPoplink; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.itableeditorpane.ParameterTableModel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.ChartHyperEditPane; +import com.fr.general.Inter; +import com.fr.design.utils.gui.GUICoreUtils; + +import java.awt.*; + +/** + * 类说明: 图表超链 -- 弹出 悬浮窗. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2011-12-28 上午10:41:39 + */ +public class ChartHyperPoplinkPane extends BasicBeanPane { + private static final long serialVersionUID = 2469115951510144738L; + private UITextField itemNameTextField; + private ChartHyperEditPane hyperEditPane; + private ChartComponent chartComponent; + + public ChartHyperPoplinkPane() { + this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); + + if(this.needRenamePane()){ + itemNameTextField = new UITextField(); + this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("FR-Chart-Use_Name") + ":"), BorderLayout.NORTH); + } + + hyperEditPane = new ChartHyperEditPane(getChartParaType()); + this.add(hyperEditPane, BorderLayout.CENTER); + + ChartCollection cc = new ChartCollection(); + cc.addChart(new Chart(new Bar2DPlot())); + + chartComponent = new ChartComponent(); + chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小. + chartComponent.setSupportEdit(false); + chartComponent.populate(cc); + + this.add(chartComponent, BorderLayout.EAST); + + hyperEditPane.populate(cc); + + hyperEditPane.useChartComponent(chartComponent); + } + + protected int getChartParaType() { + return ParameterTableModel.CHART_NORMAL_USE; + } + + /** + * 是否需要加载重命名的空间 + * @return 默认需要加载 + */ + protected boolean needRenamePane(){ + return true; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Pop_Chart"); + } + + @Override + public void populateBean(ChartHyperPoplink chartHyperlink) { + if(itemNameTextField != null){ + this.itemNameTextField.setText(chartHyperlink.getItemName()); + } + + BaseChartCollection cc = chartHyperlink.getChartCollection(); + if (cc == null || cc.getChartCount() < 1) { + cc = new ChartCollection(); + cc.addChart(new Chart(ChartFactory.createBar2DPlot())); + chartHyperlink.setChartCollection(cc); + } + + hyperEditPane.populateHyperLink(chartHyperlink); + chartComponent.populate(cc); + } + + /** + * 超链数组HyperlinkGoup切换时 updateBean. + * @return 返回的弹出超链. + */ + public ChartHyperPoplink updateBean() { + ChartHyperPoplink chartLink = new ChartHyperPoplink(); + updateBean(chartLink); + if(itemNameTextField != null){ + chartLink.setItemName(this.itemNameTextField.getText()); + } + return chartLink; + } + + /** + * 属性表 对应update + */ + public void updateBean(ChartHyperPoplink chartHyperlink) { + hyperEditPane.updateHyperLink(chartHyperlink); + chartHyperlink.setChartCollection(chartComponent.update()); + + ChartEditPane.getInstance().fire();// 响应整个图表保存事件等. + if(itemNameTextField != null){ + chartHyperlink.setItemName(this.itemNameTextField.getText()); + } + } + + public static class CHART_NO_RENAME extends ChartHyperPoplinkPane{ + protected boolean needRenamePane(){ + return false; + } + } + + public static class CHART_MAP extends ChartHyperPoplinkPane { + + protected int getChartParaType() { + return ParameterTableModel.CHART_MAP_USE; + } + } + + public static class CHART_GIS extends ChartHyperPoplinkPane { + + protected int getChartParaType() { + return ParameterTableModel.CHART_GIS_USE; + } + } + + public static class CHART_PIE extends ChartHyperPoplinkPane { + @Override + protected int getChartParaType() { + return ParameterTableModel.CHART_PIE_USE; + } + } + + public static class CHART_XY extends ChartHyperPoplinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART__XY_USE; + } + } + + public static class CHART_BUBBLE extends ChartHyperPoplinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_BUBBLE_USE; + } + } + + public static class CHART_STOCK extends ChartHyperPoplinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_STOCK_USE; + } + } + + public static class CHART_GANTT extends ChartHyperPoplinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_GANTT_USE; + } + } + + public static class CHART_METER extends ChartHyperPoplinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_METER_USE; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java new file mode 100644 index 000000000..a0b161a0f --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java @@ -0,0 +1,182 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.base.Utils; +import com.fr.chart.web.ChartHyperRelateCellLink; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.columnrow.ColumnRowVerticalPane; +import com.fr.design.gui.frpane.ReportletParameterViewPane; +import com.fr.design.gui.itableeditorpane.ParameterTableModel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; +import com.fr.stable.ColumnRow; +import com.fr.stable.ParameterProvider; +import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.*; +import java.awt.*; +import java.util.List; + +/** + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2011-12-28 下午02:51:10 + * 类说明: 图表超链 -- 关联单元格图表. + */ +public class ChartHyperRelateCellLinkPane extends BasicBeanPane{ + private static final long serialVersionUID = 7874948047886548990L; + + private UITextField itemNameTextField; + private ColumnRowVerticalPane colRowPane; + private ReportletParameterViewPane parameterViewPane; + + public ChartHyperRelateCellLinkPane() { + this.initComponent(); + } + + private void initComponent() { + this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); + if(needRenamePane()){ + itemNameTextField = new UITextField(); + this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH); + } + + JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); + this.add(centerPane, BorderLayout.CENTER); + + centerPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Related", "Cell"}))); + + colRowPane = new ColumnRowVerticalPane(); + centerPane.add(colRowPane, BorderLayout.NORTH); + + parameterViewPane = new ReportletParameterViewPane(getChartParaType()); + parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Parameters"))); + parameterViewPane.setPreferredSize(new Dimension(500, 200)); + this.add(parameterViewPane, BorderLayout.SOUTH); + } + + protected int getChartParaType() { + return ParameterTableModel.CHART_NORMAL_USE; + } + + /** + * 是否需要加载重命名的空间 + * @return 默认需要加载 + */ + protected boolean needRenamePane(){ + return true; + } + + @Override + public void populateBean(ChartHyperRelateCellLink ob) { + if(ob == null) { + return; + } + if(itemNameTextField != null){ + itemNameTextField.setText(ob.getItemName()); + } + if(ob.getRelateCCName() != null) { + ColumnRow colRow = ColumnRow.valueOf(ob.getRelateCCName()); + colRowPane.populate(colRow); + } else { + colRowPane.populate(ColumnRow.valueOf("A1")); + } + + List parameterList = this.parameterViewPane.update(); + parameterList.clear(); + + ParameterProvider[] parameters = ob.getParameters(); + parameterViewPane.populate(parameters); + } + + @Override + public ChartHyperRelateCellLink updateBean() { + ChartHyperRelateCellLink chartLink = new ChartHyperRelateCellLink(); + updateBean(chartLink); + if(itemNameTextField != null){ + chartLink.setItemName(this.itemNameTextField.getText()); + } + return chartLink; + } + + /** + * 属性表 对应update + */ + public void updateBean(ChartHyperRelateCellLink chartLink) { + chartLink.setRelateCCName(Utils.objectToString(colRowPane.update())); + + List parameterList = this.parameterViewPane.update(); + if (parameterList != null && !parameterList.isEmpty()) { + ParameterProvider[] parameters = new ParameterProvider[parameterList.size()]; + parameterList.toArray(parameters); + + chartLink.setParameters(parameters); + } else { + chartLink.setParameters(null); + } + if(itemNameTextField != null){ + chartLink.setItemName(this.itemNameTextField.getText()); + } + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Related", "Cell"}); + } + + public static class CHART_NO_RENAME extends ChartHyperRelateCellLinkPane{ + protected boolean needRenamePane(){ + return false; + } + } + + public static class CHART_MAP extends ChartHyperRelateCellLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_MAP_USE; + } + } + + public static class CHART_GIS extends ChartHyperRelateCellLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_GIS_USE; + } + } + + public static class CHART_PIE extends ChartHyperRelateCellLinkPane { + @Override + protected int getChartParaType() { + return ParameterTableModel.CHART_PIE_USE; + } + }; + + + public static class CHART_XY extends ChartHyperRelateCellLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART__XY_USE; + } + } + + public static class CHART_BUBBLE extends ChartHyperRelateCellLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_BUBBLE_USE; + } + } + + public static class CHART_STOCK extends ChartHyperRelateCellLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_STOCK_USE; + } + } + + public static class CHART_GANTT extends ChartHyperRelateCellLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_GANTT_USE; + } + } + + public static class CHART_METER extends ChartHyperRelateCellLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_METER_USE; + } + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java new file mode 100644 index 000000000..2a13a6e37 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java @@ -0,0 +1,199 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.base.Utils; +import com.fr.chart.web.ChartHyperRelateFloatLink; +import com.fr.design.DesignModelAdapter; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.frpane.ReportletParameterViewPane; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itableeditorpane.ParameterTableModel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; +import com.fr.stable.ParameterProvider; +import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.*; +import javax.swing.border.Border; +import javax.swing.border.TitledBorder; +import java.awt.*; +import java.util.List; + +/** + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2011-12-28 下午03:02:43 + * 类说明: 图表超链 关联悬浮元素 + */ +public class ChartHyperRelateFloatLinkPane extends BasicBeanPane { + private static final long serialVersionUID = -3308412003405587689L; + + private UITextField itemNameTextField; + + private UIComboBox floatNameBox; + private ReportletParameterViewPane parameterViewPane; + + public ChartHyperRelateFloatLinkPane() { + this.initComponent(); + } + + private void initComponent() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); + + if(needRenamePane()){ + itemNameTextField = new UITextField(); + this.add(GUICoreUtils.createNamedPane(itemNameTextField, Inter.getLocText("Name") + ":"), BorderLayout.NORTH); + } + + this.add(centerPane, BorderLayout.CENTER); + floatNameBox = new UIComboBox(getFloatNames()); + floatNameBox.setPreferredSize(new Dimension(90, 20)); + + JPanel pane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); + pane.add(new UILabel(Inter.getLocText("M_Insert-Float") + ":")); + pane.add(floatNameBox); + + Border boder = null; + Font font = null; + TitledBorder border = new TitledBorder(boder, Inter.getLocText(new String[]{"Related", "M_Insert-Float"}), 4, 2, font, new Color(1, 159, 222)); + // 圆角不行 + centerPane.setBorder(border); + + centerPane.add(pane, BorderLayout.NORTH); + + parameterViewPane = new ReportletParameterViewPane(getChartParaType()); + parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Parameters"))); + parameterViewPane.setPreferredSize(new Dimension(500, 200)); + this.add(parameterViewPane, BorderLayout.SOUTH); + } + + protected int getChartParaType() { + return ParameterTableModel.CHART_NORMAL_USE; + } + + /** + * 是否需要加载重命名的空间 + * @return 默认需要加载 + */ + protected boolean needRenamePane(){ + return true; + } + + private String[] getFloatNames() { + DesignModelAdapter adapter = DesignModelAdapter.getCurrentModelAdapter(); + if(adapter != null ) { + return adapter.getFloatNames(); + } + return new String[0]; + } + + @Override + public void populateBean(ChartHyperRelateFloatLink ob) { + if(ob == null) { + return ; + } + + if(itemNameTextField != null){ + itemNameTextField.setText(ob.getItemName()); + } + + floatNameBox.setSelectedItem(ob.getRelateCCName()); + + List parameterList = this.parameterViewPane.update(); + parameterList.clear(); + + ParameterProvider[] parameters = ob.getParameters(); + parameterViewPane.populate(parameters); + } + + @Override + public ChartHyperRelateFloatLink updateBean() { + ChartHyperRelateFloatLink chartLink = new ChartHyperRelateFloatLink(); + updateBean(chartLink); + if(itemNameTextField != null){ + chartLink.setItemName(this.itemNameTextField.getText()); + } + return chartLink; + } + + public void updateBean(ChartHyperRelateFloatLink chartLink) { + + if(floatNameBox.getSelectedItem() != null) { + chartLink.setRelateCCName(Utils.objectToString(floatNameBox.getSelectedItem())); + } + + List parameterList = this.parameterViewPane.update(); + if (parameterList != null && !parameterList.isEmpty()) { + ParameterProvider[] parameters = new ParameterProvider[parameterList.size()]; + parameterList.toArray(parameters); + + chartLink.setParameters(parameters); + } else { + chartLink.setParameters(null); + } + if(itemNameTextField != null){ + chartLink.setItemName(this.itemNameTextField.getText()); + } + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"Related", "M_Insert-Float"}); + } + + public static class CHART_NO_RENAME extends ChartHyperRelateFloatLinkPane{ + protected boolean needRenamePane(){ + return false; + } + } + + public static final class CHART_MAP extends ChartHyperRelateFloatLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_MAP_USE; + } + } + + public static final class CHART_GIS extends ChartHyperRelateFloatLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_GIS_USE; + } + } + + public static final class CHART_PIE extends ChartHyperRelateFloatLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_PIE_USE; + } + } + + public static class CHART_XY extends ChartHyperRelateFloatLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART__XY_USE; + } + } + + public static class CHART_BUBBLE extends ChartHyperRelateFloatLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_BUBBLE_USE; + } + } + + public static class CHART_STOCK extends ChartHyperRelateFloatLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_STOCK_USE; + } + } + + public static class CHART_GANTT extends ChartHyperRelateFloatLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_GANTT_USE; + } + } + + public static class CHART_METER extends ChartHyperRelateFloatLinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_METER_USE; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4AreaConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4AreaConditionPane.java new file mode 100644 index 000000000..383ab0ec0 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4AreaConditionPane.java @@ -0,0 +1,17 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrAxisPosition; +import com.fr.design.chart.series.SeriesCondition.LabelAxisPositionPane; + +/** + * 类说明: 组合图中 堆积面积图(无趋势线)条件属性界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-4-20 下午05:28:52 + */ +public class CustomPlot4AreaConditionPane extends AreaPlotDataSeriesCondtionPane { + private static final long serialVersionUID = 6938149100125099651L; + + protected void addAxisPositionAction() { + classPaneMap.put(AttrAxisPosition.class, new LabelAxisPositionPane(this)); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarNoTrendLineConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarNoTrendLineConditionPane.java new file mode 100644 index 000000000..316009763 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarNoTrendLineConditionPane.java @@ -0,0 +1,17 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrAxisPosition; +import com.fr.design.chart.series.SeriesCondition.LabelAxisPositionPane; + +/** + * 类说明: 组合图中 柱形的条件属性界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-4-20 下午05:14:44 + */ +public class CustomPlot4BarNoTrendLineConditionPane extends BarPlotDataSeriesConditionPane { + private static final long serialVersionUID = -6960758805042551364L; + + protected void addAxisPositionAction() { + classPaneMap.put(AttrAxisPosition.class, new LabelAxisPositionPane(this)); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarTrendLineConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarTrendLineConditionPane.java new file mode 100644 index 000000000..9683c9765 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4BarTrendLineConditionPane.java @@ -0,0 +1,17 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrAxisPosition; +import com.fr.design.chart.series.SeriesCondition.LabelAxisPositionPane; + +/** + * 类说明: 组合图中 非堆积 带趋势线的条件属性界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-4-20 下午05:23:38 + */ +public class CustomPlot4BarTrendLineConditionPane extends Bar2DTrendLineDSConditionPane { + private static final long serialVersionUID = 5216036756293601852L; + + protected void addAxisPositionAction() { + classPaneMap.put(AttrAxisPosition.class, new LabelAxisPositionPane(this)); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4LineConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4LineConditionPane.java new file mode 100644 index 000000000..79322ecd9 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlot4LineConditionPane.java @@ -0,0 +1,17 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrAxisPosition; +import com.fr.design.chart.series.SeriesCondition.LabelAxisPositionPane; + +/** + * 类说明: 组合图中 折线类型 非堆积 带趋势线的条件属性界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-4-20 下午05:27:35 + */ +public class CustomPlot4LineConditionPane extends LinePlotDataSeriesConditionPane { + private static final long serialVersionUID = -5614266090158187836L; + + protected void addAxisPositionAction() { + classPaneMap.put(AttrAxisPosition.class, new LabelAxisPositionPane(this)); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..306c9e86c --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/CustomPlotDataSeriesConditionPane.java @@ -0,0 +1,22 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrAxisPosition; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelAxisPositionPane; + +/** + * 组合图 条件属性界面. + * + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午10:01 + */ +public class CustomPlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = -6140023104743692628L; + + protected void addAxisPositionAction() { + classPaneMap.put(AttrAxisPosition.class, new LabelAxisPositionPane(this)); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/DataSeriesConditionPaneFactory.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/DataSeriesConditionPaneFactory.java new file mode 100644 index 000000000..b40d1161d --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/DataSeriesConditionPaneFactory.java @@ -0,0 +1,75 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.chartattr.*; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.DataSeriesCustomConditionPane; +import com.fr.design.condition.ConditionAttributesPane; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午10:25 + * 系列的条件属性 工厂. + * 不包括组合图.(ps 组合图是用组合类型界面拼凑的) + */ +public class DataSeriesConditionPaneFactory { + private static final String TREND = ".TrendLine"; + + private static Map> map = new HashMap>(); + + static { + map.put(Area3DPlot.class.getName(), Area3DPlotDataSeriesConditionPane.class); + map.put(AreaPlot.class.getName(), AreaPlotDataSeriesCondtionPane.class); + map.put(BarPlot.class.getName(), BarPlotDataSeriesConditionPane.class); + map.put(Bar3DPlot.class.getName(), Bar3DPlotDataSeriesConditionPane.class); + map.put(Bar2DPlot.class.getName() + TREND, Bar2DTrendLineDSConditionPane.class); + map.put(BubblePlot.class.getName(), BubblePlotDataSeriesConditionPane.class); + map.put(GanttPlot.class.getName(), GanttPlotDataSeriesConditionPane.class); + map.put(LinePlot.class.getName() + TREND, LinePlotDataSeriesConditionPane.class); + map.put(PiePlot.class.getName(), PiePlotDataSeriesConditionPane.class); + map.put(Pie3DPlot.class.getName(), Pie3DPlotDataSeriesConditionPane.class); + map.put(RadarPlot.class.getName(), RadarPlotDataSeriesConditionPane.class); + map.put(StockPlot.class.getName(), StockPlotDataSeriesConditionPane.class); + map.put(XYScatterPlot.class.getName() + TREND, XYScatterPlotDataSeriesConditionPane.class); + map.put(MapPlot.class.getName(), MapPlotDataSeriesConditionPane.class); + map.put(CustomPlot.class.getName(), DataSeriesCustomConditionPane.class); + map.put(Donut2DPlot.class.getName(), Donut2DPlotDataSeriesConditionPane.class); + } + + private DataSeriesConditionPaneFactory() { + + } + + /** + * 找到Plot条件界面对应的DataSeries的. + * @param plot 对应Plot + * @return 返回class对应的属性界面. + */ + public static Class findConfitionPane4DataSeries(Plot plot) { + if (plot == null) { + return DataSeriesConditionPane.class; + } + boolean isSupportTrendLine = plot.isSupportTrendLine(); + return searchSuitableClass(plot.getClass(), isSupportTrendLine); + } + + private static Class searchSuitableClass(Class plotCls, boolean isSupportTrendLine) { + if (plotCls == null) { + return DataSeriesConditionPane.class; + } + String plotClsName = plotCls.getName(); + if (isSupportTrendLine) { + plotClsName += TREND; + } + Class resClass = map.get(plotClsName); + if (resClass != null) { + return resClass; + } + return searchSuitableClass(plotCls.getSuperclass(), isSupportTrendLine); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Donut2DPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Donut2DPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..dc9af083e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Donut2DPlotDataSeriesConditionPane.java @@ -0,0 +1,20 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrBorder; +import com.fr.chart.chartattr.Donut2DPlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelBorderPane; + +public class Donut2DPlotDataSeriesConditionPane extends DataSeriesConditionPane{ + private static final long serialVersionUID = -8816067568992838526L; + + protected void addBorderAction() { + classPaneMap.put(AttrBorder.class, new LabelBorderPane(this)); + } + + public Class class4Correspond() { + return Donut2DPlot.class; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkNorthPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkNorthPane.java new file mode 100644 index 000000000..39d3d17b9 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkNorthPane.java @@ -0,0 +1,135 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + + +import java.awt.BorderLayout; +import java.awt.Component; + +import javax.swing.DefaultListCellRenderer; +import javax.swing.JList; +import javax.swing.JPanel; + +import com.fr.design.DesignModelAdapter; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.form.ui.Widget; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.js.FormHyperlinkProvider; +import com.fr.stable.bridge.StableFactory; + +/** + + * Created with IntelliJ IDEA. + + * User: zx + + * Date: 14-8-6 + + * Time: 下午2:53 + + */ +public class FormHyperlinkNorthPane extends BasicBeanPane { + + private UITextField itemNameTextField; + private boolean needRenamePane = false; + private Widget[] formHyperlinkEditors; + private UIComboBox targetFrameComboBox; + + public FormHyperlinkNorthPane(boolean needRenamePane) { + this.needRenamePane = needRenamePane; + this.initComponents(); + } + + protected void initComponents() { + this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); + JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); + + this.add(centerPane, BorderLayout.CENTER); + formHyperlinkEditors = getFormHyperlinkEditors(); + targetFrameComboBox = formHyperlinkEditors == null ? new UIComboBox() : new UIComboBox(getFormHyperlinkEditNames()); + targetFrameComboBox.setRenderer(new DefaultListCellRenderer() { + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + return this; + } + }); + double p = TableLayout.PREFERRED; + double[] rowSize = {p, p, p}; + double[] columnSize = {p, TableLayout.FILL}; + Component[][] components; + if(!this.needRenamePane){ + components = new Component[][]{ + {new UILabel(Inter.getLocText("FR-Designer_Form-Object")), targetFrameComboBox}, + }; + }else{ + itemNameTextField = new UITextField(); + components = new Component[][]{ + {new UILabel(Inter.getLocText("FR-Designer_Name_has_Colon")), itemNameTextField}, + {new UILabel(Inter.getLocText("FR-Designer_Form-Object")), targetFrameComboBox}, + }; + } + JPanel northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + centerPane.add(northPane, BorderLayout.NORTH); + } + + public Widget getEditingEditor(){ + if (formHyperlinkEditors == null){ + return null; + } + String editingEditorName = (String)targetFrameComboBox.getSelectedItem(); + for (Widget editor : formHyperlinkEditors){ + if (ComparatorUtils.equals(editingEditorName,editor.getWidgetName())){ + return editor; + } + } + return null; + } + + private Widget[] getFormHyperlinkEditors(){ + return DesignModelAdapter.getCurrentModelAdapter().getLinkableWidgets(); + } + + + private String[] getFormHyperlinkEditNames(){ + String[] editorNames = new String[formHyperlinkEditors.length]; + int i =0; + for(Widget editor : formHyperlinkEditors){ + editorNames[i] = editor.getWidgetName(); + i++; + } + return editorNames; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("Hyperlink-Form_link"); + } + + @Override + public void populateBean(FormHyperlinkProvider formHyperlink) { + if(itemNameTextField != null){ + this.itemNameTextField.setText(formHyperlink.getItemName()); + } + String editorName = formHyperlink.getRelateEditorName(); + //防止初始的时候有空白选项 + if (editorName == null){ + return; + } + targetFrameComboBox.setSelectedItem(editorName); + } + + + @Override + public FormHyperlinkProvider updateBean() { + FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); + updateBean(formHyperlink); + return formHyperlink; + } + + public void updateBean(FormHyperlinkProvider formHyperlink) { + if(itemNameTextField != null){ + formHyperlink.setItemName(this.itemNameTextField.getText()); + } + formHyperlink.setRelateEditorName((String) targetFrameComboBox.getSelectedItem()); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java new file mode 100644 index 000000000..d87ccbb8f --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java @@ -0,0 +1,161 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import java.awt.BorderLayout; + +import javax.swing.BorderFactory; + +import com.fr.base.Parameter; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.frpane.ReportletParameterViewPane; +import com.fr.design.gui.itableeditorpane.ParameterTableModel; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.form.ui.ElementCaseEditorProvider; +import com.fr.general.Inter; +import com.fr.js.FormHyperlinkProvider; +import com.fr.stable.ParameterProvider; +import com.fr.stable.bridge.StableFactory; + +public class FormHyperlinkPane extends BasicBeanPane { + + private ReportletParameterViewPane parameterViewPane; + private FormHyperlinkNorthPane northPane; + + public FormHyperlinkPane() { + super(); + this.initComponents(); + } + + protected void initComponents() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); + northPane = new FormHyperlinkNorthPane(needRenamePane()); + this.add(northPane, BorderLayout.NORTH); + + parameterViewPane = new ReportletParameterViewPane(getChartParaType()); + this.add(parameterViewPane, BorderLayout.CENTER); + parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Parameters"), null)); + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("Hyperlink-Form_link"); + } + + protected int getChartParaType() { + return ParameterTableModel.NO_CHART_USE; + } + + protected boolean needRenamePane(){ + return getChartParaType() != ParameterTableModel.NO_CHART_USE; + } + + protected int getHyperlinkType() { + if (northPane.getEditingEditor() != null){ + if (northPane.getEditingEditor().acceptType(ElementCaseEditorProvider.class)) { + return FormHyperlinkProvider.ELEMENTCASE; + } + } + return FormHyperlinkProvider.CHART; + } + + @Override + public void populateBean(FormHyperlinkProvider formHyperlink) { + northPane.populateBean(formHyperlink); + //parameter + java.util.List parameterList = this.parameterViewPane.update(); + parameterList.clear(); + + ParameterProvider[] parameters = formHyperlink.getParameters(); + parameterViewPane.populate(parameters); + } + + @Override + public FormHyperlinkProvider updateBean() { + FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); + formHyperlink.setType(getHyperlinkType()); + updateBean(formHyperlink); + + return formHyperlink; + } + + public void updateBean(FormHyperlinkProvider formHyperlink) { + formHyperlink.setType(getHyperlinkType()); + + northPane.updateBean(formHyperlink); + //Parameter. + java.util.List parameterList = this.parameterViewPane.update(); + if (!parameterList.isEmpty()) { + Parameter[] parameters = new Parameter[parameterList.size()]; + parameterList.toArray(parameters); + + formHyperlink.setParameters(parameters); + } + } + + public static class CHART_NO_RENAME extends FormHyperlinkPane{ + protected boolean needRenamePane(){ + return false; + } + protected int getChartParaType() { + return ParameterTableModel.CHART_NORMAL_USE; + } + } + + public static class CHART extends FormHyperlinkPane { + @Override + protected int getChartParaType() { + return ParameterTableModel.CHART_NORMAL_USE; + } + } + + public static class CHART_MAP extends FormHyperlinkPane { + @Override + protected int getChartParaType() { + return ParameterTableModel.CHART_MAP_USE; + } + } + + public static class CHART_GIS extends FormHyperlinkPane{ + protected int getChartParaType() { + return ParameterTableModel.CHART_GIS_USE; + } + } + + public static class CHART_PIE extends FormHyperlinkPane { + @Override + protected int getChartParaType() { + return ParameterTableModel.CHART_PIE_USE; + } + }; + + public static class CHART_XY extends FormHyperlinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART__XY_USE; + } + } + + public static class CHART_BUBBLE extends FormHyperlinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_BUBBLE_USE; + } + } + + public static class CHART_STOCK extends FormHyperlinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_STOCK_USE; + } + } + + public static class CHART_GANTT extends FormHyperlinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_GANTT_USE; + } + } + + public static class CHART_METER extends FormHyperlinkPane { + protected int getChartParaType() { + return ParameterTableModel.CHART_METER_USE; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/GanttPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/GanttPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..c58b50a57 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/GanttPlotDataSeriesConditionPane.java @@ -0,0 +1,41 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrAlpha; +import com.fr.chart.base.AttrColor; +import com.fr.chart.chartattr.GanttPlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelAlphaPane; +import com.fr.design.chart.series.SeriesCondition.LabelColorPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午9:56 + */ +public class GanttPlotDataSeriesConditionPane extends DataSeriesConditionPane { + + private static final long serialVersionUID = 2558855009849187262L; + + protected void addBasicAction() { + classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this)); + } + + protected void addStyleAction() { + classPaneMap.put(AttrColor.class, new LabelColorPane(this)); + } + + protected void addBorderAction() { + + } + + protected void addTrendLineAction() { + + } + + public Class class4Correspond() { + return GanttPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/LinePlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/LinePlotDataSeriesConditionPane.java new file mode 100644 index 000000000..a12c552ac --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/LinePlotDataSeriesConditionPane.java @@ -0,0 +1,30 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrColor; +import com.fr.chart.base.AttrLineStyle; +import com.fr.chart.base.AttrMarkerType; +import com.fr.chart.base.AttrTrendLine; +import com.fr.chart.chartattr.LinePlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.*; + +/** + * 折线图(无趋势线)中的条件属性界面. + */ +public class LinePlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = 90767073697041627L; + + protected void addStyleAction() { + classPaneMap.put(AttrColor.class, new LabelColorPane(this)); + classPaneMap.put(AttrLineStyle.class, new LabelLineStylePane(this)); + classPaneMap.put(AttrMarkerType.class, new LineMarkerTypePane(this)); + } + + protected void addTrendLineAction() { + classPaneMap.put(AttrTrendLine.class, new TrendLinePane(this)); + } + + public Class class4Correspond() { + return LinePlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MapPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MapPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..5ed5fb62e --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MapPlotDataSeriesConditionPane.java @@ -0,0 +1,31 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrContents; +import com.fr.chart.chartattr.MapPlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelContentsPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-1 + * Time : 上午9:32 + * 地图 条件属性界面 + */ +public class MapPlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = 3698292568618077981L; + + protected void addBasicAction() { + classPaneMap.put(AttrContents.class, new LabelContentsPane(this, class4Correspond())); + } + + /** + * 返回界面对应的class + * @return 返回界面对应class + */ + public Class class4Correspond() { + return MapPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MeterPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MeterPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..c42d5f775 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/MeterPlotDataSeriesConditionPane.java @@ -0,0 +1,21 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.chartattr.MeterPlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-12-1 + * Time : 上午9:34 + * 仪表盘 条件属性界面 + */ +public class MeterPlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = -1476436318592049848L; + + public Class class4Correspond() { + return MeterPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Pie3DPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Pie3DPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..790f6d0cc --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/Pie3DPlotDataSeriesConditionPane.java @@ -0,0 +1,27 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrColor; +import com.fr.chart.chartattr.PiePlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelColorPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午9:59 + * 三维饼图的条件属性界面 + */ +public class Pie3DPlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = 4137513003721586526L; + + protected void addStyleAction() { + classPaneMap.put(AttrColor.class, new LabelColorPane(this)); + } + + public Class class4Correspond() { + return PiePlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/PiePlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/PiePlotDataSeriesConditionPane.java new file mode 100644 index 000000000..59493955a --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/PiePlotDataSeriesConditionPane.java @@ -0,0 +1,28 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrBorder; +import com.fr.chart.chartattr.PiePlot; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelBorderPane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午10:01 + * 饼图 条件属性界面 + */ + +public class PiePlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = 7442193860514835962L; + + protected void addBorderAction() { + classPaneMap.put(AttrBorder.class, new LabelBorderPane(this)); + } + + public Class class4Correspond() { + return PiePlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/RadarPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/RadarPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..578d300b6 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/RadarPlotDataSeriesConditionPane.java @@ -0,0 +1,33 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrColor; +import com.fr.chart.base.AttrLineStyle; +import com.fr.chart.base.AttrMarkerType; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartattr.RadarPlot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelColorPane; +import com.fr.design.chart.series.SeriesCondition.LabelLineStylePane; +import com.fr.design.chart.series.SeriesCondition.LineMarkerTypePane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午9:57 + * 雷达图条件属性界面 + */ +public class RadarPlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = 4134539843311969532L; + + protected void addStyleAction() { + classPaneMap.put(AttrColor.class, new LabelColorPane(this)); + classPaneMap.put(AttrLineStyle.class, new LabelLineStylePane(this)); + classPaneMap.put(AttrMarkerType.class, new LineMarkerTypePane(this)); + } + + public Class class4Correspond() { + return RadarPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/StockPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/StockPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..b33f44cbd --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/StockPlotDataSeriesConditionPane.java @@ -0,0 +1,27 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrTrendLine; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartattr.StockPlot; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.TrendLinePane; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午9:56 + * 股价图的条件属性界面 + */ +public class StockPlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = 1348842506599776627L; + + protected void addTrendLineAction() { + classPaneMap.put(AttrTrendLine.class, new TrendLinePane(this)); + } + + public Class class4Correspond() { + return StockPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/XYScatterPlotDataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/XYScatterPlotDataSeriesConditionPane.java new file mode 100644 index 000000000..26dfb6712 --- /dev/null +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/XYScatterPlotDataSeriesConditionPane.java @@ -0,0 +1,35 @@ +package com.fr.design.chart.series.SeriesCondition.impl; + +import com.fr.chart.base.AttrColor; +import com.fr.chart.base.AttrLineStyle; +import com.fr.chart.base.AttrMarkerType; +import com.fr.chart.base.AttrTrendLine; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartattr.XYScatterPlot; +import com.fr.design.chart.series.SeriesCondition.*; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date : 11-11-30 + * Time : 上午9:53 + * 散点图的条件属性界面 + */ +public class XYScatterPlotDataSeriesConditionPane extends DataSeriesConditionPane { + private static final long serialVersionUID = -2552214303519434824L; + + protected void addStyleAction() { + classPaneMap.put(AttrColor.class, new LabelColorPane(this)); + classPaneMap.put(AttrLineStyle.class, new LabelLineStylePane(this)); + classPaneMap.put(AttrMarkerType.class, new LineMarkerTypePane(this)); + } + + protected void addTrendLineAction() { + classPaneMap.put(AttrTrendLine.class, new TrendLinePane(this)); + } + + public Class class4Correspond() { + return XYScatterPlot.class; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/AreaIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/AreaIndependentChartInterface.java new file mode 100644 index 000000000..ff8a06ac7 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/AreaIndependentChartInterface.java @@ -0,0 +1,53 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.impl.Area3DPlotDataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.AreaPlotDataSeriesCondtionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.Area3DSeriesPane; +import com.fr.design.mainframe.chart.gui.style.series.AreaSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.AreaPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class AreaIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new AreaPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return plot.isSupport3D() ? new Area3DSeriesPane(parent, plot) : new AreaSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return plot.isSupport3D() ? new Area3DPlotDataSeriesConditionPane() : new AreaPlotDataSeriesCondtionPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Area.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/BarIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/BarIndependentChartInterface.java new file mode 100644 index 000000000..de1160b10 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/BarIndependentChartInterface.java @@ -0,0 +1,55 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.impl.Bar2DTrendLineDSConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.Bar3DPlotDataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.BarPlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.Bar2DSeriesPane; +import com.fr.design.mainframe.chart.gui.style.series.Bar3DSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.BarPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class BarIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new BarPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return plot.isSupport3D() ? new Bar3DSeriesPane(parent, plot) : new Bar2DSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return plot.isSupport3D() ? new Bar3DPlotDataSeriesConditionPane() + : (plot.isSupportTrendLine() ? new Bar2DTrendLineDSConditionPane() : new BarPlotDataSeriesConditionPane()); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Bar.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/BubbleIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/BubbleIndependentChartInterface.java new file mode 100644 index 000000000..b9d0b232c --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/BubbleIndependentChartInterface.java @@ -0,0 +1,51 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.impl.BubblePlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.BubblePlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.BubbleSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.BubblePlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class BubbleIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new BubblePlotPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/Chart_BubbleChart.png"; + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new BubblePlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new BubblePlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new BubbleSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return new BubblePlotDataSeriesConditionPane(); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/ColumnIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/ColumnIndependentChartInterface.java new file mode 100644 index 000000000..fcbfbc6b2 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/ColumnIndependentChartInterface.java @@ -0,0 +1,54 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.impl.Bar2DTrendLineDSConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.Bar3DPlotDataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.BarPlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotMoreCateReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotMoreCateTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.Bar2DSeriesPane; +import com.fr.design.mainframe.chart.gui.style.series.Bar3DSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.ColumnPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class ColumnIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + public AbstractChartTypePane getPlotTypePane(){ + return new ColumnPlotPane(); + } + + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotMoreCateTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotMoreCateReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return plot.isSupport3D() ? new Bar3DSeriesPane(parent, plot) : new Bar2DSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return plot.isSupport3D() ? new Bar3DPlotDataSeriesConditionPane() + : (plot.isSupportTrendLine() ? new Bar2DTrendLineDSConditionPane() : new BarPlotDataSeriesConditionPane()); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Column.png"; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/CustomIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/CustomIndependentChartInterface.java new file mode 100644 index 000000000..3d2af6812 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/CustomIndependentChartInterface.java @@ -0,0 +1,51 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.DataSeriesCustomConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.CustomSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.CustomPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class CustomIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new CustomPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new CustomSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return new DataSeriesCustomConditionPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Comb_Chart.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/DonutIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/DonutIndependentChartInterface.java new file mode 100644 index 000000000..fa9d537c6 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/DonutIndependentChartInterface.java @@ -0,0 +1,52 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.Donut2DPlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.Donut2DSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.DonutPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class DonutIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new DonutPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return plot.isSupport3D() ? null : new Donut2DSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return plot.isSupport3D() ? new DataSeriesConditionPane() : new Donut2DPlotDataSeriesConditionPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Donut.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/FunnelIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/FunnelIndependentChartInterface.java new file mode 100644 index 000000000..43c71b46c --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/FunnelIndependentChartInterface.java @@ -0,0 +1,45 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.PiePlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.PiePlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.FunnelSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.FunnelPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class FunnelIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new FunnelPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new PiePlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new PiePlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new FunnelSeriesPane(parent, plot); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Funnel.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/GanttIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/GanttIndependentChartInterface.java new file mode 100644 index 000000000..5c8c6f6d5 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/GanttIndependentChartInterface.java @@ -0,0 +1,44 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.impl.GanttPlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.GanttPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.GanttPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.GanttPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class GanttIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new GanttPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new GanttPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new GanttPlotReportDataContentPane(parent); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return new GanttPlotDataSeriesConditionPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Gantt.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/GisMapIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/GisMapIndependentChartInterface.java new file mode 100644 index 000000000..1e172750a --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/GisMapIndependentChartInterface.java @@ -0,0 +1,35 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +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.design.mainframe.chart.gui.type.GisMapPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class GisMapIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new GisMapPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return null; + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return null; + } + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Gis.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/LineIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/LineIndependentChartInterface.java new file mode 100644 index 000000000..413ed6b52 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/LineIndependentChartInterface.java @@ -0,0 +1,52 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.LinePlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotMoreCateReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotMoreCateTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.LineSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.LinePlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class LineIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new LinePlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotMoreCateTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotMoreCateReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new LineSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return plot.isSupportTrendLine() ? new LinePlotDataSeriesConditionPane() : new DataSeriesConditionPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Line.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/MapIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/MapIndependentChartInterface.java new file mode 100644 index 000000000..a1f933a1c --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/MapIndependentChartInterface.java @@ -0,0 +1,49 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.impl.MapPlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +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.style.series.MapSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.MapPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class MapIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new MapPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return null; + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return null; + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new MapSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return new MapPlotDataSeriesConditionPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/Chart-Map.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/MeterIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/MeterIndependentChartInterface.java new file mode 100644 index 000000000..513107556 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/MeterIndependentChartInterface.java @@ -0,0 +1,45 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.MeterPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.MeterPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.MeterSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.MeterPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class MeterIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new MeterPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new MeterPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new MeterPlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new MeterSeriesPane(parent, plot); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Meter.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/PieIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/PieIndependentChartInterface.java new file mode 100644 index 000000000..fabd3f265 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/PieIndependentChartInterface.java @@ -0,0 +1,53 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.impl.Pie3DPlotDataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.PiePlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.PiePlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.PiePlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.Pie2DSeriesPane; +import com.fr.design.mainframe.chart.gui.style.series.Pie3DSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.PiePlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class PieIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new PiePlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new PiePlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new PiePlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return plot.isSupport3D() ? new Pie3DSeriesPane(parent, plot) : new Pie2DSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return plot.isSupport3D() ? new Pie3DPlotDataSeriesConditionPane() : new PiePlotDataSeriesConditionPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Pie.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/RadarIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/RadarIndependentChartInterface.java new file mode 100644 index 000000000..d0320f8fd --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/RadarIndependentChartInterface.java @@ -0,0 +1,52 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.impl.RadarPlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.RadarSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.RadarPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class RadarIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new RadarPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new RadarSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return new RadarPlotDataSeriesConditionPane(); + } + + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Radar.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/RangeIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/RangeIndependentChartInterface.java new file mode 100644 index 000000000..04f238192 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/RangeIndependentChartInterface.java @@ -0,0 +1,45 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.RangeSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.RangePlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class RangeIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new RangePlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new CategoryPlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new RangeSeriesPane(parent, plot); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Range_Chart.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/StockIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/StockIndependentChartInterface.java new file mode 100644 index 000000000..647c11a91 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/StockIndependentChartInterface.java @@ -0,0 +1,52 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.StockPlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.StockPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.StockPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.StockSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.StockPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class StockIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new StockPlotPane(); + } + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new StockPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new StockPlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new StockSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return plot.isSupportTrendLine() ? new StockPlotDataSeriesConditionPane() : new DataSeriesConditionPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-Stock.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/chartinterface/XYScatterIndependentChartInterface.java b/designer_chart/src/com/fr/design/chartinterface/XYScatterIndependentChartInterface.java new file mode 100644 index 000000000..23f363083 --- /dev/null +++ b/designer_chart/src/com/fr/design/chartinterface/XYScatterIndependentChartInterface.java @@ -0,0 +1,53 @@ +package com.fr.design.chartinterface; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.impl.XYScatterPlotDataSeriesConditionPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.report.XYScatterPlotReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.XYScatterPlotTableDataContentPane; +import com.fr.design.mainframe.chart.gui.style.series.XYScatterSeriesPane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.XYScatterPlotPane; + +/** + * Created by eason on 15/4/21. + */ +public class XYScatterIndependentChartInterface extends AbstractIndependentChartUIWithAPILevel { + + public AbstractChartTypePane getPlotTypePane(){ + return new XYScatterPlotPane(); + } + + + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ + return new XYScatterPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ + return new XYScatterPlotReportDataContentPane(parent); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ + return new XYScatterSeriesPane(parent, plot); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot){ + return plot.isSupportTrendLine() ? new XYScatterPlotDataSeriesConditionPane() : new DataSeriesConditionPane(); + } + + /** + *图标路径 + * @return 图标路径 + */ + public String getIconPath(){ + return "com/fr/design/images/form/toolbar/ChartF-XYScatter.png"; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/gui/xcombox/ComboBoxUseEditor.java b/designer_chart/src/com/fr/design/gui/xcombox/ComboBoxUseEditor.java new file mode 100644 index 000000000..577d6549f --- /dev/null +++ b/designer_chart/src/com/fr/design/gui/xcombox/ComboBoxUseEditor.java @@ -0,0 +1,160 @@ +package com.fr.design.gui.xcombox; + +import java.awt.*; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.Enumeration; + +import com.fr.design.editor.editor.Editor; +import com.fr.design.gui.icombobox.FRTreeComboBox; +import com.fr.design.gui.icombobox.UIComboBoxRenderer; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; + +import javax.swing.*; +import javax.swing.event.PopupMenuEvent; +import javax.swing.event.PopupMenuListener; +import javax.swing.tree.*; + +/** + * 下拉列表 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-10-22 下午03:14:25 + */ +public class ComboBoxUseEditor extends Editor { + private FRTreeComboBox comBox; + private String[] items = new String[0]; + + private PopupMenuListener popupMenuListener = new PopupMenuListener() { + + public void popupMenuWillBecomeVisible(PopupMenuEvent e) { + new Thread() { + + public void run() { + calculateComboBoxNames(items); + } + }.start(); + } + + public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { + + } + + public void popupMenuCanceled(PopupMenuEvent e) { + + } + }; + + TreeCellRenderer treeRenderer = new DefaultTreeCellRenderer() { + public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { + super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); + if (value instanceof DefaultMutableTreeNode) { + DefaultMutableTreeNode node = (DefaultMutableTreeNode) value; + Object userObj = node.getUserObject(); + if (userObj instanceof String) { + this.setIcon(null); + } + } + return this; + } + }; + + public ComboBoxUseEditor(String[] useNames) { + this.setLayout(new BorderLayout(0, 0)); + comBox = new FRTreeComboBox(){ + protected void dealSamePath(TreePath parent,TreeNode node,UITextField textField){ + for (Enumeration e = node.children(); e.hasMoreElements(); ) { + TreeNode n = (TreeNode) e.nextElement(); + TreePath path = parent.pathByAddingChild(n); + if (pathToString(path).toUpperCase().startsWith(textField.getText().toUpperCase())) { + tree.scrollPathToVisible(path); + tree.setSelectionPath(path); + break; + } + } + } + }; + comBox.getTree().setCellRenderer(treeRenderer); + comBox.setEditable(true); + comBox.setEnabled(true); + items = useNames; + + this.comBox.addPopupMenuListener(popupMenuListener); + comBox.setRenderer(new UIComboBoxRenderer()); + this.add(comBox, BorderLayout.CENTER); + this.setName(""); + comBox.setBorder(null); + + comBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + fireStateChanged(); + } + }); + + comBox.getEditor().getEditorComponent().addFocusListener(new FocusListener() { + public void focusLost(FocusEvent e) { + fireStateChanged(); + } + + @Override + public void focusGained(FocusEvent e) { + + } + }); + } + + /** + * 是否是String类型 + * @param object 要判断的 + * @return 是则返回true + */ + public boolean accept(Object object) { + return object instanceof String; + } + + @Override + public String getValue() { + if(comBox.getSelectedItem() != null) { + return comBox.getSelectedItem().toString(); + } + return ""; + } + + @Override + public void setValue(String value) { + comBox.setSelectedItem(value); + } + + private void calculateComboBoxNames(String[] useNames) { + JTree tree = comBox.getTree(); + if (tree == null) { + return; + } + DefaultMutableTreeNode rootTreeNode = (DefaultMutableTreeNode) tree.getModel().getRoot(); + rootTreeNode.removeAllChildren(); + + if (useNames.length == 0) { + return; + } + + for (int i = 0; i < useNames.length; i++) { + ExpandMutableTreeNode tableChildTreeNode = new ExpandMutableTreeNode(useNames[i]); + rootTreeNode.add(tableChildTreeNode); + } + + ((DefaultTreeModel) tree.getModel()).reload(); + + TreeNode root = (TreeNode) tree.getModel().getRoot(); + TreePath parent = new TreePath(root); + TreeNode node = (TreeNode) parent.getLastPathComponent(); + for (Enumeration e = node.children(); e.hasMoreElements(); ) { + TreeNode n = (TreeNode) e.nextElement(); + TreePath path = parent.pathByAddingChild(n); + tree.expandPath(path); + } + } + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/gui/xcombox/MarkerComboBox.java b/designer_chart/src/com/fr/design/gui/xcombox/MarkerComboBox.java new file mode 100644 index 000000000..d6f794362 --- /dev/null +++ b/designer_chart/src/com/fr/design/gui/xcombox/MarkerComboBox.java @@ -0,0 +1,102 @@ +/* + * Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved. + */ +package com.fr.design.gui.xcombox; + +import com.fr.base.FRContext; +import com.fr.base.GraphHelper; +import com.fr.base.ScreenResolution; +import com.fr.base.background.ColorBackground; +import com.fr.chart.chartglyph.Marker; +import com.fr.chart.chartglyph.NullMarker; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.icombobox.UIComboBoxRenderer; +import com.fr.general.FRFont; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; + +/** + * Combobox for selecting marker. + */ +public class MarkerComboBox extends UIComboBox { + /** + * Constructor. + * + * @param markerArray the array of marker. + */ + public MarkerComboBox(Marker[] markerArray) { + this.setModel(new DefaultComboBoxModel(markerArray)); + this.setRenderer(new MarkerCellRenderer()); + } + + /** + * Get selected marker. + */ + public Marker getSelectedMarkder() { + return (Marker) getSelectedItem(); + } + + /** + * Set the selected marker. + */ + public void setSelectedMarker(Marker marker) { + setSelectedItem(marker); + } + + /** + * CellRenderer. + */ + class MarkerCellRenderer extends UIComboBoxRenderer { + public Component getListCellRendererComponent(JList list, + Object value, int index, boolean isSelected, boolean cellHasFocus) { + this.marker = (Marker) value; + this.isSelected = isSelected; + + return this; + } + + public void paint(Graphics g) { + Graphics2D g2d = (Graphics2D) g; + + Dimension d = getSize(); + g2d.setColor(Color.black); + g2d.setFont(FRContext.getDefaultValues().getFRFont()); + + if (marker != null) { + if (marker instanceof NullMarker) { + g2d.setColor(Color.black); + FRFont font = FRContext.getDefaultValues().getFRFont(); + int resolution = ScreenResolution.getScreenResolution(); + Font rfont = font.applyResolutionNP(resolution); + g2d.setFont(rfont); + FontMetrics fm = GraphHelper.getFontMetrics(rfont); + + GraphHelper.drawString(g2d, Inter.getLocText("None"), 12, (d.height - fm.getHeight()) / 2 + fm.getAscent()); + } else { + if (marker.getBackground() == null) { + marker.setBackground(ColorBackground.getInstance(Color.black)); + } + marker.paint(g2d, d.width / 2, d.height / 2); + } + } + + if (isSelected) { + g2d.setColor(Color.blue); + GraphHelper.drawRect(g2d, 0, 0, d.width - 1, d.height - 1); + } + } + + public Dimension getPreferredSize() { + return new Dimension(36, 16); + } + + public Dimension getMinimumSize() { + return getPreferredSize(); + } + + private Marker marker = null; + private boolean isSelected = false; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/images/add.png b/designer_chart/src/com/fr/design/images/add.png new file mode 100644 index 0000000000000000000000000000000000000000..113de462b0ad13fc5fd9954c848ab53e1110f261 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP*J+4i(^Q|t)xHy|JyU`G6*yG zGH@GqZFy#_!w~c_;N79@P9DxHMTIteW`CQLt|Z)&KErWZA;YsPhQYtfXNj6}(qz@x zLlugmXQDdz zhbMOTCd<#9Mn5=xUQA!vUDtfzjQS42!-rfNS{TIw*10fuE-}g5_hgpY%e}j|X?8Ap zaq0VB_ScrX*X^#?_Yh$5KWCY+!sD{Yu646LCHQ9K+};)xAi{d3v{%TU$Jv4Na)vC2 zVnXD!H%S7XoS~|@eaQ+=94l6F@f@CD_+ax(w-}*K@ zwwUnT@<`zt^&f1}t6JuiWgR>(`={|iap&dl@y7ExPi<;Z@!XrhrDCzj<)Y1IL*U&&91yCi{`x!|4g+Zh>jY&o8GrzoKS3PAgrrvD zX0s{ei3lKyq7WDy0HOU&1+_HwVFh1U zsZ?%>y4@~HrBczfgH}#jJ6I}c-;j{m!2@6=w_s=>kyzAAtWubX$Kx@n!gM+nW6>ZL z@M?z?rY5{9;HboQyG66vjCvzn=Wzg30j@zynA{=D@&}%DEtqy9MaTN|BoMt`uZ>S_ zw;S=;eZeO!jMhc=qvqd3a9eb>T2VzB1;lGS9)Di1*AJqSXS3O_+dr^-$BzI5036u& UmUoS*Pyhe`07*qoM6N<$g77{R*Z=?k literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/del.png b/designer_chart/src/com/fr/design/images/del.png new file mode 100644 index 0000000000000000000000000000000000000000..f7e584e8f7f76b2fa48ece1073e65fb155944121 GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|+h#7srr_TSt>We{fW zWvJz?dn}yBaD=bLr1?t26`@pvfJCMVR{TePH@;!5;9))amVIUGD@Vqj6BF6D{&?WR@>vp8UCk<9S8R%Q>As&YV)`T$&bg7q(c29llsRkJ)7Q zqaF<#F>9u)G6$YM;%`Zk_s{y-V63sA(sp9Nq(ey+N=259`p+A=lo?ajKh!dF)N?f# iS$%IVe%i!ti=d#Wzp$PzK27A2# literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/exportimg.png b/designer_chart/src/com/fr/design/images/exportimg.png new file mode 100644 index 0000000000000000000000000000000000000000..3f039124ccaf2d65d39d9c8ddbb8c686f81412b2 GIT binary patch literal 446 zcmV;v0YUzWP)w>8F+bl!59cYhAe=~#Z>of zdiU|OFD}i_<^~LQ8ZuzEfq?Ut`e*JoeOP4Mo zVu49ogMqznFN&tEH|G*G7;M1hmq!_nJlw$W>IXnG-uvaf0rcf+*PL);beb=i01VSZA$;P1wV-IA{ti&sz(HXrmw#0S9(3R4smADov7Zp;TkQBZsm^rWuS2W#NuT=>54znt$JNw;oU zShb>xqNs(*t#XFUes9e8k$>ISp9-03adSJ~fx2;Cu_4u@p)LrLhSCEwP|*fWbGX@G$=rDZRC_87;>d;| z5{d*>mghjd7~&$4`g(pn;8`xrupGk)K~9vyVTonI>_?Mmw$?3W_ z^7(uyFNBcY!*HS~GAz&Ve2^f5&VY#(H)uM6qJj(^)z&SnBNKRvN*C(KQJQ4>y9C3U zlQo^$Hj#!gu3|AkfFKEGce7 z1tU9)P+zf&=^Vny$sr5GzWjahno^% zmb9A}IIcMy+bGH#V?s0H>7T!tjWc$fRvWfzZ#gS_ROb;)MV{Lmzhw~4jS+-`hGp2f?g z+>~`+cTL{tohbA94!OSRd$G2*iHhZiYjSt@fxZ5bMgB{*m$$Eae<*VP` z%75NHw8Fng6Nai41+45Ce%={BJ^#v!vroU&4PWX=yB`9{abYSwvXr_|&4ZeeM(W<< z@ndzu@tMkz%4^jVi))vUww$rweR^|qx}|za*|NzE`}YTS`reg+(fcon!7r|b;MIc7 z6MHG;WXDjS;Qw;!edXBIAGxV-Co0bca~t?+;q=&(;q%)%xr*x*GY1Yn``CAEoSr%Q dy=G?_xJ&J+ZCyH#76abfPd2y8*J7OqegVHFa2Wsq literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/newchart_over.png b/designer_chart/src/com/fr/design/images/newchart_over.png new file mode 100644 index 0000000000000000000000000000000000000000..a26a47e12cc637080b949a77a3b6317a02861db8 GIT binary patch literal 706 zcmV;z0zLhSP)%S!!F_ zRVPdjg7AyfrU6HWhqjoHU(H^NzH4icM%9I5pM+R#Q>(h?=u25re_!w>Le95}F`67F z+#gc=#xf=}MD>7SXIJT|e79%DPpB?|1(7Vgo>`n4+}?esw>!7L>UzIP-QT3L{>fOB z1-uD}MFOfr%d69uH@|P^Y5B~}eHd-KK^jpgix({zgu=1V*8In@Xbdollhz_JW6DGnDATb` zdIm}ez=*z)&BYPKImN%ej;Cf!8OM03G7;q`7A?|fO|Rw-5VyE`{1#HTvU8W9MXNA++FeF@8#;!+eu7_%E&Yxy~ o-CLf|0^bsK=|BHKuKp2V07ID_|9lT5!vFvP07*qoM6N<$f})~3y#N3J literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/newchart_press.png b/designer_chart/src/com/fr/design/images/newchart_press.png new file mode 100644 index 0000000000000000000000000000000000000000..b0e0c4637a5b0628b5565296f7ad6f13ae3f0090 GIT binary patch literal 386 zcmV-|0e$|7P)&bGQAkh#006q2tdu$c04oRpz@Q@`{FNYVP0Rj$5xYz4x@$OD zx_d!fp#X6UCo?FeoCCxPst$!%__&Nhg#iGdw~eN*yRMR=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DXP=iA z``K??GRNLAbG?zq=E^U3-Nn(xS$JMB2pY})&cOH=Y{CD3EI&S+PvHPsjtFDTd63v+ z=J>$CrLg}ghu9UNf4{jtL0yT{CyXpV7zB-HyaTb{pUn{Z|Azxr9%k^6D1=509yOTG c1_J~b0IvyqpS42Kj{pDw07*qoM6N<$g4|uV@c;k- literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/area/0_over.png b/designer_chart/src/com/fr/design/images/toolbar/area/0_over.png new file mode 100644 index 0000000000000000000000000000000000000000..3f7dc1c7fa80a49997247160c02ed40c1c8bb5ac GIT binary patch literal 439 zcmV;o0Z9IdP)JgG$QcQba2F`C98M3wqe#0^grleqv(($jmN!jT@i3 zZ;x%hf4%3zO)$Cr`^Ed|x!wq1bLE%2?tI8%K#i<_K1(qO8qNOA!1xzz!T*0OzdxK$VFOx@2xHB8 z|7U_2%p4yWxD@t(;1IjQ{qHx|cc?3I`h=0?2ZNyTjISW}`?DF`|Nn5H%EJsE5{1yH h!J`J#*SB;knE}5wFW8 z+f}=4&Q~9c_?hW_|2yNZb4OfdTm>6`@lH8fSkt=sx=*Xyl%<(cM!uU>oGzQ#Zi{}$ z%3nFJUG{k7BF@7T&V2s!EON0#8)Ir@T4$4(yerEB1&)qC$A$i!f3Tc^nZeSs?7iys SwJ(5vWAJqKb6Mw<&;$T6Vt}y# literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/area/1_normal.png b/designer_chart/src/com/fr/design/images/toolbar/area/1_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..37f18c9e7a7755c5c1469973e4455f86439a1496 GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|;~m7srr_TS;4XNB^JS$kx!= z=$3HhL16RCln>{xN4@Vb`|(@&^mGN@mMgW@IiEjX-fEyI=EU{?@1xqEAB(p9n6EGN zNWrfC${GGanlpy%YZj^KI02`d?RE z+q6q)xxYkYodJi`c?R~gzc))d{r_LE;M8FrIp5=p+4`k=I2o9D818cTwLcSAHv@W$ N!PC{xWt~$(697MMhq3?w literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/area/1_over.png b/designer_chart/src/com/fr/design/images/toolbar/area/1_over.png new file mode 100644 index 0000000000000000000000000000000000000000..f52ea6a48231d6a1f00b445907bf5f12f644bab5 GIT binary patch literal 328 zcmV-O0k{5%P)l63j05Bh+X0S_nYfG)Rj1W!pQQ2LC|={R}lOC*$nRge>hO(VFr(;<57c04aNij a0R{lv2T$auf#u);0000J literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/area/2_gray.png b/designer_chart/src/com/fr/design/images/toolbar/area/2_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..90f6436af1bec098631af84d645cda9df4454bc9 GIT binary patch literal 686 zcmV;f0#W^mP)GgU|ZE}=Kr3bJ_ z+*t#X$>fvea=FX%e2L?@mkh%^Pp8wmyVA}P1y&uEjFaP2$K%m{zyE$RnN;1e+zHTYnC`j#PLa`Q^!j)4oU@u9 zkLMQbItp_+5{U@CUhf&wp8jEDa4gGSI0jd%)z7h5>^yk}h$kW-=zKm8I{=nj0KRQ7F6MH% z568!DG#Yff-L~Mw^?6xQ6jh(k_Z^Bt$taY8b_yYwCq8r%J06dtDB2bgkY!oybUJ#s z+ug_V*RB9GfMA|%CZ{5X_L&BQLDG-YX0zExMjEnsBM8D32t=I%7(4ZP{S`!%A1+$c zG#;*_#R6DS%mMwOTK*-}tG51WE?dJwRGJxQ=sxnctwZ zUzOb!II%VC2a+zXq_C-v5kvi@@gMxJgYkDb+$fY`atwhEhr_*1LbKWI<1YdX0CqB3 UFSSa`m;e9(07*qoM6N<$f>XpaUH||9 literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/area/2_normal.png b/designer_chart/src/com/fr/design/images/toolbar/area/2_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..5622dc837cc1c5e87abdbcd29c8fa60b6481fc9b GIT binary patch literal 746 zcmV^;TvV&Ef}JUlUBBVS3!y z=;PU7w)QnS;yNiKn$Nr|BP2-jHOPye4BVY&^c9YrVUk1OB-)4_+p*HKT5d%CF z2bU-`QVUgQ*#lTHTUZa8ceUdw$P%p{>NI(u5A54EJszHc5Ap*A3iG7(+(O2XWD%FX ziMaf!w!nfKB`mCTg&?js;Pm$0dUo&Tsppl{@+bz%ahOSAEXlHq;Sl3&C3%Klg=*ri zmdaA6%yOe%Izfk(BPL;V5eJPT46q(%UhoAxQu?S=SO|>((Enq`6xv)WRvq*a8LKO! z1O(({6o(h40SYSe$Fn(NxC@4IFv)VU5H$$a8t|sSBa=AwPA&PSQDZLOU6*>N+WTU8B%IVC$v3pyD0WGf+_ z-$Jdhy0^Z{AGTv<-AqF$XmW21$h{5u86ohO;y?Ib2dg^BG!hCKb_iL}tO_EHgr@HF c-25)U016jY>rX8MKmY&$07*qoM6N<$f*8e8mH+?% literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/area/2_over.png b/designer_chart/src/com/fr/design/images/toolbar/area/2_over.png new file mode 100644 index 0000000000000000000000000000000000000000..f24e513b36b177129d574c5418821369c430f456 GIT binary patch literal 736 zcmV<60w4W}P)9B-k)oj}3QCJ;@t_BD5{u|f@ZeGZ13h{X!K)}9 z1yAkv2A{BvL?Hm-JKa{D;t*}wuN{Q99U*~kN5e${l3RS&N=Aj zd7-{J|8{Zi64`A*>dC}4YS_alNLEn*FGGSd3wK`XUjAuyYG_bO-2RaL9Q?GB*@C<2 z*n@V)J(2r2?v2HQk>juG@71}P*{Yk{5j>uMaDnR98N1vB=6X$TZE2J{tX*_Bed|Cu zLBXt%%^S>W)@D~?JAwstL|mi(m=KA2A{R$Sb zG7275P-p-{)OR{O6qq;HGB&5yUceAww2z(W*#=K)A0Lg$!;1TEaR)qCXTA$))(Bj;VUbD;f4X0+Rv>~2m$zR|?od#9f zT_MOj1!Oy!uuCUv}2Y7U0lQg!3qERc;EXZ2xZZo`Cs> z?P#wXa}v6xr3*kycjaeP>4wuxzLgUvfYFh9*$4`5MThL@>n{_ Sp`zFT0000mj5W1-=z*FTon*2wJNx@H!)}&cEEY_^-+$CJZI3C*Y}zRpvfl@$+hB4Wx4$vib=~7MO;t&f97R#?U~#sd!?NrS&+~`9UeBVN zLg(|jhR@UKv>C^7V_g8CtuPD^5c<)I(P$(=@T6L;`m!wF*J`z335}vi^*k>UMNxsp z6^y~5;#LJzRh1pb3CH7c2d3Y)8$~EAu3$2L6*{GKRn4eje^;8svpCrkxAP7ew z&|DP&Yn!Hd10wdPM*F^BA%rmC2V`B|#`$OBZEA4Z}En a6<`2&2ilacxTcc;0000xrw}VKad1qt6Xll3@wyA z_6tN#RHg#L(2G=0E0+T>rjpb7CuaI3Qyo9Y{N8{q5UUjkSdqApo;lEzNbWXP)Tp^`$ev9YkTFqI&JPo#}c;2T(`v#>QFf`}JP zATb&tx|`cB>u&ZkGwuc=iCU!C2%@JM=5Xfwhco{fjxh#u>c!z=U`hl&#id$S;V7W{ zCr7XNSjj_ouUGBHtsmg_*+a}*AsA8oJ}~wh$N>b$>2hRfuo32ncp6Y0E2-@>Qq)(TZAy1T+<9kO1HK z2__?v=sl>_nio3Kl7WSM$Tbu4a*Q&rUmzKu4z-`wjpoZj34qhC-EbGGn8=+#&byVP z0TJ@Z8jEpF0B0@reph2oPNpd@4=q`|NqNJ>7{x4`~SC>s$9&*|FPtZhgYSKm!<72t+ovZ85r3Z Y?CuBzpExhR4`>{Nr>mdKI;Vst0GatWHUIzs literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/bar/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..d489dc4dab6b7d17303a33596a6783d5921837f5 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?5c-i(^Q|t)we+zW=vpp7a*m(ez$uo4laHvQEh2EORH_eK?X)Ph8zpN Vw=VY{$pDRF@O1TaS?83{1OQK}IGX?f literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/0_over.png b/designer_chart/src/com/fr/design/images/toolbar/bar/0_over.png new file mode 100644 index 0000000000000000000000000000000000000000..b2db29c3ebec7b3d55cf7456d0df2fe4d2fd930e GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?4Rdi(^Q|t)we+zSpZUPka!i z;w) UPRflXK$93eUHx3vIVCg!0QgQfasU7T literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/1_gray.png b/designer_chart/src/com/fr/design/images/toolbar/bar/1_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..3e9230770e043c6aa49a5bcac162e729912c5858 GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?4{vi(^Q|tt20B@89PeSS6&T zlRFr%8W{<2&XCApapPUK_h8Te|NrHq^wK>2{ncNjGI+ZBxvXFVdQ&MBb@00{#+b^rhX literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/2_normal.png b/designer_chart/src/com/fr/design/images/toolbar/bar/2_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..3b1b6972a3be7bb30062f80dd2a521e7e6d7fb55 GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?58zi(^Q|t)we+zW=vpp6GC8 zUt`2l9v>bPrp0WR?-oh8VW+vT+zN YJXy$lTyEx4p#2OCp00i_>zopr06X40fB*mh literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/3_gary.png b/designer_chart/src/com/fr/design/images/toolbar/bar/3_gary.png new file mode 100644 index 0000000000000000000000000000000000000000..ffd5e545ba034eb794eadc1e266e58a21e509ad1 GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|N_}h zvik6tFfC@|cWT~QSy^vvxLHqS#vKpCDU+wapFd?y)4zKqKVP?8F={HhH-Rg;AYj6z zwVh{w`D`%|37Iz`By2*^yq;%!0-HBZQNLm)5;RZa6*G$jL+b`>gQd@kS%5BN@O1Ta JS?83{1OUP1V<-Rs literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/3_over.png b/designer_chart/src/com/fr/design/images/toolbar/bar/3_over.png new file mode 100644 index 0000000000000000000000000000000000000000..d7194a6a25724342b766ed07c1245c5beacf7f94 GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|-9`7srr_TS79&=u}pw8pcsPEw1 z$?C&n!nBx;->G?LW#xY(!_9K)Gwyg8PMJLY{r)LyoIc+x`T4x%icwS1y$M{&1pyN# zt?fMf%V&#$NXWbiAz>4O=Jh<=6WF|Qiux5Zk)U}RX3Q)S4DJi9ZasIEj{v%m!PC{x JWt~$(696-OV{8Bb literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/4_gray.png b/designer_chart/src/com/fr/design/images/toolbar/bar/4_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..70e4683d0e5e0e9e7bfff2b136b6db040e71524a GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|+h#7srr_TU(}VkJ)(wf(p9E@^_skJ^chYyw)(k7B4)LX5 z`WTXX9D}@Kr#&sLYfoNy*dS)wyN{9=}O*Re&JXV9FSc*d!Fo~+dq!`URDWwyG<-6WOwe(4ZH8wbiK_ppPzK` kEnB8#4cnEo?hT9#Ji2EW?3GPA0`x6|r>mdKI;Vst0E7pJs0%CJ1R z!GA*Y!HJC=AKpICZ>yZ$SF``#s}rqy$6Zz~jNf1L@QB)Z7jEZ=Y{5wy%G$@%*02R< zy*MlvZl9ACIW1QGT!6rj-%o`Pmn-oc?XXE=RCGR=W%7LCQu94}b*B|Re>ZfV(99TD z+Fd@c@^r_XK2Og4nl`)YZ!t4E#o8uKz0+YRBEs&o#Xv-4ql&BCI*z|}&n4Wl5|b7P zIrul}Trmg<4V?Dy^?Ca+4a@gYO3ccsn$8ju$G$&I^a*^~ru|4m>+Xl8Y@58zojiNq sY-$P+TD+q~dD)cYMXd`J7z7d+ek?!g+TLp%3iLLEr>mdKI;Vst0Q%mCi~s-t literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/4_over.png b/designer_chart/src/com/fr/design/images/toolbar/bar/4_over.png new file mode 100644 index 0000000000000000000000000000000000000000..259422a6597488acf2e1c7e9e27b79d8b6f24a10 GIT binary patch literal 347 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|*ud7srr_TSs0%CI~b zpmO5if^!ZmKfZl7KfK4+y)Hh#^o-;5h6ZazXO z3)>d1>e|E;U;i)A?PTS3A<0Xc-jat780_QcPww(Ej}deaeA%XNIw5wKpjT4L^t_fy n5=WOx8!nXrna0?_z|3GY>(I@2e~(%K{mkI$>gTe~DWM4fxKD<8 literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/5_gray.png b/designer_chart/src/com/fr/design/images/toolbar/bar/5_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..046aa24d2bb5bf5858140a0e40bf082fad903f37 GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|;3L7srr_TS&MZ5WvJ;_>l*$$$U;{uY~UH|_KD z^W98_dc~4Gy}gp>=Gk^D@)?Q9CnPNplrXKBAbsZG!H?22_{EZZ^PWhZI(hPEe}BLK z{%za7S(#P31)P%(O61|=a=JNdhE5+(*}FSG`y-v4nqIZpRe$U0Oo(*!+1beB(AM{C tPhhiQV?)D%Y_%wfTbC{=u?ZwFd^j1Y{qnT(MW81bJYD@<);T3K0RY@#cNG8t literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/5_normal.png b/designer_chart/src/com/fr/design/images/toolbar/bar/5_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..01dc291076028243fe6deb74e256509f70a5fdcc GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|;RT7srr_TSyS#Cw!|hC~L78?W3Gw&LQhziBB?Vm(5eEiGIBcYd&ZmH+kg z{yyJ%f>S=Xg-C2};BdM*YlcoAPngWz-~F9pZFZG)(>oI)9es8-2DLHp%AT!U%$CfQ oSoik2&lZC(2@zW*92yuI76kg7KKuBTIM4$Op00i_>zopr0O;*>V*mgE literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/5_over.png b/designer_chart/src/com/fr/design/images/toolbar/bar/5_over.png new file mode 100644 index 0000000000000000000000000000000000000000..63dee58b1dda2dd896cdfdf7ea43595d244842f2 GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|;RT7srr_TSUYWAF{7X`arJ5H{?T06Fhwt0}-=B2(_@>94 z7cQvtSTwHqo7g7&-tg#sCf=j$GbA!t+<4`luoV|~{Y_1IV(S;$Y-!p0zx#uwS^n40 z^?knc1gCs%3z68|z~OXr)(o9Ko-moazvp*~wb@nHO`n($>FBewF{q7!SN3e>Vzy+a o#JacVeYO~UNr))rbZB5?h^+MKNqVyMDbNE9p00i_>zopr01c3HqW}N^ literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bar/6_gray.png b/designer_chart/src/com/fr/design/images/toolbar/bar/6_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..ce1ce75d0eed70a40a29080a10da229d2523da05 GIT binary patch literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP*Jm|i(^Q|t)xHy|Jxt#ku;7w zdE!Ke(F2D2`)ZQ|!ot!N#NOQ5`B{E*OAE_Y-r8?(B!y4^{QTUtQDV7Ma&mIp=JfMI zxdtZ!1kN6DP&UZ=AYdBd;PAjySeGX^GgB~`<>?+p(PKIaO#zXPSz+p{)+ihgSagaj n=ydSq!WhYO5 zV_Q>(8k zK~#9!v{b>7gD?yPhJR8*N}z-Db#SR5`SCob0!#(*J^3XSgc6btD1j1k6%grW$!I*b zbA-V&!dNmZS-UtLh9OyEyyt%$X$LL%eSbCxVLGS5-(U|&VPQ`j?2ZXiZ`$m3Xn zR#@CG-y-}&`}HdwcTk2E{Z>fW!?zdf0=+&lcpedYAu6xjAB19D(ShDiLW(>e`I|g; zbA=dp)FH?C<80=t!X>zX0Q&r$n`k{Qv*} literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bubble/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/bubble/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..72823ae193561ff83c68b596701a9556e2cbee0c GIT binary patch literal 481 zcmV<70UrK|P)(a+;>%98$^S`n9;g(m`)&-$Cy_ABz2{zzePdD&Q-s5A;irfP+p{ zcQj*Wx0Yu&dPzknyzR@ImcP!(m0PHfW$Ly(NrUf(Ep@PvHq~Gv2%v7XF0hhvx za}2LML^lSr)FsW|&=vum9;mLu`%=II7U^*d?P;zVXas;^@GmvcHSDGC@gG_dw8p_f zxqA3Iu8u)xvBI+CA#~6tfR;0mA+D)S$cnJHOI3bMdf!*})Xm~?jw~Xj?m7KB@m&hq8n}Z>fNx{TLG^UL^mq)P56Vz4Tt>`_FF|ok!Sfv z|I$&SCoU)fzR|6MO)C0;UgfeP9Izn)#_E)t%MVK3h&_Wi+7A!!KLXHpHY;-FM}PqU XGxw>WJy6WD00000NkvXXu0mjf4ARoN literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/bubble/0_over.png b/designer_chart/src/com/fr/design/images/toolbar/bubble/0_over.png new file mode 100644 index 0000000000000000000000000000000000000000..2ddec442ad7c933da4fac9f30bfad038a5a397c0 GIT binary patch literal 476 zcmV<20VDp2P)fuC1cPJavAf3K5k6fi*re9w7B-%c+^0peeB zS|jn{7I4lAzX)KHY0w2hPjtz<7kC!h4!|B_TOmEISgCDAiyidVA^k?Y)~yHur=p5` zkeB-8#$+XJPWKP2(WLnZHG!lXnDn@To#`ti5x|}RuniGvJk?eN-2tFep%yVw&W3B6 zsj4Ws<<1SzCx9h65E7qhwW|uZw{x}qv2nJ2Wls;2bR08gBU`2h3`OnQ|iBdOW%OroNF^&1p1L$h9Dq_d400RJ$v!0mH SRS|ap0000Y zFZAGL;ET{OWe9)L*Y+{MPxMLJ&5H(drWIEn9Lz9qXkcXEc+8uq TldWD2G>O5})z4*}Q$iB}>;^VL literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/column/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..27c077ab9e435b5f76333021022c7716cb2c3035 GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?4>ti(^Q|t)xHy|JyU$Eij$W zxVkC3lc(p$7em7f96eGz>^f7V8nlbt4_9a`=PKI#CPSiM$|mbWf{BE}0fxMGuCJ0m SzupEK#Ng@b=d#Wzp$PzPh&A>A literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/0_over.png b/designer_chart/src/com/fr/design/images/toolbar/column/0_over.png new file mode 100644 index 0000000000000000000000000000000000000000..e79ec99717764fd575f30904b33c1faa0ac1015e GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?4Rdi(^Q|t)xHy|JyU$Eij#* zsAl#tyOZbTk1vLX7dU#Pc-VEONHu5|xgW03Sk6_n`AvpIzm!eZhXfM|g#!%I-CX@0 Tn_5=@O=9qL^>bP0l+XkKuERB? literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/1_gray.png b/designer_chart/src/com/fr/design/images/toolbar/column/1_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..9b6b56a79894083f3afa1612285c384d2b4eacbf GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?49Xi(^Q|t)xHy|JyU$8DwA6 zS;KYd(j|$HFO!oN2uher@I`2tGK4?rYx@}BC;B8UQo^G8+ZzS%<2zzZc$E8N*7v1N fNX#*CXkcUrF%dOBcGdeI&{PIbS3j3^P6cl?}vVq1jc)I$ztaD0e0swSiIxGMH literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/1_over.png b/designer_chart/src/com/fr/design/images/toolbar/column/1_over.png new file mode 100644 index 0000000000000000000000000000000000000000..5ac0dd420cbd0d274d37fc06c1b495f8b7359989 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?3+Pi(^Q|t)xHy|JyU$CDgA^ zR5Sb7?8W=?#}`Ax3miRCJnTACq#Cq~+z(f1EaxiPti!X%?uNmMONM&lh8n!PPbgns hy;w3uLYhY)fuYAvME|>C+Zv#`44$rjF6*2UngGAEIoALH literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/2_gray.png b/designer_chart/src/com/fr/design/images/toolbar/column/2_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..aaf4f5a8d88326c1269fbbdbcc2bc2f05eabe1bb GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?4vni(^Q|t)w}Y#n0;5bQE-T zdj(z2&ob@SsZ?W=Y7A_C*w7lpd~TktwbU_Y(aQPu^~-t>ZqK_bmG)91+)CCrZ!udx eOEV)A4}*n{sBymJ?Q1|o89ZJ6T-G@yGywoo*ftvg literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/2_normal.png b/designer_chart/src/com/fr/design/images/toolbar/column/2_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..ba7cf13c2073005d4d17ff48a9abf5b50baa1ed4 GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?4{vi(^Q|t)wlxqyNum%i+~-o=SF0TaLfZf45m`Bz}bxVz_Kfba1gmo%F% jWfV!9R{W6W5lCQottz}!XVcVvpur5Du6{1-oD!M<)Du4h literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/2_over.png b/designer_chart/src/com/fr/design/images/toolbar/column/2_over.png new file mode 100644 index 0000000000000000000000000000000000000000..eb88fb67e88a238352d77a79d762029078f77414 GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?4{vi(^Q|t)wlxqwOa%a$Bsp zGJ$W=+xMmuRL>uAP&UXikl7HBb>MX~@8U$8fQjFKH#6n({3|eI+}(3A!1wr$OPbA> jGK!>4D}G4x2qZ8(J0oo0ceVU1&|n5nS3j3^P6seneg(` z()^!4f3_B!tpD@lqrI>$Pwd_*Q)TXzZ1H=mLOJID*_wS_0w{IRVbj6<`}>Y+^Bak< zc<^y09b9p+fT4enW%08w4}&Ydzq`Bl?c2A}o<U5GN@K4RQLu3$k^A-;hx{r&M)7T>F0Ou;uEv14=WDdU@$iRoS$$m+H1{1 zg|95x0%Bs*_UGi}SiQcscDHLtSlcRg4g&_y!=BMbP0l+XkK&ZBnG literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/3_normal.png b/designer_chart/src/com/fr/design/images/toolbar/column/3_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..5842bccb9c035e61d580ffe16047d460c1d740ba GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|+Sw7srr_TSsex!|M3 z;b=iUHpQ4v`TPI;JMY5nJU!>u`4dj74!X~KWG2EQH}Bs0ACI5=vrXcy`^CE7=0t#i zf~7_W>teRUj5eRT_zk{146b;5@$}y4$49nLN-@yL)#7~MKYM-L-iHYZ3I`voI?NNl zv{G`%2Z>V*ULW?~{1G=0CfZRRaSvgZ^{p@^tcI^NF literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/3_over.png b/designer_chart/src/com/fr/design/images/toolbar/column/3_over.png new file mode 100644 index 0000000000000000000000000000000000000000..bd9f6497e39816a71eba5585f454a8c00ed1963b GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|+Sw7srr_TSsex!|LO z^L!3*W^=ut+vDs0r!Q(<=xz2kJw@^A17-h0X)Y#y|M%&CK7LkbKFMbPw<%sOMT294 zjL4Cuz~+Yxa+OEfC7eEL?)muQY46&?N7FrxB&L{6W%;oDZ20bP0l+XkKzlU-o literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/4_gray.png b/designer_chart/src/com/fr/design/images/toolbar/column/4_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..4c4958c209e795a8d25ab0e50c9c0917105ec8a9 GIT binary patch literal 347 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|*ud7srr_TSt}nDFz{ z)87@9m9ma+`sMBa-Pm28|7%a>XR*ZK(@yIat`1-S?8o=__t|4!%{*cH<#@k*#n%l1 zrvpk#eYO~gEa_vNzv%RI{liDs$L@C9vQVK^=ZDDN+TYWd)!NTqIB?*A*n+Cq9J{1L z>BjpKiptB=1w=)!9u@V`d2;O6>+9&iN`ki=wyZeN8^3?%65RcF@Pir@SyzMdkRRLz8;8vN7KJ r!K0DcdDxWYsaf8gA5v;;0tpP7T904<$Y-bk`kBGg)z4*}Q$iB}6!nda literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/4_normal.png b/designer_chart/src/com/fr/design/images/toolbar/column/4_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..191789551058ab520a2106c0046a346fdef16914 GIT binary patch literal 349 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|+(-7srr_TSt}xZo+v zVLL}YHg|#FccWpY1@qLwYt}xZo*^ z^F#&qW~+|B?@qtJKf5nJx@cF(e-^W?I!~l_Ra~yS7Jo+Oe&Nb=rRx{u?du<1J?y0G zeDSK`#X|uTti)=%`0U&|>}`DaEL14f`5|Ka_s}V>$%oT2rtEID57=vBCU5v~vt+!% zPm4$+5AF?~kGa&uYVJKenEc^wyb{m${KtH1VnvgLIBfnlB_s!*XX;TXbrN*pOHfQP z-r3OE=$3Hhfnt_{vi5ORwVFv!PT9UGoO`Opf0B@;PxH*kxW|_~Joqv`D6KK&P}cs< s?iO~=@69?zo$m|oelzyrQ8>WhoqL{3!tLsBpsyJ`UHx3vIVCg!0FuUsJpcdz literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/5_gray.png b/designer_chart/src/com/fr/design/images/toolbar/column/5_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..9a1de0259199e9f6bb29b2f3aa37c30105b5b3b3 GIT binary patch literal 371 zcmV-(0gV2MP)KEQ8}X0&8&J_u9IG zs<3W_X*^yW$MH@lEX$IFVR*0ttAPYTpdARMbSBPgbp{s>+i& zE6DTwr5=A|c+)h!9}FP`P1BhBSg!s?okdY-b#2=M&bb*_eeJ#&OAEpnd-n0-*AO~d zxkB!?R#4aVRfy2{UGWG15ZG}XE^W6rg)04`hosHUuIp~2C@PHnd(&S87yyzBc#`NA RGZp{<002ovPDHLkV1io#ld=E+ literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/5_normal.png b/designer_chart/src/com/fr/design/images/toolbar/column/5_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..2bfa3d33bed4cc0152c66f355a3eea060ed0e2ef GIT binary patch literal 386 zcmV-|0e$|7P)>@%29wEeu_@dkrHCsRp0@cP3Sd)K;oZ6(QIP=u(6;g68l@1Jr2 znM51R)cR!KR|2uj0E*?eA3nb(DJXXRI>g2B3%7!|dvB2y#yb8Wt+zh6fSqDR^7&UnC7|h7Z{+p4RWhv2_38Upv8*AOXE|X+1C_+@k@JGn&_fJ`Y zOri~DYJIYAGJ#lT0LAj#51&7i6coFD9b#kng5;W7FHz`_01szu`A~~E;{X5v07*qoM6N<$f=8yS&j0`b literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/6_gray.png b/designer_chart/src/com/fr/design/images/toolbar/column/6_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..db9ff17d6c215ebb13626b0ebfa3fb89c2b809c4 GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|;dX7srr_TW>BKavfF>X-E`3 zsUulE^N!^?xr5w0UIqzR&2$XdQrX(3w{hR3OA9L>DE#~@ro48m(9$cu9EOwTMowGm zclpS?-}B~ubqVt7a$NZQ-tWTLYT1iXmn9x=d;hkQqjAeK(bku5C4XL;^C8(w^Z4Ng ztLGfY}Q@;eC+W1I&+8m`by2Ej}sl%Zq1mnK7Y4lP18L6_wo-CCDuuZR9zE3 i`?==ef(!RqB^ca9i%zke*C+)#oWax8&t;ucLK6TH`*Ugl literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/6_normal.png b/designer_chart/src/com/fr/design/images/toolbar/column/6_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..6218c91027318808a865b02aa94c1aea4da22b4f GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|+?=7srr_TS&|*^!v_rS>uUbStGqnR@>qEByiN(%(`D-uRgMNssG4T{-;dj{ChY*{JGmVvems8e zZ!tgOtB(G^nuG)F6L?t}ldc*YUf}4F;$i&Hnwem5;evj7jAVqz)$b3JnBsowm+Kk) z`F+x7*TMbv8V{!a|Ni-tLdTx^`jD0R1}84)oBMc}&3O9tAlsjbg~^{Y&Pkg}%vSQ- u_gqDiE9AUO&mwl&Z$V2WxPtfv5*Y66&4{e~tgZ<31%s!npUXO@geCweRCL4u literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/column/6_over.png b/designer_chart/src/com/fr/design/images/toolbar/column/6_over.png new file mode 100644 index 0000000000000000000000000000000000000000..a5cc6c056419cdf764b1e6eced06f04a64dfbeeb GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|+?=7srr_TSv(jQy!u^W$hiK`bZc>m ze}7Zd?moCLFY@8k|KF9B0xtLV+poG}E|KzLy0n^#^qEh;5}5y;*s-zFbP0l+XkKrKfh; literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/custom/0_gray.png b/designer_chart/src/com/fr/design/images/toolbar/custom/0_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..e3a78d4f12bef1f9e60993f18e1b0942e8c318af GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|+Vx7srr_TW=;^BTa(u!rFDOClysGt!NaxaPw)Xh@7ai^@=$xJz1Q)o}{u#>m5vRDCWtITgPBp zWdF_7-$c1pN{G)aY5phmxOXv!k2Poq_ICH_8@|bAl4U$ws~;qnp|wET>db|fzjr?W z(VBgg-!`GKI!X1LQI^2#Lua!lZr4B9p=;9q&ZeHN`c6;oI;jl`%d?#7T<@;F7MXCQ z_1^MFvnzCF)MWn_V+nurTin^nRi5kby7u_hKluM8esFGJWUx9Id$xB6Z!$0(7(8A5 KT-G@yGywn?osld6 literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/custom/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/custom/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..059e5f643baa6cf2893658f9902c4f69386d9f7f GIT binary patch literal 367 zcmV-#0g(QQP)AW4KwCL|?>-Z)wTRVpC&qZ};p?RkCGE+9pbDPBC$pc5cvTGT;BpW!swL=>mleyYHe^`cxM&Q-LzaUH8<7UxqxX12r0 zUA$~kS*%OuEWFd|;GC~`db2d$;uD@YKKdB&E^fgc!xCeOjZ3*!h|j&) zvfo*ECo6BbpMo8qNeQFb@r?ZBrIV5l zx(tZ{D!%Ne>Y2OFs~kIO=b*!LB)_qOdlQREkG_EPP9KY=1jZAlQ&e12#D6QX9@JIg z-dH8NLTzqDv%GV19k*za@}Y!?hmN`jjyNbEaLSY5o6+sgD|d*EnMH!(L85nB#x&l0 Qz%XO*boFyt=akR{0GzgaivR!s literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/donut/0_gray.png b/designer_chart/src/com/fr/design/images/toolbar/donut/0_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..8cf435bb1401067ed2c74f7ae430af05cac9576b GIT binary patch literal 589 zcmV-T0+CQk^N$?QCtF+z)TPXCH{(m3= z#CV(+?-h`SXtqEgq&Y4v&TZ*io-v&2%tXoFB`e^K-)C$)Ko_XV0*I5p@{#>#QO1_^ zmQo183&)-bk?9H;n?Hz{Selr>q@+CtFAAh+0}nu*zDhny5p$ygj*Yot*Jh(GjTAjf z#fX5MFP z!sQu##Fo_0v3ix*$Y{Q_T%O&@jKvj*<3FFgincbjZTpUAi#lV?3d9{#+rH^18gGo_ z>K_`fOaW{xv6hkS^pyQN^gk`Rq@)TO{G2j2;Zlu59uTR+a~Aw7@CbsK^Gj1sBU4Fp z#?%bgZ^pd(^z?M`Ek%ApXCb%)K8QtzG_t2wuTj@t^vF)Kx|g-M@;Z~9V{{C;!8bYv z(j#?nvo8qA+d0?f0mr_9V;{`|LZ800000NkvXXu0mjfdM^fU literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/donut/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/donut/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..bb561d1e56f6dd58558a6200789b2555cc3f9937 GIT binary patch literal 579 zcmV-J0=)f+P)S?%3FNNjB)*jlU~Ac?(T0_n4VVEltkDFk9FOA~AbgN>EoHnxd> zkbHo|bK%_OX4zdi%MQ>5j^qcJC##B}eqE;6lHSn@ zA$VikDSrb4g0tRd#FIas5!2^i}m&SA9iq(opCjfm-oF&Z%`&4Y2x>894uk z$8)m*QcJAcNHRTUJ%s<~6_=Fkf(AdwoSSiZxi-0}m*#*-yaV@4P-3zkQK{~vDX=yN z>{xC*ulF&Jv~+IJ5t{F+m{Q?HMPY87DK^U!RgYAfFw?_=`yyq(tn^mfKzgbJeEtO? zdAs1+JYd@oaK@wCFhAP4Hht04RMQ5RU%m}r_U7fErUEM}pC-Sr$Mjc#0RVFmpeC8m Rn%MvV002ovPDHLkV1jUZ`@jGI literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/donut/0_over.png b/designer_chart/src/com/fr/design/images/toolbar/donut/0_over.png new file mode 100644 index 0000000000000000000000000000000000000000..e69217b24b91487785032084e4e03b8994776913 GIT binary patch literal 581 zcmV-L0=oT)P)jKs-+ae-CBb}OzCYDI{GX_tl1P1^KggH@6ZJRdS2+N%gFXk zCXLu9XIRebd2CL!IefoNal$E7Hq4Pi^`!Impa<*>#WQrsKYs?Jv)M4973y;g=(RTR z;SEA~b;+^m`A#})aW(~;YBt0Cva2bj4KAF%4ZrHn3$LanR;<06{H89`9{~mcU!$2v TZE7?f00000NkvXXu0mjfL&gPX literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/donut/1_gray.png b/designer_chart/src/com/fr/design/images/toolbar/donut/1_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..d21c01965ac0b04199a19694cbe4b3cb9e820165 GIT binary patch literal 627 zcmV-(0*w8MP)!#VfYIp>~p?|V|cUN>~284Vq3|As{~ zHxC4ZK`X=*kiige(Rd^hkuayN^aIEM1#_{shOsdWu?j5U8C-*VVB#gGEZ;#FJ72)Q zL&yejQWB}4C;@rj1~jq724+D3IJxg+0z7BnwI$xG@QFo^Q+#APUK;EITCfIeh(hLc z$gJCV&dO`kyw}CH3=%yMP44DEob_oKNwq5w_E9a))%B`Q^)TzKS3S$B_cl!di zx=6(p%MGx?x*riaTSQ7Vp(5wNC759+q=&_=D3{A;7K_EokuHK^wh@B?H{Xz)#E77B#}hr{7-N&#KB6U}u~+Y?{6F)m&i>=cW|w_2@6dF~N8 zMiJMM^pMZz>$ltO;pPX@q84;~1qQpZe;$mqe0lH~&*$^6k|f=rdjYxGD2CB^%k!fg z$OOb7E=P}%?h N002ovPDHLkV1mSp6M_H$ literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/donut/1_normal.png b/designer_chart/src/com/fr/design/images/toolbar/donut/1_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..d006f15cb3f0d914a3121960bd3488eb4fc00285 GIT binary patch literal 661 zcmV;G0&4w{T&H8(|dw@1izC#JD+F3=Jq~ZFH%FgC}Nks#8G}ZFH>ACUhxSQ*;y&?Bq}t zbT(V2(sL-NV2CJ%79tTH#3`afYI67Yd)Ig8ktVTF90Y&(@?P$}|9kI$@BMd*lv3Qq zQpFvu2V!T{ls;%*5q^jlfCh8{A$tD(l~7=FcX}U413GN0Rf(}N4)F$P0FHrgz#iaX zmo=6K;N{?B*tZC20YP$3DJV;TqR#+im}Y`uAOZyVe}EBTn_%A@@74LlPK^_MWIA3F zm<7n;EzpQ8G%kn6dL!HX?3?7hA?6YaT@Y98Mu2tJhd`33)*$SoUToU_wod)1DdTTP z*6iq2mJal@o_6U@DYjU?1EyFXM@E4PnNm-v$ywkl@REa&9(ShV`t0XMT~n){Go1js znPU|MeLNvq7k3{^dOi|9KiOaKJ`RnSlz_(VvuoV!mEm#g z<>p-gAAg-56s1w1I@jOS*eFI(^jL8ApyN?O+mpv6~t#=UF{rK-U4>&9?`+~UFlX&W~+|h0!yh5hSM;}5l=TW&&6B_s$HPld^ vrwGzkDLarIq6d0ry7SXt=6m{U-F1W_D*Gpxncfw0AHO|23a@~L30T;Qr?3om~?ZwTBqjHeQVY4Yh zIf%BTsa<3h%1N=%_vez@f%GQztsMTbFI+c zQMV{c5gGvv@Br1+e>x(@Ft%VxO#oMbjO_A`Al^Kr<8R9LqRr94U8=b9-s0;0h7BLgyHNf}Bj-ivt1R30NnU zSrs^-45VoVPs86wJ8WQDYYdeMC_#O_alu_4tE7uM2@S_p`Zy~nG%k_C_Y&f zvdjzFk6YHm9$=ZD+py&_CpNMIpd!z4ZJIa+*`7DW&o}yEQH55@O51^1<`@Qn#znff za9fL)Ei{Qpr0-&zLipZ@&E&&S^6F%(*we7Ylg4=>9k)G)i?qkb%?I>zp*K>As3DCs z&7FAn*m&tiK~{V-(Mor9{f7O5Ogjl8tAdf i`t1+Hf9{+2D!>5Jv%?ZUR5;@R0000bP0l+XkK*LH1c literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/funnel/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/funnel/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..fb50bbe29a818cf89a3b244fee3ecd1c92816805 GIT binary patch literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XPJ6mIhE&{2x-#ece|u(L24Uu2h7%8%O$@#>_{P>uV0$Jf z!<&4I*-ap^eEUD!2|^1d&6MZUH0L_hl%ymoYb|K`TzA2ugWM0;nCJd$@M_a4Z3ONtS37Icg7i9AmPR$e6>^1qdBspcmv}taB1u-*Bv!^L8Y_b!W za>DbZK!EL!Sf0|Y%oA?;FFDxfa6L&R<;;zcdA8Nx8aHnI=&o?NxnW_egL8Po^f`ZFT?v literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/funnel/0_over.png b/designer_chart/src/com/fr/design/images/toolbar/funnel/0_over.png new file mode 100644 index 0000000000000000000000000000000000000000..af504b8c788bc215d2c1f11e09d089f1ccb03886 GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XE_u2*hE&{2x-#c`y&5wwgD`V1!-)scCI;WHt>_MnshQ07 z?B0@@-I;6>jxBfZ{;E?r>Z)qIUp6RDr-k*Xot9OZe9<{;H`nI=gS>23e|0BV`LR0p zJD+vZ)b0yBy;XyaIhX0_f#V_)za+BQu3gI2XJvc8G~UXMEi*II)WK`om4q3l*A(>OWrHk(x4daT{{OdUV_Pbc^Jq!JterDhr@K^D{i=^CIA(>OWrHk(x4daT_W#x*jGOI5aRatd;D^4DgtB0B8w=r>mdKI;Vst07f=PDF6Tf literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/gis/0_gray.png b/designer_chart/src/com/fr/design/images/toolbar/gis/0_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..ebc7c23cb0b7e74a78554743525527fe7df581c1 GIT binary patch literal 923 zcmV;M17!S(P)U1>27^I+czD=ClG^0t4VK@e0RRom_M60CQnUa$LLOKl(!P;GB-GpEyO zhPNe2V=5(LRQe6!39uneU}Z%Q^O}SiVI8+I|_DqtrvtkR6 zX>3Ln8$;xexIRhSYG#2$mW5GTL_vipL45>iUqTQVK_B+xMn%+G}7-se)H zD8m03w34y8xw#S{B3`eSn3ahLfmH_43uM1_wZs%j1&MAM|Dd|x*%#F@F+Nk2QA;+; z$;oN`8{$gTEeJCroAL&MZ?Z#l$G9{px@Am~9*YqiC%1wSuWFM|(<)=hhE(L`bv$X@ z#eW)k&rW%O9d~!KX^9D3zcVRdb8^HVOo)Qfirs`o9zaSYIj%_ndMCiWVw`BR5L~*Iir?}^f9S=j$W%_gpnC_xE(hM zuc#&ECY4;Giiwkw4-imFB9aE3u)vg=c9aMpwm-HtwJcl5IPzrxNdq(IgN4BfPMvDd zP(b;mMxsCrezp6^oG#H3V1X_~weW-~ci0Vqs(RZOyHe-fM!X@4H$yKOoDV;6-l0hj zqryCktiRjN%~rpPap_g-yNy0Wa)vqEkg_ICqffAyGd89x)^XS+6rp&kdEN{BhvD~P z6dNb-oL>FSVZ?}~AYM=dU^TPg=Xl`!ZfV`7z1tx(Z`(|$t}*B3k(WoB1m+HI=+M=) zzeLp}+YbRn(a)IyRePdmikecXJM&9T3=Q1=*g^WS@d%XptQv#L7fNY4twbzDvENZ# zMc6`)XTd(9(L2yIJiX9w9dp-?m~sO{>vj&`(;dIxGamuWhATkPDQG{6nDz-$nT@}5>RJ)dbsEZ*avb_7#yr(2 zl~L9$sF9n15Y)(KqLcX=B&L3QkLB)xKRuVYuoT5LQuoE_i!Dq@r%A>l>li|nB>J(wyXh;fX*Hd z$tQLgnFJFjjRhrf$R8RzUo{bF8v@%^*FgWdBEK48)OLsZ9Yf4{0?Wh6JS6PN4I}Ba zTTGIf@F%zG{Uvw(e08rGy}A@tMONjIOa)_!B?B8rQD;wxiIYvYvP^0`Ble8U*oTLx z71gX&ZgkLX)3Zidd;n2PL?jixFu{~K@(V?fgfhX^HCKZ;)!L;pu)ZKnbPTeF^du7j z5}``qNmAr|^9mnLi0aa0m=5RS!Hd;|V%_jk$2 z8AV<<&(Q3NLyrkv^O&?jdj0s$1MFsV2Pw1fgpy#pDM=qxCDkStjoc8zQ?zX= zd3mHod=c&x0>cSX*ca~ZaTIKp2=U!x*R=%4nEZ$R3u}+2wYgP}*~BIVyDS|Sf}ZrV zGI_b!3NIzW<%dx7m(x}IfiM;vzec+}D9U9v`pRn&(4esxO0|g9TTLz@N{&!fJY`dw z+=e`*38(TYk>fdFu+Ia?vP?;M@tus7TEv-AH`H9umQ9PmFp46jngI$@X5=SFl~K#%-~Bae zuh&4~p;Z7M`Y>yg==Dz#e@03h&YEs38!_CtUH0L<2heAfH9>;M1&07*qoM6N<$ Ef(jJD^#A|> literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/gis/1_gray.png b/designer_chart/src/com/fr/design/images/toolbar/gis/1_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..9d4bcfed45bb87c66742b104b79547ddaf7757d1 GIT binary patch literal 892 zcmV-?1B3jDP)>~rLP$9HOBqb?kd-gEt&&pqdJk3zj( zXa8d<+HG!bZqCE%u(h)SD>)DWB)QRN7mp{;3M^15h~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UxbQt%LNn)6u`89?EHfZZzg*+mU*r z;j5+-dFH5+4r@lIQJbyX?PTbn4owT<5k6ewrhZJS2X@jfk+2%kN}_E;T*GfuWTQ8R zRgz^Jr0RL~+O4X*(AJSA)Er4{3hPkY8LBjOq-_F{FQIveSc-f+;|~8d%!IrjqyJ3S jmPq8${rF#v-vSH({x4;O(W#*>00000NkvXXu0mjfAOXPr literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/gis/1_over.png b/designer_chart/src/com/fr/design/images/toolbar/gis/1_over.png new file mode 100644 index 0000000000000000000000000000000000000000..337ae8d2ff2b8dfbda26621b5d9f943e07b02283 GIT binary patch literal 968 zcmV;(12_DMP)-xX^_g1wmZ6P#1!_a3L-f zaUm33h}{%)q0rW%P^uuJqN&xk7LAEjGi}=DXYJ(EWIo=PP9$wcv7!$yXXd>-=YHQE zN>x?(AB)x7?C$Q~gRmRLS65ee^{k>{xP`UFP5ofq01|#2IofmvJz1b~7Q@b5zibG!+%k+U{QiECmLq z4JuCT;^ozH%3U>u>@OKx)o$p@3rR$0K#eIZ(6#tjd(gH1TN0!P?ZWGEy>>gS<;Kmw3IXO2XwCp-2R4Fn zQ901bEM(u0fOxGFQeslQ&G<5*68XE7o}3KZmMVdrry>d40!zO42aZ7Vw01)S9)#nz zwvWKS82Y4gET`~>IVNAsiXKx$=RP$EpR1+<4cp!DX5~RR%5;H$@eb)>#7SSN?tj|2 zadpeg;*m=N6FU|U&28@O$Hy{le-%&^-Np_ zZ0p!O=ohV98v*o*6^@M{bfRp}lefx#<+1ct$O?)igCaQ9zOt4XjREnQ@~&djlWmVb@s q8u@wjK0hN;n&-vy_+PCb0t^6tYhcX$#C`Sv0000t_8i1QK5|+1i2Vy9TSuEx#Mn-6`h63qW>E=B0KqFaj4SG*YEuRZ?v|GX~&1_0ol=ALOz!2$pP002ovPDHLk FV1nF&!?pkb literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/line/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/line/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..764b9bac97a5c13cb379bd8dcccdc3a2a587373c GIT binary patch literal 474 zcmV<00VV#4P) zK~#9!%vB*$#6S?-TpygOi6Y1M(;<-Y$c2yMG3T8Ymsu_yj_}l>&ugp6p2+7PqADB$9UGl&#`|7j)1eR$4#WH z?69}dV+Y)kln&Mc%RcbsW3(i`AZlyfre;Z7_HX-#n4NqE9lQb`z>5m~RxHw<3<-`3 z0I$9Q?pe^21|8f2=PVA6VrUdhYJF92@TvX@IFxEHB$sbhjJ`#DxgG@^r=&bmd|a5RY5ddY*9@Mid%&iLQ|^S%Wb01|`HNooOC QM*si-07*qoM6N<$f61Fzsl9${4-rnAO_pghps&Y+?*flg-brbI1x}+(^eISX~Q3iBOZ6DLy z)3JMqS0vq}vJ-EewH|Q4P84%xzzE1mDzzEZPL~qX>RzC}jp-05#4_dya0(nqZE3sF zUJhjVoSMfOP=ZtxJIq410et$JjL2RP+Pa|4XUUO|F6FdIJOIgua&Qj3126ocpTs21 znN^|cqPh!w0e6hRKa>5EYv~1rx*}t{6uOADsDA{ufVLv-&_ziHLm-v2St!OL+&nXcUG}SE&rbhxgF@}53CFqvR(fsLMYtg5Dfa6kw2EsZ{59i$|DX3QzyO0c VmrHaIFPs1X002ovPDHLkV1n7I&Q$;a literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/map/0_gray.png b/designer_chart/src/com/fr/design/images/toolbar/map/0_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..3865ace7446396c6a113d6682785a24c6f406801 GIT binary patch literal 389 zcmV;00eb$4P) zK~#9!?3B$Bf-n$;#jyZ7paiu8JCF{@jiZ!633%irR$#0^O27`Z1FZnxIxkGXpFw_Z zW@aa0nS6OH`{I;kIT>S2CnJqNxEeFF2*WVLyBVB=nkHn$n z{<9p6&>{km8=)&qPjSe(rWC6mgv}8f#EBq*Dn5HWw5qY+v6O3m{?5u3HrVU&pCW60 zL>XcmeC+}DnrdxuK2{&=fq1$GMqMPa?+M+4^HK_dOUo>IK$n_l_Ji~7+N2wU53lct zM4TpVCxR%hZfSzV(u$TY*h)DK6c84hpKU%J`z}o{)WBj-suU%PcFmB}RHl(j-l$i+ jXWEtGf6)&z9s&#imF!^hI@^UR00000NkvXXu0mjfjvtsz literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/map/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/map/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..a1492da8f0d32aba4c234ac9833a4ff74e441998 GIT binary patch literal 387 zcmV-}0et?6P)8c6i#9fcY3gL?Tu4FkvT|fo7#K0SIo3vkvI2$xhQp8R z&$Ka=lM{g48S0~ZIR~3-Lg6=XYzD2N6N3mE@!aE0ix>wjL%HPRrn2 literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/map/0_over.png b/designer_chart/src/com/fr/design/images/toolbar/map/0_over.png new file mode 100644 index 0000000000000000000000000000000000000000..dec831942ea1e6940cb45c981aa8747193ef8cbe GIT binary patch literal 388 zcmV-~0ek+5P)f>pAWY?XQxXQX1aYQ(oQ59UB|M5MVh zJA1RoefMsUJu}a9qYoPxJ=q^znpF%YJ7bAp!!!8#v@+7RFfamyG1i6_6CQ%kc^5uI zuE{R4Fj#8VY8>LQ7_BlG~yQz--_)#~`YtM^ z)7Vro#Z_CHAe*3+$J+B^9p(iV6_;Hc9qTsrUZ{YjJ@HY@A3kKe9+6X2rjR?lP#+ep i{81_X5B*QRDiBW`rG!|4c;w(nIv_W1Vh1?m#T#}IE5Lsz z|I4f^1jYvd@i;1W{?3kMQ=g{9b_9s~m#V|r3cTW08jm#pAY`P=|r^nwj^%WRq>GG%ImAMgVh zj*`U-*EevA$219X0=wqz1>!3ERumeFfDE=60yBY)VeG*GNaq9Cmz1x%-{4s~BJq^5 z0a<$~R5=gGAXQ~H-0&Ut$OhK%*>y-Fdf&Q=ofHx0()c@_&tdoMLER%!saXyjP_N49 zC-)x)5Gc8cU00000 LNkvXXu0mjfQM<)< literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/meter/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/meter/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..62327bb2b8db2150e3a5af08ade545e476b93a8a GIT binary patch literal 463 zcmV;=0WkiFP)mtL~Ane?9$7{&bz_3g2a$H)n`ZvDc&|--RJ9f z^%%eb*(_zCQRk9Y7Z?WxE$6b>0=J_Ke0d&Bq!10a(RA)ivdntqLU>4?Nr`i5k+ z8LwPKWN>CCTf(1Ue3AgtuC6NRlWUd($J`6!k?%skC0c$hx~@F=m-{T)=V`%;;`}#xSWvf zK=p|pVqhj3U2#)Jzref?)-3t2OMKVvZt?&Bn%w#lU;r2qdBgIbU{L@7002ovPDHLk FV1nK2%N@=V&1$Q{ z#~k#`0hb9`Rb=1SO>DV3dZEN8VBQCFrhKW0?cCfg;s0NgkzWA@0HZs4$z_UrB>(^b M07*qoM6N<$f@NaLJOBUy literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/meter/1_gray.png b/designer_chart/src/com/fr/design/images/toolbar/meter/1_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..ca7262cdd14534e082412972d2414da71eddfd02 GIT binary patch literal 542 zcmV+(0^$9MP)>DR z2`Sx?!hh($aI%~>Mf9X!t{waHoqgx_>$>h8!%o^hOeT{MO-x15fS#v0 zeV@mG-k?bhtj%PT6!2^>7|;UEh}{n;qlYoaN=6`?UvO*zc+v`Xptsf&e3J-z7)#l| zvCD(|hWHlbgyr>Oy z3Ms%ne}&52lKmCeY&agfV6iE@ij4OPjG#ySeC6Ud%v-CMTr;&S&Etsel3^DXisspI z{zZ?69ye>1r5+E=MAu@^*q84PEGy_xouOx}>RQrLK?7b!MK24MYi82Wrk-AA%wsq= ztj1$Kp9koj=MjS$MPNdc5YC|F z4^VwKwt7qf!>vs2&KN;gXky-rRHF?{y2vFh*qz(D-{a}rJVM#Q&!%1&GvTmj^QaH~ gQU99$!@dO=0MrlN91oP&0ssI207*qoM6N<$g6%!->Hq)$ literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/meter/1_normal.png b/designer_chart/src/com/fr/design/images/toolbar/meter/1_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..bedd67c1afcf60e3423b01b086c56d6f5bba31ac GIT binary patch literal 541 zcmV+&0^CgzC+)IljZaeA}4)v?btux*>~=sX_}x9JL>vySp*T9go>ddKW(4|REgfwp!TgF z_&f&m8ck+kT_&4kfag2GfR<>+?0!HwJxn-OF#_5AjAL`aC!JsidSgAoH;Ev?SjPT2 zH=Ft3p%cDBQ%`smC3COPl$?|D`;W@=fQ$1&Rl!!9ip&6DH& zvmOsUZr3VHJsz5gt|gwaFW((lR=7uXMxL>H-;$OJ8uBt~dRekubCZTP_4G0m9>b|& zwI1vF+(Yj?r^tjjf^Mmib7Y#Tcb4^2dDvMhrhq=7i>`-dn}M-niA!;np$SbwIDsaA zfa<%k(PIi3Zf$aR#t8O>PRx6eX|$n97rCT4yM?X$9iA5E5y}sKHub`o35PwKy*~84 f{x$uFeG4!Eg`vK%zirg&00000NkvXXu0mjfIbiD; literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/meter/1_over.png b/designer_chart/src/com/fr/design/images/toolbar/meter/1_over.png new file mode 100644 index 0000000000000000000000000000000000000000..6f2824dfeb5ae23ff97d8d1a7bfef2d67291cf38 GIT binary patch literal 542 zcmV+(0^$9MP)}aZrF*L zqDc8J`HsC@uIZZ4mwb8ayZ63(@7}#zuc|7q3km8L&K|u!R6@i+$fa*!1t^X83$Jv= z_goo+^c*S`WObr9$v~br5`%OKHRR_8$eCe6n_>le^N6+rOJwx`y|4&l;0ix)8T;SxPQ*k7Mc;%YKoh z%u>pyIUcCBj5S;)<4`!-k~nNXt{zA(e~;~w8gNuvn1P2F4 zZ)s`i5nOs1v4wGGXJ`1^w{K^B{P_%U2RKxV5!)&Z9?I0|SFZA0M9uI1NTN6l5R}hvM=sD42kj z%n=h4Q4^vTeg4tp=}j$kskm6002ov JPDHLkV1kAB%5?w$ literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/meter/2_normal.png b/designer_chart/src/com/fr/design/images/toolbar/meter/2_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..36783e9e9a692c708c15c1a6842242cac905a9b3 GIT binary patch literal 529 zcmV+s0`C2ZP);_1gK&ezS-yb7=h+{=U2mpHwgF)qi1?R&KJ@)4ZDKNMZhy#JC;{ncMb7WRc009O7%l4%| T&+~9^00000NkvXXu0mjf;BwjZ literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/meter/2_over.png b/designer_chart/src/com/fr/design/images/toolbar/meter/2_over.png new file mode 100644 index 0000000000000000000000000000000000000000..76f3404b40d49b8284443575492b8aa5a3277352 GIT binary patch literal 529 zcmV+s0`C2ZP)9Io&Gaw`4$&kR<}#`yP-AoKTod`v%f zPYYMRgG(MmZFMRNi`Md>Tf^_7QP6BU;g102GPLSKTbiOxB#Wq;0A+&0YuM^ zP}obZsjx@`1qc1g3Q*c4*C1e|31b)x%9pwOt3LL2pr4i{^oaGCc^Xw0wAq56o zB1an5KjlDj<-0A&5>C(0R$KTw!fy} T<@1WS00000NkvXXu0mjfGI-~3 literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/pie/0_gray.png b/designer_chart/src/com/fr/design/images/toolbar/pie/0_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..c059182399d789e3f13d4411c55e66da9bfbcd9a GIT binary patch literal 388 zcmV-~0ek+5P)MKMGdQ91@@n*_j&|cU}<2EpouGn&l6eK5OZeux*nz4gExC?}8%j#-`JTrkt}7;FW> zHU=9(@Rz0INdBer2H%^4Le)1Htf*H+rJ96N;=nxYFb7HkbX5By(7@7B#YsRrRsa`5 z(2k|~pHS;71)ybUqbhFn2;u|FeI>L8^qlN&IJjWBu7M7#SEWW1cRIJg{XCh+b4F7_ i;pAviTMg5X00RJ-`DtSsOxa8T00004Gj mLq=0TVee>Ca}Cpv00RJk@LWeqk-@kC0000oRcb zajyNzbI9S8WXILUh-Xns&Q<|AY9YTk1@5yv+UxLfyNfiBi2_fShMofR(Q^)46%L0# zG?iG;lzuOecx4dMyzt)ig$nx|s%isx+`2Tp z8jY{$?C74ma>k`O6M4gyFFN?@1l#F=iwPSdeNGs9PM_1xwy#-V zK~#9!V*LOAKLafQ69bLFsKIc+f-aDro-P2S0)W^7hz)>PA0$3==1fMQ9CA!w1mX)o zd;lo70I$J7jSWDm0EqdCaFjk2#{>0E0McL#wB!RkC_t_RVvz0iL>h_?_@R0aKz$4k z;|(w`Qwa2-X2A`%r((R>V~sohHm`+0F&7lr)22y%JdNRx~jK~9OJ_S@@h9u4dXP)5R1Xc;3E)E0AZlI4{(E_t~>y99X3F~U}Rr7fDDI) z@dkW`k^uCfX2B!Ro{I5ik2UgefQ?YvkCm~$H z$?fNp%YXj={kSJTvP_u>9ZO=3x5&KW8AJ$MFB(WFXChJ@S~C zPa)d|R`~y~3y|dk%n?OU3yCa!fM&tcF%v6?7tnP#DNeyaGr(q{mlYtO)Nt-IHm?yd z@C(qTv+mXD7h^4iU;r3_IlwS<00xf^&=PfAt^*o&1sDeh?$+u~!CSfwiGm&=zyPQP VpinGrQ{w;t002ovPDHLkV1oWF**X9K literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/pie/1_over.png b/designer_chart/src/com/fr/design/images/toolbar/pie/1_over.png new file mode 100644 index 0000000000000000000000000000000000000000..09a1c2e5037e8bae13a86627157a0edd4fcd771a GIT binary patch literal 536 zcmV+z0_XjSP)ZlIRh~#5ss39VoRXDFd)4bgn^cPgBuKWWiiZkWB`yud_X=0n$-(3 z92Ulz6c~!`i%jImQ=?+MsbP&g9N;39?j>d&V_;B*xcJ|X&oMt9U);kXtG@v1a!?El zlVBjocYA+6x%~J4-`}9f%R_|m-#;$EWU^Yh`LYzdjP4fn41&#dunYn;kp2I^zZMMt z{wmv*B7ihI z_Q+#met>KnSmFP_nn0E&u(Wo8T1aH+12hYkj+t0FCIMadlHwE$Gy`lFh>2cEU~I`m5nW*s3OA1Udr4Pz@M7z%cwTj>~mG!=3`;;MUz*-TfHSL$1yP a2rvLlER~Mf1j8c$0000##(E-V&UiY*qjG=)m)IrzP#Rr%4IoZkEH{l4?Qd+vF+CHZ__ zby{0pT{WYdlgIAX*4Ef*Ii+VHwV{gum4b-Oo!ClFsu%=rbdP~IKwPFxzyshVDj)u* zia}Tbu*v~o5CrVAgp3Ed#u&z)i5P)abkvXuRuE169wT#BiHS+h@x%xiMYjO>fo2dy z3J&ifA!C)SHB0P*o2T>)P7ddcLu-q2Y6FZEdc)y84O3;doI{ z5Vhv>B49)QPDv;fY8Fyu>k+5Z$*OERoo+0f&7LnWFaKIoQxhi1=H_NgI-Rb>+IOst zFxTVpP>v!V64MqtfM<4gHWQD>uVLJ)(P$3q>+63QjmBsF{rzLgR`KFdpU*dvOeUYM zt*xnZx!gHS&zMZ64?R6SdW@YUSK}uthh^H|-?yXJc6D_fn$2du%mJdg-w#G!6zb^c z@Wx`X3KVx21@($81Av)_HxD$@MyXWlIujF#L=IgN@PQyEer_Z<<{Z};g95(o?d?&5 z8L=Yc=1ENJ)KMd7#glf0!(kl`OO3z^@iMFL2JXmsK-TDOFLrvH?hu{p$XP13Sr=cb zKwO% zCNdoDK<0iCBY_XQiX3bW4Gpg>7K>_mdAVhLd|U%>D>oXex78iaE4N7OuemNZ{-4O00000NkvXXu0mjf3B$Ip literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/radar/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/radar/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..b8fa242889df844d98128f879d15ece3b3c8494b GIT binary patch literal 976 zcmV;>126oEP)8@jokv(87K;$OY+?EO3EdC&Wt^SzTLlS$#A z=61Uc=!SUOP*YRmJIE*P5Tq7#ULc#{<+XjAY`=&>U`N*qJOLJYSqC%&_Yry9KSc~e zEkIGW09FuCA0zPCN_%8Owud5yp%EQvNDf92_3gCbH6z>j*k^BI7<8c<1)M-72)vTy z-5~H-;Jr$=9cAC`8uN7=z*)csC%b6S^JdOA9aZ&s!kToNSE)mrC8}t9`#F8DBp}k7 z=3{^b{y~|`<*H;-@#@~wj|Ga#k|mFKM-mEkZpOxHxjN(_l8<3c)yhUjHul2U>m=VV z)|4FEc!-$FA_zRXJ5#zo70s%~*qoWRm8d)VBVMG8-m{qu-Qrboa98hJU+3()>h}0r zjv}^|Cdcw%sVefJqj*Y*@pU3s;O8?ZONR)qpwDP6oJrJbf^^tb5Do223?JlbF8J2( z3Td?i-}5gbATyWcIAEZN?W~Id63}%#=Dda2WnI9}H5=qB>X~R2{5yA#tX0 z+4#9G1(4e{ip|Ns`IE&D-_4d|-^o%f14}ffH7>h~my7u;=rw#R;_wrvSjSF|EY(8s z^txz5oPRZk`9{;7R0 zYRbML=Gyj2i>HgtbLm(>xTg0BCCUgT?p1AnBKb6+U-SP`9wCG0ffEHp#!0t`(e5O6 zrlR=!TG^EH#8{ijARA~@%P=omPsr~KujKhVzMc|pO_fD3w-Fipm_>beiy+xTPx=_`@ou;A;Ut9?_LjZgW4cNc yC)9q>-;czmNh-r`5z{qih5u_s(m&bX0t^6+tda(0{Zya;0000_hW9tls2W5bU_wL=a6nfT85zm$mT^u={79uVw(flz#&-K+$Xj6=7J2A%J`mhrIi+(=L@qwgwJAa+O@ ze%W?XKbYc>nN#Bd9+E>6hr^*~QU!z2}i)Z*P6 zoNAbiC{KU-t(7jvrBtWUa%E_`{h&J&^Liqe>GQ9^YzJ`mK8L#db1 z7C!Q RoU8x<002ovPDHLkV1l;@)tvwU literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/range/0_gray.png b/designer_chart/src/com/fr/design/images/toolbar/range/0_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..614f6f142b9195923c13623e21cfe744db1bc938 GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP*J9*i(^Q|t)xHy|JyU`G6*yG z9$0a(;6Ty0H<1-@&dxIB_WAwehk=Ku=R%E^lS`K_6+9}>oBYc~uI<6v=seVMh*XEY=8H*^neyJWt1|}Yc`Iih0zF5U?23pGC M>FVdQ&MBb@0J)V(D*ylh literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/range/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/range/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..0877a3a74d48aaa17c48aa86e1284e6669d303eb GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP*I7ei(^Q|t)xHy|JyU`G6*yG z9$0a(;6Ty0H<1-@j>Z|WT@LlyE@4t>w^*a)r0z9qZ;^VFo|nRv9CF$!OnG;A9sTh3 zzj4Ua0LvX!Of_Q3$;mCxyal{`eR*eSsRZ)2ojQ0`_(8v$+*{r>8Qp$&-eU|5jBE_K X+jSnX`hHjkw4cG#)z4*}Q$iB}gab@^ literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/range/0_over.png b/designer_chart/src/com/fr/design/images/toolbar/range/0_over.png new file mode 100644 index 0000000000000000000000000000000000000000..c94bc34cc8cb1cf2d5a6452431b71a561a35dee5 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP*I7ei(^Q|t)xHy|JyU`G6*yG z9$0a(;6Ty0H#cV*_`Ok0Hi%tX((O3;xp9}%j5|qtH@kdvKRm;3V*7)QPD&51t&Qfn z|IgkzlyhqHYV`x@hGu4N8T(ikUb%9mVWpGM)r1u?F}95VGM-$#mvHRjr-~~HJPZN} Z3?k7wHRWfxuL136@O1TaS?83{1OR@$RH*;} literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/stock/0_gray.png b/designer_chart/src/com/fr/design/images/toolbar/stock/0_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..acf6a462cd88615d54b287969037e6ef70e1aa23 GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP*H-Xi(^Q|t)xHy|JySgD%je} zt|@qSW@gWk73oO}gcu@uHqTkbcKOWF7Y(fe5=zzmQ#Pb6bi0xCnE#-GnmG^qnWKx@ zF5gRVi+JglbFP^&=2gO@#fd$V$C|gXN&aGEW|3g{T5lHb!seEA#n>=_vq7gV(l4|*^I1~K0VfTfiF@6>A~pvo=WP7go**$pr3zlk^Cnv)$b2z9alu?d;Q)i~VYRK-X3k0i+QZ=K>gTe~DWM4f5cfmw literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_gray.png b/designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..b755a72268c0c038a46260c44ded33d303b7ce38 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|*rc7srr_TU$aL`5F{>np5ka zN**w-(5*Vq;&UJ>ReV|E*=uD#qE_D)tWs5MDUsV)`z*-o7wZn@y+slgSEd-bHfL{N zw&eFj^~yOmqkOVp(@AOitGK&a!|sO9Amf?xuhxZbP0l+XkKx29>6 literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_normal.png b/designer_chart/src/com/fr/design/images/toolbar/xyscatter/0_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..d29e0eabeb96b7e01aec896792f0d7bfce6fd59b GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4foCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP|+q&7srr_TU$a7@-`^&uskx! zd#Z9kCGV*f2ODpgR{BJ5j;9x&?TB0L%#p>i%y>rl(?_YFFXx~BD0Wz6W9lO{p_LU* zc70-PleH=)XmMAoiT!ecCgcZ&X-ZbzeGRdewBh^y)g%AFc;|{|2qC3)~mB zy5(1pu+dYC)isG{cnf{6iZWJs=9n&CywZd#c^Y$};8q0=*JFAIqWc2v?Qfl%kvCy_ kz)jYQuC(>H6%Q~xeHAA6@%fn;pxYTdUHx3vIVCg!0Ke33wEzGB literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/mainframe/AbstractChartDataPane4Chart.java b/designer_chart/src/com/fr/design/mainframe/AbstractChartDataPane4Chart.java new file mode 100644 index 000000000..f7c3ca189 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/AbstractChartDataPane4Chart.java @@ -0,0 +1,244 @@ +package com.fr.design.mainframe; + +import com.fr.base.TableData; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.JSONTableData; +import com.fr.data.impl.EmbeddedTableData; +import com.fr.data.impl.ExcelTableData; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.*; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * Date: 14/12/3 + * Time: 下午6:53 + */ +public class AbstractChartDataPane4Chart extends DataContentsPane implements UIObserver { + + private static final int DATA_SOURCE_GAP = 18; + private static final int WIDTH = 262; + + protected ChartDataPane parentPane; + protected ChartDesignDataLoadPane choosePane; + protected JComponent choose = new UILabel(); + + protected UIObserverListener observerListener; + + protected UIComboBox dataSource = new UIComboBox( + new String[]{"JSON" + Inter.getLocText("Chart-DS_TableData"), Inter.getLocText("Chart-Use_Local") + "EXCEL", Inter.getLocText("Chart-DS_Embedded_TableData")}); + + protected ItemListener dsListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + int index = dataSource.getSelectedIndex(); + if (index == 0) { + initJSON(); + } else if (index == 1) { + initExcel(); + } else { + initEmbbed(); + } + remove(leftContentPane); + clearTableDataSetting(); + initContentPane(); + AbstractChartDataPane4Chart.this.validate(); + } + }; + + protected AttributeChangeListener attributeChangeListener; + + public AbstractChartDataPane4Chart(final AttributeChangeListener listener, ChartDataPane parent) { + this.parentPane = parent; + this.attributeChangeListener = listener; + initJSON(); + initAll(); + } + + protected void populateChoosePane(TableData tableData) { + dataSource.removeItemListener(dsListener); + if (tableData instanceof JSONTableData) { + initJSON(); + dataSource.setSelectedIndex(0); + } else if (tableData instanceof ExcelTableData) { + initExcel(); + dataSource.setSelectedIndex(1); + } else if (tableData instanceof EmbeddedTableData) { + initEmbbed(); + dataSource.setSelectedIndex(2); + } + choosePane.populateChartTableData(tableData); + dataSource.addItemListener(dsListener); + } + + + protected void initJSON() { + choosePane = new JSONDataPane(this); + UILabel url = new UILabel("URL:"); + url.setHorizontalAlignment(SwingConstants.RIGHT); + choose = url; + } + + protected void initExcel() { + choose = new UIButton(Inter.getLocText("Chart-Select_Path")); + choosePane = new ExcelDataPane(this, choose); + } + + protected void initEmbbed() { + choosePane = new EmbbeddDataPane(this); + choose = null; + } + + @Override + public void setSupportCellData(boolean supportCellData) { + + } + + @Override + protected JPanel createContentPane() { + double p = TableLayout.PREFERRED; + double[] columnSize = {WIDTH}; + double[] rowSize = {p, p}; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("Chart-Data_Import"))}, + new Component[]{createDataImportPane()} + }; + + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + + private JPanel createDataImportPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p}; + Component[][] components = new Component[][]{ + new Component[]{createDataSourcePane()}, + new Component[]{new JSeparator()}, + new Component[]{createDataSetPane()} + }; + + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + + + /** + * 数据配置面板 + * + * @return + */ + protected JPanel createDataSetPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p}; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("Chart-Data_Configuration"))}, + new Component[]{getDataContentPane()} + }; + + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + + protected JPanel getDataContentPane() { + return new JPanel(); + } + + + private JPanel createDataSourcePane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {DATA_SOURCE_GAP, f}; + double[] rowSize = {p,}; + Component[][] components = new Component[][]{ + new Component[]{null, createChooseBoxPane()}, + }; + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + + private JPanel createChooseBoxPane() { + UILabel dataSourceLabel = new UILabel(Inter.getLocText("Chart-Data_Resource") + ":"); + dataSourceLabel.setHorizontalAlignment(SwingConstants.RIGHT); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p, p}; + Component[][] components = new Component[][]{ + new Component[]{dataSourceLabel, dataSource}, + new Component[]{choose, choosePane} + }; + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + + + /** + * 注册观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(UIObserverListener listener) { + this.observerListener = listener; + } + + /** + * 使用应该响应listener + * + * @return 应该响应 + */ + public boolean shouldResponseChangeListener() { + return true; + } + + + protected void initSelfListener(Container parentComponent) { + for (int i = 0; i < parentComponent.getComponentCount(); i++) { + Component tmpComp = parentComponent.getComponent(i); + if (tmpComp instanceof Container) { + initListener((Container) tmpComp); + } + if (tmpComp instanceof UIObserver) { + ((UIObserver) tmpComp).registerChangeListener(observerListener); + } + } + } + + + @Override + public void populate(ChartCollection collection) { + + } + + @Override + public void update(ChartCollection collection) { + + } + + /** + * 清空数据集的设置 + */ + public void clearTableDataSetting() { + + } + + /** + * 数据集数据改变 + */ + public void fireTableDataChange() { + + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/AbstractMapPlotPane4ToolBar.java b/designer_chart/src/com/fr/design/mainframe/AbstractMapPlotPane4ToolBar.java new file mode 100644 index 000000000..d2da88c83 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/AbstractMapPlotPane4ToolBar.java @@ -0,0 +1,111 @@ +package com.fr.design.mainframe; + +import com.fr.chart.base.ChartConstants; +import com.fr.chart.base.MapSvgXMLHelper; +import com.fr.chart.chartattr.*; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.mainframe.chart.ChartDesignEditPane; +import com.fr.general.ComparatorUtils; +import com.fr.stable.Constants; + +import javax.swing.*; +import javax.swing.border.EmptyBorder; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * Date: 14/12/1 + * Time: 下午3:15 + */ +public abstract class AbstractMapPlotPane4ToolBar extends JPanel{ + + + protected static final int COM_HEIGHT = 22; + protected static final int COM_GAP = 14; + protected static final int COMBOX_WIDTH = 230; + + protected ChartDesigner chartDesigner; + protected UIComboBox mapTypeComboBox; + + protected ItemListener mapTypeListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + calculateDetailMaps(mapTypeComboBox.getSelectedIndex()); + } + }; + + + public AbstractMapPlotPane4ToolBar(ChartDesigner designer){ + this.chartDesigner = designer; + this.setLayout(new FlowLayout(FlowLayout.LEFT, COM_GAP, 0)); + this.setBorder(new EmptyBorder(2, 0, 2, 0)); + mapTypeComboBox = new UIComboBox(getMapTypes()) { + public Dimension getPreferredSize() { + return new Dimension(COMBOX_WIDTH, COM_HEIGHT); + } + }; + mapTypeComboBox.addItemListener(mapTypeListener); + this.add(mapTypeComboBox); + } + + + protected abstract void calculateDetailMaps(int mapType); + + /** + * 更新地图面板 + * @param mapType 地图名字 + */ + public void populateMapPane(String mapType){ + mapTypeComboBox.removeItemListener(mapTypeListener); + for (String type : getMapTypes()) { + java.util.List list = MapSvgXMLHelper.getInstance().getNamesListWithCateName(type); + for (Object name : list) { + if(ComparatorUtils.equals(name,mapType)){ + mapTypeComboBox.setSelectedItem(type); + break; + } + } + } + mapTypeComboBox.addItemListener(mapTypeListener); + } + + public abstract String[] getMapTypes(); + + /** + * 切换图表类型 + */ + public void fireChange(){ + ChartCollection chartCollection = (ChartCollection)chartDesigner.getTarget().getChartCollection(); + Chart chart =chartCollection.getSelectedChart(); + if(chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE){ + resetChart(chart); + } + chart.switchPlot(getSelectedClonedPlot()); + + if(chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE){ + resetChart(chart); + } + chartDesigner.fireTargetModified(); + ChartDesignEditPane.getInstance().populateSelectedTabPane(); + } + + protected void resetChart(Chart chart){ + chart.setTitle(new Title(chart.getTitle().getTextObject())); + chart.setBorderStyle(Constants.LINE_NONE); + chart.setBorderColor(new Color(150, 150, 150)); + chart.setBackground(null); + } + + protected abstract Plot getSelectedClonedPlot(); + + /** + * 触发更新 + */ + public void fireTargetModified() { + chartDesigner.fireTargetModified(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/ChartAndWidgetPropertyPane.java b/designer_chart/src/com/fr/design/mainframe/ChartAndWidgetPropertyPane.java new file mode 100644 index 000000000..f5547b7e6 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/ChartAndWidgetPropertyPane.java @@ -0,0 +1,143 @@ +/* + * Copyright(c) 2001-2011, FineReport Inc, All Rights Reserved. + */ +package com.fr.design.mainframe; + +import java.awt.BorderLayout; +import java.awt.Component; + +import javax.swing.BorderFactory; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.SwingConstants; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.constants.UIConstants; +import com.fr.design.designer.TargetComponent; +import com.fr.design.gui.ibutton.UIToggleButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itabpane.TitleChangeListener; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.module.DesignModuleFactory; +import com.fr.general.Inter; + +public class ChartAndWidgetPropertyPane extends MiddleChartPropertyPane { + + public synchronized static ChartAndWidgetPropertyPane getInstance(BaseFormDesigner formEditor) { + if(singleton == null) { + singleton = new ChartAndWidgetPropertyPane(formEditor); + } + + singleton.setWidgetPropertyPane(DesignModuleFactory.getWidgetPropertyPane(formEditor)); + singleton.setSureProperty(); + return singleton; + } + + public static ChartAndWidgetPropertyPane getInstance() { + if(singleton == null) { + singleton = new ChartAndWidgetPropertyPane(); + } + return singleton; + } + + private static ChartAndWidgetPropertyPane singleton; + + private BaseWidgetPropertyPane widgetpane = null; + + private UIToggleButton hisButton; + + public ChartAndWidgetPropertyPane() { + + } + + public ChartAndWidgetPropertyPane(BaseFormDesigner formEditor) { + super(); + this.widgetpane = DesignModuleFactory.getWidgetPropertyPane(formEditor); + } + + public void setWidgetPropertyPane(BaseWidgetPropertyPane pane) { + this.widgetpane = pane; + } + + @Override + protected void createMainPane() { + this.add(chartEditPane, BorderLayout.CENTER); + } + + @Override + protected void createNameLabel() { + nameLabel = new UILabel(); + nameLabel.setHorizontalAlignment(SwingConstants.LEFT); + nameLabel.setBorder(BorderFactory.createEmptyBorder(-2, 6, 2, 0)); + } + + @Override + protected JComponent createNorthComponent() { + JPanel toolPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + + JPanel hisPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + hisPane.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); + hisButton = new UIToggleButton(Inter.getLocText(new String[]{"Widget", "Attribute"}), UIConstants.HISTORY_ICON); + hisButton.setNormalPainted(false); + hisButton.setBorderPaintedOnlyWhenPressed(true); + hisPane.add(hisButton, BorderLayout.CENTER); + + hisButton.addChangeListener(new ChangeListener() { + + @Override + public void stateChanged(ChangeEvent e) { + cardChange(); + } + }); + + toolPane.add(nameLabel, BorderLayout.CENTER); + toolPane.add(hisPane, BorderLayout.EAST); + + titleListener = new TitleChangeListener() { + + @Override + public void fireTitleChange(String addName) { + if(hisButton.isSelected()) { + nameLabel.setText(Inter.getLocText(new String[]{"Widget", "Form-Widget_Property_Table"})); + }else { + nameLabel.setText(Inter.getLocText("Chart-Property_Table") + '-' + addName); + } + } + }; + + return toolPane; + } + + /** + * 感觉ChartCollection加载图表属性界面. + * @param collection 收集图表 + * @param ePane 面板 + */ + public void populateChartPropertyPane(ChartCollection collection, TargetComponent ePane) { + super.populateChartPropertyPane(collection, ePane); + //表单中的图表切换界面上得更新 + resetChartEditPane(); + } + + protected void resetChartEditPane() { + cardChange(); + } + + private void cardChange() { + remove(chartEditPane); + remove((Component)widgetpane); + if(hisButton.isSelected()) { + nameLabel.setText(Inter.getLocText(new String[]{"Widget", "Form-Widget_Property_Table"})); + add((Component)widgetpane, BorderLayout.CENTER); + } else { + String tabname = chartEditPane.getSelectedTabName(); + nameLabel.setText(Inter.getLocText(new String[]{"Utils-The-Chart", "Form-Widget_Property_Table"}) + (tabname != null ? ('-' + chartEditPane.getSelectedTabName()) : "")); + add(chartEditPane, BorderLayout.CENTER); + } + validate(); + repaint(); + revalidate(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/ChartArea.java b/designer_chart/src/com/fr/design/mainframe/ChartArea.java new file mode 100644 index 000000000..e30f15ea5 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/ChartArea.java @@ -0,0 +1,521 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UINumberField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.scrollruler.*; +import com.fr.general.FRScreen; +import com.fr.general.Inter; + +import javax.swing.*; +import javax.swing.border.LineBorder; +import java.awt.*; +import java.awt.event.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-13 + * Time: 下午5:08 + */ +public class ChartArea extends JComponent implements ScrollRulerComponent { + + private static final int TOPGAP = 8; + private static final int MIN_WIDTH = 36; + private static final int MIN_HEIGHT = 21; + private static final double SLIDER_FLOAT = 120.0; + private static final double SLIDER_MIN = 60.0; + private static final double DEFAULT_SLIDER = 100.0; + private static final int ROTATIONS = 50; + private int designerwidth = 810; + private int designerheight = 500; + private int customWidth = 810; + private int customHeight = 500; + private ChartDesigner designer; + private int horizontalValue = 0; + private int verticalValue = 0; + private int verticalMax = 0; + private int horicalMax = 0; + private FormScrollBar verScrollBar; + private FormScrollBar horScrollBar; + //显示和设置图表界面大小的控件 + private UINumberField widthPane; + private UINumberField heightPane; + private boolean isValid = true; + private double START_VALUE = DEFAULT_SLIDER; + + public ChartArea(ChartDesigner designer) { + this(designer, true); + } + + public ChartArea(ChartDesigner designer, boolean useScrollBar) { + this.designer = designer; + this.designer.setParent(this); + this.customWidth = designer.getTarget().getWidth(); + this.customHeight = designer.getTarget().getHeight(); + this.designerwidth = this.customWidth; + this.designerheight = this.customHeight; + isValid = useScrollBar; + verScrollBar = new FormScrollBar(Adjustable.VERTICAL, this); + horScrollBar = new FormScrollBar(Adjustable.HORIZONTAL, this); + if (useScrollBar) { + this.setLayout(new FormRulerLayout()); + designer.setBorder(new LineBorder(new Color(198, 198, 198))); + this.add(FormRulerLayout.CENTER, designer); + addFormSize(); + this.add(FormRulerLayout.VERTICAL, verScrollBar); + this.add(FormRulerLayout.HIRIZONTAL, horScrollBar); + enableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK); + } else { + // 报表参数界面只要标尺和中心pane + this.setLayout(new RulerLayout()); + this.add(RulerLayout.CENTER, designer); + addFormRuler(); + } + this.setFocusTraversalKeysEnabled(false); + } + + /** + * 增加表单的页面大小控制界面,包括手动修改和滑块拖动 + */ + private void addFormSize() { + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + double[] rowSize = {f}; + double[] columnSize = {p, f, p, p, p, p, p,f,p}; + UILabel tipsPane = new UILabel("chart"); + tipsPane.setPreferredSize(new Dimension(200, 0)); + widthPane = new UINumberField(); + widthPane.setPreferredSize(new Dimension(60, 0)); + heightPane = new UINumberField(); + heightPane.setPreferredSize(new Dimension(60, 0)); + JPanel panel = new JPanel(){ + public Dimension getPreferredSize(){ + return new Dimension(200,0); + } + }; + JPanel resizePane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ + {tipsPane, new UILabel(), widthPane, new UILabel(Inter.getLocText("Indent-Pixel")), new UILabel("x"), + heightPane, new UILabel(Inter.getLocText("Indent-Pixel")),new UILabel(),panel}}, + rowSize, columnSize, 8 + ); + this.add(FormRulerLayout.BOTTOM, resizePane); + setWidgetsConfig(); + // 先初始话滑块及对应事件,然后获取分辨率调整容器的显示大小 + initCalculateSize(); + } + + private void setWidgetsConfig() { + widthPane.setHorizontalAlignment(widthPane.CENTER); + heightPane.setHorizontalAlignment(heightPane.CENTER); + widthPane.setMaxDecimalLength(0); + heightPane.setMaxDecimalLength(0); + //控件初始值就是根节点组件初始的宽和高 + widthPane.setValue(designerwidth); + heightPane.setValue(designerheight); + addWidthPaneListener(); + addHeightPaneListener(); + } + + private void initCalculateSize() { + Toolkit toolkit = Toolkit.getDefaultToolkit(); + Dimension scrnsize = toolkit.getScreenSize(); + double value = FRScreen.getByDimension(scrnsize).getValue(); + if (value != DEFAULT_SLIDER) { + reCalculateRoot(value, true); + } + } + + //设置宽度的控件及响应事件 + private void addWidthPaneListener() { + widthPane.addActionListener( + new ActionListener() { + public void actionPerformed(ActionEvent evt) { + reCalculateWidth((int) ((UINumberField) evt.getSource()).getValue()); + } + } + ); + widthPane.addFocusListener( + new FocusAdapter() { + public void focusLost(FocusEvent e) { + // 失去焦点时,可以认为输入结束 + reCalculateWidth((int) ((UINumberField) e.getSource()).getValue()); + } + } + ); + } + + private void addHeightPaneListener() { + heightPane.addActionListener( + new ActionListener() { + public void actionPerformed(ActionEvent evt) { + reCalculateHeight((int) ((UINumberField) evt.getSource()).getValue()); + } + } + ); + heightPane.addFocusListener( + new FocusAdapter() { + public void focusLost(FocusEvent e) { + // 失去焦点时,可以认为输入结束 + reCalculateHeight((int) ((UINumberField) e.getSource()).getValue()); + } + } + ); + } + + private void reCalculateWidth(int width) { + int dW = width - designerwidth; + if (dW == 0) { + return; + } + // 图表设计器先设大小为实际的高和当前的宽,然后按此调整内部的组件 + designer.setSize(width, designerheight); + designerwidth = width; + customWidth = width; + designer.getTarget().setWidth(width); + ChartArea.this.validate(); + designer.fireTargetModified(); + } + + private void reCalculateHeight(int height) { + int dW = height - designerwidth; + if (dW == 0) { + return; + } + // 图表设计器先设大小为实际的高和当前的宽,然后按此调整内部的组件 + designer.setSize(designerwidth, height); + designerheight = height; + customHeight = height; + this.designer.getTarget().setHeight(height); + ChartArea.this.validate(); + designer.fireTargetModified(); + } + + /** + * 按照界面大小的百分比值调整root大小 + * + * @param needCalculateParaHeight 是否需要调整参数界面高度 + * @param value + */ + private void reCalculateRoot(double value, boolean needCalculateParaHeight) { + if (value == START_VALUE) { + return; + } + double percent = (value - START_VALUE) / START_VALUE; + Dimension d = new Dimension(designerwidth, designerheight); + // 调整自适应布局大小后,同步调整参数界面和border大小,此时刷新下formArea + ChartArea.this.validate(); + START_VALUE = value; + } + + /** + * 增加刻度条 + */ + public void addFormRuler() { + BaseRuler vRuler = new VerticalRuler(this); + BaseRuler hRuler = new HorizontalRuler(this); + this.add(RulerLayout.VRULER, vRuler); + this.add(RulerLayout.HRULER, hRuler); + } + + /** + * 鼠标滚轮事件 + * 由于表单设计界面要求: 容器大小大于界面时,滚动条才可以拖动,所以不支持滚动无限往下滚 + */ + @Override + protected void processMouseWheelEvent(java.awt.event.MouseWheelEvent evt) { + int id = evt.getID(); + switch (id) { + case MouseEvent.MOUSE_WHEEL: { + int rotations = evt.getWheelRotation(); + int value = this.verScrollBar.getValue() + rotations * ROTATIONS; + value = Math.min(value, verticalMax); + value = Math.max(0, value); + doLayout(); //加dolayout是因为每次滚动都要重置 Max的大小 + this.verScrollBar.setValue(value); + break; + } + } + } + + /** + * 容器布局 + */ + public void doLayout() { + layout(); + if (isValid) { + setScrollBarProperties(customWidth - designer.getWidth(), horScrollBar); + //计算滚动条值的时候应该算上参数面板的高度 + setScrollBarProperties(customHeight - designer.getHeight(), verScrollBar); + } + } + + /** + * 设置滚动条的属性 + */ + private void setScrollBarProperties(int value, FormScrollBar bar) { + if (value <= 0) { + // 界面有滚动条时,手动缩小容器宽度到界面内,重置滚动条值和max + setScrollBarMax(0, bar); + bar.setMaximum(0); + bar.setValue(0); + bar.setEnabled(false); + } else { + //参数面板拖拽过程中value一直为当前value + int oldValue = verticalValue; + setScrollBarMax(value, bar); + bar.setEnabled(true); + bar.setMaximum(value); + bar.setValue(value); + bar.setValue(oldValue); + } + } + + private boolean isScrollNotVisible(FormScrollBar bar) { + if (bar.getOrientation() == Adjustable.VERTICAL) { + return verticalMax == 0; + } else { + return horicalMax == 0; + } + } + + private void setScrollBarMax(int max, FormScrollBar bar) { + if (bar.getOrientation() == Adjustable.VERTICAL) { + verticalMax = max; + } else { + horicalMax = max; + } + } + + /** + * 返回designer的最小高度 + * + * @return int + */ + public int getMinHeight() { + return MIN_HEIGHT; + } + + /** + * 返回designer的最小宽度 + * + * @return int + */ + public int getMinWidth() { + return MIN_WIDTH; + } + + /** + * getRulerLengthUnit + * + * @return short + */ + public short getRulerLengthUnit() { + return -1; + } + + /** + * 返回水平滚动条的value + * + * @return int + */ + public int getHorizontalValue() { + return horizontalValue; + } + + /** + * 设置水平滚动条的value + * + * @param newValue + */ + public void setHorizontalValue(int newValue) { + this.horizontalValue = newValue; + } + + /** + * 返回竖直滚动条的value + * + * @return + */ + public int getVerticalValue() { + return verticalValue; + } + + /** + * 竖直滚动条赋值 + * + * @param newValue + */ + public void setVerticalValue(int newValue) { + this.verticalValue = newValue; + } + + /** + * 返回当前designer的高度 + * + * @return height + */ + public int getDesignerHeight() { + return designer.getHeight(); + } + + /** + * 返回当前designer的宽度 + * + * @return + */ + public int getDesignerWidth() { + return designer.getWidth(); + } + + /** + * 返回宽度控件的value + * + * @return 宽度 + */ + public double getWidthPaneValue() { + return widthPane.getValue(); + } + + /** + * 设置宽度值 + * + * @param value 值 + */ + public void setWidthPaneValue(int value) { + widthPane.setValue(value); + } + + /** + * 设置高度值 + * + * @param value 值 + */ + public void setHeightPaneValue(int value) { + heightPane.setValue(value); + } + + /** + * 返回高度控件的value + * + * @return 高度 + */ + public double getHeightPaneValue() { + return heightPane.getValue(); + } + + /** + * 返回界面区域大小 + * + * @return Dimension + */ + public Dimension getAreaSize() { + return new Dimension(horScrollBar.getMaximum(), verScrollBar.getMaximum()); + } + + /** + * setAreaSize + * + * @param totalSize + * @param horizontalValue + * @param verticalValue + */ + public void setAreaSize(Dimension totalSize, int horizontalValue, int verticalValue, double width, double height, double slide) { + horScrollBar.setMaximum((int) totalSize.getWidth()); + verScrollBar.setMaximum((int) totalSize.getHeight()); + horScrollBar.setValue(horizontalValue); + verScrollBar.setValue(verticalValue); + // 撤销会refresh底层容器,需要按照之前的宽高和百分比重置下容器size + if (width != widthPane.getValue()) { + widthPane.setValue(width); + reCalculateWidth((int) width); + } + if (height != heightPane.getValue()) { + heightPane.setValue(height); + reCalculateHeight((int) height); + } + // undo时会重新refreshRoot,需要再次按照百分比调整下 + START_VALUE = DEFAULT_SLIDER; + reCalculateRoot(slide, true); + } + + public int getCustomWidth(){ + return this.customWidth; + } + + public int getCustomHeight(){ + return this.customHeight; + } + + /** + * 计算滚动条的值和max + * + * @param oldmax 之前最大值 + * @param max 当前最大值 + * @param newValue 当前value + * @param oldValue 之前value + * @param visi designer的大小 + * @param orientation 滚动条方向 + * @return 计算后的值和max + */ + @Override + public Point calculateScroll(int oldmax, int max, int newValue, int oldValue, int visi, int orientation) { + int scrollMax = orientation == 1 ? verticalMax : horicalMax; + //防止滚动条到达低端还可以继续点击移动(滚动条最大范围不变时,newValue要在范围之内) + if (oldmax == scrollMax + visi && newValue > scrollMax) { + return new Point(oldValue, oldmax); + } + return new Point(newValue, max); + } + + private class FormRulerLayout extends RulerLayout { + public FormRulerLayout() { + super(); + } + + /** + * 表单用的layout,当前不需要标尺 + */ + public void layoutContainer(Container target) { + synchronized (target.getTreeLock()) { + Insets insets = target.getInsets(); + int top = insets.top; + int left = insets.left; + int bottom = target.getHeight() - insets.bottom; + int right = target.getWidth() - insets.right; + Dimension resize = resizePane.getPreferredSize(); + Dimension hbarPreferredSize = null; + Dimension vbarPreferredSize = null; + + resizePane.setBounds(left, bottom - resize.height, right, resize.height); + if (horScrollBar != null) { + hbarPreferredSize = horScrollBar.getPreferredSize(); + vbarPreferredSize = verScrollBar.getPreferredSize(); + horScrollBar.setBounds(left, bottom - hbarPreferredSize.height - resize.height, right - BARSIZE, hbarPreferredSize.height); + verScrollBar.setBounds(right - vbarPreferredSize.width, top, vbarPreferredSize.width, bottom - BARSIZE - resize.height); + } + ChartDesigner dg = ((ChartDesigner) designer); + Rectangle rec = new Rectangle(left + (right - designerwidth) / 2, TOPGAP, right, bottom); + //是否为图表 + if (isValid) { + int maxHeight = bottom - hbarPreferredSize.height - resize.height - TOPGAP * 2; + int maxWidth = right - vbarPreferredSize.width; + designerwidth = designerwidth> maxWidth ? maxWidth : designerwidth; + designerheight = designerheight > maxHeight ? maxHeight : designerheight; + int designerLeft = left + (verScrollBar.getX() - designerwidth) / 2; + rec = new Rectangle(designerLeft, TOPGAP, designerwidth, designerheight); + } + // designer是整个表单设计界面中的面板部分,目前只放自适应布局和参数界面。 + designer.setBounds(rec); + } + } + + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/ChartDesigner.java b/designer_chart/src/com/fr/design/mainframe/ChartDesigner.java new file mode 100644 index 000000000..715c02a32 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/ChartDesigner.java @@ -0,0 +1,264 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe; +import com.fr.form.ui.ChartBook; +import com.fr.design.designer.TargetComponent; +import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; +import com.fr.design.menu.MenuDef; +import com.fr.design.menu.ShortCut; +import com.fr.design.menu.ToolBarDef; + +import javax.swing.*; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionAdapter; +import java.util.ArrayList; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-13 + * Time: 下午4:30 + */ +public class ChartDesigner extends TargetComponent implements MouseListener{ + + private ChartArea chartArea;//上层区域 + private boolean hasCalGap = false; + private ChartDesignerUI designerUI; + private ArrayList changeListeners = new ArrayList(); + private ChartToolBarPane chartToolBarPane; + + public ChartDesigner(ChartBook chartBook) { + super(chartBook); + this.addMouseListener(this); + designerUI = new ChartDesignerUI(); + chartToolBarPane = new ChartToolBarPane(this){ + public Dimension getPreferredSize() { + Dimension size = super.getPreferredSize(); + return new Dimension(size.width, ChartToolBarPane.TOTAL_HEIGHT); + } + }; + this.addMouseMotionListener(new MouseMotionAdapter() { + @Override + public void mouseMoved(MouseEvent e) { + if(designerUI!=null){ + designerUI.mouseMoved(e); + ChartDesigner.this.repaint(); + } + } + }); + updateUI();// 初始化界面设计工具的UI实例 + } + + /** + * 设置其UI类为DesignerUI,负责渲染 + */ + @Override + public void updateUI() { + setUI(designerUI); + } + + /** + * 设置上层区域 + * @param chartArea 图表区域 + */ + public void setParent(ChartArea chartArea) { + this.chartArea = chartArea; + } + + /** + * 复制 + */ + public void copy() { + + } + + /** + * 黏贴 + * @return 成功返回true + */ + public boolean paste() { + return false; + } + + /** + * 剪切 + * @return 成功返回TRUE + */ + public boolean cut() { + return false; + } + + /** + * 停止编辑 + */ + public void stopEditing() { + + } + + /** + * 权限编辑面板 + * @return 面板 + */ + public AuthorityEditPane createAuthorityEditPane() { + return null; + } + + /** + * 工具条 + * @return 工具条 + */ + public ToolBarMenuDockPlus getToolBarMenuDockPlus() { + return null; + } + + /** + * 菜单状态 + * @return 状态 + */ + public int getMenuState() { + return 0; + } + + /** + * 东上面板 + * @return 面板 + */ + public JPanel getEastUpPane() { + return null; + } + + /** + * 东下面板 + * @return 面板 + */ + public JPanel getEastDownPane() { + return null; + } + + /** + * 取消格式 + */ + public void cancelFormat() { + + } + + /** + * 图表设计器得工具条项 + * @return 图表设计器得工具条项 + */ + public ToolBarDef[] toolbars4Target() { + return new ToolBarDef[0]; + } + + /** + * 菜单 + * @return 菜单 + */ + public MenuDef[] menus4Target() { + return new MenuDef[0]; + } + + /** + * 菜单项 + * @return 菜单项 + */ + public ShortCut[] shortcut4TemplateMenu() { + return new ShortCut[0]; + } + + /** + * 权限编辑得菜单项 + * @return 菜单项 + */ + public ShortCut[] shortCuts4Authority() { + return new ShortCut[0]; + } + + /** + * 表单得工具条按钮 + * @return 表单得工具条按钮 + */ + public JComponent[] toolBarButton4Form() { + return new JComponent[0]; + } + + + /** + * 返回表单区域 + * @return 表单区域 + */ + public ChartArea getArea() { + return chartArea; + } + + + /** + * 鼠标点击 + * @param e 事件 + */ + public void mouseClicked(MouseEvent e) { + designerUI.mouseClicked(e); + this.chartToolBarPane.populate(); + } + + /** + * 鼠标按下 + * @param e 事件 + */ + public void mousePressed(MouseEvent e) { + + } + + /** + * 鼠标释放 + * @param e 事件 + */ + public void mouseReleased(MouseEvent e) { + + } + + /** + * 鼠标进入 + * @param e 事件 + */ + public void mouseEntered(MouseEvent e) { + + } + + /** + * 鼠标退出 + * @param e 事件 + */ + public void mouseExited(MouseEvent e) { + + } + + + private void registerChangeListener(ChangeListener changeListener){ + if(changeListener == null){ + return; + } + this.changeListeners.add(changeListener); + } + + public ChartToolBarPane getChartToolBarPane(){ + return this.chartToolBarPane; + } + + public void populate(){ + this.chartToolBarPane.populate(); + } + + /** + * 清除工具栏上面全局风格按钮的选中 + */ + public void clearToolBarStyleChoose(){ + chartToolBarPane.clearStyleChoose(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/ChartDesignerPropertyPane.java b/designer_chart/src/com/fr/design/mainframe/ChartDesignerPropertyPane.java new file mode 100644 index 000000000..efa1eea62 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/ChartDesignerPropertyPane.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe; + +import com.fr.base.chart.BaseChartCollection; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.designer.TargetComponent; +import com.fr.design.gui.chart.BaseChartPropertyPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itabpane.TitleChangeListener; +import com.fr.design.mainframe.chart.ChartDesignEditPane; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.general.Inter; + + +import javax.swing.*; +import java.awt.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 下午12:43 + */ +public class ChartDesignerPropertyPane extends BaseChartPropertyPane { + private static ChartDesignerPropertyPane instance; + private TargetComponentContainer container = new TargetComponentContainer(); + private ChartEditPane chartEditPane; + private UILabel nameLabel; + private TitleChangeListener titleListener = new TitleChangeListener() { + + @Override + public void fireTitleChange(String addName) { + nameLabel.setText(Inter.getLocText("Chart-Property_Table") + '-' + addName); + } + }; + + public synchronized static ChartDesignerPropertyPane getInstance() { + if (instance == null) { + instance = new ChartDesignerPropertyPane(); + } + instance.setSureProperty(); + return instance; + } + + public ChartDesignerPropertyPane() { + this.setLayout(new BorderLayout()); + this.setBorder(null); + + createNameLabel(); + this.add(nameLabel, BorderLayout.NORTH); + chartEditPane = ChartDesignEditPane.getInstance(); + this.add(chartEditPane, BorderLayout.CENTER); + } + + private void createNameLabel() { + nameLabel = new UILabel() { + @Override + public Dimension getPreferredSize() { + return new Dimension(super.getPreferredSize().width, 18); + } + }; + nameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 1, 0)); + nameLabel.setHorizontalAlignment(SwingConstants.CENTER); + } + + @Override + public void setSureProperty() { + chartEditPane.setContainer(container); + chartEditPane.addTitleChangeListener(titleListener); + String tabname = chartEditPane.getSelectedTabName(); + nameLabel.setText(Inter.getLocText("Chart-Property_Table") + (tabname != null ? ('-' + chartEditPane.getSelectedTabName()) : "")); + resetChartEditPane(); + + } + + protected void resetChartEditPane() { + remove(chartEditPane); + add(chartEditPane, BorderLayout.CENTER); + validate(); + repaint(); + revalidate(); + } + + @Override + public void setSupportCellData(boolean supportCellData){ + + } + + /** + * 感觉ChartCollection加载图表属性界面. + * @param collection 收集图表 + * @param chartDesigner 图表设计 + */ + public void populateChartPropertyPane(BaseChartCollection collection, TargetComponent chartDesigner) { + if (collection instanceof ChartCollection) { + this.container.setEPane(chartDesigner); + chartEditPane.populate((ChartCollection) collection); + } + } + + @Override + public void setWidgetPropertyPane(BaseWidgetPropertyPane pane) { + + } + + /** + * 刷新 + */ + public void refreshDockingView() { + + } + + @Override + public String getViewTitle() { + return null; + } + + @Override + public Icon getViewIcon() { + return null; + } + + /** + * 位置 + * @return 位置 + */ + public Location preferredLocation() { + return null; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/ChartDesignerUI.java b/designer_chart/src/com/fr/design/mainframe/ChartDesignerUI.java new file mode 100644 index 000000000..5ba44f735 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/ChartDesignerUI.java @@ -0,0 +1,211 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe; + +import com.fr.base.BaseUtils; +import com.fr.base.ScreenResolution; +import com.fr.base.chart.BaseChartGlyph; +import com.fr.chart.chartattr.*; +import com.fr.chart.charttypes.ColumnIndependentChart; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.chart.ChartDesignEditPane; +import com.fr.general.FRLogger; + +import javax.swing.*; +import javax.swing.plaf.ComponentUI; +import java.awt.*; +import java.awt.event.MouseEvent; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-13 + * Time: 下午4:55 + */ +public class ChartDesignerUI extends ComponentUI { + private static final Icon ADD = BaseUtils.readIcon("/com/fr/design/images/add.png"); + private static final Icon DEL = BaseUtils.readIcon("/com/fr/design/images/del.png"); + private static final int ICON_SIZE = 22; + private static final int H_GAP = 2; + private static final int V_GAP = 6; + private Rectangle[] iconLocations; + private Rectangle add; + private Rectangle del; + private UILabel tooltipLabel; + private int overIndex = -1;//鼠标悬浮上去的图表的INDEX + + // 图表当前的设计器 + private ChartDesigner designer; + + public ChartDesignerUI() { + + + } + + /** + * 加载界面 + * + * @param c 组件 + */ + public void installUI(JComponent c) { + designer = (ChartDesigner) c; + } + + /** + * 渲染当前的设计界面以及设计辅助状态 + * + * @param g 画图类 + * @param c 组件 + */ + @Override + public void paint(Graphics g, JComponent c) { + ChartCollection chartCollection = (ChartCollection) designer.getTarget().getChartCollection(); + Chart editingChart = chartCollection.getSelectedChart(); + BaseChartGlyph chartGlyph = null; + if (editingChart != null && editingChart.getPlot() != null) { + chartGlyph = editingChart.createGlyph(editingChart.defaultChartData()); + } + int parentWidth = designer.getSize().width; + int parentHeight = designer.getSize().height; + int chartWidth = designer.getArea().getCustomWidth(); + int chartHeight = designer.getArea().getCustomHeight(); + Graphics clipg; + clipg = g.create(-designer.getArea().getHorizontalValue(), -designer.getArea().getVerticalValue(), parentWidth + designer.getArea().getHorizontalValue(), parentHeight + designer.getArea().getVerticalValue()); + clipg = clipg.create(1, 1, designer.getArea().getCustomWidth(), designer.getArea().getCustomHeight()); + g.setColor(Color.white); + g.fillRect(0, 0, chartWidth, chartHeight); + chartGlyph.setUseChangeChart(true); + Image chartImage = chartGlyph.toImage(chartWidth, chartHeight, ScreenResolution.getScreenResolution()); + clipg.drawImage(chartImage, 0, 0, chartWidth, chartHeight, null); + paintChange(clipg, c); + } + + + //绘制切换的东西 + private void paintChange(Graphics g, JComponent c) { + int chartWidth = designer.getArea().getCustomWidth(); + ChartCollection collection = (ChartCollection) designer.getTarget().getChartCollection(); + int chartCount = collection.getChartCount(); + iconLocations = new Rectangle[chartCount]; + int startX = chartWidth - V_GAP - ICON_SIZE; + if (chartCount == 1) { + //只有一个时,只绘制新增按钮,不绘制删除按钮 + ADD.paintIcon(c, g, startX, H_GAP); + add = new Rectangle(startX, H_GAP, ICON_SIZE, ICON_SIZE); + del = null; + } else { + DEL.paintIcon(c, g, startX, H_GAP); + del = new Rectangle(startX, H_GAP, ICON_SIZE, ICON_SIZE); + startX -= (V_GAP + ICON_SIZE); + ADD.paintIcon(c, g, startX, H_GAP); + add = new Rectangle(startX, H_GAP, ICON_SIZE, ICON_SIZE); + } + + for (int i = chartCount - 1; i >= 0; i--) { + Plot plot = collection.getChart(i).getPlot(); + if (plot == null) { + continue; + } + if (collection.getSelectedIndex() == i) { + Icon ploticon = BaseUtils.readIcon(plot.getPlotSmallIconPath() + "_normal.png"); + if (ploticon != null) { + startX -= (V_GAP + ICON_SIZE); + ploticon.paintIcon(c, g, startX, H_GAP); + } + + }else if(overIndex == i){ + Icon ploticon = BaseUtils.readIcon(plot.getPlotSmallIconPath() + "_over.png"); + if (ploticon != null) { + startX -= (V_GAP + ICON_SIZE); + ploticon.paintIcon(c, g, startX, H_GAP); + } + } else { + Icon ploticon = BaseUtils.readIcon(plot.getPlotSmallIconPath() + "_gray.png"); + if (ploticon != null) { + startX -= (V_GAP + ICON_SIZE); + ploticon.paintIcon(c, g, startX, H_GAP); + } + } + + iconLocations[i] = new Rectangle(startX, H_GAP, ICON_SIZE, ICON_SIZE); + } + } + + /** + * 鼠标点击 + * + * @param e 事件 + */ + public void mouseClicked(MouseEvent e) { + Point clikPoint = new Point(e.getPoint().x + designer.getArea().getHorizontalValue(), e.getPoint().y + designer.getArea().getVerticalValue()); + ChartCollection collection = (ChartCollection) designer.getTarget().getChartCollection(); + for (int i = 0; i < iconLocations.length; i++) { + if (iconLocations[i].contains(clikPoint)) { + if (i == collection.getSelectedIndex()) { + return; + } + collection.setSelectedIndex(i); + designer.repaint(); + ChartDesignEditPane.getInstance().populateSelectedTabPane(); + return; + } + } + + if (add.contains(clikPoint)) { + Chart[] barChart = ColumnIndependentChart.columnChartTypes; + try { + Chart newChart = (Chart) barChart[0].clone(); + int select = collection.getSelectedIndex(); + collection.addNamedChartAtIndex(newChart.getTitle().getTextObject().toString(), newChart,select+1); + collection.setSelectedIndex(select+1); + ChartDesignEditPane.getInstance().populateSelectedTabPane(); + } catch (CloneNotSupportedException e1) { + FRLogger.getLogger().error("Error in Clone"); + } + designer.fireTargetModified(); + ChartDesignEditPane.getInstance().populateSelectedTabPane(); + return; + } + + if (del != null && del.contains(clikPoint)) { + int selectedIndex = collection.getSelectedIndex(); + collection.removeNameObject(selectedIndex); + if (selectedIndex > 0) { + collection.setSelectedIndex(selectedIndex - 1); + } else { + collection.setSelectedIndex(0); + } + designer.fireTargetModified(); + ChartDesignEditPane.getInstance().populateSelectedTabPane(); + } + } + + /** + * 鼠标悬浮上时的数据点提示 + * + * @param e 事件 + */ + public void mouseMoved(MouseEvent e) { + Point clikPoint = new Point(e.getPoint().x + designer.getArea().getHorizontalValue(), e.getPoint().y + designer.getArea().getVerticalValue()); + if (clikPoint.getY() < H_GAP || clikPoint.getY() > H_GAP + ICON_SIZE) { + ToolTip4Chart.getInstance().hideToolTip(); + overIndex = -1; + return; + } + ChartCollection collection = (ChartCollection) designer.getTarget().getChartCollection(); + for (int i = 0; i < iconLocations.length; i++) { + if (iconLocations[i].contains(clikPoint)) { + overIndex = i; + String chartName = collection.getChartName(i); + ToolTip4Chart.getInstance().showToolTip(chartName,e.getXOnScreen(),e.getYOnScreen()); + return; + } + } + ToolTip4Chart.getInstance().hideToolTip(); + overIndex = -1; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/ChartPropertyPane.java b/designer_chart/src/com/fr/design/mainframe/ChartPropertyPane.java new file mode 100644 index 000000000..d11279fed --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/ChartPropertyPane.java @@ -0,0 +1,57 @@ +/* + * Copyright(c) 2001-2011, FineReport Inc, All Rights Reserved. + */ +package com.fr.design.mainframe; + +import java.awt.BorderLayout; +import java.awt.Dimension; + +import javax.swing.BorderFactory; +import javax.swing.JComponent; +import javax.swing.SwingConstants; + +import com.fr.design.gui.ilable.UILabel; + +public class ChartPropertyPane extends MiddleChartPropertyPane{ + + /** + * 创建图表属性表实例. + */ + public synchronized static ChartPropertyPane getInstance() { + if(singleton == null) { + singleton = new ChartPropertyPane(); + } + + singleton.setSureProperty(); + return singleton; + } + + private static ChartPropertyPane singleton; + + @Override + protected void createNameLabel() { + nameLabel = new UILabel() { + @Override + public Dimension getPreferredSize() { + return new Dimension(super.getPreferredSize().width, 18); + } + }; + nameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 1, 0)); + nameLabel.setHorizontalAlignment(SwingConstants.CENTER); + } + + @Override + protected void createMainPane() { + this.add(chartEditPane, BorderLayout.CENTER); + } + + @Override + protected JComponent createNorthComponent() { + return nameLabel; + } + + @Override + public void setWidgetPropertyPane(BaseWidgetPropertyPane pane) { + + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/ChartToolBarPane.java b/designer_chart/src/com/fr/design/mainframe/ChartToolBarPane.java new file mode 100644 index 000000000..0550c463c --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/ChartToolBarPane.java @@ -0,0 +1,558 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe; + +import com.fr.base.ChartPreStyleManagerProvider; +import com.fr.base.ChartPreStyleServerManager; +import com.fr.base.background.ColorBackground; +import com.fr.chart.base.*; +import com.fr.chart.chartattr.*; +import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.mainframe.chart.ChartDesignEditPane; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.gui.type.ColumnPlotPane4ToolBar; +import com.fr.design.mainframe.chart.gui.type.PlotPane4ToolBar; +import com.fr.general.FRFont; +import com.fr.general.Inter; +import com.fr.stable.Constants; + +import javax.swing.*; +import javax.swing.border.EmptyBorder; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-13 + * Time: 下午8:32 + */ +public class ChartToolBarPane extends JPanel { + public static final int TOTAL_HEIGHT = 42; + private static final int COM_HEIGHT = 22; + private static final int GAP = 7; + private static final int COM_GAP = 14; + private static final int COMBOX_WIDTH = 230; + + private static final String[] CHOOSEITEM = new String[]{ + Inter.getLocText("FR-Chart-Type_Column"), + Inter.getLocText("FR-Chart-Type_Line"), + Inter.getLocText("FR-Chart-Type_Bar"), + Inter.getLocText("FR-Chart-Type_Pie"), + Inter.getLocText("FR-Chart-Type_Area"), + Inter.getLocText("FR-Chart-Type_XYScatter"), + Inter.getLocText("FR-Chart-Chart_BubbleChart"), + Inter.getLocText("FR-Chart-Type_Radar"), + Inter.getLocText("FR-Chart-Type_Stock"), + Inter.getLocText("FR-Chart-Type_Meter"), + Inter.getLocText("FR-Chart-Type_Range"), + Inter.getLocText("FR-Chart-Type_Comb"), + Inter.getLocText("FR-Chart-Type_Gantt"), + Inter.getLocText("FR-Chart-Type_Donut"), + Inter.getLocText("FR-Chart-Map_Map"), + "gis"+Inter.getLocText("FR-Chart-Map_Map") + }; + + private UIComboBox chooseComboBox = new UIComboBox(CHOOSEITEM) { + public Dimension getPreferredSize() { + return new Dimension(COMBOX_WIDTH, COM_HEIGHT); + } + }; + + private JPanel stylePane; + private JPanel plotTypeComboBoxPane; + private UIButton topDownShade = new UIButton(Inter.getLocText("FR-Chart-Style_TopDownShade")); + private UIButton transparent = new UIButton(Inter.getLocText("FR-Chart-Style_Transparent")); + private UIButton plane3D = new UIButton(Inter.getLocText("FR-Chart-Style_Plane3D")); + private UIButton gradient = new UIButton(Inter.getLocText("FR-Chart-Style_GradientHighlight")); + private ItemListener itemListener = new ItemListener() { + + @Override + public void itemStateChanged(ItemEvent e) { + if (e.getStateChange() == ItemEvent.DESELECTED) { + ChartToolBarPane.this.remove(centerPane); + ChartToolBarPane.this.remove(stylePane); + if(chooseComboBox.getSelectedIndex() < ChartTypeValueCollection.MAP.toInt()){ + calSubChartTypesPane(chooseComboBox.getSelectedIndex()); + ChartToolBarPane.this.add(subChartTypesPane,BorderLayout.CENTER); + centerPane = subChartTypesPane; + ChartToolBarPane.this.add(stylePane, BorderLayout.EAST); + } else{ + calMapSubChartTypesPane(chooseComboBox.getSelectedIndex()); + ChartToolBarPane.this.add(mapTypePane, BorderLayout.CENTER); + centerPane = mapTypePane; + } + ChartCollection chartCollection = (ChartCollection) chartDesigner.getTarget().getChartCollection(); + Chart chart = chartCollection.getSelectedChart(); + ChartToolBarPane.this.validate(); + fireTypeChange(); + + if(chooseComboBox.getSelectedIndex() == ChartTypeValueCollection.MAP.toInt()){ + mapTypePane.populateMapPane(((MapPlot) chart.getPlot()).getMapName()); + }else if(chooseComboBox.getSelectedIndex() == ChartTypeValueCollection.GIS.toInt()){ + mapTypePane.populateMapPane(chart.getChartName()); + } + } + } + }; + private PlotPane4ToolBar subChartTypesPane;//默认柱形图 + + private AbstractMapPlotPane4ToolBar mapTypePane;//地图类型选择的面板 + private JPanel centerPane; + + private ChartDesigner chartDesigner; + private int lastStyleIndex = -1; + private MouseAdapter styleListener = new MouseAdapter() { + @Override + public void mousePressed(MouseEvent e) { + ChartCollection chartCollection = (ChartCollection) chartDesigner.getTarget().getChartCollection(); + Chart chart = chartCollection.getSelectedChart(); + Plot newPlot; + int chartType =chart.getPlot().getPlotType().toInt(); + if(chartType >= ChartTypeValueCollection.MAP.toInt()){ + return; + } + newPlot = subChartTypesPane.setSelectedClonedPlotWithCondition(chart.getPlot()); + chartDesigner.fireTargetModified(); + UIButton button = (UIButton)e.getSource(); + //如果是第二次选中,就是消除 + if(button.isSelected()){ + button.setSelected(false); + chart.setPlot(newPlot); + resetChart(chart); + lastStyleIndex = -1; + ChartDesignEditPane.getInstance().populateSelectedTabPane(); + return; + } + clearStyleChoose(); + setStyle(chart,e,newPlot); + lastStyleIndex = chart.getPlot().getPlotStyle(); + } + }; + + private void setStyle( Chart chart,MouseEvent e,Plot newPlot){ + if (e.getSource() == topDownShade) { + topDownShade.setSelected(true); + chart.setPlot(newPlot); + chart.getPlot().setPlotStyle(ChartConstants.STYLE_SHADE); + resetChart(chart); + createCondition4Shade(chart); + setPlotFillStyle(chart); + } else if (e.getSource() == transparent) { + transparent.setSelected(true); + chart.setPlot(newPlot); + chart.getPlot().setPlotStyle(ChartConstants.STYLE_TRANSPARENT); + resetChart(chart); + createCondition4Transparent(chart); + setPlotFillStyle(chart); + } else if (e.getSource() == plane3D) { + plane3D.setSelected(true); + chart.setPlot(newPlot); + chart.getPlot().setPlotStyle(ChartConstants.STYLE_3D); + resetChart(chart); + createCondition4Plane3D(chart); + setPlotFillStyle(chart); + } else if (e.getSource() == gradient) { + gradient.setSelected(true); + chart.setPlot(newPlot); + chart.getPlot().setPlotStyle(ChartConstants.STYLE_OUTER); + resetChart(chart); + createCondition4HighLight(chart); + setPlotFillStyle(chart); + } + chart.setStyleGlobal(true); + ChartEditPane pane = ChartDesignEditPane.getInstance(); + pane.styleChange(true); + ChartDesignEditPane.getInstance().populate((ChartCollection)chartDesigner.getTarget().getChartCollection()); + pane.styleChange(false); + } + + public ChartToolBarPane(ChartDesigner designer) { + chartDesigner = designer; + subChartTypesPane = new ColumnPlotPane4ToolBar(designer);//默认柱形图 + this.setLayout(new BorderLayout()); + this.setBorder(new EmptyBorder(GAP, COM_GAP, GAP, 0)); + plotTypeComboBoxPane = new JPanel(); + plotTypeComboBoxPane.setBorder(new EmptyBorder(2, 0, 2, 0)); + plotTypeComboBoxPane.setLayout(new BorderLayout()); + plotTypeComboBoxPane.add(chooseComboBox, BorderLayout.CENTER); + chooseComboBox.addItemListener(itemListener); + //默认选择第一个 + chooseComboBox.setSelectedIndex(0); + this.add(plotTypeComboBoxPane, BorderLayout.WEST); + initStylePane(); + this.add(stylePane, BorderLayout.EAST); + this.add(subChartTypesPane, BorderLayout.CENTER); + this.centerPane = subChartTypesPane; + topDownShade.addMouseListener(styleListener); + transparent.addMouseListener(styleListener); + plane3D.addMouseListener(styleListener); + gradient.addMouseListener(styleListener); + } + + private void initStylePane(){ + stylePane = new JPanel() { + public Dimension getPreferredSize() { + Dimension size = super.getPreferredSize(); + return new Dimension(size.width, COM_HEIGHT); + } + }; + stylePane.setLayout(new FlowLayout(FlowLayout.LEFT, COM_GAP, 0)); + stylePane.setBorder(new EmptyBorder(3, 0, 3, 0)); + stylePane.add(topDownShade); + stylePane.add(transparent); + stylePane.add(plane3D); + stylePane.add(gradient); + } + + /** + * 清除工具栏上面全局风格按钮的选中 + */ + public void clearStyleChoose() { + topDownShade.setSelected(false); + transparent.setSelected(false); + plane3D.setSelected(false); + gradient.setSelected(false); + } + + + private void calMapSubChartTypesPane(int index){ + ChartTypeValueCollection type = ChartTypeValueCollection.parse(index); + mapTypePane = PlotToolBarFactory.createToolBar4MapPlot(type,chartDesigner); + } + + private void calSubChartTypesPane(int index) { + ChartTypeValueCollection type = ChartTypeValueCollection.parse(index); + subChartTypesPane = PlotToolBarFactory.createToolBar4NormalPlot(type,chartDesigner); + } + + + private void fireTypeChange() { + if(chooseComboBox.getSelectedIndex() < ChartTypeValueCollection.MAP.toInt()){ + subChartTypesPane.fireChange(); + }else{ + mapTypePane.fireChange(); + } + } + + //图表区属性清空 + private void resetChart(Chart chart) { + chart.setTitle(new Title(chart.getTitle().getTextObject())); + chart.setBorderStyle(Constants.LINE_NONE); + chart.setBorderColor(new Color(150, 150, 150)); + chart.setBackground(null); + setPlotFillStyle(chart); + } + + //高光渐变的默认属性设置 + private void createCondition4HighLight(Chart chart) { + if (chart != null) { + //标题 + Title title = new Title(chart.getTitle().getTextObject()); + chart.setTitle(title); + title.setTitleVisible(true); + TextAttr textAttr = title.getTextAttr(); + if (textAttr == null) { + textAttr = new TextAttr(); + title.setTextAttr(textAttr); + } + title.setPosition(Constants.LEFT); + textAttr.setFRFont(FRFont.getInstance("Microsoft YaHei", Font.BOLD, 16f, new Color(51, 51, 51))); + + //图例 + Legend legend = new Legend(); + legend.setFRFont(FRFont.getInstance("SimSun", Font.PLAIN, 9f, new Color(138, 140, 139))); + legend.setPosition(Constants.RIGHT_TOP); + chart.getPlot().setLegend(legend); + + //分类轴,现在只有柱形图,条形图,面积图 + if (chart.getPlot() instanceof CategoryPlot) { + CategoryPlot plot = (CategoryPlot) chart.getPlot(); + + //分类轴设置 + Axis cateAxis = plot.getxAxis(); + cateAxis.setAxisStyle(Constants.LINE_THICK); + cateAxis.setAxisColor(new Color(204, 220, 228)); + cateAxis.setTickMarkType(Constants.TICK_MARK_INSIDE); + cateAxis.setSecTickMarkType(Constants.TICK_MARK_NONE); + cateAxis.setShowAxisLabel(true); + cateAxis.getTextAttr().setFRFont(FRFont.getInstance("Microsoft YaHei", Font.PLAIN, 10f, new Color(138, 140, 139))); + + //值轴 + Axis valueAxis = plot.getyAxis(); + valueAxis.setAxisStyle(Constants.NONE); + valueAxis.setAxisColor(null); + valueAxis.setTickMarkType(Constants.TICK_MARK_INSIDE); + valueAxis.setSecTickMarkType(Constants.TICK_MARK_NONE); + valueAxis.setShowAxisLabel(true); + valueAxis.getTextAttr().setFRFont(FRFont.getInstance("SimSun", Font.PLAIN, 10f, new Color(138, 140, 139))); + + //绘图区 + plot.setBorderStyle(Constants.LINE_THIN); + plot.setBorderColor(new Color(204, 220, 228)); + plot.setBackground(ColorBackground.getInstance(new Color(248, 247, 245))); + plot.getyAxis().setMainGridStyle(Constants.LINE_THIN); + plot.getyAxis().setMainGridColor(new Color(192, 192, 192)); + } + + } + } + + //平面3D的默认属性设置 + private void createCondition4Plane3D(Chart chart) { + if (chart != null) { + //标题 + Title title = new Title(chart.getTitle().getTextObject()); + chart.setTitle(title); + title.setTitleVisible(true); + TextAttr textAttr = title.getTextAttr(); + if (textAttr == null) { + textAttr = new TextAttr(); + title.setTextAttr(textAttr); + } + title.setPosition(Constants.CENTER); + textAttr.setFRFont(FRFont.getInstance("Microsoft YaHei", Font.PLAIN, 16f, new Color(51, 51, 51))); + + //图例 + Legend legend = new Legend(); + legend.setFRFont(FRFont.getInstance("SimSun", Font.PLAIN, 9f, new Color(128, 128, 128))); + legend.setPosition(Constants.TOP); + chart.getPlot().setLegend(legend); + + //分类轴,现在只有柱形图,条形图,面积图 + if (chart.getPlot() instanceof CategoryPlot) { + CategoryPlot plot = (CategoryPlot) chart.getPlot(); + //分类轴设置 + Axis cateAxis = plot.getxAxis(); + cateAxis.setAxisStyle(Constants.LINE_THICK); + cateAxis.setAxisColor(new Color(57, 57, 57)); + cateAxis.setTickMarkType(Constants.TICK_MARK_NONE); + cateAxis.setSecTickMarkType(Constants.TICK_MARK_NONE); + cateAxis.setShowAxisLabel(true); + cateAxis.getTextAttr().setFRFont(FRFont.getInstance("Microsoft YaHei", Font.PLAIN, 10f, new Color(57, 57, 57))); + + //值轴设置 + Axis valueAxis = plot.getyAxis(); + valueAxis.setAxisStyle(Constants.LINE_NONE); + valueAxis.setTickMarkType(Constants.TICK_MARK_NONE); + valueAxis.setSecTickMarkType(Constants.TICK_MARK_NONE); + valueAxis.setShowAxisLabel(false); + + //绘图区 + plot.getyAxis().setMainGridStyle(Constants.LINE_THIN); + plot.getyAxis().setMainGridColor(new Color(192, 192, 192)); + chart.setBorderStyle(Constants.LINE_NONE); + + //数据标签 + ConditionAttr attrList = plot.getConditionCollection().getDefaultAttr(); + DataSeriesCondition attr = attrList.getExisted(AttrContents.class); + if (attr != null) { + attrList.remove(attr); + } + AttrContents attrContents = new AttrContents(); + attrContents.setPosition(Constants.OUTSIDE); + attrContents.setSeriesLabel(ChartConstants.VALUE_PARA); + attrContents.setTextAttr(new TextAttr(FRFont.getInstance("SimSun", Font.PLAIN, 9f, new Color(51, 51, 51)))); + attrList.addDataSeriesCondition(attrContents); + } + } + } + + //透明风格的默认属性设置 + private void createCondition4Transparent(Chart chart) { + if (chart != null) { + //标题 + Title title = new Title(chart.getTitle().getTextObject()); + chart.setTitle(title); + title.setTitleVisible(true); + TextAttr textAttr = title.getTextAttr(); + if (textAttr == null) { + textAttr = new TextAttr(); + title.setTextAttr(textAttr); + } + title.setPosition(Constants.LEFT); + textAttr.setFRFont(FRFont.getInstance("Microsoft YaHei", Font.BOLD, 16f, new Color(192, 192, 192))); + + //图例 + Legend legend = new Legend(); + legend.setFRFont(FRFont.getInstance("SimSun", Font.PLAIN, 9f, new Color(138, 140, 139))); + legend.setPosition(Constants.RIGHT_TOP); + chart.getPlot().setLegend(legend); + + Plot plot = chart.getPlot(); + //绘图区 + chart.setBackground(ColorBackground.getInstance(new Color(51, 51, 51))); + + //分类轴,现在只有柱形图,条形图,面积图 + if (plot instanceof CategoryPlot) { + //边框 + plot.setBorderStyle(Constants.LINE_THIN); + plot.setBorderColor(new Color(65, 65, 65)); + + //分类轴设置 + Axis cateAxis = plot.getxAxis(); + cateAxis.setAxisStyle(Constants.LINE_THICK); + cateAxis.setAxisColor(new Color(192, 192, 192)); + cateAxis.setTickMarkType(Constants.TICK_MARK_NONE); + cateAxis.setSecTickMarkType(Constants.TICK_MARK_NONE); + cateAxis.setShowAxisLabel(true); + cateAxis.getTextAttr().setFRFont(FRFont.getInstance("Microsoft YaHei", Font.PLAIN, 10f, new Color(150, 150, 150))); + + //值轴 + Axis valueAxis = plot.getyAxis(); + valueAxis.setShowAxisLabel(true); + valueAxis.setAxisStyle(Constants.LINE_NONE); + valueAxis.getTextAttr().setFRFont(FRFont.getInstance("SimSun", Font.PLAIN, 10f, new Color(150, 150, 150))); + valueAxis.setMainGridStyle(Constants.LINE_THIN); + valueAxis.setMainGridColor(new Color(63, 62, 62)); + } + } + } + + //渐变的默认属性设置 + private void createCondition4Shade(Chart chart) { + if (chart != null) { + //标题 + Title title = new Title(chart.getTitle().getTextObject()); + chart.setTitle(title); + title.setTitleVisible(true); + TextAttr textAttr = title.getTextAttr(); + if (textAttr == null) { + textAttr = new TextAttr(); + title.setTextAttr(textAttr); + } + title.setPosition(Constants.CENTER); + textAttr.setFRFont(FRFont.getInstance("Microsoft YaHei", Font.BOLD, 16f, new Color(0, 51, 102))); + + //图例 + Legend legend = new Legend(); + legend.setFRFont(FRFont.getInstance("SimSun", Font.PLAIN, 9f, new Color(128, 128, 128))); + legend.setPosition(Constants.BOTTOM); + chart.getPlot().setLegend(legend); + + //分类轴,现在只有柱形图,条形图,面积图 + if (chart.getPlot() instanceof CategoryPlot) { + CategoryPlot plot = (CategoryPlot) chart.getPlot(); + + //分类轴设置 + Axis cateAxis = plot.getxAxis(); + cateAxis.setAxisStyle(Constants.LINE_THICK); + cateAxis.setAxisColor(new Color(73, 100, 117)); + cateAxis.setTickMarkType(Constants.TICK_MARK_NONE); + cateAxis.setSecTickMarkType(Constants.TICK_MARK_NONE); + cateAxis.setShowAxisLabel(true); + cateAxis.getTextAttr().setFRFont(FRFont.getInstance("Microsoft YaHei", Font.PLAIN, 10f, new Color(128, 128, 128))); + + //值轴 + Axis valueAxis = plot.getyAxis(); + valueAxis.setShowAxisLabel(true); + valueAxis.getTextAttr().setFRFont(FRFont.getInstance("SimSun", Font.PLAIN, 10f, new Color(128, 128, 128))); + valueAxis.setAxisStyle(Constants.LINE_NONE); + + //绘图区 + plot.getyAxis().setMainGridStyle(Constants.LINE_THIN); + plot.getyAxis().setMainGridColor(new Color(192, 192, 192)); + plot.setHorizontalIntervalBackgroundColor(new Color(243, 243, 243)); + } + } + } + + private void setPlotFillStyle(Chart chart) { + ChartPreStyleManagerProvider manager = ChartPreStyleServerManager.getProviderInstance(); + Plot plot = chart.getPlot(); + Object preStyle = null; + String name = ""; + if (topDownShade.isSelected()) { + name = Inter.getLocText("FR-Chart-Style_Retro"); + preStyle = manager.getPreStyle(name); + } else if (transparent.isSelected()) { + name = Inter.getLocText("FR-Chart-Style_Fresh"); + preStyle = manager.getPreStyle(name); + } else if (plane3D.isSelected()) { + name = Inter.getLocText("FR-Chart-Style_Bright"); + preStyle = manager.getPreStyle(name); + } else if (gradient.isSelected()) { + name = Inter.getLocText("FR-Chart-Style_Bright"); + preStyle = manager.getPreStyle(name); + }else{ + preStyle = null; + } + if (preStyle == null) { + plot.getPlotFillStyle().setColorStyle(ChartConstants.COLOR_DEFAULT); + } else { + AttrFillStyle fillStyle = ((ChartPreStyle) preStyle).getAttrFillStyle(); + fillStyle.setFillStyleName(name); + plot.setPlotFillStyle(fillStyle); + } + + } + + public void populate(){ + ChartCollection chartCollection = (ChartCollection) chartDesigner.getTarget().getChartCollection(); + Chart chart = chartCollection.getSelectedChart(); + chooseComboBox.removeItemListener(itemListener); + chooseComboBox.setSelectedIndex(chart.getPlot().getPlotType().toInt()); + int chartType =chart.getPlot().getPlotType().toInt(); + this.removeAll(); + populateStyle(); + this.add(plotTypeComboBoxPane, BorderLayout.WEST); + initStylePane(); + if(chartType < ChartTypeValueCollection.MAP.toInt()){ + calSubChartTypesPane(chartType); + subChartTypesPane.setSelectedIndex(chart.getPlot().getDetailType()); + ChartToolBarPane.this.add(subChartTypesPane, BorderLayout.CENTER); + this.add(subChartTypesPane, BorderLayout.CENTER); + centerPane = subChartTypesPane; + this.add(stylePane, BorderLayout.EAST); + }else if(chartType == ChartTypeValueCollection.MAP.toInt()){ + calMapSubChartTypesPane(chartType); + mapTypePane.populateMapPane(((MapPlot) chart.getPlot()).getMapName()); + ChartToolBarPane.this.add(mapTypePane, BorderLayout.CENTER); + centerPane = mapTypePane; + }else{ + calMapSubChartTypesPane(chartType); + mapTypePane.populateMapPane((chart.getPlot()).getPlotName()); + ChartToolBarPane.this.add(mapTypePane, BorderLayout.CENTER); + centerPane = mapTypePane; + } + ChartToolBarPane.this.validate(); + chooseComboBox.addItemListener(itemListener); + } + + + + private void populateStyle() { + clearStyleChoose(); + ChartCollection chartCollection = (ChartCollection) chartDesigner.getTarget().getChartCollection(); + Chart chart = chartCollection.getSelectedChart(); + int plotStyle = chart.getPlot().getPlotStyle(); + switch (plotStyle) { + case ChartConstants.STYLE_SHADE: + topDownShade.setSelected(chart.isStyleGlobal() && true); + break; + case ChartConstants.STYLE_TRANSPARENT: + transparent.setSelected(chart.isStyleGlobal() && true); + break; + case ChartConstants.STYLE_3D: + plane3D.setSelected(chart.isStyleGlobal() && true); + break; + case ChartConstants.STYLE_OUTER: + gradient.setSelected(chart.isStyleGlobal() && true); + break; + default: + clearStyleChoose(); + break; + } + lastStyleIndex = plotStyle; + } + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/ChartUndoState.java b/designer_chart/src/com/fr/design/mainframe/ChartUndoState.java new file mode 100644 index 000000000..04809b0de --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/ChartUndoState.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe; + +import com.fr.form.ui.ChartBook; + +import java.awt.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-13 + * Time: 下午2:32 + */ +public class ChartUndoState extends BaseUndoState { + private ChartBook chartBook; + private Dimension designerSize; + private double widthValue; + private double heightValue; + + public ChartUndoState(JChart t,ChartArea area) { + super(t); + try { + this.chartBook = (ChartBook) t.getTarget().clone(); + } catch (CloneNotSupportedException e) { + throw new RuntimeException(e); + } + this.widthValue =area.getCustomWidth(); + this.heightValue = area.getCustomHeight(); + } + + + public ChartBook getChartBook(){ + return this.chartBook; + } + + /** + * 应用状态 + */ + public void applyState() { + this.getApplyTarget().applyUndoState(this); + + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/DesignerFrame4Chart.java b/designer_chart/src/com/fr/design/mainframe/DesignerFrame4Chart.java new file mode 100644 index 000000000..d282aa104 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/DesignerFrame4Chart.java @@ -0,0 +1,98 @@ +package com.fr.design.mainframe; + +import com.fr.design.ChartEnvManager; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.mainframe.actions.UpdateVersion; +import com.fr.design.mainframe.chart.UpdateOnLinePane; +import com.fr.design.mainframe.toolbar.ToolBarMenuDock; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.json.JSONObject; +import com.fr.stable.ProductConstants; +import com.fr.stable.StableUtils; + +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; +import java.util.ArrayList; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class DesignerFrame4Chart extends DesignerFrame { + + /** + * Constructor. + * + * @param ad + */ + public DesignerFrame4Chart(ToolBarMenuDock ad) { + super(ad); + } + + + + + + protected ArrayList getFrameListeners(){ + ArrayList listeners = super.getFrameListeners(); + listeners.add(0, new WindowAdapter() { + @Override + public void windowOpened(WindowEvent e) { + super.windowOpened(e); + judgeFirstUseWhenStart(); + } + }); + return listeners; + } + + /** + * 退出 + */ + public void exit() { + ChartEnvManager.getEnvManager().saveXMLFile(); + super.exit(); + } + + //不需要西侧的文件树面板 + protected void laoyoutWestPane(){ + + } + + protected void judgeFirstUseWhenStart(){ + boolean isNeed2Check =ChartEnvManager.getEnvManager().isPushUpdateAuto() || ChartEnvManager.getEnvManager().isOverOneMonth(); + if(!StableUtils.checkDesignerActive(ChartEnvManager.getEnvManager().getActivationKey()) + || isNeed2Check){ + ChartEnvManager.getEnvManager().setActivationKey(ChartEnvManager.ACTIVE_KEY); + checkVersion(); + if(ChartEnvManager.getEnvManager().isOverOneMonth()){ + ChartEnvManager.getEnvManager().resetCheckDate(); + } + } + } + + private void checkVersion(){ + + new UpdateVersion(){ + protected void done() { + try { + JSONObject serverVersion = get(); + String version = serverVersion.getString(UpdateVersion.VERSION); + if(!ComparatorUtils.equals(ProductConstants.RELEASE_VERSION, version)){ + UpdateOnLinePane updateOnLinePane = new UpdateOnLinePane(version); + BasicDialog dg = updateOnLinePane.showWindow4UpdateOnline(DesignerContext.getDesignerFrame()); + updateOnLinePane.setParentDialog(dg); + dg.setVisible(true); + } + }catch (Exception e){ + FRLogger.getLogger().error(e.getMessage()); + } + } + }.execute(); + } + + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/GisMapPlotPane4ToolBar.java b/designer_chart/src/com/fr/design/mainframe/GisMapPlotPane4ToolBar.java new file mode 100644 index 000000000..4cf8da691 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/GisMapPlotPane4ToolBar.java @@ -0,0 +1,203 @@ +package com.fr.design.mainframe; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.chartattr.*; +import com.fr.chart.charttypes.GisMapIndependentChart; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.general.FRLogger; +import com.fr.general.Inter; + +import javax.swing.*; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import java.awt.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * Date: 14/12/1 + * Time: 下午3:11 + */ +public class GisMapPlotPane4ToolBar extends AbstractMapPlotPane4ToolBar { + private static final int BAIDU = 0; + private static final int GOOGLE= 1; + + + private static final String[] TYPE_NAMES = new String[]{ + Inter.getLocText("FR-Chart-Map_Baidu"), + Inter.getLocText("FR-Chart-Map_Google")}; + + + private UITextField keyField = new UITextField(){ + public Dimension getPreferredSize() { + return new Dimension(COMBOX_WIDTH, COM_HEIGHT); + } + }; + + private DocumentListener keyListener = new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent e) { + fireKeyChange(); + } + + @Override + public void removeUpdate(DocumentEvent e) { + fireKeyChange(); + } + + @Override + public void changedUpdate(DocumentEvent e) { + fireKeyChange(); + } + } ; + + private void fireKeyChange(){ + ChartCollection chartCollection = (ChartCollection)chartDesigner.getTarget().getChartCollection(); + Chart chart =chartCollection.getSelectedChart(); + GisMapPlot plot =(GisMapPlot) chart.getPlot(); + String key = this.keyField.getText().trim(); + if(plot.isGisType() && key != plot.getBaiduKey()){ + plot.setBaiduKey(key); + }else if(!plot.isGisType() && key != plot.getGoogleKey()){ + plot.setGoogleKey(key); + } + chartDesigner.fireTargetModified(); + } + + public GisMapPlotPane4ToolBar(final ChartDesigner chartDesigner){ + super(chartDesigner); + this.add(getKeyPane()); + keyField.getDocument().addDocumentListener(keyListener); + } + + private JPanel getKeyPane(){ + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p,f}; + double[] rowSize = {p}; + Component[][] components = new Component[][]{ + new Component[]{new UILabel("key"),keyField}, + }; + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } + + + protected void calculateDetailMaps(int mapType){ + switch (mapType) { + case BAIDU: + populateDetilMaps(Inter.getLocText("FR-Chart-Map_Baidu")); + break; + case GOOGLE: + populateDetilMaps(Inter.getLocText("FR-Chart-Map_Google")); + break; + default: + populateDetilMaps(Inter.getLocText("FR-Chart-Map_Baidu")); + } + fireMapChange(); + + } + + /** + * 更新地图面板 + * @param mapType 地图名字 + */ + public void populateMapPane(String mapType){ + super.populateMapPane(mapType); + populateDetilMaps(mapTypeComboBox.getSelectedItem().toString()); + } + + protected void populateDetilMaps(String mapType){ + mapTypeComboBox.removeItemListener(mapTypeListener); + ChartCollection chartCollection = (ChartCollection)chartDesigner.getTarget().getChartCollection(); + Chart chart =chartCollection.getSelectedChart(); + GisMapPlot plot = (GisMapPlot) chart.getPlot(); + keyField.getDocument().removeDocumentListener(keyListener); + if(plot.isGisType()){ + keyField.setText(plot.getBaiduKey()); + mapTypeComboBox.setSelectedIndex(0); + }else{ + keyField.setText(plot.getGoogleKey()); + mapTypeComboBox.setSelectedIndex(1); + } + keyField.getDocument().addDocumentListener(keyListener); + mapTypeComboBox.addItemListener(mapTypeListener); + } + + private void fireMapChange(){ + ChartCollection chartCollection = (ChartCollection)chartDesigner.getTarget().getChartCollection(); + Chart chart =chartCollection.getSelectedChart(); + if(chart.getPlot().getPlotStyle() != ChartConstants.STYLE_NONE){ + resetChart(chart); + } + + Chart[] cs = GisMapIndependentChart.gisChartTypes; + GisMapPlot plot; + if (cs.length > 0) { + try { + plot = (GisMapPlot)cs[0].getPlot().clone(); + } catch (Exception e) { + plot = new GisMapPlot(); + } + } else { + plot = new GisMapPlot(); + } + + try { + chart.switchPlot((Plot)plot.clone()); + } catch (CloneNotSupportedException e) { + FRLogger.getLogger().error("Error In GisChart"); + chart.switchPlot(new GisMapPlot()); + } + + plot = (GisMapPlot) chart.getPlot(); + boolean index = plot.isGisType(); + plot.setGisType(mapTypeComboBox.getSelectedIndex() == 1); + + if(index != plot.isGisType()){ + if(plot.isGisType()){ + this.keyField.setText(plot.getBaiduKey()); + }else{ + this.keyField.setText(plot.getGoogleKey()); + } + }else{ + String key = this.keyField.getText().trim(); + if(plot.isGisType() && key != plot.getBaiduKey()){ + plot.setBaiduKey(key); + }else if(!plot.isGisType() && key != plot.getGoogleKey()){ + plot.setGoogleKey(key); + } + } + chartDesigner.fireTargetModified(); + } + + protected Plot getSelectedClonedPlot() { + Chart[] mapChart = GisMapIndependentChart.gisChartTypes; + GisMapPlot newPlot; + if (mapChart.length > 0) { + try { + newPlot = (GisMapPlot)mapChart[0].getPlot().clone(); + } catch (Exception e) { + newPlot = new GisMapPlot(); + } + } else { + newPlot = new GisMapPlot(); + } + + Plot cloned = null; + try { + cloned = (Plot) newPlot.clone(); + } catch (CloneNotSupportedException e) { + FRLogger.getLogger().error("Error In GisMapChart"); + } + return cloned; + } + + public String[] getMapTypes(){ + return TYPE_NAMES; + } + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/JChart.java b/designer_chart/src/com/fr/design/mainframe/JChart.java new file mode 100644 index 000000000..147c4d1b3 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/JChart.java @@ -0,0 +1,376 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + * 图表类型文件 + */ + +package com.fr.design.mainframe; + +import com.fr.base.BaseUtils; +import com.fr.base.FRContext; +import com.fr.file.FILEChooserPane; +import com.fr.file.FILEChooserPane4Chart; +import com.fr.form.ui.ChartBook; +import com.fr.design.DesignModelAdapter; +import com.fr.design.event.TargetModifiedEvent; +import com.fr.design.event.TargetModifiedListener; +import com.fr.design.gui.imenu.UIMenuItem; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.actions.ExcelExportAction4Chart; +import com.fr.design.mainframe.actions.PDFExportAction4Chart; +import com.fr.design.mainframe.actions.PNGExportAction4Chart; +import com.fr.design.mainframe.form.FormECCompositeProvider; +import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; +import com.fr.design.menu.ShortCut; +import com.fr.design.menu.ToolBarDef; +import com.fr.file.FILE; +import com.fr.general.Inter; +import com.fr.json.JSONArray; +import com.fr.json.JSONException; +import com.fr.json.JSONObject; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.datatransfer.StringSelection; + +/** + * 图表crt文件 + *

+ * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-13 + * Time: 下午2:28 + */ +public class JChart extends JTemplate { + public static final String XML_TAG = "JChart"; + private static final String CHART_CARD = "FORM"; + private static final String ELEMENTCASE_CARD = "ELEMENTCASE"; + + private static final String[] CARDNAME = new String[]{CHART_CARD, ELEMENTCASE_CARD}; + private static final int TOOLBARPANEDIMHEIGHT_FORM = 60; + //图表设计器 + ChartDesigner chartDesigner; + + //中间编辑区域, carllayout布局 + private JPanel tabCenterPane; + private CardLayout cardLayout; + //当前编辑的组件对象 + private JComponent editingComponent; + private FormECCompositeProvider reportComposite; + + public JChart() { + super(new ChartBook(), "Chart"); + } + + public JChart(ChartBook chartFile, FILE file) { + super(chartFile, file); + } + + @Override + protected JPanel createCenterPane() { + tabCenterPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + centerPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, new Color(85, 85, 85))); + chartDesigner = new ChartDesigner(this.getTarget()); + ChartArea area = new ChartArea(chartDesigner); + centerPane.add(area, BorderLayout.CENTER); + tabCenterPane.add(centerPane, CHART_CARD, 0); + chartDesigner.addTargetModifiedListener(new TargetModifiedListener() { + public void targetModified(TargetModifiedEvent e) { + JChart.this.fireTargetModified();// 调用保存*, 调用刷新界面, 刷新工具栏按钮 + } + }); + + this.add(tabCenterPane, BorderLayout.CENTER); + return tabCenterPane; + } + + /** + * 移除选择 + */ + public void removeTemplateSelection() { + + } + + /** + * 刷新容器 + */ + public void refreshContainer() { + + } + + /** + * 移除参数面板选择 + */ + public void removeParameterPaneSelection() { + + } + + /** + * 创建设计模式 + * + * @return 返回模式 + */ + protected DesignModelAdapter createDesignModel() { + return null; + } + + /** + * 创建预览得菜单 + * + * @return 菜单 + */ + public UIMenuItem[] createMenuItem4Preview() { + return new UIMenuItem[0]; + } + + /** + * 创建撤销状态 + * + * @return 状态 + */ + protected ChartUndoState createUndoState() { + return new ChartUndoState(this,chartDesigner.getArea()); + } + + /** + * 应用撤销状态 + * + * @param chartUndoState 撤销状态 + */ + protected void applyUndoState(ChartUndoState chartUndoState) { + try { + this.setTarget((ChartBook)chartUndoState.getChartBook().clone()); + chartDesigner.setTarget(this.getTarget()); + chartDesigner.populate(); + }catch (CloneNotSupportedException e) { + throw new RuntimeException(e); + } + } + + /** + * 后缀 + * + * @return 后缀 + */ + public String suffix() { + return ".crt"; + } + + /** + * 复制 + */ + public void copy() { + + } + + /** + * 黏贴 + * + * @return 是否鸟贴成功 + */ + public boolean paste() { + return false; + } + + /** + * 是否剪切 + * + * @return 剪切成功 + */ + public boolean cut() { + return false; + } + + /** + * 创建权限编辑面板 + * + * @return 面板 + */ + public AuthorityEditPane createAuthorityEditPane() { + return null; + } + + /** + * 工具栏 + * + * @return 工具栏 + */ + public ToolBarMenuDockPlus getToolBarMenuDockPlus() { + return null; + } + + /** + * 东上面板 + * + * @return 面板 + */ + public JPanel getEastUpPane() { + return null; + } + + /** + * 东下面板 + * + * @return 面板 + */ + public JPanel getEastDownPane() { + return null; + } + + /** + * 工具栏菜单 + * + * @return 菜单 + */ + public ToolBarDef[] toolbars4Target() { + return new ToolBarDef[0]; + } + + /** + * 表单面板 + * + * @return 面板 + */ + public JPanel[] toolbarPanes4Form() { + return new JPanel[0]; + } + + /** + * 模版菜单 + * + * @return 模版菜单 + */ + public ShortCut[] shortcut4TemplateMenu() { + return new ShortCut[0]; + } + + /** + * 权限编辑菜单 + * + * @return 菜单 + */ + public ShortCut[] shortCuts4Authority() { + return new ShortCut[0]; + } + + /** + * 工具条表单 + * + * @return 表单 + */ + public JComponent[] toolBarButton4Form() { + return new JComponent[0]; + } + + /** + * 权限编辑工具栏,但是图表设计器里面用于正常工具栏不是全县编辑 + * + * @return 工具条 + */ + public JComponent toolBar4Authority() { + return chartDesigner.getChartToolBarPane(); + } + + /** + * 工具条高度 + * + * @return 工具条高度 + */ + public int getToolBarHeight() { + return 0; + } + + /** + * 是否是报表 + * + * @return 不是 + */ + public boolean isJWorkBook() { + return false; + } + + /** + * 是否是图表 + * + * @return 是则返回true + */ + public boolean isChartBook() { + return true; + } + + /** + * 设置权限编辑模式 + * + * @param isUpMode 没有权限编辑 + */ + public void setAuthorityMode(boolean isUpMode) { + + } + + /** + * 刷新工具区域 + */ + public void refreshToolArea() { + DesignerContext.getDesignerFrame().resetToolkitByPlus(JChart.this); + chartDesigner.populate(); + ChartDesignerPropertyPane.getInstance().populateChartPropertyPane(getTarget().getChartCollection(), chartDesigner); + EastRegionContainerPane.getInstance().replaceUpPane(ChartDesignerPropertyPane.getInstance()); + } + + /** + * 导出菜单的子菜单 ,目前用于图表设计器 + * + * @return 子菜单 + */ + public ShortCut[] shortcut4ExportMenu() { + return new ShortCut[]{new PNGExportAction4Chart(this), new ExcelExportAction4Chart(this), new PDFExportAction4Chart(this)}; + } + + public Icon getIcon() { + return BaseUtils.readIcon("/com/fr/design/images/chart.png"); + } + + public ChartDesigner getChartDesigner(){ + return chartDesigner; + } + + /** + * 复制JS代码 + */ + public void copyJS(){ + JSONObject jsonObject =this.getTarget().createExportConfig(); + String jsonString = StringUtils.EMPTY; + if(jsonObject != null){ + try{ + if(jsonObject.has("charts")){ + JSONArray charts = jsonObject.getJSONArray("charts"); + jsonString = charts.toString(2); + }else{ + jsonString = jsonObject.toString(2); + } + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Chart-CopyJS_Message"), Inter.getLocText("FR-Chart-Action_Copy")+"JS", JOptionPane.INFORMATION_MESSAGE); + }catch (JSONException ex){ + FRContext.getLogger().error(ex.getMessage()); + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Chart-CopyJS_Failed")+"!", Inter.getLocText("Error"), JOptionPane.ERROR_MESSAGE); + } + }else{ + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Chart-CopyJS_Failed")+"!", Inter.getLocText("Error"), JOptionPane.ERROR_MESSAGE); + } + StringSelection stringSelection = new StringSelection(jsonString); + Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stringSelection, null); + }; + + /** + * 系列风格改动 + */ + public void styleChange(){ + chartDesigner.clearToolBarStyleChoose(); + } + + protected FILEChooserPane getFILEChooserPane(boolean isShowLoc){ + return new FILEChooserPane4Chart(true, isShowLoc); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/MapArrayPane.java b/designer_chart/src/com/fr/design/mainframe/MapArrayPane.java new file mode 100644 index 000000000..14926e71c --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/MapArrayPane.java @@ -0,0 +1,339 @@ +package com.fr.design.mainframe; + +import com.fr.chart.base.MapSvgAttr; +import com.fr.chart.base.MapSvgXMLHelper; +import com.fr.design.DesignerEnvManager; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.controlpane.*; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilist.JNameEdList; +import com.fr.design.gui.ilist.ListModelElement; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.Inter; +import com.fr.stable.CoreConstants; +import com.fr.stable.Nameable; +import com.fr.stable.StringUtils; +import com.fr.stable.core.PropertyChangeAdapter; + +import javax.swing.*; +import javax.swing.border.EmptyBorder; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * Date: 14/12/3 + * Time: 上午10:00 + */ +public class MapArrayPane extends JControlPane { + private static final int LEFT_WIDTH = 180; + private static final Color LINE_COLOR = new Color(176, 176, 176); + private static final int TOP_GAP = 5; + + private static final String[] TYPE_NAMES = new String[]{ + Inter.getLocText("FR-Chart-World_Map"), + Inter.getLocText("FR-Chart-State_Map"), + Inter.getLocText("FR-Chart-Province_Map"), + Inter.getLocText("FR-Chart-Custom_Map")}; + + private String mapType; + private String mapDetailName; + + MapPlotPane4ToolBar toolBar; + UIComboBox mapTypeBox; + private ArrayList editedNames = new ArrayList(); + + private ItemListener typeListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + MapArrayPane.this.updateBeans(); + mapType = mapTypeBox.getSelectedItem().toString(); + MapArrayPane.this.populate(MapSvgXMLHelper.getInstance().getAllMapObjects4Cate(mapType)); + } + }; + + + private ArrayList removeNames = new ArrayList(); + private MapEditPane mapEditPane; + private ChartDesigner chartDesigner; + + public MapArrayPane(String mapType, String mapDetailName,ChartDesigner chartDesigner) { + this.mapDetailName = mapDetailName; + this.mapType = mapType; + if (mapTypeBox != null) { + mapTypeBox.setSelectedItem(mapType); + } + this.chartDesigner = chartDesigner; + mapTypeBox.addItemListener(typeListener); + this.setBorder(new EmptyBorder(TOP_GAP, 0, 0, 0)); + this.addEditingListner(new PropertyChangeAdapter() { + public void propertyChange() { + dealPropertyChange(); + } + }); + } + + public void setToolBarPane(MapPlotPane4ToolBar pane) { + this.toolBar = pane; + } + + protected void doWhenPopulate(BasicBeanPane beanPane) { + mapEditPane = (MapEditPane)beanPane; + mapEditPane.dealWidthMap(mapType); + String editingName = ((MapEditPane)beanPane).getCurrentMapName(); + if(!editedNames.contains(editingName)){ + editedNames.add(editingName); + } + } + + protected JPanel getLeftPane() { + JPanel centerPane = super.getLeftPane(); + mapTypeBox = new UIComboBox(TYPE_NAMES); + JPanel leftPane = new JPanel(); + leftPane.setLayout(new BorderLayout()); + leftPane.setBorder(new EmptyBorder(3, 0, 0, 0)); + leftPane.add(mapTypeBox, BorderLayout.NORTH); + leftPane.add(centerPane, BorderLayout.CENTER); + return leftPane; + } + + + private void dealPropertyChange() { + MapSvgXMLHelper helper = MapSvgXMLHelper.getInstance(); + java.util.List nameList =helper.getNamesListWithCateName(mapType); + String[] allListNames = nameableList.getAllNames(); + allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY; + String tempName = getEditingName(); + if (StringUtils.isEmpty(tempName)) { + String[] warning = new String[]{"NOT_NULL_Des", "Please_Rename"}; + String[] sign = new String[]{",", "!"}; + nameableList.stopEditing(); + JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(MapArrayPane.this), Inter.getLocText(warning, sign)); + setWarnigText(editingIndex); + return; + } + if (!ComparatorUtils.equals(tempName, selectedName) + && isNameRepeted(new List[]{nameList, Arrays.asList(allListNames)}, tempName)) { + nameableList.stopEditing(); + JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(MapArrayPane.this), + Inter.getLocText(new String[]{"FR-Chart-Map_NameAlreadyExist", "Please_Rename"}, new String[]{",", "!"})); + setWarnigText(editingIndex); + return; + } + String oldname = mapEditPane.getCurrentMapName(); + mapEditPane.setCurrentMapName(tempName); + mapEditPane.dealWidthMap(mapType); + if(editedNames.contains(oldname)){ + editedNames.remove(oldname); + editedNames.add(tempName); + } + if(helper.getNewMapAttr(oldname) != null){ + MapSvgAttr attr = helper.getNewMapAttr(oldname); + attr.renameMap(tempName); + helper.removeNewMapAttr(oldname); + helper.addNewSvgMaps(tempName,attr); + } + this.toolBar.fireTargetModified(); + this.saveMapInfo(tempName); + } + + protected void doAfterRemove(){ + for(String map2Remove : removeNames){ + MapSvgXMLHelper.getInstance().removeMapAttr(map2Remove); + MapSvgXMLHelper.getInstance().removeNewMapAttr(map2Remove); + } + update4AllType(); + } + + protected void doBeforeRemove(){ + removeNames.clear(); + for(int index : nameableList.getSelectedIndices()){ + removeNames.add(nameableList.getNameAt(index)); + } + } + + //保存修改过的地图信息 + private void saveMapInfo(final String mapName) { + SwingWorker worker = new SwingWorker() { + @Override + protected Integer doInBackground() throws Exception { + MapSvgAttr attr = MapSvgXMLHelper.getInstance().getMapAttr(mapName);// 只有在编辑地图时才需要储存相关数据 @kuns + if (attr != null) { + attr.writeBack(mapName); + } + return 0; + } + + @Override + protected void done() { + FRLogger.getLogger().info(Inter.getLocText("FR-Chart-Map_Saved")); // 地图已经保存. + } + + }; + worker.execute(); + DesignerEnvManager.addWorkers(worker); + } + + private void update4AllType() { + MapSvgXMLHelper helper = MapSvgXMLHelper.getInstance(); + helper.clearNames4Cate(mapType); + for(String name : nameableList.getAllNames()){ + MapSvgAttr attr = helper.getMapAttr(name); + if(attr == null){ + continue; + } + helper.addCateNames(attr.getMapType(),attr.getName()); + } + } + + + /** + * 创建菜单 + * + * @return 菜单 + */ + public NameableCreator[] createNameableCreators() { + return new NameableCreator[]{ + new NameableSelfCreator(Inter.getLocText("FR-Chart-Custom_Map"), MapSvgAttr.class, MapEditPane.class) { + public MapSvgAttr createNameable(UnrepeatedNameHelper helper) { + MapSvgAttr attr = new MapSvgAttr(); + attr.setFilePath(MapSvgXMLHelper.customMapPath() + CoreConstants.SEPARATOR + helper.createUnrepeatedName(Inter.getLocText("FR-Chart-Custom_Map")) + ".svg"); + MapSvgXMLHelper.getInstance().addNewSvgMaps(attr.getName(), attr); + update4Edited(attr.getName()); + // 返回参数设置面板. + return attr; + } + + @Override + public String createTooltip() { + return null; + } + + public void saveUpdatedBean(ListModelElement wrapper, Object bean) { + wrapper.wrapper = (Nameable)bean; + } + } + }; + } + + protected boolean isCreatorNeedIocn() { + return false; + } + + protected ShortCut4JControlPane[] createShortcuts() { + return new ShortCut4JControlPane[]{ + addItemShortCut(), + removeItemShortCut(), + }; + } + + protected int getLeftPreferredSize() { + return LEFT_WIDTH; + } + + + @Override + protected String title4PopupWindow() { + return Inter.getLocText(new String[]{"FR-Chart-Map_Map", "FR-Chart-Data_Edit"}); + } + + /** + * 更新 + */ + public void updateBeans() { + super.update(); + this.update4AllType(); + this.updateAllEditedAttrMaps(); + MapSvgXMLHelper.getInstance().clearTempAttrMaps(); + //versionID递增 + this.toolBar.fireTargetModified(); + this.saveMapInfo(selectedName); + } + + /** + * 创建list + * @return 返回list + */ + public JNameEdList createJNameList() { + JNameEdList nameEdList = new JNameEdList(new DefaultListModel()) { + + public Rectangle createRect(Rectangle rect, int iconWidth) { + return rect; + } + + protected void doAfterLostFocus() { + MapArrayPane.this.updateControlUpdatePane(); + } + + public void setNameAt(String name, int index) { + super.setNameAt(name,index); + update4Edited(name); + } + + }; + nameEdList.setCellRenderer(new NameableListCellRenderer()); + return nameEdList; + } + + + protected void update4Edited(String editingName){ + + } + + private void updateAllEditedAttrMaps(){ + MapSvgXMLHelper helper = MapSvgXMLHelper.getInstance(); + for(String editedName : editedNames){ + if(helper.getMapAttr(editedName)!=null){ + helper.getMapAttr(editedName).writeBack(editedName); + }else if(helper.getNewMapAttr(editedName)!=null){ + helper.getNewMapAttr(editedName).writeBack(editedName); + } + } + } + + //根据地图的名字返回地图的图片 + private Image getMapImage(String mapName) { + if (MapSvgXMLHelper.getInstance().containsMapName(mapName)) { + MapSvgAttr mapAttr = MapSvgXMLHelper.getInstance().getMapAttr(mapName); + if (mapAttr == null) { + return null; + } + return mapAttr.getMapImage(); + } + + return null; + } + + /* + * Nameable的ListCellRenerer + */ + private class NameableListCellRenderer extends + DefaultListCellRenderer { + public Component getListCellRendererComponent(JList list, Object value, + int index, boolean isSelected, boolean cellHasFocus) { + super.getListCellRendererComponent(list, value, index, isSelected, + cellHasFocus); + + if (value instanceof ListModelElement) { + Nameable wrappee = ((ListModelElement) value).wrapper; + this.setText(((ListModelElement) value).wrapper.getName()); + + for (NameableCreator creator : MapArrayPane.this.creators()) { + if (creator.menuIcon() != null && creator.acceptObject2Populate(wrappee) != null) { + this.setIcon(creator.menuIcon()); + this.setToolTipText(creator.createTooltip()); + break; + } + } + } + return this; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/MapEditPane.java b/designer_chart/src/com/fr/design/mainframe/MapEditPane.java new file mode 100644 index 000000000..4c137afb7 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/MapEditPane.java @@ -0,0 +1,121 @@ +package com.fr.design.mainframe; + +import com.fr.chart.base.MapSvgAttr; +import com.fr.chart.base.MapSvgXMLHelper; +import com.fr.chart.chartglyph.MapShapeValue; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.series.PlotSeries.AbstrctMapAttrEditPane; +import com.fr.design.chart.series.PlotSeries.MapCustomPane; +import com.fr.design.chart.series.PlotSeries.MapDefiAreaNamePane; +import com.fr.design.gui.frpane.UITabbedPane; +import com.fr.general.Inter; +import com.fr.stable.CoreConstants; +import com.fr.stable.StringUtils; + +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * Date: 14/12/2 + * Time: 下午7:17 + */ +public class MapEditPane extends BasicBeanPane{ + + private UITabbedPane tabbedPane; + private MapCustomPane areaPane ; +// private MapCustomPane pointPane; + private MapDefiAreaNamePane namedPane; + private String currentMapName; + private AbstrctMapAttrEditPane editingPane; + + private ChangeListener tabbedChangeListener = new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + switch ( tabbedPane.getSelectedIndex()){ + case 1: + namedPane.populateMapAttr(editingPane.updateCurrentAttr()); + editingPane = namedPane; + break; + default: + areaPane.populateMapAttr(editingPane.updateCurrentAttr()); + editingPane = areaPane; + } + } + } ; + + public MapEditPane(){ + initTabbedPane(); + this.setLayout(new BorderLayout()); + this.add(tabbedPane,BorderLayout.CENTER); + } + + private void initTabbedPane(){ + tabbedPane = new UITabbedPane(); + areaPane = new MapCustomPane(false); +// pointPane = new MapCustomPane(false); + namedPane= new MapDefiAreaNamePane(false); + areaPane.setImageSelectType(MapShapeValue.AREA); +// pointPane.setImageSelectType(MapShapeValue.POINT); + tabbedPane.add(Inter.getLocText("FR-Chart-Map_ImageArea"),areaPane); +// tabbedPane.add(Inter.getLocText("FR-Chart-Map_ImagePoint"),pointPane); + tabbedPane.add(Inter.getLocText("FR-Chart-Map_Corresponding_Fields"),namedPane); + editingPane = areaPane; + } + + @Override + protected String title4PopupWindow() { + return null; + } + + @Override + public void populateBean(MapSvgAttr ob) { + if(!StringUtils.isEmpty(ob.getName()) && !MapSvgXMLHelper.getInstance().containsMapName(ob.getName())){ + MapSvgAttr mapSvgAttr = new MapSvgAttr(); + mapSvgAttr.setFilePath(MapSvgXMLHelper.customMapPath()+ CoreConstants.SEPARATOR+ob.getName()+".svg"); + MapSvgXMLHelper.getInstance().addNewSvgMaps(ob.getName(), mapSvgAttr); + } + + currentMapName = ob.getName(); + if(editingPane == null){ + editingPane = areaPane; + } + editingPane.populateMapAttr(ob); + tabbedPane.addChangeListener(tabbedChangeListener); + } + + public String getCurrentMapName(){ + return currentMapName; + } + + public void setCurrentMapName(String currentMapName){ + this.currentMapName = currentMapName; + + } + + /** + * 再图片面板设置类型和名字 + * @param mapType 地图类型 + */ + public void dealWidthMap(String mapType){ + areaPane.setTypeNameAndMapName(mapType,currentMapName); +// pointPane.setTypeNameAndMapName(mapType,currentMapName); + } + + @Override + public MapSvgAttr updateBean() { + MapSvgAttr currentAttr = editingPane.updateCurrentAttr(); + currentMapName =currentAttr != null ? currentAttr.getName() : currentMapName; + MapSvgAttr attr = MapSvgXMLHelper.getInstance().getMapAttr(currentMapName); + if(attr != null ){ + MapSvgXMLHelper.getInstance().removeNewMapAttr(currentMapName); + MapSvgXMLHelper.getInstance().pushMapAttr(currentMapName,currentAttr); + return currentAttr; + }else{ + return MapSvgXMLHelper.getInstance().getNewMapAttr(currentMapName); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/MapPlotPane4ToolBar.java b/designer_chart/src/com/fr/design/mainframe/MapPlotPane4ToolBar.java new file mode 100644 index 000000000..62a149647 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/MapPlotPane4ToolBar.java @@ -0,0 +1,210 @@ +package com.fr.design.mainframe; + +import com.fr.chart.base.MapSvgXMLHelper; +import com.fr.chart.chartattr.*; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.mainframe.chart.ChartDesignEditPane; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * Date: 14/12/1 + * Time: 上午11:57 + */ +public class MapPlotPane4ToolBar extends AbstractMapPlotPane4ToolBar{ + + private static final int WORLD_MAP = 0; + private static final int STATE_MAP = 1; + private static final int PROVINCE_MAP = 2; + private static final int CUSTOM_MAP = 3; + private static final int BUTTON_WIDTH = 44; + + + private static final String[] TYPE_NAMES = new String[]{ + Inter.getLocText("FR-Chart-World_Map"), + Inter.getLocText("FR-Chart-State_Map"), + Inter.getLocText("FR-Chart-Province_Map"), + Inter.getLocText("FR-Chart-Custom_Map")}; + + private String lastEditingName =StringUtils.EMPTY; + + private UIButton mapEditButton = new UIButton(Inter.getLocText("FR-Chart-Data_Edit")){ + public Dimension getPreferredSize() { + return new Dimension(BUTTON_WIDTH, COM_HEIGHT); + } + }; + + protected UIComboBox detailMaps = new UIComboBox(){ + public Dimension getPreferredSize() { + return new Dimension(COMBOX_WIDTH, COM_HEIGHT); + } + }; + + private ItemListener detailListener = new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + fireMapChange(); + } + }; + + private ActionListener mapEditListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String selectedName =StringUtils.EMPTY; + if(detailMaps.getSelectedItem() != null){ + selectedName = detailMaps.getSelectedItem().toString(); + } + final MapArrayPane mapArrayPane = new MapArrayPane(mapTypeComboBox.getSelectedItem().toString(),selectedName,chartDesigner){ + public void updateBeans() { + super.updateBeans(); + if(reCalculateDetailsMaps(mapTypeComboBox.getSelectedItem().toString(),lastEditingName) || + ComparatorUtils.equals(StringUtils.EMPTY,lastEditingName)){ + detailMaps.setSelectedItem(lastEditingName); + ChartCollection chartCollection = (ChartCollection)chartDesigner.getTarget().getChartCollection(); + com.fr.chart.chartattr.Chart chart =chartCollection.getSelectedChart(); + if(chart.getPlot().isMapPlot()){ + MapPlot mapPlot = (MapPlot) chart.getPlot(); + mapPlot.setMapName(lastEditingName); + } + } + } + + protected void update4Edited(String editingName){ + lastEditingName = editingName; + } + }; + + BasicDialog mapArrayDialog = mapArrayPane.showWindow4ChartMapArray(DesignerContext.getDesignerFrame(), + new DialogActionAdapter() { + + @Override + public void doOk() { + mapArrayPane.updateBeans(); + } + }); + mapArrayDialog.setModal(true); + mapArrayPane.setToolBarPane(MapPlotPane4ToolBar.this); + mapArrayPane.populate(MapSvgXMLHelper.getInstance().getAllMapObjects4Cate(mapTypeComboBox.getSelectedItem().toString())); + if(detailMaps.getSelectedItem() != null){ + mapArrayPane.setSelectedName(detailMaps.getSelectedItem().toString()); + } + mapArrayDialog.setVisible(true); + } + }; + + public MapPlotPane4ToolBar(ChartDesigner chartDesigner){ + super(chartDesigner); + this.add(detailMaps); + detailMaps.addItemListener(detailListener); + mapEditButton.addActionListener(mapEditListener); + this.add(mapEditButton); + } + + /** + * 更新地图面板 + * @param mapType 地图名字 + */ + public void populateMapPane(String mapType){ + super.populateMapPane(mapType); + populateDetilMaps(mapTypeComboBox.getSelectedItem().toString()); + detailMaps.removeItemListener(detailListener); + detailMaps.setSelectedItem(mapType); + detailMaps.addItemListener(detailListener); + } + + /** + * 触发地图改变 + */ + public void fireMapChange(){ + MapPlot plot = new MapPlot(); + String selectedName = StringUtils.EMPTY; + if(detailMaps.getSelectedItem() !=null ){ + selectedName = detailMaps.getSelectedItem().toString(); + } + plot.setMapName(selectedName);// 名字问题 + ChartCollection chartCollection = (ChartCollection)chartDesigner.getTarget().getChartCollection(); + Chart chart =chartCollection.getSelectedChart(); + chart.setPlot(plot); + ChartDesignEditPane.getInstance().populate(chartCollection); + chartDesigner.fireTargetModified(); + } + + + + //默认选中国家地图 + protected void calculateDetailMaps(int mapType){ + switch (mapType) { + case WORLD_MAP: + populateDetilMaps(Inter.getLocText("FR-Chart-World_Map")); + break; + case STATE_MAP: + populateDetilMaps(Inter.getLocText("FR-Chart-State_Map")); + break; + case PROVINCE_MAP: + populateDetilMaps(Inter.getLocText("FR-Chart-Province_Map")); + break; + case CUSTOM_MAP: + populateDetilMaps(Inter.getLocText("FR-Chart-Custom_Map")); + break; + default: + populateDetilMaps(Inter.getLocText("FR-Chart-State_Map")); + } + fireMapChange(); + } + + private boolean reCalculateDetailsMaps(String mapType ,String detailMap){ + detailMaps.removeItemListener(detailListener); + detailMaps.removeAllItems(); + java.util.List list = MapSvgXMLHelper.getInstance().getNamesListWithCateName(mapType); + boolean isContains = false; + for (Object name : list) { + detailMaps.addItem(name); + if(ComparatorUtils.equals(detailMap,name)){ + isContains = true; + } + } + detailMaps.addItemListener(detailListener); + return isContains; + } + + + protected void populateDetilMaps(String mapType){ + detailMaps.removeItemListener(detailListener); + detailMaps.removeAllItems(); + java.util.List list = MapSvgXMLHelper.getInstance().getNamesListWithCateName(mapType); + for (Object name : list) { + detailMaps.addItem(name); + } + detailMaps.addItemListener(detailListener); + if(detailMaps.getSelectedItem() != null){ + lastEditingName = detailMaps.getSelectedItem().toString(); + } + } + + protected Plot getSelectedClonedPlot() { + MapPlot mapPlot = new MapPlot(); + populateDetilMaps(Inter.getLocText("FR-Chart-State_Map")); + if(detailMaps.getSelectedItem()!= null && !StringUtils.isEmpty(detailMaps.getSelectedItem().toString())){ + mapPlot.setMapName(detailMaps.getSelectedItem().toString()); + } + return mapPlot; + } + + public String[] getMapTypes(){ + return TYPE_NAMES; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java b/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java new file mode 100644 index 000000000..59cfb383e --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java @@ -0,0 +1,142 @@ +/* + * Copyright(c) 2001-2011, FineReport Inc, All Rights Reserved. + */ +package com.fr.design.mainframe; + +import java.awt.BorderLayout; + +import javax.swing.Icon; +import javax.swing.JComponent; + +import com.fr.base.BaseUtils; +import com.fr.base.chart.BaseChartCollection; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.designer.TargetComponent; +import com.fr.design.gui.chart.BaseChartPropertyPane; +import com.fr.design.gui.frpane.UITitlePanel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itabpane.TitleChangeListener; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.general.Inter; + +public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{ + + protected TargetComponentContainer container = new TargetComponentContainer(); + protected UILabel nameLabel; + + protected ChartEditPane chartEditPane; + + public MiddleChartPropertyPane() { + initComponenet(); + } + + protected void initComponenet() { + this.setLayout(new BorderLayout()); + this.setBorder(null); + + createNameLabel(); + this.add(createNorthComponent(), BorderLayout.NORTH); + + chartEditPane = ChartEditPane.getInstance(); + chartEditPane.setSupportCellData(true); + this.createMainPane(); + } + + protected abstract void createNameLabel(); + + protected abstract JComponent createNorthComponent(); + + protected abstract void createMainPane(); + + public void setSureProperty() { + chartEditPane.setContainer(container); + chartEditPane.addTitleChangeListener(titleListener); + String tabname = chartEditPane.getSelectedTabName(); + nameLabel.setText(Inter.getLocText("Chart-Property_Table") + (tabname != null ? ('-' + chartEditPane.getSelectedTabName()) : "")); + resetChartEditPane(); + } + + protected void resetChartEditPane() { + remove(chartEditPane); + add(chartEditPane, BorderLayout.CENTER); + validate(); + repaint(); + revalidate(); + } + + protected TitleChangeListener titleListener = new TitleChangeListener() { + + @Override + public void fireTitleChange(String addName) { + nameLabel.setText(Inter.getLocText("Chart-Property_Table") + '-' + addName); + } + }; + + /** + * 感觉ChartCollection加载图表属性界面. + * @param collection 收集图表 + * @param ePane 面板 + */ + public void populateChartPropertyPane(ChartCollection collection, TargetComponent ePane) { + this.container.setEPane(ePane); + chartEditPane.populate(collection); + } + + /** + * 感觉ChartCollection加载图表属性界面. + * @param collection 收集图表 + * @param ePane 面板 + */ + public void populateChartPropertyPane(BaseChartCollection collection, TargetComponent ePane) { + if (collection instanceof ChartCollection) { + populateChartPropertyPane((ChartCollection)collection, ePane); + } + } + + /** + * 返回View的标题. + */ + public String getViewTitle() { + return Inter.getLocText("CellElement-Property_Table"); + } + + /** + * 返回View的Icon地址. + */ + public Icon getViewIcon() { + return BaseUtils.readIcon("/com/fr/design/images/m_report/qb.png"); + } + + /** + * 预定义定位 + * @return 定位 + */ + public Location preferredLocation() { + return Location.WEST_BELOW; + } + + /** + * 创建标题Panel + * @return 标题panel + */ + public UITitlePanel createTitlePanel() { + return new UITitlePanel(this); + } + + /** + * 刷新Dockview + */ + public void refreshDockingView() { + // TODO Auto-generated method stub + + } + + /** + * 设置是否支持单元格数据. + */ + public void setSupportCellData(boolean supportCellData) { + if(chartEditPane != null) { + chartEditPane.setSupportCellData(supportCellData); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/PlotToolBarFactory.java b/designer_chart/src/com/fr/design/mainframe/PlotToolBarFactory.java new file mode 100644 index 000000000..1bb67547d --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/PlotToolBarFactory.java @@ -0,0 +1,90 @@ +package com.fr.design.mainframe; + +import com.fr.chart.base.ChartTypeValueCollection; +import com.fr.design.mainframe.chart.gui.type.*; +import com.fr.general.FRLogger; + +import java.lang.reflect.Constructor; +import java.util.HashMap; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * 图表设计器工具栏面板的工厂类 + */ +public class PlotToolBarFactory { + private static HashMap> panes4NormalPlot = + new HashMap>(); + + private static HashMap> panes4MapPlot = + new HashMap>(); + + static { + panes4NormalPlot.put(ChartTypeValueCollection.COLUMN, ColumnPlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.LINE, LinePlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.BAR, BarPlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.PIE, PiePlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.AREA,AreaPlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.XYSCATTER,XYSCatterPlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.BUBBLE,BubblePlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.RADAR,RadarPlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.STOCK,StockPlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.METER,MeterPlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.RANGE,RangePlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.COMB,CustomPlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.GANTT,GanttPlotPane4ToolBar.class); + panes4NormalPlot.put(ChartTypeValueCollection.DONUT,DonutPlotPane4ToolBar.class); + + panes4MapPlot.put(ChartTypeValueCollection.MAP,MapPlotPane4ToolBar.class); + panes4MapPlot.put(ChartTypeValueCollection.GIS,GisMapPlotPane4ToolBar.class); + } + + private PlotToolBarFactory(){ + + } + + /** + * 为了地图和gis以外的图表类型创建工具栏 + * @param type 图表类型 + * @param chartDesigner 图表设计器 + * @return 工具栏 + */ + public static PlotPane4ToolBar createToolBar4NormalPlot(ChartTypeValueCollection type,ChartDesigner chartDesigner){ + if(!panes4NormalPlot.containsKey(type)){ + return new ColumnPlotPane4ToolBar(chartDesigner); + } + try { + Class cls = panes4NormalPlot.get(type); + Constructor constructor = cls.getConstructor(ChartDesigner.class); + return constructor.newInstance(chartDesigner); + }catch (Exception e){ + FRLogger.getLogger().error(e.getMessage()); + return new ColumnPlotPane4ToolBar(chartDesigner); + } + } + + /** + *为地图和gis创建工具栏 + * @param type 类型 + * @param chartDesigner 图表设计器 + * @return 工具栏 + */ + public static AbstractMapPlotPane4ToolBar createToolBar4MapPlot(ChartTypeValueCollection type,ChartDesigner chartDesigner){ + if(!panes4MapPlot.containsKey(type)){ + return new MapPlotPane4ToolBar(chartDesigner); + } + try { + Class cls = panes4MapPlot.get(type); + Constructor constructor = cls.getConstructor(ChartDesigner.class); + return constructor.newInstance(chartDesigner); + }catch (Exception e){ + FRLogger.getLogger().error(e.getMessage()); + return new MapPlotPane4ToolBar(chartDesigner); + } + } + + + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/TargetComponentContainer.java b/designer_chart/src/com/fr/design/mainframe/TargetComponentContainer.java new file mode 100644 index 000000000..cd14411f6 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/TargetComponentContainer.java @@ -0,0 +1,15 @@ +package com.fr.design.mainframe; + +import com.fr.design.designer.TargetComponent; + +public class TargetComponentContainer { + private TargetComponent ePane; + + public TargetComponent getEPane() { + return ePane; + } + + public void setEPane(TargetComponent ePane) { + this.ePane = ePane; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/ToolTip4Chart.java b/designer_chart/src/com/fr/design/mainframe/ToolTip4Chart.java new file mode 100644 index 000000000..83761022a --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/ToolTip4Chart.java @@ -0,0 +1,91 @@ +package com.fr.design.mainframe; + +import com.fr.base.GraphHelper; +import com.fr.base.background.ColorBackground; +import com.fr.stable.CoreConstants; + +import javax.swing.*; +import java.awt.*; +import java.awt.geom.Dimension2D; +import java.awt.geom.RoundRectangle2D; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-25 + * Time: 下午4:11 + */ +public class ToolTip4Chart extends JWindow { + private static ToolTip4Chart instance = new ToolTip4Chart(); + private static final int HGAP = 5; + private static final int VGAP = 3; + private static final int FONT_SIZE = 12; + private ToolTipStringPane stringPane; + private Font font = new Font("Dialog", Font.PLAIN, FONT_SIZE); + + public ToolTip4Chart() { + stringPane = new ToolTipStringPane(); + this.getContentPane().add(stringPane); + } + + public static ToolTip4Chart getInstance() { + if (instance == null) { + instance = new ToolTip4Chart(); + } + return instance; + } + + /** + * 现实提示信息 + * + * @param toolTip 提示信息 + * @param xAbs 绝对位置x + * @param yAbs 绝对位置Y + */ + public void showToolTip(String toolTip, int xAbs, int yAbs) { + stringPane.text = toolTip.trim(); + Dimension2D dim = GraphHelper.stringDimensionWithRotation(toolTip, font, 0, CoreConstants.DEFAULT_FRC); + this.setSize(new Dimension((int) dim.getWidth() + HGAP * 2, (int) dim.getHeight() + VGAP * 2)); + stringPane.setPreferredSize(new Dimension((int) dim.getWidth(), (int) dim.getHeight())); + if (!this.isVisible()) { + this.setVisible(true); + if (xAbs + this.getWidth() > Toolkit.getDefaultToolkit().getScreenSize().width) { + xAbs -= this.getWidth(); + } + this.setLocation(xAbs, yAbs+HGAP*2); + } + } + + /** + * 隐藏弹出框 + */ + public void hideToolTip() { + this.setVisible(false); + } + + + private class ToolTipStringPane extends JPanel { + String text; + + public ToolTipStringPane() { + + } + + @Override + public void paintComponent(Graphics g) { + super.paintComponent(g); + if (!isOpaque()) { + return; + } + g.setFont(font); + Rectangle r = new Rectangle(0, 0, this.getWidth(), this.getHeight()); + ColorBackground background = ColorBackground.getInstance(Color.white); + background.paint(g, new RoundRectangle2D.Double(r.getX(), r.getY(), r.getWidth(), r.getHeight(), HGAP, HGAP)); + Graphics2D g2d = (Graphics2D) g; + g2d.drawString(text, HGAP, this.getHeight() - HGAP); + } + + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/AbstractExportAction4JChart.java b/designer_chart/src/com/fr/design/mainframe/actions/AbstractExportAction4JChart.java new file mode 100644 index 000000000..0601bd4f4 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/AbstractExportAction4JChart.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.actions; + +import com.fr.base.FRContext; +import com.fr.design.gui.iprogressbar.FRProgressBar; +import com.fr.form.ui.ChartBook; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.DesignerFrame; +import com.fr.design.mainframe.JChart; +import com.fr.design.mainframe.exporter.Exporter4Chart; +import com.fr.file.FILE; +import com.fr.file.FILEChooserPane; +import com.fr.file.filter.ChooseFileFilter; +import com.fr.general.FRLogger; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.io.FileOutputStream; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 上午9:48 + */ +public abstract class AbstractExportAction4JChart extends JChartAction { + protected AbstractExportAction4JChart(JChart chart){ + super(chart); + } + + private FRProgressBar progressbar; + + protected ChartBook getChartBook(){ + return this.getEditingComponent().getTarget(); + } + + /** + * 执行方法 + * @param e 事件 + */ + public void actionPerformed(ActionEvent e) { + JChart chart = this.getEditingComponent(); + FILE editingFILE = chart.getEditingFILE(); + DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); + + // 弹出参数 + final java.util.Map parameterMap = new java.util.HashMap(); + final ChartBook chartBook = getChartBook(); + + // Choose a file name.... + FILEChooserPane fileChooserPane = FILEChooserPane.getInstance(false, true); + fileChooserPane.setFILEFilter(this.getChooseFileFilter()); + + // 打开文件后输出文件名修改,eg:w.cpt.doc / w.svg.doc,去掉中间的后缀名~~ w.doc + String filenName = editingFILE.getName(); + if (filenName.indexOf('.') != -1) { + filenName = filenName.substring(0, editingFILE.getName().lastIndexOf('.')); + } + fileChooserPane.setFileNameTextField(filenName, "." + this.getDefaultExtension()); + int saveValue = fileChooserPane.showSaveDialog(designerFrame, "." + this.getDefaultExtension()); + if (saveValue == FILEChooserPane.CANCEL_OPTION || saveValue == FILEChooserPane.JOPTIONPANE_CANCEL_OPTION) { + fileChooserPane = null; + return; + } else if (saveValue == FILEChooserPane.JOPTIONPANE_OK_OPTION || saveValue == FILEChooserPane.OK_OPTION) { + FILE file = fileChooserPane.getSelectedFILE(); + try { + file.mkfile(); + } catch (Exception e1) { + FRLogger.getLogger().error("Error In Make New File"); + } + fileChooserPane = null; + FRContext.getLogger().info("\"" + file.getName() + "\"" + Inter.getLocText("Prepare_Export") + "!"); + + (progressbar = new FRProgressBar(createExportWork(file, chartBook), designerFrame, + Inter.getLocText("Exporting"), "", 0, 100)).start(); + } + + } + + private SwingWorker createExportWork(FILE file, final ChartBook chartBook) { + final String filePath = file.getPath(); + final String fileGetName = file.getName(); + + SwingWorker exportWorker = new SwingWorker() { + protected Void doInBackground() throws Exception { + Thread.sleep(100); //bug 10516 + try { + final FileOutputStream fileOutputStream = new FileOutputStream(filePath); + + this.setProgress(10); + dealExporter(fileOutputStream,chartBook); + this.setProgress(80); + fileOutputStream.close(); + this.setProgress(100); + + FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("Finish_Export") + "!"); + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), + Inter.getLocText("Exported_successfully") + "\n" + filePath); + } catch (Exception exp) { + this.setProgress(100); + FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Export_failed") + "\n" + filePath); + } + return null; + } + + public void done() { + progressbar.close(); + } + }; + return exportWorker; + } + + private void dealExporter(FileOutputStream fileOutputStream, final ChartBook chartBook) throws Exception { + final Exporter4Chart exporter = AbstractExportAction4JChart.this.getExporter(); + exporter.export(fileOutputStream,this.getEditingComponent()); + } + + + + protected abstract ChooseFileFilter getChooseFileFilter(); + + protected abstract String getDefaultExtension(); + + protected abstract Exporter4Chart getExporter(); + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/ChartDownLoadWorker.java b/designer_chart/src/com/fr/design/mainframe/actions/ChartDownLoadWorker.java new file mode 100644 index 000000000..ddcf70aa7 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/ChartDownLoadWorker.java @@ -0,0 +1,170 @@ +package com.fr.design.mainframe.actions; + +import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.file.SaveSomeTemplatePane; +import com.fr.design.mainframe.DesignerContext; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.json.JSONObject; +import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.net.URL; +import java.net.URLConnection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Set; +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class ChartDownLoadWorker extends SwingWorker{ + private static final String FILE_PATH = "http://chart.finedevelop.com/update/"; + private static final String VERSION = "version"; + private static final String TEMP = "_temp"; + private static final int BYTE = 153600; + private static final int FILE_BYTE = 1024; + private HashMap files = new HashMap(); + + public ChartDownLoadWorker() { + } + + private void loadFilesPaths() throws Exception { + files.clear(); + final String installHome = StableUtils.getInstallHome(); + + JSONObject serverVersion = UpdateVersion.getJsonContent(); + if(serverVersion == null){ + return; + } + Iterator keys = serverVersion.keys(); + while (keys.hasNext()){ + String jarName = keys.next(); + if(!ComparatorUtils.equals(jarName, VERSION)){ + String filePath = (String) serverVersion.get(jarName); + String path =installHome + filePath.substring(2); + files.put(jarName,path); + } + } + files.isEmpty(); + } + + @Override + protected Void doInBackground() throws Exception { + try { + loadFilesPaths(); + Set key = files.keySet(); + Iterator iterator = key.iterator(); + int totalSize = 0; + //先得到所有的长度,方便计算百分比 + while (iterator.hasNext()) { + String jarName = (String) iterator.next(); + String jarUrl = FILE_PATH + jarName; + URL url = new URL(jarUrl); + URLConnection connection = url.openConnection(); + totalSize += connection.getContentLength(); + } + + int totalBytesRead = 0; + iterator = key.iterator(); + while (iterator.hasNext()) { + String jarName = (String) iterator.next(); + String jarUrl = FILE_PATH + jarName; + URL url = new URL(jarUrl); + InputStream reader = url.openStream(); + String filePath = files.get(jarName); + int point = filePath.lastIndexOf("."); + //先写临时文件,防止更新一半意外中止 + String tmpFilePath = filePath.substring(0,point)+TEMP+filePath.substring(point); + FileOutputStream writer = new FileOutputStream(tmpFilePath); + byte[] buffer = new byte[BYTE]; + int bytesRead = 0; + while ((bytesRead = reader.read(buffer)) > 0) { + writer.write(buffer, 0, bytesRead); + buffer = new byte[BYTE]; + totalBytesRead += bytesRead; + publish(totalBytesRead/(double)totalSize); + } + } + + + } catch (Exception e) { + throw new Exception("Update Failed !" + e.getMessage()); + } + + return null; + } + + //替换更新下来的临时文件 + protected void replaceFiles(){ + try { + Set key = files.keySet(); + Iterator iterator = key.iterator(); + while (iterator.hasNext()) { + String jarName = (String) iterator.next(); + String filePath = files.get(jarName); + int point = filePath.lastIndexOf("."); + //先写临时文件,防止更新一半意外中止 + String tmpFilePath = filePath.substring(0,point)+TEMP+filePath.substring(point); + FileInputStream inputStream = new FileInputStream(tmpFilePath); + FileOutputStream writer = new FileOutputStream(filePath); + byte[] buffer = new byte[FILE_BYTE]; + int bytesRead = 0; + while ((bytesRead = inputStream.read(buffer))>0){ + writer.write(buffer,0,bytesRead); + buffer = new byte[FILE_BYTE]; + } + writer.flush(); + writer.close(); + inputStream.close(); + } + } catch (Exception e) { + FRLogger.getLogger().error(e.getMessage()); + } + } + + /** + * 完成时的动作 + */ + public void done() { + //检测是否没有保存的模版 + SaveSomeTemplatePane saveSomeTempaltePane = new SaveSomeTemplatePane(true); + // 只有一个文件未保存时 + if (HistoryTemplateListPane.getInstance().getHistoryCount() == 1) { + int choose = saveSomeTempaltePane.saveLastOneTemplate(); + if (choose != JOptionPane.CANCEL_OPTION) { + restartChartDesigner(); + } + } else { + if (saveSomeTempaltePane.showSavePane()) { + restartChartDesigner(); + } + } + } + + private void restartChartDesigner(){ + String installHome = StableUtils.getInstallHome(); + if(StringUtils.isEmpty(installHome) || ComparatorUtils.equals(".",installHome)){ + DesignerContext.getDesignerFrame().exit(); + return; + } + + try { + String path = installHome + File.separator + "bin" + File.separator + "restart.bat"; + ProcessBuilder builder = new ProcessBuilder(path,installHome); + builder.start(); + DesignerContext.getDesignerFrame().exit(); + }catch (Exception e){ + FRLogger.getLogger().error(e.getMessage()); + } + } + + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/ChartFeedBackAciton.java b/designer_chart/src/com/fr/design/mainframe/actions/ChartFeedBackAciton.java new file mode 100644 index 000000000..782d1a400 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/ChartFeedBackAciton.java @@ -0,0 +1,51 @@ +package com.fr.design.mainframe.actions; + +import com.fr.design.actions.help.FeedBackAction; +import com.fr.design.actions.help.FeedBackPane; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.DesignerFrame; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class ChartFeedBackAciton extends FeedBackAction{ + + /** + * 动作 + * @param e 事件 + */ + public void actionPerformed(ActionEvent e) { + final DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); + ChartFeedBackPane feedBackPane = new ChartFeedBackPane(); + BasicDialog basicDialog =feedBackPane.showWindow(designerFrame,false); + feedBackPane.setFeedbackDialog(basicDialog); + basicDialog.setVisible(true); + } + + private class ChartFeedBackPane extends FeedBackPane{ + protected JPanel getContactPane() { + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("email") + ":", SwingConstants.RIGHT), email}, + new Component[]{new UILabel(Inter.getLocText("mobile_number") + ":", SwingConstants.RIGHT), phone} + }; + double[] rowSize = {p, p, p}; + double[] columnSize = {p, p}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/ChartUpdateAction.java b/designer_chart/src/com/fr/design/mainframe/actions/ChartUpdateAction.java new file mode 100644 index 000000000..05cb46b14 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/ChartUpdateAction.java @@ -0,0 +1,25 @@ +package com.fr.design.mainframe.actions; + +import com.fr.design.actions.UpdateAction; + +import java.awt.event.ActionEvent; + +/** + * @author : richie + * @since : 8.0 + */ +public class ChartUpdateAction extends UpdateAction { + + private static final String DOWNLOAD_DESIGNER=""; + private static final String DOWNLOAD_CHART=""; + private static final String DOWNLOAD_THIRD=""; + + public ChartUpdateAction() { + + } + + @Override + public void actionPerformed(ActionEvent e) { + + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/ChartWebAction.java b/designer_chart/src/com/fr/design/mainframe/actions/ChartWebAction.java new file mode 100644 index 000000000..24218c876 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/ChartWebAction.java @@ -0,0 +1,56 @@ +package com.fr.design.mainframe.actions; + +import com.fr.base.BaseUtils; +import com.fr.design.actions.UpdateAction; +import com.fr.design.menu.MenuKeySet; +import com.fr.general.Inter; +import com.fr.start.StartServer; + +import javax.swing.*; +import java.awt.event.ActionEvent; + +/** + * 图表设计器得产品演示 + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-27 + * Time: 下午9:01 + */ +public class ChartWebAction extends UpdateAction { + public ChartWebAction() { + this.setMenuKeySet(getSelfMenuKeySet()); + this.setName(getMenuKeySet().getMenuName()); + this.setMnemonic(getMenuKeySet().getMnemonic()); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_help/demo.png")); + } + + private MenuKeySet getSelfMenuKeySet(){ + return new MenuKeySet() { + @Override + public char getMnemonic() { + return 'D'; + } + + @Override + public String getMenuName() { + return Inter.getLocText("FR-Chart-Product_Demo"); + } + + @Override + public KeyStroke getKeyStroke() { + return null; + } + }; + } + + + /** + * 动作 + * @param e 事件 + */ + public void actionPerformed(ActionEvent e) { + StartServer.browerURLWithLocalEnv("http://www.vancharts.com/demo.html"); + return; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/ExcelExportAction4Chart.java b/designer_chart/src/com/fr/design/mainframe/actions/ExcelExportAction4Chart.java new file mode 100644 index 000000000..aa703f311 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/ExcelExportAction4Chart.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.actions; + +import com.fr.base.BaseUtils; +import com.fr.base.ExcelUtils; +import com.fr.design.mainframe.JChart; +import com.fr.design.mainframe.exporter.ExcelExporter4Chart; +import com.fr.design.mainframe.exporter.Exporter4Chart; +import com.fr.design.menu.MenuKeySet; +import com.fr.file.filter.ChooseFileFilter; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.event.KeyEvent; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 上午9:52 + */ +public class ExcelExportAction4Chart extends AbstractExportAction4JChart { + + private MenuKeySet excel= new MenuKeySet() { + @Override + public char getMnemonic() { + return 'E'; + } + + @Override + public String getMenuName() { + return Inter.getLocText("FR-Chart-Format_Excel"); + } + + @Override + public KeyStroke getKeyStroke() { + return KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyEvent.CTRL_MASK); + } + }; + + public ExcelExportAction4Chart(JChart chart) { + super(chart); + this.setMenuKeySet(excel); + this.setName(getMenuKeySet().getMenuKeySetName()); + this.setMnemonic(getMenuKeySet().getMnemonic()); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/excel.png")); + } + + + @Override + protected ChooseFileFilter getChooseFileFilter() { + return new ChooseFileFilter(new String[]{"xls", "xlsx"}, Inter.getLocText("Export-Excel")); + } + + @Override + protected String getDefaultExtension() { + return ExcelUtils.checkPOIJarExist() ? "xlsx" : "xls"; + } + + @Override + protected Exporter4Chart getExporter() { + return new ExcelExporter4Chart(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/JChartAction.java b/designer_chart/src/com/fr/design/mainframe/actions/JChartAction.java new file mode 100644 index 000000000..ba4667875 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/JChartAction.java @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.actions; + +import com.fr.design.actions.JTemplateAction; +import com.fr.design.mainframe.JChart; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 上午9:47 + */ +public abstract class JChartAction extends JTemplateAction { + public JChartAction(JChart jChart) { + super(jChart); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/NewChartAction.java b/designer_chart/src/com/fr/design/mainframe/actions/NewChartAction.java new file mode 100644 index 000000000..bd62a689b --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/NewChartAction.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.actions; + +import com.fr.base.BaseUtils; +import com.fr.design.actions.UpdateAction; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.JChart; +import com.fr.design.menu.MenuKeySet; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-13 + * Time: 下午3:22 + */ +public class NewChartAction extends UpdateAction{ + + public NewChartAction(){ + this.setMenuKeySet(NEW_CHART); + this.setName(getMenuKeySet().getMenuKeySetName()); + this.setMnemonic(getMenuKeySet().getMnemonic()); + this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/newchart_normal.png")); + this.setAccelerator(getMenuKeySet().getKeyStroke()); + } + + + /** + * 执行事件 + * @param e 事件 + */ + public void actionPerformed(ActionEvent e) { + DesignerContext.getDesignerFrame().addAndActivateJTemplate(new JChart()); + } + + public static final MenuKeySet NEW_CHART = new MenuKeySet() { + @Override + public char getMnemonic() { + return 'F'; + } + + @Override + public String getMenuName() { + return Inter.getLocText("M-New_ChartBook"); + } + + @Override + public KeyStroke getKeyStroke() { + return KeyStroke.getKeyStroke(KeyEvent.VK_F, InputEvent.CTRL_MASK); + } + }; +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/OpenChartAction.java b/designer_chart/src/com/fr/design/mainframe/actions/OpenChartAction.java new file mode 100644 index 000000000..82b95c736 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/OpenChartAction.java @@ -0,0 +1,35 @@ +package com.fr.design.mainframe.actions; + +import com.fr.design.actions.file.OpenTemplateAction; +import com.fr.design.mainframe.DesignerContext; +import com.fr.file.FILE; +import com.fr.file.FILEChooserPane; +import com.fr.file.FILEChooserPane4Chart; + +import java.awt.event.ActionEvent; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-20 + * Time: 下午7:35 + */ +public class OpenChartAction extends OpenTemplateAction { + /** + * 动作 + * @param evt 事件 + */ + public void actionPerformed(ActionEvent evt) { + FILEChooserPane fileChooser = FILEChooserPane4Chart.getInstance(true, true); + + if (fileChooser.showOpenDialog(DesignerContext.getDesignerFrame(),".crt") + == FILEChooserPane.OK_OPTION) { + final FILE file = fileChooser.getSelectedFILE(); + if (file == null) {//选择的文件不能是 null + return; + } + DesignerContext.getDesignerFrame().openTemplate(file); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/PDFExportAction4Chart.java b/designer_chart/src/com/fr/design/mainframe/actions/PDFExportAction4Chart.java new file mode 100644 index 000000000..df2f95598 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/PDFExportAction4Chart.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.actions; + +import com.fr.base.BaseUtils; +import com.fr.design.mainframe.JChart; +import com.fr.design.mainframe.exporter.Exporter4Chart; +import com.fr.design.mainframe.exporter.PdfExporter4Chart; +import com.fr.design.menu.MenuKeySet; +import com.fr.file.filter.ChooseFileFilter; +import com.fr.general.Inter; + +import javax.swing.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 上午10:16 + */ +public class PDFExportAction4Chart extends AbstractExportAction4JChart { + + private MenuKeySet pdf = new MenuKeySet() { + @Override + public char getMnemonic() { + return 'P'; + } + + @Override + public String getMenuName() { + return Inter.getLocText("FR-Chart-Format_PDF"); + } + + @Override + public KeyStroke getKeyStroke() { + return null; + } + }; + + public PDFExportAction4Chart(JChart chart) { + super(chart); + this.setMenuKeySet(pdf); + this.setName(getMenuKeySet().getMenuKeySetName()); + this.setMnemonic(getMenuKeySet().getMnemonic()); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/pdf.png")); + } + + @Override + protected ChooseFileFilter getChooseFileFilter() { + return new ChooseFileFilter(new String[]{"pdf"}, Inter.getLocText("Export-PDF")); + } + + @Override + protected String getDefaultExtension() { + return "pdf"; + } + + @Override + protected Exporter4Chart getExporter() { + return new PdfExporter4Chart(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/PNGExportAction4Chart.java b/designer_chart/src/com/fr/design/mainframe/actions/PNGExportAction4Chart.java new file mode 100644 index 000000000..2b04f80d4 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/PNGExportAction4Chart.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.actions; + +import com.fr.base.BaseUtils; +import com.fr.design.mainframe.JChart; +import com.fr.design.mainframe.exporter.Exporter4Chart; +import com.fr.design.mainframe.exporter.ImageExporter4Chart; +import com.fr.design.menu.MenuKeySet; +import com.fr.file.filter.ChooseFileFilter; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.event.KeyEvent; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 上午10:18 + */ +public class PNGExportAction4Chart extends AbstractExportAction4JChart { + + private MenuKeySet menuSet = new MenuKeySet() { + @Override + public char getMnemonic() { + return 'M'; + } + + @Override + public String getMenuName() { + return Inter.getLocText("FR-Chart-Format_Image"); + } + + @Override + public KeyStroke getKeyStroke() { + return KeyStroke.getKeyStroke(KeyEvent.VK_M, KeyEvent.CTRL_MASK); + } + }; + + public PNGExportAction4Chart(JChart chart) { + super(chart); + this.setMenuKeySet(menuSet); + this.setName(getMenuKeySet().getMenuKeySetName()); + this.setMnemonic(getMenuKeySet().getMnemonic()); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/exportimg.png")); + } + + @Override + protected ChooseFileFilter getChooseFileFilter() { + return new ChooseFileFilter(new String[]{"png"}, Inter.getLocText("Image")); + } + + @Override + protected String getDefaultExtension() { + return "png"; + } + + @Override + protected Exporter4Chart getExporter() { + return new ImageExporter4Chart(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/UpdateOnlineAction.java b/designer_chart/src/com/fr/design/mainframe/actions/UpdateOnlineAction.java new file mode 100644 index 000000000..42419128e --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/UpdateOnlineAction.java @@ -0,0 +1,74 @@ +package com.fr.design.mainframe.actions; + +import com.fr.design.ChartEnvManager; +import com.fr.design.actions.UpdateAction; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.chart.UpdateOnLinePane; +import com.fr.design.menu.MenuKeySet; +import com.fr.general.FRLogger; +import com.fr.general.Inter; +import com.fr.json.JSONObject; +import com.fr.stable.ProductConstants; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import java.awt.event.ActionEvent; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * 图表设计器在线更新 + */ +public class UpdateOnlineAction extends UpdateAction { + + public UpdateOnlineAction() { + this.setMenuKeySet(getKeySet()); + this.setName(getMenuKeySet().getMenuKeySetName() + "..."); + this.setMnemonic(getMenuKeySet().getMnemonic()); + } + + private MenuKeySet getKeySet() { + return new MenuKeySet() { + @Override + public char getMnemonic() { + return 'U'; + } + + @Override + public String getMenuName() { + return Inter.getLocText("FR-Chart-Help_UpdateOnline"); + } + + @Override + public KeyStroke getKeyStroke() { + return null; + } + }; + } + + + /** + *动作 + * @param e 事件 + */ + public void actionPerformed(ActionEvent e) { + new UpdateVersion(){ + protected void done() { + try { + ChartEnvManager.getEnvManager().resetCheckDate(); + JSONObject serverVersion = get(); + String version = serverVersion.getString(UpdateVersion.VERSION); + UpdateOnLinePane updateOnLinePane = new UpdateOnLinePane(StringUtils.isEmpty(version)? ProductConstants.RELEASE_VERSION:version); + BasicDialog dg = updateOnLinePane.showWindow4UpdateOnline(DesignerContext.getDesignerFrame()); + updateOnLinePane.setParentDialog(dg); + dg.setVisible(true); + }catch (Exception e){ + FRLogger.getLogger().error(e.getMessage()); + } + } + }.execute(); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/actions/UpdateVersion.java b/designer_chart/src/com/fr/design/mainframe/actions/UpdateVersion.java new file mode 100644 index 000000000..0d5088ee7 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/actions/UpdateVersion.java @@ -0,0 +1,69 @@ +package com.fr.design.mainframe.actions; + +import com.fr.general.FRLogger; +import com.fr.json.JSONObject; + +import javax.swing.*; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class UpdateVersion extends SwingWorker { + + private static final String VERSION_URL ="http://chart.finedevelop.com/update/update.json"; + private static final int TIME_OUT = 300;//5s + public static final String VERSION = "version"; + + public UpdateVersion(){ + + } + + + @Override + protected JSONObject doInBackground() throws Exception { + return getJsonContent(); + } + + public static JSONObject getJsonContent() throws Exception{ + String res = null; + try { + res = readVersionFromServer(TIME_OUT); + } catch (IOException e) { + FRLogger.getLogger().error(e.getMessage()); + } + return new JSONObject(res); + } + + /** + * 从服务器读取版本 + */ + private static String readVersionFromServer(int timeOut) throws IOException { + URL getUrl = new URL(VERSION_URL); + // 根据拼凑的URL,打开连接,URL.openConnection函数会根据URL的类型, + // 返回不同的URLConnection子类的对象,这里URL是一个http,因此实际返回的是HttpURLConnection + HttpURLConnection connection = (HttpURLConnection) getUrl + .openConnection(); + connection.setReadTimeout(timeOut); + // 进行连接,但是实际上get request要在下一句的connection.getInputStream()函数中才会真正发到 + // 服务器 + connection.connect(); + // 取得输入流,并使用Reader读取 + BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "utf8"));//设置编码,否则中文乱码 + String lines; + StringBuffer sb = new StringBuffer(); + while ((lines = reader.readLine()) != null) { + sb.append(lines); + } + reader.close(); + // 断开连接 + connection.disconnect(); + return sb.toString(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java b/designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java new file mode 100644 index 000000000..23f21463b --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/AbstractChartAttrPane.java @@ -0,0 +1,35 @@ +package com.fr.design.mainframe.chart; + + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; + +public abstract class AbstractChartAttrPane extends AbstractAttrNoScrollPane { + public abstract void populate(ChartCollection collection); + + public abstract void update(ChartCollection collection); + + public void populateBean(ChartCollection collection) { + if (collection == null) { + return; + } + removeAttributeChangeListener(); + populate(collection); + } + + /** + * 注册图表切换按钮 改变的 事件. + * @param isFromChartHyper 编辑面板 + */ + public void registerChartEditPane(ChartEditPane isFromChartHyper) { + + } + + /** + * 刷新图表数据界面 + * @param collection 图表收集器 + */ + public void refreshChartDataPane(ChartCollection collection){ + + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/AttributeChange.java b/designer_chart/src/com/fr/design/mainframe/chart/AttributeChange.java new file mode 100644 index 000000000..ddd4bdf4e --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/AttributeChange.java @@ -0,0 +1,8 @@ +package com.fr.design.mainframe.chart; + + +public interface AttributeChange { + + public void fire(); + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartDesignEditPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartDesignEditPane.java new file mode 100644 index 000000000..c5190b9bc --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartDesignEditPane.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.chart; + +import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.mainframe.chart.gui.*; + +import java.util.ArrayList; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 下午5:47 + */ +public class ChartDesignEditPane extends ChartEditPane { + + private static ChartDesignEditPane instance; + + private boolean isFromToolBar = false; + + public synchronized static ChartEditPane getInstance() { + if (instance == null) { + instance = new ChartDesignEditPane(); + } + return instance; + } + + public ChartDesignEditPane() { + paneList = new ArrayList(); + dataPane4SupportCell = new ChartDesignerDataPane(listener); + paneList.add(dataPane4SupportCell); + paneList.add(new StylePane4Chart(listener, false)); + paneList.add(new ChartDesignerOtherPane()); + createTabsPane(); + } + + protected void dealWithStyleChange(){ + if(!isFromToolBar){ + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().styleChange(); + } + } + + /** + *主要用于图表设计器,判断样式改变是否来自工具栏的全局样式按钮 + * @param isFromToolBar 是否来自工具栏 + */ + public void styleChange(boolean isFromToolBar){ + this.isFromToolBar = isFromToolBar; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java new file mode 100644 index 000000000..204062e44 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java @@ -0,0 +1,343 @@ +package com.fr.design.mainframe.chart; + + +import com.fr.base.BaseUtils; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.ChartTypeInterfaceManager; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.data.DesignTableDataManager; +import com.fr.design.data.tabledata.Prepare4DataSourceChange; +import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.ibutton.UIHeadGroup; +import com.fr.design.gui.itabpane.TitleChangeListener; +import com.fr.design.mainframe.EastRegionContainerPane; +import com.fr.design.mainframe.TargetComponentContainer; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartOtherPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.ChartTypePane; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.Inter; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; + +public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4DataSourceChange { + public synchronized static ChartEditPane getInstance() { + if (singleton == null) { + singleton = new ChartEditPane(); + } + return singleton; + } + + private final static int CHANGE_MIN_TIME = 80; + + protected ChartCollection collection; + protected boolean isDefaultPane = true;//是否是默认的界面 + + private static ChartEditPane singleton; + protected List paneList; + + protected ChartTypePane typePane; + protected ChartDataPane dataPane4SupportCell = null; + protected ChartStylePane stylePane; + protected ChartOtherPane otherPane; + + protected UIHeadGroup tabsHeaderIconPane; + private ChartCollection lastCollection; + protected CardLayout card; + protected JPanel center; + private TargetComponentContainer container = null; + private TitleChangeListener titleChangeListener = null; + + private Calendar lastTime; + + protected ChartEditPane() { + this.setLayout(new BorderLayout()); + + paneList = new ArrayList(); + typePane = new ChartTypePane(); + dataPane4SupportCell = new ChartDataPane(listener); + dataPane4SupportCell.setSupportCellData(true); + stylePane = new ChartStylePane(listener); + otherPane = new ChartOtherPane(); + + paneList.add(typePane); + paneList.add(dataPane4SupportCell); + paneList.add(stylePane); + paneList.add(otherPane); + + createTabsPane(); + registerDSChangeListener(); + } + + //构建主面板 + protected void createTabsPane() { + Icon[] iconArray = new Icon[paneList.size()]; + card = new CardLayout(); + center = new JPanel(card); + for (int i = 0; i < paneList.size(); i++) { + AbstractChartAttrPane pane = paneList.get(i); + iconArray[i] = BaseUtils.readIcon(pane.getIconPath()); + center.add(pane, pane.title4PopupWindow()); + } + + tabsHeaderIconPane = new UIHeadGroup(iconArray) { + @Override + public void tabChanged(int index) { + paneList.get(index).populateBean(collection); + paneList.get(index).addAttributeChangeListener(listener); + card.show(center, paneList.get(index).title4PopupWindow()); + if (titleChangeListener != null) { + titleChangeListener.fireTitleChange(getSelectedTabName()); + } + } + }; + tabsHeaderIconPane.setNeedLeftRightOutLine(false); + this.add(tabsHeaderIconPane, BorderLayout.NORTH); + this.add(center, BorderLayout.CENTER); + } + + AttributeChangeListener listener = new AttributeChangeListener() { + @Override + public void attributeChange() { + if (lastTime != null && Calendar.getInstance().getTimeInMillis() - lastTime.getTimeInMillis() < CHANGE_MIN_TIME) { + return; + } + AbstractChartAttrPane selectedPane = paneList.get(tabsHeaderIconPane.getSelectedIndex()); + selectedPane.update(collection); + if (!ComparatorUtils.equals(collection, lastCollection)) { + try { + lastCollection = (ChartCollection) collection.clone(); + } catch (CloneNotSupportedException e) { + FRLogger.getLogger().error("error in clone ChartEditPane"); + } + if(ComparatorUtils.equals(selectedPane.title4PopupWindow(),PaneTitleConstants.CHART_STYLE_TITLE)){ + dealWithStyleChange(); + } + + fire(); + } + } + }; + + /** + * 重新构造面板 + * @param currentChart 图表 + */ + public void reLayout(Chart currentChart){ + if(currentChart != null){ + int chartIndex = getSelectedChartIndex(currentChart); + this.removeAll(); + this.setLayout(new BorderLayout()); + paneList = new ArrayList(); + addTypeAndDataPane(); + + boolean isDefault = true; + String plotID = ""; + if(currentChart.getPlot() != null){ + plotID = currentChart.getPlot().getPlotID(); + isDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID); + } + + if(isDefault){ + paneList.add(stylePane); + paneList.add(otherPane); + this.isDefaultPane = true; + }else{ + AbstractChartAttrPane[] otherPaneList = ChartTypeInterfaceManager.getInstance().getAttrPaneArray(plotID, listener); + for(int i = 0; i < otherPaneList.length; i++){ + otherPaneList[i].addAttributeChangeListener(listener); + paneList.add(otherPaneList[i]); + } + this.isDefaultPane = false; + } + createTabsPane(); + setSelectedTab(); + } + } + + protected void addTypeAndDataPane() { + paneList.add(typePane); + paneList.add(dataPane4SupportCell); + + } + + protected void setSelectedTab() { + } + + /** + * 设置是否支持单元格 + */ + public void setSupportCellData(boolean supportCellData) { + if (dataPane4SupportCell != null) { + dataPane4SupportCell.setSupportCellData(supportCellData); + } + } + + /** + * 返回选中的tab名称. + */ + public String getSelectedTabName() { + int index = Math.min(tabsHeaderIconPane.getSelectedIndex(), paneList.size() - 1); + return paneList.get(index).title4PopupWindow(); + } + + /** + * 添加标题变化监听事件. + * + * @param titleChangeListener 标题的ChangeListener + */ + public void addTitleChangeListener(TitleChangeListener titleChangeListener) { + this.titleChangeListener = titleChangeListener; + } + + /** + * 设置容器. + */ + public void setContainer(TargetComponentContainer container) { + this.container = container; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Property_Table"); + } + + public void populate(ChartCollection collection) { + if (collection.getChartCount() <= 0) { + return; + } + + if(checkNeedsReLayout(collection.getSelectedChart())){ + reLayout(collection.getSelectedChart()); + } + + this.collection = collection; + paneList.get(tabsHeaderIconPane.getSelectedIndex()).populateBean(collection); + paneList.get(tabsHeaderIconPane.getSelectedIndex()).addAttributeChangeListener(listener); + + for (int i = 0; i < paneList.size(); i++) { + paneList.get(i).registerChartEditPane(getCurrentChartEditPane()); + } + } + + protected ChartEditPane getCurrentChartEditPane() { + return this; + } + + + /** + * 响应事件. + */ + public void fire() { + if (container != null && container.getEPane() != null) { + container.getEPane().fireTargetModified(); + } + } + + public int getSelectedChartIndex(Chart chart){ + int index = 0; + if(typePane != null){ + FurtherBasicBeanPane[] paneList = typePane.getPaneList(); + for(; index < paneList.length; index++){ + if(paneList[index].accept(chart)){ + return index; + } + } + } + return index; + } + + //populate的时候看看要不要重构面板 + private boolean checkNeedsReLayout(Chart chart){ + if(chart != null){ + int lastIndex = typePane.getSelectedIndex(); + int currentIndex = getSelectedChartIndex(chart); + boolean currentPane = true; + if(chart.getPlot() != null){ + String plotID = chart.getPlot().getPlotID(); + currentPane = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID); + } + return (currentPane != isDefaultPane) || (!currentPane && lastIndex != currentIndex); + } + return false; + } + + /** + * 当前界面是否是默认的界面 + * @return 是否是默认的界面 + */ + public boolean isDefaultPane(){ + return this.isDefaultPane; + } + + /** + * 展开到对应id的pane. + * + * @param id 界面的标志.id + */ + public void GoToPane(String... id) { + this.setSelectedIndex(id); + EastRegionContainerPane.getInstance().setWindow2PreferWidth(); + } + + /** + * 设置选中的id + * + * @param id 界面的标志.id + */ + public void setSelectedIndex(String... id) { + String firstid = id[0]; + for (int i = 0; i < paneList.size(); i++) { + if (ComparatorUtils.equals(firstid, paneList.get(i).title4PopupWindow())) { + tabsHeaderIconPane.setSelectedIndex(i); + if (id.length >= 2) { + paneList.get(i).setSelectedByIds(1, id); + } + break; + } + } + } + + protected void dealWithStyleChange(){ + + } + + /** + *主要用于图表设计器,判断样式改变是否来自工具栏的全局样式按钮 + * @param isFromToolBar 是否来自工具栏 + */ + public void styleChange(boolean isFromToolBar){ + + } + + /** + * 图表设计器,显示选中的面板 + */ + public void populateSelectedTabPane() { + int index = tabsHeaderIconPane.getSelectedIndex(); + paneList.get(index).populateBean(collection); + paneList.get(index).addAttributeChangeListener(listener); + } + + /** + * 数据集改变的事件监听 + */ + public void registerDSChangeListener() { + DesignTableDataManager.addDsChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + AbstractChartAttrPane attrPane = paneList.get(tabsHeaderIconPane.getSelectedIndex()); + attrPane.refreshChartDataPane(collection); + } + }); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java new file mode 100644 index 000000000..3c99eff5d --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartHyperEditPane.java @@ -0,0 +1,96 @@ +package com.fr.design.mainframe.chart; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.web.ChartHyperPoplink; +import com.fr.design.chart.gui.ChartComponent; +import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPopAttrPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.ChartOtherPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.ChartTypePane; + +import java.util.ArrayList; + + +/** + * 图表 超级链接 tab 切换 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-8-6 下午02:18:23 + */ +public class ChartHyperEditPane extends ChartEditPane { + + private ChartComponent useChartComponent; + private ChartHyperPopAttrPane attrPane; + + public ChartHyperEditPane(int paraType) { + paneList = new ArrayList(); + + paneList.add(attrPane = new ChartHyperPopAttrPane(paraType)); + paneList.add(new ChartTypePane()); + + dataPane4SupportCell = new ChartDataPane(listener); + dataPane4SupportCell.setSupportCellData(false); + paneList.add(dataPane4SupportCell); + paneList.add(new ChartStylePane(listener)); + paneList.add(new ChartOtherPane()); + + createTabsPane(); + } + + + protected void addTypeAndDataPane() { + paneList.add(attrPane); + paneList.add(typePane); + paneList.add(dataPane4SupportCell); + + } + + + protected void setSelectedTab() { + tabsHeaderIconPane.setSelectedIndex(1); + card.show(center, getSelectedTabName()); + for (int i = 0; i < paneList.size(); i++) { + paneList.get(i).registerChartEditPane(getCurrentChartEditPane()); + } + } + + protected ChartEditPane getCurrentChartEditPane() { + return this; + } + + /** + * 关联 对应的ChartComponent + * @param chartComponent 对应的ChartComponent + */ + public void useChartComponent(ChartComponent chartComponent) { + this.useChartComponent = chartComponent; + } + + /** + * 响应超级链接中的demo变化. + */ + public void fire() { + if(useChartComponent != null) { + useChartComponent.populate(this.collection); + useChartComponent.reset(); + } + } + + /** + * 取 + * @param hyperlink 超链 + */ + public void populateHyperLink(ChartHyperPoplink hyperlink) { + attrPane.populateBean(hyperlink); + populate((ChartCollection)hyperlink.getChartCollection()); + } + + /** + * 存 + * @param hyperlink 超链 + */ + public void updateHyperLink(ChartHyperPoplink hyperlink) { + attrPane.updateBean(hyperlink); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/PaneTitleConstants.java b/designer_chart/src/com/fr/design/mainframe/chart/PaneTitleConstants.java new file mode 100644 index 000000000..0a9176030 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/PaneTitleConstants.java @@ -0,0 +1,25 @@ +package com.fr.design.mainframe.chart; + +import com.fr.general.Inter; + +public class PaneTitleConstants { + public final static String CHART_TYPE_TITLE = Inter.getLocText("Type"); + public final static String CHART_DATA_TITLE = Inter.getLocText("Data"); + public final static String CHART_STYLE_TITLE = Inter.getLocText("Style"); + public final static String CHART_OTHER_TITLE = Inter.getLocText("Animation_Special"); + + public final static String CHART_STYLE_TITLE_TITLE = Inter.getLocText("Title"); + public final static String CHART_STYLE_LEGNED_TITLE = Inter.getLocText("ChartF-Legend"); + public final static String CHART_STYLE_SERIES_TITLE = Inter.getLocText("ChartF-Series"); + public final static String CHART_STYLE_AXIS_TITLE = Inter.getLocText("ChartF-Axis"); + public final static String CHART_STYLE_AREA_TITLE = Inter.getLocText("Background"); + public final static String CHART_STYLE_DATA_TITLE = Inter.getLocText("Chart_Data_Sheet"); + public final static String CHART_STYLE_LABEL_TITLE = Inter.getLocText("Data-Label"); + public final static String CHART_STYLE_LINE_TITLE = Inter.getLocText("AnalysisLine"); + + public final static String CHART_STYLE_AREA_AREA_TITLE = Inter.getLocText("D-ChartArea"); + public final static String CHART_STYLE_AREA_PLOT_TITLE = Inter.getLocText("ChartF-Plot"); + + public final static String CHART_OTHER_TITLE_CHANGE = Inter.getLocText("Chart-Switch"); + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/UpdateOnLinePane.java b/designer_chart/src/com/fr/design/mainframe/chart/UpdateOnLinePane.java new file mode 100644 index 000000000..c889ddc71 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/UpdateOnLinePane.java @@ -0,0 +1,238 @@ +package com.fr.design.mainframe.chart; + +import com.fr.design.ChartEnvManager; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.actions.ChartDownLoadWorker; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.ProductConstants; + +import javax.swing.*; +import javax.swing.border.EmptyBorder; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.text.DecimalFormat; +import java.text.NumberFormat; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + * 在线更新面板 + */ +public class UpdateOnLinePane extends BasicPane{ + private static final int GAP = 40; + private static final int H_GAP = 16; + private static final int SIDE_GAP =30; + private static final int RIGHT_BORDER_GAP = 34; + private static final Color LABEL_COLOR = new Color(114,114,114); + private static final int MESSAGE_FONT_SIZE = 20; + private static final int PUSH_FONT_SIZE = 12; + private static final int PROGRESS_WIDTH = 500; + private static final int PROGRESS_HEIGHT = 14; + private static final NumberFormat NUMBER_FORMAT = new DecimalFormat("##.##"); + private static final int PRECENT =100; + private static final Color FOREGROUNG = new Color(23,190,86); + private static final Color BACKGROUND = new Color(210,210,210); + + String serverVersion = ProductConstants.RELEASE_VERSION; + UIButton okButton = new UIButton(Inter.getLocText("FR-Chart-Dialog_OK")); + UIButton updateButton = new UIButton(Inter.getLocText("FR-Chart-App_Update")); + UIButton cancleButton = new UIButton(Inter.getLocText("FR-Chart-Dialog_Cancle")); + UICheckBox pushAuto = new UICheckBox(Inter.getLocText("FR-Chart-UpdateMessage_PushAuto")); + private JPanel messagePane; + private JPanel optionsPane; + private BasicDialog parentDialog; + private ChartDownLoadWorker downLoadWorker = null; + private boolean isUpdateCancle = false; + + private ActionListener updateListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + final JProgressBar progressBar = init4UpdatingPane(); + downLoadWorker = new ChartDownLoadWorker(){ + protected void process(java.util.List v) { + progressBar.setValue((int)(v.get(v.size() - 1) * PRECENT)); + } + + public void done() { + try { + get(); + } catch (Exception e1) { + init4UpdateFaild(); + return; + } + if(!isUpdateCancle){ + replaceFiles(); + dialogExit(); + super.done(); + } + } + }; + downLoadWorker.execute(); + } + }; + + private ActionListener okListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + dialogExit(); + } + }; + + private ActionListener cancleListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + if(downLoadWorker !=null){ + isUpdateCancle = true; + downLoadWorker.cancel(true); + } + dialogExit(); + } + }; + + public void setParentDialog(BasicDialog dialog){ + this.parentDialog = dialog; + } + + public UpdateOnLinePane(String serverVersion){ + this.serverVersion = serverVersion; + this.isUpdateCancle = false; + pushAuto.setSelected(ChartEnvManager.getEnvManager().isPushUpdateAuto()); + pushAuto.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + ChartEnvManager.getEnvManager().setPushUpdateAuto(pushAuto.isSelected()); + } + }); + init4PanesLayout(); + initListeners(); + judge(); + } + + private void initListeners(){ + updateButton.addActionListener(updateListener); + okButton.addActionListener(okListener); + cancleButton.addActionListener(cancleListener); + } + + private void init4PanesLayout(){ + this.setLayout(new BorderLayout()); + this.messagePane = FRGUIPaneFactory.createBorderLayout_L_Pane(); + this.optionsPane = new JPanel(new FlowLayout(FlowLayout.RIGHT,H_GAP ,0)) ; + this.optionsPane.setBorder(new EmptyBorder(0, 0, GAP, RIGHT_BORDER_GAP)); + this.add(this.messagePane, BorderLayout.CENTER); + this.add(this.optionsPane, BorderLayout.SOUTH); + pushAuto.setFont(new Font(Inter.getLocText("FR-Designer-All_MSBold"), 0, PUSH_FONT_SIZE)); + pushAuto.setForeground(LABEL_COLOR); + this.revalidate(); + } + + //更新失败的提示 + private void init4UpdateFaild(){ + this.messagePane.removeAll(); + UILabel label = new UILabel(Inter.getLocText("FR-Chart-Version_UpdateFail")+"!"); + label.setHorizontalAlignment(SwingConstants.CENTER); + label.setFont(new Font(Inter.getLocText("FR-Designer-All_MSBold"), 0, MESSAGE_FONT_SIZE)); + label.setForeground(LABEL_COLOR); + this.messagePane.add(label,BorderLayout.CENTER); + optionsPane.removeAll(); + optionsPane.add(okButton); + this.revalidate(); + } + + private JProgressBar init4UpdatingPane(){ + this.messagePane.removeAll(); + JPanel centerPane = new JPanel(new GridLayout(2,1)); + UILabel label = new UILabel(Inter.getLocText("FR-Chart-App_UpdateProgress")); + label.setHorizontalAlignment(SwingConstants.CENTER); + label.setFont(new Font(Inter.getLocText("FR-Designer-All_MSBold"), 0, MESSAGE_FONT_SIZE)); + label.setForeground(LABEL_COLOR); + label.setBorder(new EmptyBorder(PUSH_FONT_SIZE,0,0,0)); + centerPane.add(label); + JProgressBar progressBar = new JProgressBar(); + progressBar.setMaximum(PRECENT); + progressBar.setMinimum(0); + progressBar.setValue(0); + progressBar.setBorder(new EmptyBorder(MESSAGE_FONT_SIZE,SIDE_GAP,SIDE_GAP*2,SIDE_GAP)); + centerPane.add(progressBar); + messagePane.add(centerPane,BorderLayout.CENTER); + optionsPane.removeAll(); + optionsPane.add(cancleButton); + this.revalidate(); + return progressBar; + } + + private void init4VersionSamePane(){ + this.messagePane.removeAll(); + UILabel label = new UILabel(Inter.getLocText("FR-Chart-Versions_Lasted")); + label.setHorizontalAlignment(SwingConstants.CENTER); + label.setFont(new Font(Inter.getLocText("FR-Designer-All_MSBold"), 0, MESSAGE_FONT_SIZE)); + label.setForeground(LABEL_COLOR); + this.messagePane.add(label,BorderLayout.CENTER); + optionsPane.removeAll(); + optionsPane.add(pushAuto); + optionsPane.add(okButton); + this.revalidate(); + } + + private void init4VersionDifferentPane(){ + this.messagePane.removeAll(); + createPaneShowVersions(); + optionsPane.removeAll(); + optionsPane.add(pushAuto); + optionsPane.add(updateButton); + optionsPane.add(cancleButton); + this.revalidate(); + } + + private void createPaneShowVersions(){ + JPanel centerPane = new JPanel(new GridLayout(2,1)); + UILabel localLabel = new UILabel(Inter.getLocText("FR-Chart-Version_Local")+":"+ ProductConstants.RELEASE_VERSION); + localLabel.setFont(new Font(Inter.getLocText("FR-Designer-All_MSBold"), 0, MESSAGE_FONT_SIZE)); + localLabel.setForeground(LABEL_COLOR); + localLabel.setBorder(new EmptyBorder(PUSH_FONT_SIZE,0,0,0)); + UILabel serverLabel = new UILabel(Inter.getLocText("FR-Chart-Version_Lasted")+":"+serverVersion); + serverLabel.setFont(new Font(Inter.getLocText("FR-Designer-All_MSBold"), 0, MESSAGE_FONT_SIZE)); + serverLabel.setForeground(LABEL_COLOR); + serverLabel.setBorder(new EmptyBorder(-MESSAGE_FONT_SIZE - PUSH_FONT_SIZE, 0, 0,0)); + localLabel.setHorizontalAlignment(SwingConstants.CENTER); + serverLabel.setHorizontalAlignment(SwingConstants.CENTER); + centerPane.add(localLabel); + centerPane.add(serverLabel); + messagePane.add(centerPane,BorderLayout.CENTER); + } + + private void judge(){ + if(ComparatorUtils.equals(ProductConstants.RELEASE_VERSION,serverVersion)){ + //版本一致,提示已经是最新版本 + init4VersionSamePane(); + }else{ + init4VersionDifferentPane(); + } + } + + /** + * Dialog exit. + */ + private void dialogExit() { + parentDialog.setVisible(false); + parentDialog.dispose(); + } + + + + + protected String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Help_UpdateOnline"); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDataPane.java new file mode 100644 index 000000000..d1a4088cd --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDataPane.java @@ -0,0 +1,108 @@ +package com.fr.design.mainframe.chart.gui; + +import java.awt.BorderLayout; + +import javax.swing.JPanel; + +import com.fr.design.chart.report.GisMapDataPane; +import com.fr.design.chart.report.MapDataPane; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.GisMapPlot; +import com.fr.chart.chartattr.MapPlot; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.gui.data.DataContentsPane; +import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; + +public class ChartDataPane extends AbstractChartAttrPane { + + protected DataContentsPane contentsPane; + protected AttributeChangeListener listener; + + private boolean supportCellData = true; + + public ChartDataPane(AttributeChangeListener listener) { + super(); + this.listener = listener; + } + + @Override + protected JPanel createContentPane() { + contentsPane = new NormalChartDataPane(listener, ChartDataPane.this); + return contentsPane; + } + + /** + * 界面标题 + */ + public String getIconPath() { + return "com/fr/design/images/chart/ChartData.png"; + } + + /** + * 界面标题 + * @return 界面标题 + */ + public String title4PopupWindow() { + return PaneTitleConstants.CHART_DATA_TITLE; + } + + protected void repeatLayout(ChartCollection collection) { + if(contentsPane != null) { + this.remove(contentsPane); + } + + this.setLayout(new BorderLayout(0, 0)); + if (collection != null && collection.getChartCount() <= 0) { + contentsPane = new NormalChartDataPane(listener, ChartDataPane.this); + } else if (collection.getSelectedChart().getPlot() instanceof MapPlot) { + contentsPane = new MapDataPane(listener); + } else if(collection.getSelectedChart().getPlot() instanceof GisMapPlot){ + contentsPane = new GisMapDataPane(listener); + }else { + contentsPane = new NormalChartDataPane(listener, ChartDataPane.this); + } + + if(contentsPane != null) { + contentsPane.setSupportCellData(supportCellData); + } + } + + /** + * 设置数据界面是否支持单元格 + */ + public void setSupportCellData(boolean supportCellData) { + this.supportCellData = supportCellData; + } + + /** + * 更新界面 数据内容 + */ + public void populate(ChartCollection collection) { + repeatLayout(collection); + + contentsPane.populate(collection); + + this.add(contentsPane, BorderLayout.CENTER); + + this.validate(); + } + + /** + * 保存 数据界面内容 + */ + public void update(ChartCollection collection) { + if(contentsPane != null) { + contentsPane.update(collection); + } + } + + /** + * 刷新图表数据界面 + * @param collection 图表收集器 + */ + public void refreshChartDataPane(ChartCollection collection){ + this.populate(collection); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerDataPane.java new file mode 100644 index 000000000..f424d6981 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerDataPane.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.chart.gui; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.GisMapPlot; +import com.fr.chart.chartattr.MapPlot; +import com.fr.design.chart.report.GisMapDataPane4Chart; +import com.fr.design.chart.report.MapDataPane4Chart; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.gui.data.ImportSetChartDataPane; +import com.fr.general.FRLogger; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 下午1:57 + */ +public class ChartDesignerDataPane extends ChartDataPane { + private AttributeChangeListener listener; + + public ChartDesignerDataPane(AttributeChangeListener listener) { + super(listener); + this.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + FRLogger.getLogger().info("SD"); + } + }); + this.listener = listener; + } + + @Override + protected JPanel createContentPane() { + contentsPane = new ImportSetChartDataPane(listener,ChartDesignerDataPane.this); + return contentsPane; + } + + + protected void repeatLayout(ChartCollection collection) { + if(contentsPane != null) { + this.remove(contentsPane); + } + + this.setLayout(new BorderLayout(0, 0)); + if (collection.getSelectedChart().getPlot() instanceof MapPlot) { + contentsPane = new MapDataPane4Chart(listener,this); + }else if(collection.getSelectedChart().getPlot() instanceof GisMapPlot){ + contentsPane = new GisMapDataPane4Chart(listener,this); + } else{ + contentsPane = new ImportSetChartDataPane(listener,ChartDesignerDataPane.this); + } + } + + /** + * 主要用于图表设计器 + * @return 是 + */ + public boolean isNeedPresentPaneWhenFilterData(){ + return true; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerOtherPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerOtherPane.java new file mode 100644 index 000000000..7fe51b94b --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDesignerOtherPane.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.chart.gui; + +import com.fr.design.mainframe.chart.gui.other.ChartDesignerConditionAttrPane; +import com.fr.design.mainframe.chart.gui.other.ChartDesignerInteractivePane; +import com.fr.design.dialog.BasicPane; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.*; + +/** + * 图表设计器的图标属性表高级tab + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-16 + * Time: 下午2:04 + */ +public class ChartDesignerOtherPane extends ChartOtherPane { + + @Override + protected JPanel createContentPane() { + JPanel content = new JPanel(new BorderLayout()); + otherPane = new ChartTabPane(); + content.add(otherPane, BorderLayout.CENTER); + return content; + } + + /** + * 界面标题 + * + * @return 返回标题. + */ + public String title4PopupWindow() { + return Inter.getLocText("Advanced"); + } + + private boolean isHaveCondition() { + return hasCondition; + } + + + private class ChartTabPane extends TabPane { + + @Override + protected java.util.List initPaneList() { + java.util.List paneList = new ArrayList(); + interactivePane = new ChartDesignerInteractivePane(ChartDesignerOtherPane.this); + + paneList.add(interactivePane); + + if (ChartDesignerOtherPane.this.isHaveCondition()) { + conditionAttrPane = new ChartDesignerConditionAttrPane(); + paneList.add(conditionAttrPane); + } + return paneList; + } + + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartOtherPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartOtherPane.java new file mode 100644 index 000000000..f0fe20d03 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartOtherPane.java @@ -0,0 +1,139 @@ +package com.fr.design.mainframe.chart.gui; + +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.dialog.BasicPane; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.gui.other.ChartConditionAttrPane; +import com.fr.design.mainframe.chart.gui.other.ChartInteractivePane; +import com.fr.design.mainframe.chart.gui.type.ChartTabPane; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +public class ChartOtherPane extends AbstractChartAttrPane { + private static final long serialVersionUID = -5612046386597783406L; + protected TabPane otherPane; + protected boolean hasCondition = false; + + @Override + protected JPanel createContentPane() { + JPanel content = new JPanel(new BorderLayout()); + otherPane = new TabPane(); + content.add(otherPane, BorderLayout.CENTER); + return content; + } + + @Override + public void populate(ChartCollection collection) { + Plot plot = collection.getSelectedChart().getPlot(); + hasCondition = plot.isSupportDataSeriesCondition(); + + this.removeAll(); + initAll(); + this.validate();// kunsnat: 重新激活面板. 不然事件 滚动条等不响应. + + otherPane.populateBean(collection.getSelectedChart()); + } + + @Override + public void update(ChartCollection collection) { + otherPane.updateBean(collection.getSelectedChart()); + } + + protected BasicBeanPane createInteractivePane() { + return new ChartInteractivePane(ChartOtherPane.this); + } + + protected BasicBeanPane createConditionAttrPane() { + return new ChartConditionAttrPane(); + } + /** + * 注册 切换按钮的 改变事件, 和超链区分. + * @param currentChartEditPane 当前图表编辑界面. + */ + public void registerChartEditPane(ChartEditPane currentChartEditPane) { + otherPane.registerChartEditPane(currentChartEditPane); + } + + @Override + public String getIconPath() { + return "com/fr/design/images/chart/InterAttr.png"; + } + + /** + * 界面标题 + * @return 返回标题. + */ + public String title4PopupWindow() { + return PaneTitleConstants.CHART_OTHER_TITLE; + } + + private boolean isHaveCondition() { + return hasCondition; + } + + /** + * 设置选中的界面id + */ + public void setSelectedByIds(int level, String... id) { + otherPane.setSelectedByIds(level, id); + } + + protected class TabPane extends ChartTabPane { + protected BasicBeanPane interactivePane; + protected BasicBeanPane conditionAttrPane; + + @Override + protected List initPaneList() { + List paneList = new ArrayList(); + interactivePane = ChartOtherPane.this.createInteractivePane(); + + paneList.add(interactivePane); + + if (ChartOtherPane.this.isHaveCondition()) { + conditionAttrPane = ChartOtherPane.this.createConditionAttrPane(); + paneList.add(conditionAttrPane); + } + return paneList; + } + + @Override + public void populateBean(Chart chart) { + interactivePane.populateBean(chart); + if (ChartOtherPane.this.isHaveCondition()) { + conditionAttrPane.populateBean(chart); + } + } + + @Override + public void updateBean(Chart chart) { + if(chart == null) { + return; + } + interactivePane.updateBean(chart); + if (ChartOtherPane.this.isHaveCondition()) { + conditionAttrPane.updateBean(chart); + } + } + + /** + * 注册 切换按钮的切换事件. + * @param currentChartEditPane 当前编辑的图表编辑界面. + */ + public void registerChartEditPane(ChartEditPane currentChartEditPane) { +// chartSwitchPane.registerChartEditPane(currentChartEditPane); + } + + @Override + public Chart updateBean() { + return null; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartStylePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartStylePane.java new file mode 100644 index 000000000..0d338290e --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartStylePane.java @@ -0,0 +1,196 @@ +package com.fr.design.mainframe.chart.gui; + +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.dialog.BasicPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.gui.style.analysisline.ChartAnalysisLinePane; +import com.fr.design.mainframe.chart.gui.style.area.ChartAreaPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartAxisPane; +import com.fr.design.mainframe.chart.gui.style.datalabel.ChartDataLabelPane; +import com.fr.design.mainframe.chart.gui.style.datalabel.ChartLabelFontPane; +import com.fr.design.mainframe.chart.gui.style.datasheet.ChartDatasheetPane; +import com.fr.design.mainframe.chart.gui.style.legend.ChartLegendPane; +import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane; +import com.fr.design.mainframe.chart.gui.style.title.ChartTitlePane; +import com.fr.design.mainframe.chart.gui.type.ChartTabPane; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +public class ChartStylePane extends AbstractChartAttrPane { + private static final long serialVersionUID = 8916444369607754491L; + private TabPane stylePane; + private Chart chart; + private AttributeChangeListener listener; + private BasicPane chartAxisPane; + + protected Chart getChart() { + return chart; + } + + public ChartStylePane() { + super(); + } + + public ChartStylePane(AttributeChangeListener listener) { + super(); + this.listener = listener; + } + + //shine: isNeedFormula是图表设计器用的, 所以属性给删除了. + public ChartStylePane(AttributeChangeListener listener, boolean isNeedFormula){ + super(); + this.listener = listener; + } + + @Override + protected JPanel createContentPane() { + JPanel content = new JPanel(new BorderLayout()); + if (chart == null) { + return content; + } + stylePane = new TabPane(); + content.add(stylePane, BorderLayout.CENTER); + return content; + } + + @Override + public void populate(ChartCollection collection) { + this.chart = collection.getSelectedChart(); + this.remove(leftContentPane); + initContentPane(); + this.removeAttributeChangeListener(); + stylePane.populateBean(chart); + this.addAttributeChangeListener(listener); + this.initAllListeners(); + } + + @Override + public void update(ChartCollection collection) { + stylePane.updateBean(collection.getSelectedChart()); + } + + protected List getPaneList() { + List paneList = new ArrayList(); + Plot plot = chart.getPlot(); + + paneList.add(new ChartTitlePane()); + + if(plot.isSupportLegend()){ + paneList.add(new ChartLegendPane()); + } else { + plot.setLegend(null); + } + + if(plot.isSupportDataSeriesAttr()) {// 系列属性 + paneList.add(createChartSeriesPane()); + } + + if(plot.isSupportDataLabelAttr()) {// 数据标签 + paneList.add(new ChartDataLabelPane(ChartStylePane.this)); + } + + if(plot.isMeterPlot()){//标签属性 + paneList.add(new ChartLabelFontPane()); + } + + if(plot.isHaveAxis()) {// 然后加载坐标轴界面. + paneList.add(createAxisPane()); + paneList.add(createAreaPane()); + if(plot.isSupportDataSheet()) { + paneList.add(createDataSheetPane()); + } + } else { + paneList.add(createAreaPane()); + } + + if(plot.needAnalysisLinePane()){//分析线型界面 + paneList.add(new ChartAnalysisLinePane(ChartStylePane.this)); + } + return paneList; + } + + protected ChartSeriesPane createChartSeriesPane() { + return new ChartSeriesPane(ChartStylePane.this); + } + + private BasicPane createDataSheetPane() { + ChartDatasheetPane chartDatasheetPane = new ChartDatasheetPane(); + chartDatasheetPane.useWithAxis((ChartAxisPane)chartAxisPane); + return chartDatasheetPane; + } + + private BasicPane createAxisPane() { + return chartAxisPane = new ChartAxisPane(chart.getPlot(),ChartStylePane.this); + } + + private BasicPane createAreaPane() { + return new ChartAreaPane(chart.getPlot(),ChartStylePane.this); + } + + /** + * 返回对应的图片路径. + */ + public String getIconPath() { + return "com/fr/design/images/chart/ChartStyle.png"; + } + + /** + * 返回界面的标题名称 + * @return 返回名称. + */ + public String title4PopupWindow() { + return PaneTitleConstants.CHART_STYLE_TITLE; + } + + /** + * 设置选中的界面id + */ + public void setSelectedByIds(int level, String... id) { + stylePane.setSelectedByIds(level, id); + } + + class TabPane extends ChartTabPane { + + @Override + protected void tabChanged() { + ChartStylePane.this.removeAttributeChangeListener(); + ((BasicBeanPane) paneList.get(tabPane.getSelectedIndex())).populateBean(chart); + ChartStylePane.this.addAttributeChangeListener(listener); + } + + @Override + protected List initPaneList() { + return ChartStylePane.this.getPaneList(); + } + + @Override + public void populateBean(Chart chart) { + if (chart == null || stylePane.getSelectedIndex() == -1) { + return; + } + ((BasicBeanPane) paneList.get(stylePane.getSelectedIndex())).populateBean(chart); + } + + @Override + public Chart updateBean() { + if (chart == null) { + return null; + } + ((BasicBeanPane) paneList.get(stylePane.getSelectedIndex())).updateBean(chart); + return chart; + } + + @Override + public void updateBean(Chart ob) { + ((BasicBeanPane) paneList.get(stylePane.getSelectedIndex())).updateBean(ob); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java new file mode 100644 index 000000000..0d6891050 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -0,0 +1,441 @@ +package com.fr.design.mainframe.chart.gui; + +import com.fr.base.BaseUtils; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.charttypes.ColumnIndependentChart; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIToggleButton; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.mainframe.chart.gui.ChartTypePane.ComboBoxPane; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; +import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; +import java.util.ArrayList; + +/** + * 图表 类型 增删 控制按钮界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-9-26 上午09:27:49 + */ +public class ChartTypeButtonPane extends BasicBeanPane implements UIObserver { + private static final long serialVersionUID = -8130803225718028933L; + private static final int B_W = 52; + private static final int B_H = 20; + private static final int COL_COUNT = 3; + + private UIButton addButton; + private ArrayList indexList = new ArrayList(); + + private JPanel buttonPane; + private ChartCollection editingCollection; + private UIObserverListener uiobListener = null; + private ComboBoxPane editChartType; + private UITextField currentEditingEditor = null; + + private boolean mouseOnChartTypeButtonPane = false; + + /** + * 鼠标事件是否在这个面板 + * @return 返回是否 + */ + public boolean isMouseOnChartTypeButtonPane() { + return this.mouseOnChartTypeButtonPane; + } + + private AWTEventListener awt = new AWTEventListener() { + public void eventDispatched(AWTEvent event) { + //没有进行鼠标点击,则返回 + if (event instanceof MouseEvent && ((MouseEvent) event).getClickCount() > 0) { + if (currentEditingEditor != null && !ComparatorUtils.equals(event.getSource(), currentEditingEditor)) { + stopEditing(); + if (event.getSource() instanceof ChartChangeButton) { + ((ChartChangeButton) event.getSource()).mouseClick((MouseEvent) event); + } + populateBean(editingCollection); + } + } + } + }; + + public ChartTypeButtonPane() { + this.setLayout(new BorderLayout()); + addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); + + buttonPane = new JPanel(); + this.add(buttonPane, BorderLayout.CENTER); + + JPanel eastPane = new JPanel(); + this.add(eastPane, BorderLayout.EAST); + + eastPane.setLayout(new BorderLayout()); + + eastPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 20)); + eastPane.add(addButton, BorderLayout.NORTH); + + addButton.setPreferredSize(new Dimension(20, 20)); + addButton.addActionListener(addListener); + addButton.addMouseListener(mouseListener); + Toolkit.getDefaultToolkit().addAWTEventListener(awt, AWTEvent.MOUSE_EVENT_MASK); + } + + ActionListener addListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + mouseOnChartTypeButtonPane = true; + String name = getNewChartName(); + ChartChangeButton button = new ChartChangeButton(name);// some set selected + + button.registerChangeListener(uiobListener); + + indexList.add(button); + + if (editingCollection != null) { + Chart[] barChart = ColumnIndependentChart.columnChartTypes; + try { + Chart newChart = (Chart) barChart[0].clone(); + editingCollection.addNamedChart(name, newChart); + editingCollection.addFunctionRecord(newChart); + } catch (CloneNotSupportedException e1) { + FRLogger.getLogger().error("Error in Clone"); + } + + } + layoutPane(buttonPane); + } + }; + + MouseListener mouseListener = new MouseAdapter() { + @Override + public void mouseExited(MouseEvent e) { + super.mouseExited(e); + mouseOnChartTypeButtonPane = false; + } + }; + + private String getNewChartName() { + int count = indexList.size() + 1; + while (true) { + String name_test = Inter.getLocText("FR-Chart-Module_Name") + count; + boolean repeated = false; + for (int i = 0, len = indexList.size(); i < len; i++) { + ChartChangeButton nameable = indexList.get(i); + if (ComparatorUtils.equals(nameable.getButtonName(), name_test)) { + repeated = true; + break; + } + } + + if (!repeated) { + return name_test; + } + count++; + } + } + + private void layoutPane(JPanel northPane) { + if (northPane == null) { + return; + } + northPane.removeAll(); + northPane.setLayout(new BoxLayout(northPane, BoxLayout.Y_AXIS)); + + JPanel pane = null; + for (int i = 0; i < indexList.size(); i++) { + if (i % COL_COUNT == 0) { + pane = new JPanel(new FlowLayout(FlowLayout.LEFT)); + northPane.add(pane); + } + + pane.add(indexList.get(i)); + } + + this.revalidate(); + } + + private void layoutRenamingPane(JPanel northPane, int index) { + if (northPane == null) { + return; + } + northPane.removeAll(); + northPane.setLayout(new BoxLayout(northPane, BoxLayout.Y_AXIS)); + + JPanel pane = null; + + for (int i = 0; i < indexList.size(); i++) { + if (i % COL_COUNT == 0) { + pane = new JPanel(new FlowLayout(FlowLayout.LEFT)); + northPane.add(pane); + } + if (i != index) { + pane.add(indexList.get(i)); + } else { + pane.add(currentEditingEditor); + } + } + this.revalidate(); + } + + /** + * 注册监听器 + * @param listener 观察者监听事件 + */ + public void registerChangeListener(UIObserverListener listener) { + uiobListener = listener; + } + + /** + * 是否应该响应事件监听器 + * @return 是则返回true + */ + public boolean shouldResponseChangeListener() { + return true; + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Types_Switch"); + } + + private void changeCollectionSelected(String name) { + if (editingCollection != null) { + int count = editingCollection.getChartCount(); + for (int i = 0; i < count; i++) { + if (ComparatorUtils.equals(name, editingCollection.getChartName(i))) { + editingCollection.setSelectedIndex(i); + break; + } + } + if (editChartType != null) { + editChartType.populateBean(editingCollection.getSelectedChart()); + } + } + } + + /** + * 设置当前对应的编辑Type + * + * @param chartPane + */ + public void setEditingChartPane(ComboBoxPane chartPane) { + editChartType = chartPane; + } + + @Override + public void populateBean(ChartCollection collection) { + editingCollection = collection; + + indexList.clear(); + int count = collection.getChartCount(); + int select = collection.getSelectedIndex(); + for (int i = 0; i < count; i++) { + ChartChangeButton button = new ChartChangeButton(collection.getChartName(i)); + indexList.add(button); + button.setSelected(i == select); + button.registerChangeListener(uiobListener); + } + + layoutPane(buttonPane); + checkAddButtonVisible(); + } + + private void checkAddButtonVisible() { + addButton.setVisible(true); + //新建一个collection + if(editingCollection != null && editingCollection.getChartCount() == 1){ + //vanChart 不支持图表切换 目前 + if(!ComparatorUtils.equals(editingCollection.getSelectedChart().getClass(), Chart.class)){ + addButton.setVisible(false); + } + } + } + + @Override + public ChartCollection updateBean() { + return null;// no use + } + + /** + * 保存 属性表属性. + */ + public void update(ChartCollection collection) { + // 什么也不做, 在button操作点击等时 已经处理. + } + + + private void stopEditing() { + if (currentEditingEditor != null) { + String newName = currentEditingEditor.getText(); + int selectedIndex = editingCollection.getSelectedIndex(); + if (!ComparatorUtils.equals(editingCollection.getChartName(selectedIndex), newName)) { + editingCollection.setChartName(selectedIndex, newName); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified(); + } + buttonPane.remove(currentEditingEditor); + currentEditingEditor = null; + } + } + + + private class ChartChangeButton extends UIToggleButton { + private static final double DEL_WIDTH = 10; + private BufferedImage closeIcon = BaseUtils.readImageWithCache("com/fr/design/images/toolbarbtn/chartChangeClose.png"); + private boolean isMoveOn = false; + + private String buttonName = ""; + private UITextField nameField = new UITextField(); + + public ChartChangeButton(String name) { + super(name); + + buttonName = name; + this.setToolTipText(name); + nameField.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + stopEditing(); + populateBean(editingCollection); + } + }); + } + + public String getButtonName() { + return buttonName; + } + + public Dimension getPreferredSize() { + return new Dimension(B_W, B_H); + } + + private void paintDeleteButton(Graphics g2d) { + Rectangle2D bounds = this.getBounds(); + + int x = (int) (bounds.getWidth() - DEL_WIDTH); + int y = (int) (1); + + g2d.drawImage((Image) closeIcon, x, y, closeIcon.getWidth(), closeIcon.getHeight(), null); + } + + @Override + public void paintComponent(Graphics g) { + super.paintComponent(g); + + if (isMoveOn && indexList.size() > 1) { + paintDeleteButton(g); + } + } + + private void noSelected() { + for (int i = 0, size = indexList.size(); i < size; i++) { + indexList.get(i).setSelected(false); + } + } + + private void checkMoveOn(boolean moveOn) { + for (int i = 0; i < indexList.size(); i++) { + indexList.get(i).isMoveOn = false; + } + + this.isMoveOn = moveOn; + } + + private Rectangle2D getRectBounds() { + return this.getBounds(); + } + + private void deleteAButton() { + if (indexList.contains(this) && indexList.size() > 1) { + indexList.remove(this); + + if (this.isSelected()) { + indexList.get(0).setSelected(true); + changeCollectionSelected(indexList.get(0).getButtonName()); + } + + if (editingCollection != null) { + int count = editingCollection.getChartCount(); + for (int i = 0; i < count; i++) { + if (ComparatorUtils.equals(getButtonName(), editingCollection.getChartName(i))) { + editingCollection.removeNameObject(i); + break; + } + } + } + } + + relayoutPane(); + } + + private void relayoutPane() { + layoutPane(buttonPane); + } + + + protected MouseListener getMouseListener() { + return new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + mouseClick(e); + mouseOnChartTypeButtonPane = true; + } + + public void mouseEntered(MouseEvent e) { + checkMoveOn(true); + mouseOnChartTypeButtonPane = true; + } + + public void mouseExited(MouseEvent e) { + checkMoveOn(false); + mouseOnChartTypeButtonPane = false; + } + }; + } + + + public void mouseClick(MouseEvent e) { + Rectangle2D bounds = getRectBounds(); + if (bounds == null) { + return; + } + if (e.getX() >= bounds.getWidth() - DEL_WIDTH) { + deleteAButton(); + fireSelectedChanged(); + return; + } + + if (isSelected()) { + doWithRename(); + return; + } + + //第一次选择 + + if (isEnabled()) { + noSelected(); + changeCollectionSelected(getButtonName()); + setSelectedWithFireListener(true); + fireSelectedChanged(); + } + } + + private void doWithRename() { + currentEditingEditor = this.nameField; + Rectangle bounds = this.getBounds(); + currentEditingEditor.setPreferredSize(new Dimension((int) bounds.getWidth(), (int) bounds.getHeight())); + currentEditingEditor.setText(this.getButtonName()); + buttonPane.repaint(); + layoutRenamingPane(buttonPane, editingCollection.getSelectedIndex()); + currentEditingEditor.requestFocus(); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java new file mode 100644 index 000000000..686c130c1 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -0,0 +1,166 @@ +package com.fr.design.mainframe.chart.gui; + +import com.fr.base.FRContext; +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.design.ChartTypeInterfaceManager; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.ChartEditPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +/** + * 图表 属性表, 类型选择 界面. +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2012-12-26 上午10:56:51 + */ +public class ChartTypePane extends AbstractChartAttrPane{ + private ComboBoxPane chartTypePane; + private ChartTypeButtonPane buttonPane; + private ChartEditPane editPane; + private ChartCollection editingCollection; + + @Override + protected JPanel createContentPane() { + JPanel content = new JPanel(new BorderLayout()); + + buttonPane = new ChartTypeButtonPane(); + content.add(buttonPane, BorderLayout.NORTH); + + chartTypePane = new ComboBoxPane(); + chartTypePane.setBorder(BorderFactory.createEmptyBorder(0,0, 0, 10)); + content.add(chartTypePane, BorderLayout.CENTER); + + buttonPane.setEditingChartPane(chartTypePane); + + return content; + } + + /** + * 界面做为按钮时的图片位置. design_base + */ + public String getIconPath() { + return "com/fr/design/images/chart/ChartType.png"; + } + + /** + * 界面标题 + * @return 界面标题 + */ + public String title4PopupWindow() { + return PaneTitleConstants.CHART_TYPE_TITLE; + } + + class ComboBoxPane extends UIComboBoxPane{ + @Override + protected List> initPaneList() { + List> paneList = new ArrayList>(); + ChartTypeInterfaceManager.getInstance().addPlotTypePaneList(paneList); + return paneList; + } + + @Override + protected String title4PopupWindow() { + return null; + } + + public void updateBean(Chart chart) { + int lastSelectIndex = editPane.getSelectedChartIndex(chart); + + try{ + Chart newDefaultChart = (Chart)((AbstractChartTypePane)cards.get(jcb.getSelectedIndex())).getDefaultChart().clone(); + if(!chart.accept(newDefaultChart.getClass())){ + //vanChart 和 chart 之间切换 + editingCollection.removeNameObject(editingCollection.getSelectedIndex()); + editingCollection.addChart(newDefaultChart); + chart = newDefaultChart; + } + }catch (CloneNotSupportedException e){ + FRContext.getLogger().error(e.getMessage(), e); + } + + //这一步会替换plot + ((AbstractChartTypePane) cards.get(jcb.getSelectedIndex())).updateBean(chart); + + Plot plot = chart.getPlot(); + + if(plot != null){ + String plotID = plot.getPlotID(); + + //plot改变的话图表类型就算改变了 + + chart.setWrapperName(ChartTypeManager.getInstance().getWrapperName(plotID)); + + chart.setChartImagePath(ChartTypeManager.getInstance().getChartImagePath(plotID)); + + boolean isUseDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID); + + if(editPane.isDefaultPane() != isUseDefault || (!isUseDefault && lastSelectIndex != jcb.getSelectedIndex())){ + editPane.reLayout(chart); + } + } + } + } + + /** + * 更新界面属性 用于展示 + */ + public void populate(ChartCollection collection) { + Chart chart = collection.getSelectedChart(); + chartTypePane.populateBean(chart); + + buttonPane.populateBean(collection); + } + + /** + * 保存界面属性 + */ + public void update(ChartCollection collection) { + editingCollection = collection; + buttonPane.update(collection);// 内部操作时 已经做过处理. + Chart chart = collection.getSelectedChart(); + + chartTypePane.updateBean(chart); + } + + /** + * 所有图表的类型界面 + * @return 类型界面 + */ + public FurtherBasicBeanPane[] getPaneList(){ + return chartTypePane.getCards().toArray(new FurtherBasicBeanPane[0]); + } + + /** + * 当前选中的图表的index + * @return 当前选中的图表的index + */ + public int getSelectedIndex(){ + return chartTypePane.getSelectedIndex(); + } + + /** + * 返回选中的图表的index + * @return 选中的图标的序号 + */ + public int getSelectedChartIndex(){ + return chartTypePane.getSelectedIndex(); + } + + /** + * 设置下编辑的面板 + * @param currentEditPane 设置下编辑的面板 + */ + public void registerChartEditPane(ChartEditPane currentEditPane) { + this.editPane = currentEditPane; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/StylePane4Chart.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/StylePane4Chart.java new file mode 100644 index 000000000..9ce3afd91 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/StylePane4Chart.java @@ -0,0 +1,33 @@ +package com.fr.design.mainframe.chart.gui; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane; +import com.fr.design.mainframe.chart.gui.style.series.SeriesPane4ChartDesigner; + +/** + * 图表设计器的样式面板 + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-25 + * Time: 下午6:56 + */ +public class StylePane4Chart extends ChartStylePane { + + public StylePane4Chart(AttributeChangeListener listener, boolean isNeedFormula) { + super(listener, isNeedFormula); + } + + public void update(ChartCollection collection) { + int selectIndex = collection.getSelectedIndex(); + super.update(collection); + collection.getSelectedChart().setStyleGlobal(false); + collection.setChartName(selectIndex, collection.getSelectedChart().getTitle().getTextObject().toString()); + } + + protected ChartSeriesPane createChartSeriesPane(){ + return new SeriesPane4ChartDesigner(StylePane4Chart.this); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java new file mode 100644 index 000000000..ceca4f9dc --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java @@ -0,0 +1,213 @@ +package com.fr.design.mainframe.chart.gui; + +import com.fr.base.ScreenResolution; +import com.fr.chart.base.GlyphUtils; +import com.fr.chart.base.TextAttr; +import com.fr.design.constants.UIConstants; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRFont; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import java.awt.*; +import java.awt.event.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 7.1.1 + */ +public class UIEditLabel extends JPanel implements UIObserver{ + + private static final int OFF_LEFT = 10; + + private UITextField currentEditingEditor = null; + private UILabel showLabel; + private boolean isEditingStopped = true; + private String originalLabel = StringUtils.EMPTY; + private DocumentListener documentListener = new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent e) { + fireChange(); + } + + @Override + public void removeUpdate(DocumentEvent e) { + fireChange(); + } + + @Override + public void changedUpdate(DocumentEvent e) { + fireChange(); + } + }; + + private void fireChange(){ + setText(currentEditingEditor.getText()); + observerListener.doChange(); + } + + + private AWTEventListener awt = new AWTEventListener() { + public void eventDispatched(AWTEvent event) { + if(!UIEditLabel.this.isShowing()){ + return; + } + doSomeInAll(event); + } + }; + + private void doSomeInAll(AWTEvent event) { + Rectangle bounds = new Rectangle(getLocationOnScreen().x, getLocationOnScreen().y, getWidth(), getHeight()); + if (event instanceof MouseEvent) { + MouseEvent mv = (MouseEvent) event; + if (mv.getClickCount() > 0) { + Point point = new Point((int) (mv.getLocationOnScreen().getX()) - 2 * OFF_LEFT, (int) mv.getLocationOnScreen().getY()); + // 判断鼠标点击是否在边界内 + if (!bounds.contains(point)) { + if (!isEditingStopped) { + stopEditing(); + } + } + } + } + } + + private UIObserverListener observerListener; + + public UIEditLabel(String label,int horizontalAlignment){ + initComponents(); + showLabel.setHorizontalAlignment(horizontalAlignment); + this.originalLabel = label; + setText(label); + } + + public UIEditLabel(int horizontalAlignment){ + initComponents(); + showLabel.setHorizontalAlignment(horizontalAlignment); + } + + private void initComponents(){ + showLabel = new UILabel(); + currentEditingEditor = new UITextField(); + this.setLayout(new BorderLayout()); + this.add(showLabel, BorderLayout.CENTER); + Toolkit.getDefaultToolkit().addAWTEventListener(awt, AWTEvent.MOUSE_EVENT_MASK); + showLabel.addMouseListener(new MouseAdapter() { + @Override + public void mousePressed(MouseEvent e) { + doAfterMousePress(); + isEditingStopped = false; + UIEditLabel.this.removeAll(); + currentEditingEditor.getDocument().removeDocumentListener(documentListener); + currentEditingEditor.setText(getText()); + currentEditingEditor.getDocument().addDocumentListener(documentListener); + UIEditLabel.this.add(currentEditingEditor,BorderLayout.CENTER); + UIEditLabel.this.setBackground(UIConstants.FLESH_BLUE); + UIEditLabel.this.revalidate(); + } + + /** + * {@inheritDoc} + */ + public void mouseEntered(MouseEvent e) { + showLabel.setToolTipText(getTooltip()); + UIEditLabel.this.setBackground(UIConstants.FLESH_BLUE); + } + + /** + * {@inheritDoc} + */ + public void mouseExited(MouseEvent e) { + showLabel.setToolTipText(getTooltip()); + UIEditLabel.this.setBackground(UIConstants.NORMAL_BACKGROUND); + } + + }); + currentEditingEditor.addKeyListener(new KeyAdapter() { + + public void keyPressed(KeyEvent e) { + if(e.getKeyCode()==KeyEvent.VK_ENTER){ + stopEditing(); + } + } + }); + currentEditingEditor.getDocument().addDocumentListener(documentListener); + } + + protected void doAfterMousePress(){ + + } + + /** + * 设置成正常的背景 + */ + public void resetNomalrBackground(){ + UIEditLabel.this.setBackground(UIConstants.NORMAL_BACKGROUND); + } + + private String getTooltip(){ + String text = showLabel.getText(); + double width = GlyphUtils.calculateTextDimensionWithNoRotation(text, new TextAttr(FRFont.getInstance()), ScreenResolution.getScreenResolution()).getWidth(); + if(width<=showLabel.getWidth()){ + return null; + } + return text; + } + + private void stopEditing(){ + isEditingStopped = true; + this.removeAll(); + String text =this.showLabel.getText(); + text = StringUtils.cutStringEndWith(text,":"); + text = !ComparatorUtils.equals(text, this.originalLabel) ? + StringUtils.perfectEnd(text, "(" + this.originalLabel + ")"): this.originalLabel; + showLabel.setText(StringUtils.perfectEnd(text,":")); + this.add(showLabel, BorderLayout.CENTER); + this.revalidate(); + this.repaint(); + } + + public String getText(){ + String text =this.showLabel.getText(); + text = StringUtils.cutStringEndWith(text,":"); + return StringUtils.cutStringEndWith(text,"("+this.originalLabel+")"); + } + + public void setText(String text){ + if(text == null || StringUtils.isEmpty(text)){ + this.showLabel.setText(this.originalLabel); + return; + } + if(!ComparatorUtils.equals(text,originalLabel)){ + text = StringUtils.cutStringEndWith(text, ":"); + text = StringUtils.perfectEnd(text,"("+originalLabel+")"); + } + text = StringUtils.perfectEnd(text,":"); + this.showLabel.setText(text); + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(UIObserverListener listener) { + this.observerListener = listener; + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/CalculateComboBox.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/CalculateComboBox.java new file mode 100644 index 000000000..604c107c4 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/CalculateComboBox.java @@ -0,0 +1,68 @@ +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.data.util.function.AbstractDataFunction; +import com.fr.data.util.function.AverageFunction; +import com.fr.data.util.function.CountFunction; +import com.fr.data.util.function.MaxFunction; +import com.fr.data.util.function.MinFunction; +import com.fr.data.util.function.NoneFunction; +import com.fr.data.util.function.SumFunction; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.Inter; + +/** + * 公式选择. +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2013-1-8 上午09:52:15 + */ +public class CalculateComboBox extends UIComboBox{ + + public static final String[] CALCULATE_ARRAY = {Inter.getLocText("DataFunction-None"), Inter.getLocText("DataFunction-Sum"), + Inter.getLocText("DataFunction-Average"), Inter.getLocText("DataFunction-Max"), + Inter.getLocText("DataFunction-Min"), Inter.getLocText("DataFunction-Count")}; + public static final Class[] CLASS_ARRAY = {NoneFunction.class, SumFunction.class, AverageFunction.class, + MaxFunction.class, MinFunction.class, CountFunction.class}; + + public CalculateComboBox() { + super(CALCULATE_ARRAY); + setSelectedIndex(0); + } + + public void reset() { + this.setSelectedItem(Inter.getLocText("DataFunction-None")); + } + + /** + * 更新公式选择. + */ + public void populateBean(AbstractDataFunction function) { + for(int i = 0; i < CLASS_ARRAY.length; i++) { + if(function != null && ComparatorUtils.equals(function.getClass(), CLASS_ARRAY[i])) { + setSelectedIndex(i); + break; + } + } + } + + /** + * 返回当前选择的公式 + */ + public AbstractDataFunction updateBean() { + try { + int selectIndex = getSelectedIndex(); + if(selectIndex >= 0 && selectIndex < CLASS_ARRAY.length) { + return (AbstractDataFunction)CLASS_ARRAY[selectIndex].newInstance(); + } + } catch (InstantiationException e) { + FRLogger.getLogger().error("Function Error"); + return null; + } catch (IllegalAccessException e) { + FRLogger.getLogger().error("Function Error"); + return null; + } + + return null; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java new file mode 100644 index 000000000..f0a6d67bb --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java @@ -0,0 +1,544 @@ +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.base.Utils; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartdata.TopDefinition; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.Plot; +import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane; +import com.fr.design.mainframe.chart.gui.style.ThirdTabPane; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +/** + * 图表数据 分类 系列 过滤界面. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-19 下午04:40:21 + */ +public class ChartDataFilterPane extends ThirdTabPane { + private static final long serialVersionUID = 3650522989381790194L; + private static final int PAN_WIDTH = 210; + private static final int FIL_HEIGHT = 130; + + private CategoryFilterPane categoryPane; + private SeriesFilterPane seriesPane; + private boolean isNeedPresent = true; + private AbstractAttrNoScrollPane parentPane = null; + private Plot plot4Pane = null; + + public ChartDataFilterPane(Plot plot, ChartDataPane parent) { + super(plot, parent); + this.isNeedPresent = true; + } + + + protected List initPaneList(Plot plot, AbstractAttrNoScrollPane parent) { + plot4Pane = plot; + parentPane = parent; + List paneList = new ArrayList(); + if (plot == null || plot.isSupportCategoryFilter()) { + categoryPane = new CategoryFilterPane(parent); + paneList.add(new NamePane(categoryPane.title4PopupWindow(), categoryPane)); + } + + if (plot == null || plot.isSupportSeriesFilter()) { + seriesPane = new SeriesFilterPane(parent); + paneList.add(new NamePane(seriesPane.title4PopupWindow(), seriesPane)); + } + return paneList; + } + + protected int getContentPaneWidth() { + return PAN_WIDTH; + } + + /** + * 检查界面box使用. + */ + public void checkBoxUse() { + if (categoryPane != null) { + categoryPane.checkBoxUse(); + } + if (seriesPane != null) { + seriesPane.checkBoxUse(); + } + } + + /** + * 界面标题: 数据筛选. + * + * @return 返回标题. + */ + public String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Data_Filter"); + } + + /** + * 重新布局面板 + * @param isNeedPresent 是否需要形态(图表设计器不需要) + */ + public void relayoutPane(boolean isNeedPresent) { + if (this.isNeedPresent == isNeedPresent) { + return; + } + this.isNeedPresent = isNeedPresent; + this.removeAll(); + paneList = initPaneList4NoPresent(plot4Pane, parentPane); + initAllPane(); + this.validate(); + } + + private List initPaneList4NoPresent(Plot plot, AbstractAttrNoScrollPane parent) { + List paneList = new ArrayList(); + if (plot == null || plot.isSupportCategoryFilter()) { + categoryPane = new CategoryFilterPaneWithOutPresentPane(parent); + paneList.add(new NamePane(categoryPane.title4PopupWindow(), categoryPane)); + } + + if (plot == null || plot.isSupportSeriesFilter()) { + seriesPane = new SeriesFilterWithOutPresentPane(parent); + paneList.add(new NamePane(seriesPane.title4PopupWindow(), seriesPane)); + } + return paneList; + } + + public void populateBean(ChartCollection collection, boolean isNeedPresent) { + relayoutPane(isNeedPresent); + if (categoryPane != null) { + categoryPane.populateBean(collection.getSelectedChart().getFilterDefinition()); + } + if (seriesPane != null) { + seriesPane.populateBean(collection.getSelectedChart().getFilterDefinition()); + } + checkBoxUse(); + } + + /** + * 更新界面 数据筛选. + */ + public void populateBean(ChartCollection collection) { + this.populateBean(collection, true); + } + + /** + * 保存界面数据筛选. + */ + public void updateBean(ChartCollection collection) { + if (categoryPane != null) { + categoryPane.updateBean(collection.getSelectedChart().getFilterDefinition()); + } + if (seriesPane != null) { + seriesPane.updateBean(collection.getSelectedChart().getFilterDefinition()); + } + } + + /** + * 分类过滤. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-19 下午04:41:35 + */ + private class CategoryFilterPane extends AbstractChartTabPane { + private UICheckBox onlyPreData; + private UITextField preDataNum; + private UICheckBox combineOther; + private UICheckBox notShowNull; + private PresentComboBox present; + private AbstractAttrNoScrollPane parent; + + public CategoryFilterPane(AbstractAttrNoScrollPane parent) { + super(true); + this.parent = parent; + } + + @Override + public Dimension getPreferredSize() { + Dimension dim = super.getPreferredSize(); + dim.height = FIL_HEIGHT; + return dim; + } + + @Override + protected JPanel createContentPane() { + this.setLayout(new BorderLayout()); + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.NORTH); + pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); + pane.setPreferredSize(new Dimension(200, 110)); + initOtherPane(pane); + initPresentPane(pane); + return pane; + } + + protected void initOtherPane(JPanel pane) { + JPanel prePane = new JPanel(); + prePane.setLayout(new FlowLayout(FlowLayout.LEFT)); + prePane.setPreferredSize(new Dimension(200, 20)); + pane.add(prePane); + onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore")); + preDataNum = new UITextField(); + preDataNum.setPreferredSize(new Dimension(50, 20)); + prePane.add(onlyPreData); + prePane.add(preDataNum); + prePane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Records"))); + JPanel otherPane = new JPanel(); + otherPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); + pane.add(otherPane); + combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther")); + combineOther.setSelected(true); + otherPane.add(combineOther); + JPanel catePane = new JPanel(); + pane.add(catePane); + catePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); + notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate")); + catePane.add(notShowNull); + + onlyPreData.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + checkBoxUse(); + } + }); + } + + private void initPresentPane(JPanel pane) { + JPanel presentPane = new JPanel(); + presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0)); + pane.add(presentPane); + present = new PresentComboBox() { + protected void fireChange() { + fire(); + } + }; + present.setPreferredSize(new Dimension(70, 20)); + presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":")); + presentPane.add(present); + } + + private void fire() { + if (this.parent != null) { + this.parent.attributeChanged(); + } + } + + /** + * 界面标题 "分类" + */ + public String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Style_Category"); + } + + /** + * 检查分类过滤界面 Box是否可用. + */ + public void checkBoxUse() { + preDataNum.setEnabled(onlyPreData.isSelected()); + combineOther.setEnabled(onlyPreData.isSelected()); + ; + } + + /** + * 更新分类过滤界面内容 + */ + public void populateBean(TopDefinitionProvider topDefinition) { + if (topDefinition == null) { + return; + } + populateBean4NoPresent(topDefinition); + if(present != null){ + present.populate(topDefinition.getCategoryPresent()); + } + } + + /** + * 保存分类更新内容到TopDefinition + */ + public void updateBean(TopDefinitionProvider topDefinition) { + updateBean4NoPresent(topDefinition); + topDefinition.setCategoryPresent(present.update()); + } + + @Override + public TopDefinition updateBean() { + return null; + } + + protected void updateBean4NoPresent(TopDefinitionProvider topDefinition) { + if (onlyPreData.isSelected()) { + if (StringUtils.isNotEmpty(preDataNum.getText())) { + Number number = Utils.objectToNumber(preDataNum.getText(), true); + if (number != null) { + topDefinition.setTopCate(Integer.valueOf(preDataNum.getText())); + } + } + topDefinition.setDiscardOtherCate(!combineOther.isSelected()); + } else { + topDefinition.setTopCate(Integer.valueOf(-1)); + } + topDefinition.setDiscardNullCate(notShowNull.isSelected()); + } + + protected void populateBean4NoPresent(TopDefinitionProvider topDefinition) { + if (topDefinition.getTopCate() == -1) { + onlyPreData.setSelected(false); + } else { + onlyPreData.setSelected(true); + preDataNum.setText(String.valueOf(topDefinition.getTopCate())); + + combineOther.setSelected(!topDefinition.isDiscardOtherCate()); + } + + notShowNull.setSelected(topDefinition.isDiscardNullCate()); + } + } + + /** + * 系列过滤. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-19 下午04:41:24 + */ + private class SeriesFilterPane extends AbstractChartTabPane { + private UICheckBox onlyPreData; + private UITextField preDataNum; + private UICheckBox notShowNull; + private UICheckBox combineOther; + private PresentComboBox present; + + private AbstractAttrNoScrollPane parent; + + public SeriesFilterPane(AbstractAttrNoScrollPane parent) { + super(true); + this.parent = parent; + } + + @Override + public Dimension getPreferredSize() { + Dimension dim = super.getPreferredSize(); + dim.height = FIL_HEIGHT; + return dim; + } + + @Override + protected JPanel createContentPane() { + this.setLayout(new BorderLayout()); + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.NORTH); + pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); + pane.setPreferredSize(new Dimension(200, 110)); + initOtherPane(pane); + initPresentPane(pane); + return pane; + } + + + protected void initOtherPane(JPanel pane) { + JPanel prePane = new JPanel(); + prePane.setLayout(new FlowLayout(FlowLayout.LEFT)); + prePane.setPreferredSize(new Dimension(200, 20)); + pane.add(prePane); + onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore")); + preDataNum = new UITextField(); + preDataNum.setPreferredSize(new Dimension(50, 20)); + prePane.add(onlyPreData); + prePane.add(preDataNum); + prePane.add(new UILabel(Inter.getLocText("FR-Chart-Data_Records"))); + JPanel otherPane = new JPanel(); + otherPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); + pane.add(otherPane); + + combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther")); + combineOther.setSelected(true); + otherPane.add(combineOther); + JPanel catePane = new JPanel(); + pane.add(catePane); + + catePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); + notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries")); + catePane.add(notShowNull); + + onlyPreData.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + checkBoxUse(); + } + }); + } + + private void initPresentPane(JPanel pane) { + JPanel presentPane = new JPanel(); + presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0)); + pane.add(presentPane); + present = new PresentComboBox() { + protected void fireChange() { + fire(); + } + }; + present.setPreferredSize(new Dimension(70, 20)); + presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":")); + presentPane.add(present); + } + + private void fire() { + if (this.parent != null) { + parent.attributeChanged(); + } + } + + + /** + * 界面标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("FR-Chart-Data_Series"); + } + + /** + * 检查Box是否可用 + */ + public void checkBoxUse() { + preDataNum.setEnabled(onlyPreData.isSelected()); + combineOther.setEnabled(onlyPreData.isSelected()); + } + + /** + * 系列 筛选器界面 更新属性 + */ + public void populateBean(TopDefinitionProvider topDefinition) { + if (topDefinition == null) { + return; + } + populate4NoPresent(topDefinition); + if(present != null){ + present.populate(topDefinition.getSeriesPresent()); + } + } + + protected void populate4NoPresent(TopDefinitionProvider topDefinition) { + if (topDefinition.getTopSeries() == -1) { + onlyPreData.setSelected(false); + } else { + onlyPreData.setSelected(true); + preDataNum.setText(String.valueOf(topDefinition.getTopSeries())); + + combineOther.setSelected(!topDefinition.isDiscardOtherSeries()); + } + + notShowNull.setSelected(topDefinition.isDiscardNullSeries()); + } + + /** + * 系列 筛选器界面 保存属性到TopDefinition + */ + public void updateBean(TopDefinitionProvider topDefinition) { + update4NoPresent(topDefinition); + if(present != null){ + topDefinition.setSeriesPresent(present.update()); + } + } + + protected void update4NoPresent(TopDefinitionProvider topDefinition) { + if (onlyPreData.isSelected()) { + if (StringUtils.isNotEmpty(preDataNum.getText())) { + Number number = Utils.objectToNumber(preDataNum.getText(), true); + if (number != null) { + topDefinition.setTopSeries(number.intValue()); + } + } + topDefinition.setDiscardOtherSeries(!combineOther.isSelected()); + } else { + topDefinition.setTopSeries(Integer.valueOf(-1)); + } + + topDefinition.setDiscardNullSeries(notShowNull.isSelected()); + } + + @Override + public TopDefinition updateBean() { + return null; + } + } + + private class SeriesFilterWithOutPresentPane extends SeriesFilterPane { + + public SeriesFilterWithOutPresentPane(AbstractAttrNoScrollPane parent) { + super(parent); + } + + @Override + protected JPanel createContentPane() { + this.setLayout(new BorderLayout()); + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.NORTH); + pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); + pane.setPreferredSize(new Dimension(200, 110)); + initOtherPane(pane); + return pane; + } + + /** + * 系列 筛选器界面 更新属性 + */ + public void populateBean(TopDefinition topDefinition) { + if (topDefinition == null) { + return; + } + populate4NoPresent(topDefinition); + } + + /** + * 系列 筛选器界面 保存属性到TopDefinition + */ + public void updateBean(TopDefinition topDefinition) { + update4NoPresent(topDefinition); + } + + } + + private class CategoryFilterPaneWithOutPresentPane extends CategoryFilterPane { + + public CategoryFilterPaneWithOutPresentPane(AbstractAttrNoScrollPane parent) { + super(parent); + } + + @Override + protected JPanel createContentPane() { + this.setLayout(new BorderLayout()); + JPanel pane = new JPanel(); + this.add(pane, BorderLayout.NORTH); + pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); + pane.setPreferredSize(new Dimension(200, 110)); + initOtherPane(pane); + return pane; + } + + /** + * 更新分类过滤界面内容 + */ + public void populateBean(TopDefinition topDefinition) { + if (topDefinition == null) { + return; + } + populateBean4NoPresent(topDefinition); + } + + /** + * 保存分类更新内容到TopDefinition + */ + public void updateBean(TopDefinitionProvider topDefinition) { + updateBean4NoPresent(topDefinition); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDesignDataLoadPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDesignDataLoadPane.java new file mode 100644 index 000000000..43a2fae34 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDesignDataLoadPane.java @@ -0,0 +1,48 @@ +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.base.TableData; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; +import com.fr.design.dialog.BasicPane; +import com.fr.design.mainframe.AbstractChartDataPane4Chart; + +/** + * 图表设计器导入 界面 + * Created by kunsnat on 14-10-21. + * kunsnat@gmail.com + */ +public abstract class ChartDesignDataLoadPane extends BasicPane { + + private AbstractChartDataPane4Chart parentPane; + + public ChartDesignDataLoadPane(AbstractChartDataPane4Chart parentPane){ + this.parentPane = parentPane; + } + + /** + * 加载数据集 + * + * @param tableData 数据集 + */ + public abstract void populateChartTableData(TableData tableData); + + /** + * 根据界面 获取数据集相关. + * + * @return 返回数据集 + */ + public abstract TableData getTableData(); + + + protected abstract String getNamePrefix(); + + //响应属性事件 + protected void fireChange() { + parentPane.fireTableDataChange(); + } + + + public TableDataWrapper getTableDataWrapper(){ + return new TemplateTableDataWrapper(getTableData()); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DataContentsPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DataContentsPane.java new file mode 100644 index 000000000..ab711137b --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DataContentsPane.java @@ -0,0 +1,39 @@ +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.PaneTitleConstants; + +/** + * 图表数据内容界面, 属性表 样式数据. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-1-18 下午03:42:20 + */ +public abstract class DataContentsPane extends AbstractChartAttrPane { + + + /** + * 界面标题 + */ + public String getIconPath() { + return "com/fr/design/images/chart/ChartData.png"; + } + + /** + * 界面标题 + */ + public String title4PopupWindow() { + return PaneTitleConstants.CHART_DATA_TITLE; + } + + /** + * 设置是否关联单元格数据. + */ + public abstract void setSupportCellData(boolean surpportCellData); + + /** + * 清除掉响应事件. + */ +// public void removeAttributeListener() { +// super.removeAttributeChangeListener(); +// } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java new file mode 100644 index 000000000..0a22b9664 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java @@ -0,0 +1,102 @@ +package com.fr.design.mainframe.chart.gui.data; + +import java.awt.BorderLayout; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +import javax.swing.JPanel; +import javax.swing.border.LineBorder; + +import com.fr.base.BaseUtils; +import com.fr.base.FRContext; +import com.fr.base.TableData; +import com.fr.design.constants.UIConstants; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.data.DesignTableDataManager; +import com.fr.design.data.datapane.TableDataComboBox; +import com.fr.data.impl.NameTableData; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.dialog.BasicPane; + +public class DatabaseTableDataPane extends BasicPane{ + private static final long serialVersionUID = 5316016202202932242L; + private TableDataComboBox tableNameCombox; + private UIButton reviewButton; + + public DatabaseTableDataPane(UILabel label) { + initTableCombox(); + initReviewButton(); + this.setLayout(new BorderLayout(0,0)); + if(label != null) { + this.add(label, BorderLayout.WEST); + } + + JPanel pane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); + pane.add(tableNameCombox,BorderLayout.CENTER); + + pane.add(reviewButton,BorderLayout.EAST); + this.add(pane,BorderLayout.CENTER); + } + + /** + * 返回选中的数据源. + */ + public TableDataWrapper getTableDataWrapper() { + return tableNameCombox.getSelectedItem(); + } + + public void populateBean(TableData nameTableData) { + if(nameTableData == null) { + tableNameCombox.setSelectedItem(nameTableData); + } else { + tableNameCombox.setSelectedTableDataByName(((NameTableData)nameTableData).getName()); + } + } + + @Override + protected String title4PopupWindow() { + return null; + } + + /** + * 数据集列表选中后的事件 + */ + protected void userEvent() { + + } + + private void initTableCombox() { + tableNameCombox = new TableDataComboBox(DesignTableDataManager.getEditingTableDataSource()); + tableNameCombox.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + if(e.getStateChange() == ItemEvent.DESELECTED){ + userEvent(); + } + } + }); + } + + private void initReviewButton() { + reviewButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/search.png")); + reviewButton.setBorder(new LineBorder(UIConstants.LINE_COLOR)); + reviewButton.addMouseListener(new MouseAdapter() { + @Override + public void mouseReleased(MouseEvent e) { + TableDataWrapper tableDataWrappe = tableNameCombox.getSelectedItem(); + if ( tableDataWrappe != null) { + try { + tableDataWrappe.previewData(); + } catch (Exception e1) { + FRContext.getLogger().error(e1.getMessage(), e1); + } + } + super.mouseReleased(e); + } + }); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/EmbbeddDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/EmbbeddDataPane.java new file mode 100644 index 000000000..a9f418907 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/EmbbeddDataPane.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.base.BaseUtils; +import com.fr.base.FRContext; +import com.fr.base.TableData; +import com.fr.design.constants.UIConstants; +import com.fr.data.impl.EmbeddedTableData; +import com.fr.design.data.tabledata.tabledatapane.EmbeddedTableDataPane; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.BasicPane; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.mainframe.AbstractChartDataPane4Chart; + +import javax.swing.*; +import javax.swing.border.LineBorder; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +/** + * 图表设计器内置数据集面板 + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-16 + * Time: 上午12:09 + */ +public class EmbbeddDataPane extends ChartDesignDataLoadPane { + private UIButton edit; + private UIButton reviewButton; + private EmbeddedTableData tableData; + + public EmbbeddDataPane(AbstractChartDataPane4Chart parentPane) { + super(parentPane); + tableData = new EmbeddedTableData(); + initEditButton(); + initReviewButton(); + this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 3)); + this.add(edit); + this.add(reviewButton); + } + + private void initEditButton() { + edit = new UIButton(BaseUtils.readIcon("com/fr/design/images/control/edit.png")); + edit.setBorder(new LineBorder(UIConstants.LINE_COLOR)); + edit.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + EmbeddedTableDataPane tableDataPane = new EmbeddedTableDataPane(); + tableDataPane.populateBean(tableData); + dgEdit(tableDataPane, getNamePrefix()); + } + }); + } + + private void initReviewButton() { + reviewButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/search.png")); + reviewButton.setBorder(new LineBorder(UIConstants.LINE_COLOR)); + reviewButton.addMouseListener(new MouseAdapter() { + @Override + public void mouseReleased(MouseEvent e) { + //预览图表设计器内置数据集 + TableDataWrapper tableDataWrappe = getTableDataWrapper(); + if (tableDataWrappe != null) { + try { + tableDataWrappe.previewData(); + } catch (Exception e1) { + FRContext.getLogger().error(e1.getMessage(), e1); + } + } + } + }); + } + + @Override + protected String title4PopupWindow() { + return null; + } + + @Override + public TableData getTableData() { + return tableData; + } + + /** + * 加载数据集 + * + * @param tableData 数据集 + */ + public void populateChartTableData(TableData tableData) { + if (tableData instanceof EmbeddedTableData) { + this.tableData =(EmbeddedTableData) tableData; + } + } + + protected String getNamePrefix() { + return "Embedded"; + } + + /** + * 编辑面板 + * + * @param uPanel 面板 + * @param originalName 原始名字 + */ + private void dgEdit(final EmbeddedTableDataPane uPanel, String originalName) { + final BasicPane.NamePane nPanel = uPanel.asNamePane(); + nPanel.setObjectName(originalName); + final BasicDialog dg; + dg = nPanel.showLargeWindow(SwingUtilities.getWindowAncestor(EmbbeddDataPane.this), new DialogActionAdapter() { + public void doOk() { + tableData = uPanel.updateBean(); + fireChange(); + } + }); + dg.setVisible(true); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ExcelDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ExcelDataPane.java new file mode 100644 index 000000000..7cc476e24 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ExcelDataPane.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.base.BaseUtils; +import com.fr.base.FRContext; +import com.fr.base.TableData; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.constants.UIConstants; +import com.fr.design.data.datapane.preview.PreviewTablePane; +import com.fr.data.impl.ExcelTableData; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.mainframe.AbstractChartDataPane4Chart; +import com.fr.design.mainframe.DesignerContext; +import com.fr.file.FILE; +import com.fr.file.FILEChooserPane; +import com.fr.general.Inter; + +import javax.swing.*; +import javax.swing.border.LineBorder; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 下午11:58 + */ +public class ExcelDataPane extends ChartDesignDataLoadPane { + + private UITextField path = new UITextField(); + private UIButton reviewButton; + private ExcelTableData tableData; + private MouseListener listener = new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + FILEChooserPane fileChooserPane = new FILEChooserPane(true, true); + if (fileChooserPane.showOpenDialog(DesignerContext.getDesignerFrame(), ".xlsx") + == FILEChooserPane.OK_OPTION) { + FILE chooseFILE = fileChooserPane.getSelectedFILE(); + if (chooseFILE != null && chooseFILE.exists()) { + path.setText(chooseFILE.getPath()); + } else { + JOptionPane.showConfirmDialog(ExcelDataPane.this, Inter.getLocText("FR-Template-Path_chooseRightPath"), + Inter.getLocText("FR-App-All_Warning"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); + path.setText(""); + } + tableData.setFilePath(path.getText().toString()); + tableData.setFromEnv(chooseFILE.isEnvFile()); + tableData.setNeedColumnName(true); + fireChange(); + } + } + }; + + public ExcelDataPane(AbstractChartDataPane4Chart parentPane, JComponent pathChooseButton) { + super(parentPane); + initReviewButton(); + tableData = new ExcelTableData(); + tableData.setFilePath(path.getText().toString()); + tableData.setNeedColumnName(true); + path.setEditable(false); + pathChooseButton.addMouseListener(listener); + this.setLayout(new BorderLayout(0, 0)); + JPanel pane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE, 0)); + pane.add(path, BorderLayout.CENTER); + + pane.add(reviewButton, BorderLayout.EAST); + this.add(pane, BorderLayout.CENTER); + } + + @Override + protected String title4PopupWindow() { + return null; + } + + private void initReviewButton() { + reviewButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/search.png")); + reviewButton.setBorder(new LineBorder(UIConstants.LINE_COLOR)); + reviewButton.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + //预览本地excel + try { + PreviewTablePane.previewTableData(getTableData()); + } catch (Exception e1) { + FRContext.getLogger().error(e1.getMessage(), e1); + } + } + }); + } + + @Override + public TableData getTableData() { + return tableData; + } + + @Override + protected String getNamePrefix() { + return null; + } + + /** + * 加载数据集 + * + * @param tableData 数据集 + */ + public void populateChartTableData(TableData tableData) { + if (tableData instanceof ExcelTableData) { + path.setText(((ExcelTableData) tableData).getFilePath()); + this.tableData = (ExcelTableData)tableData; + this.tableData.setNeedColumnName(true); + } + fireChange(); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ImportSetChartDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ImportSetChartDataPane.java new file mode 100644 index 000000000..9c531ab36 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ImportSetChartDataPane.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.base.TableData; +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.chart.chartdata.TableDataDefinition; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.mainframe.AbstractChartDataPane4Chart; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotMoreCateTableDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.Factory4TableDataContentPane; + +import javax.swing.*; + +/** + * 数据导入数据设置面板 + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 下午2:35 + */ +public class ImportSetChartDataPane extends AbstractChartDataPane4Chart { + + private AbstractTableDataContentPane dataContentPane; + + public ImportSetChartDataPane(final AttributeChangeListener listener, ChartDataPane parent) { + super(listener,parent); + } + + + /** + * 更新界面 数据内容 + */ + public void populate(ChartCollection collection) { + dataContentPane = getContentPane(collection.getSelectedChart().getPlot()); + dataContentPane.setNeedSummaryCaculateMethod(false); + dataContentPane.redoLayoutPane(); + if (collection != null && collection.getSelectedChart() != null) { + Chart chart = collection.getSelectedChart(); + TopDefinitionProvider definition = chart.getFilterDefinition(); + if (definition instanceof TableDataDefinition) { + TableData tableData = ((TableDataDefinition) definition).getTableData(); + if(tableData != null){ + populateChoosePane(tableData); + fireTableDataChange(); + } + if (dataContentPane != null) { + dataContentPane.populateBean(collection); + } + } + } + this.remove(leftContentPane); + this.initContentPane(); + this.validate(); + dataSource.addItemListener(dsListener); + initAllListeners(); + initSelfListener(dataContentPane); + this.addAttributeChangeListener(attributeChangeListener); + } + + protected JPanel getDataContentPane(){ + return dataContentPane; + } + + + @Override + public void update(ChartCollection collection) { + if (collection != null && collection.getSelectedChart() != null) { + if (dataContentPane != null) { + dataContentPane.updateBean(collection); + } + TableDataDefinition topDefinition =(TableDataDefinition)collection.getSelectedChart().getFilterDefinition(); + if(topDefinition !=null){ + topDefinition.setTableData(choosePane.getTableData()); + } + } + } + + private AbstractTableDataContentPane getContentPane(Plot plot) { + if (plot == null || plot.isSupportMoreCate()) { + return new CategoryPlotMoreCateTableDataContentPane(parentPane){ + public boolean isNeedSummaryCaculateMethod(){ + return false; + } + }; + } else{ + return Factory4TableDataContentPane.createTableDataContenetPaneWithPlotType(plot, parentPane); + } + } + + /** + * 数据集数据改变 + */ + public void fireTableDataChange() { + if (dataContentPane != null) { + dataContentPane.onSelectTableData(choosePane.getTableDataWrapper()); + } + } + + /** + * 清空数据集的设置 + */ + public void clearTableDataSetting(){ + if(dataContentPane != null){ + dataContentPane.clearAllBoxList(); + } + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/JSONDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/JSONDataPane.java new file mode 100644 index 000000000..96e17d742 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/JSONDataPane.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.base.BaseUtils; +import com.fr.base.FRContext; +import com.fr.base.TableData; +import com.fr.chart.chartdata.JSONTableData; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.constants.UIConstants; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.mainframe.AbstractChartDataPane4Chart; + +import javax.swing.*; +import javax.swing.border.LineBorder; +import java.awt.*; +import java.awt.event.*; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-15 + * Time: 下午6:45 + */ +public class JSONDataPane extends ChartDesignDataLoadPane { + private UITextField url = new UITextField(); + private UIButton reviewButton; + private JSONTableData tableData; + + public JSONDataPane(AbstractChartDataPane4Chart parentPane) { + super(parentPane); + initReviewButton(); + url.addKeyListener(new KeyAdapter() { + @Override + public void keyTyped(KeyEvent e) { + if(e.getKeyChar() == KeyEvent.VK_ENTER){ + tableData.setFilePath(url.getText()); + fireChange(); + } + } + }); + this.setLayout(new BorderLayout(0, 0)); + JPanel pane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE, 0)); + pane.add(url, BorderLayout.CENTER); + pane.add(reviewButton, BorderLayout.EAST); + this.add(pane, BorderLayout.CENTER); + tableData = new JSONTableData(url.getText()); + } + + @Override + protected String title4PopupWindow() { + return null; + } + + private void initReviewButton() { + reviewButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/data/search.png")); + reviewButton.setBorder(new LineBorder(UIConstants.LINE_COLOR)); + reviewButton.addMouseListener(new MouseAdapter() { + @Override + public void mouseReleased(MouseEvent e) { + tableData.setFilePath(url.getText()); + fireChange(); + //预览JSON数据 + TableDataWrapper tableDataWrappe = getTableDataWrapper(); + if (tableDataWrappe != null) { + try { + tableDataWrappe.previewData(); + } catch (Exception e1) { + FRContext.getLogger().error(e1.getMessage(), e1); + } + } + } + }); + } + + @Override + public TableData getTableData() { + return tableData; + } + + @Override + protected String getNamePrefix() { + return null; + } + + /** + * 加载数据集 + * @param tableData 数据集 + */ + public void populateChartTableData(TableData tableData) { + if(tableData instanceof JSONTableData) { + url.setText(((JSONTableData) tableData).getFilePath()); + this.tableData = (JSONTableData)tableData; + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java new file mode 100644 index 000000000..55c645181 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -0,0 +1,131 @@ +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.dialog.BasicScrollPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +/** + * 一般数据界面 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-1-18 下午03:45:25 + */ +public class NormalChartDataPane extends DataContentsPane { + + private UIComboBoxPane dataPane; + private TableDataPane tableDataPane; + private ReportDataPane reportDataPane; + private AttributeChangeListener listener; + + private ChartDataPane parent; + + public NormalChartDataPane(AttributeChangeListener listener, ChartDataPane parent) { + this.listener = listener; + this.parent = parent; + initAll(); + } + + public NormalChartDataPane(AttributeChangeListener listener, ChartDataPane parent, boolean supportCellData) { + this.listener = listener; + this.parent = parent; + initAll(); + + dataPane.justSupportOneSelect(true); + } + + @Override + protected JPanel createContentPane() { + return new BasicScrollPane() { + + @Override + protected JPanel createContentPane() { + JPanel contentPane = new JPanel(new BorderLayout()); + dataPane = new UIComboBoxPane() { + protected void initLayout() { + this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); + JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); + northPane.add(jcb, BorderLayout.CENTER); + UILabel label1 = new UILabel(Inter.getLocText("Chart-Data_Resource") + ":", SwingConstants.RIGHT); + label1.setPreferredSize(new Dimension(75,20)); + northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); + this.add(northPane, BorderLayout.NORTH); + this.add(cardPane, BorderLayout.CENTER); + + } + @Override + protected String title4PopupWindow() { + return null; + } + + @Override + protected List> initPaneList() { + tableDataPane = new TableDataPane(parent); + reportDataPane = new ReportDataPane(parent); + List> paneList = new ArrayList>(); + paneList.add(tableDataPane); + paneList.add(reportDataPane); + return paneList; + } + }; + contentPane.add(dataPane, BorderLayout.CENTER); + dataPane.setBorder(BorderFactory.createEmptyBorder(10 ,0, 0, 0)); + return contentPane; + } + + @Override + protected String title4PopupWindow() { + return ""; + } + + @Override + public void populateBean(ChartCollection ob) { + + } + }; + + } + + /** + * 更新界面 数据内容 + */ + public void populate(ChartCollection collection) { + reportDataPane.refreshContentPane(collection); + tableDataPane.refreshContentPane(collection); + + dataPane.populateBean(collection); + this.initAllListeners(); + this.addAttributeChangeListener(listener); + + reportDataPane.checkBoxUse(); + tableDataPane.checkBoxUse(); + } + + /** + * 保存 数据界面内容 + */ + public void update(ChartCollection collection) { + if(dataPane.getSelectedIndex() == 0) { + tableDataPane.updateBean(collection); + } else { + reportDataPane.updateBean(collection); + } + } + + /** + * 是否支持单元格数据 + */ + public void setSupportCellData(boolean supportCellData) { + dataPane.justSupportOneSelect(supportCellData); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/PresentComboBox.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/PresentComboBox.java new file mode 100644 index 000000000..bf66cdf34 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/PresentComboBox.java @@ -0,0 +1,113 @@ +package com.fr.design.mainframe.chart.gui.data; + +import javax.swing.JPanel; +import javax.swing.SwingUtilities; +import javax.swing.event.PopupMenuEvent; +import javax.swing.event.PopupMenuListener; + +import com.fr.base.present.DictPresent; +import com.fr.base.present.FormulaPresent; +import com.fr.base.present.Present; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.present.FormulaPresentPane; +import com.fr.design.present.dict.DictionaryPane; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.general.Inter; + +/** + * 公式下拉框编辑器. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-27 上午01:59:49 + */ +public class PresentComboBox extends UIComboBox{ + private Present present; + + private String[] ITEMS = { + Inter.getLocText("DS-Dictionary"), + Inter.getLocText("Present-Formula_Present"), + Inter.getLocText("Present-No_Present") + }; + + public PresentComboBox() { + super(); + + this.addItem(ITEMS[0]); + this.addItem(ITEMS[1]); + this.addItem(ITEMS[2]); + + this.setSelectedItem(ITEMS[2]); + + this.addPopupMenuListener(new PopupMenuListener() { + public void popupMenuWillBecomeVisible(PopupMenuEvent e) { + } + + public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { + if (PresentComboBox.this.getSelectedIndex() == 0) { + final DictionaryPane pp = new DictionaryPane(); + if (present instanceof DictPresent) { + pp.populateBean(((DictPresent) present).getDictionary()); + } + + BasicDialog bg = pp.showWindow(SwingUtilities.getWindowAncestor(new JPanel()), new DialogActionAdapter(){ + public void doOk() { + PresentComboBox.this.populate(new DictPresent(pp.updateBean())); + fireChange(); + } + }); + + bg.setVisible(true); + } else if (PresentComboBox.this.getSelectedIndex() == 1) { + final FormulaPresentPane pp = new FormulaPresentPane(); + if (present instanceof FormulaPresent) { + pp.populateBean((FormulaPresent) present); + } + + BasicDialog bg = pp.showSmallWindow(SwingUtilities.getWindowAncestor(new JPanel()), new DialogActionAdapter(){ + public void doOk() { + PresentComboBox.this.populate(pp.updateBean()); + fireChange(); + } + }); + + bg.setVisible(true); + } else { + present = null; + fireChange(); + } + } + + public void popupMenuCanceled(PopupMenuEvent e) { + } + }); + } + + /** + * 重载用于加载 完成编辑后 ok的响应事件 + */ + protected void fireChange() { + + } + + /** + * 更新公式选择. + */ + public void populate(Present present) { + if (present instanceof DictPresent) { + this.setSelectedIndex(0); + } else if (present instanceof FormulaPresent) { + this.setSelectedIndex(1); + } else if (present == null) { + this.setSelectedIndex(2); + } + + this.present = present; + } + + /** + * 返回编辑的结果. + */ + public Present update() { + return present; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java new file mode 100644 index 000000000..cedc08a48 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java @@ -0,0 +1,101 @@ +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartdata.ReportDataDefinition; +import com.fr.design.ChartTypeInterfaceManager; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.general.Inter; + +import java.awt.*; + +public class ReportDataPane extends FurtherBasicBeanPane{ + + private AbstractReportDataContentPane contentPane; + private ChartDataPane parent; + + public ReportDataPane(ChartDataPane parent) { + this.parent = parent; + } + + private AbstractReportDataContentPane getContentPane(Chart chart) { + if(chart == null) { + return null; + } + + Plot plot = chart.getPlot(); + + return ChartTypeInterfaceManager.getInstance().getReportDataSourcePane(plot, parent); + } + + /** + * 单元格数据 + * @return 界面的标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("FR-Chart_Cell_Data"); + } + + /** + * 界面是否接受这个对象 + * @param ob 需要判断的对象 + * @return 界面是否接受对象 + */ + public boolean accept(Object ob) { + return ob instanceof ChartCollection && ((ChartCollection)ob).getSelectedChart().getFilterDefinition() instanceof ReportDataDefinition; + } + + /** + * 界面重置 + */ + public void reset() { + + } + + /** + * 刷新contentPane + * @param collection 图表属性的集合 + */ + public void refreshContentPane(ChartCollection collection) { + this.removeAll(); + + this.setLayout(new BorderLayout()); + contentPane = getContentPane(collection.getSelectedChart()); + if(contentPane != null) { + this.add(contentPane, BorderLayout.CENTER); + } + } + + /** + * 检查界面是否可用. + */ + public void checkBoxUse() { + if(contentPane != null) { + contentPane.checkBoxUse(); + } + } + + @Override + public void populateBean(ChartCollection collection) { + if(collection == null) { + return; + } + if(contentPane != null) { + contentPane.populateBean(collection); + } + } + + public void updateBean(ChartCollection collection) { + if(contentPane != null) { + contentPane.updateBean(collection); + } + } + + @Override + public ChartCollection updateBean() { + return null; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java new file mode 100644 index 000000000..2bed0cb2d --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java @@ -0,0 +1,160 @@ +package com.fr.design.mainframe.chart.gui.data; + +import com.fr.base.TableData; +import com.fr.chart.chartattr.*; +import com.fr.chart.chartdata.TableDataDefinition; +import com.fr.chart.chartdata.TopDefinition; +import com.fr.data.impl.NameTableData; +import com.fr.design.ChartTypeInterfaceManager; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.table.*; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; + +public class TableDataPane extends FurtherBasicBeanPane{ + private static final long serialVersionUID = 4740461028440155147L; + private static final int TOP = -5; + private DatabaseTableDataPane tableDataPane; + private AbstractTableDataContentPane dataContentPane; + + private ChartDataPane parent; + + public TableDataPane(ChartDataPane parent) { + this.parent = parent; + initDataPane(); + } + + private void initDataPane() { + UILabel label = new BoldFontTextLabel(Inter.getLocText("Chart-DS_TableData") + ":", SwingConstants.RIGHT) ; + label.setPreferredSize(new Dimension(75,20)); + tableDataPane = new DatabaseTableDataPane(label) { + @Override + protected void userEvent() { + onSelectTableData(); + checkBoxUse(); + } + }; + + tableDataPane.setBorder(BorderFactory.createMatteBorder(0,6,0, 0, getBackground())); + tableDataPane.setBorder(BorderFactory.createEmptyBorder(0,1,0,1)); + tableDataPane.setPreferredSize(new Dimension(205 , 20)); + this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0)); + this.add(tableDataPane, BorderLayout.NORTH); + } + + /** + * 检查box是否可用. + */ + public void checkBoxUse() { + TableDataWrapper dataWrap = tableDataPane.getTableDataWrapper(); + + if(dataContentPane != null) { + dataContentPane.checkBoxUse(dataWrap != null); + } + } + + private void onSelectTableData() { + TableDataWrapper dataWrap = tableDataPane.getTableDataWrapper(); + if(dataWrap == null) { + return; + } + if(dataContentPane != null) { + dataContentPane.onSelectTableData(dataWrap); + } + } + + private AbstractTableDataContentPane getContentPane(Plot plot) { + return ChartTypeInterfaceManager.getInstance().getTableDataSourcePane(plot, parent); + } + + /** + * 界面标题 + * @return 返回标题. + */ + public String title4PopupWindow() { + return Inter.getLocText(new String[]{"TableData", "Data"}); + } + + + /** + * 判断界面是否接受 + * @param ob 需要判断的对象 + * @return 返回是否接受. + */ + public boolean accept(Object ob) { + return ob instanceof ChartCollection && (((ChartCollection)ob).getSelectedChart().getFilterDefinition() instanceof TableDataDefinition); + } + + /** + * 重置界面 + */ + public void reset() { + + } + + /** + * 根据图表类型 刷新界面 + * @param collection 图表属性的集合 + */ + public void refreshContentPane(ChartCollection collection) { + if(dataContentPane != null) { + remove(dataContentPane); + } + dataContentPane = getContentPane(collection.getSelectedChart().getPlot()); + if(dataContentPane != null) { + add(dataContentPane, BorderLayout.CENTER); + } + } + + /** + * 更新界面属性 + */ + public void populateBean(ChartCollection collection) { + if(collection == null) { + return; + } + TableDataDefinition data = (TableDataDefinition)collection.getSelectedChart().getFilterDefinition(); + TableData tableData = null; + if(data != null) { + tableData = data.getTableData(); + } + onSelectTableData(); + checkBoxUse(); + + tableDataPane.populateBean(tableData); + if(dataContentPane != null) { + dataContentPane.populateBean(collection); + } + } + + /** + * 保存界面属性到ChartCollection + */ + public void updateBean(ChartCollection collection) { + if(dataContentPane != null) { + dataContentPane.updateBean(collection); + } + TopDefinition dataDefinition = (TopDefinition)collection.getSelectedChart().getFilterDefinition(); + if(dataDefinition instanceof TableDataDefinition) { + TableDataWrapper tableDataWrapper = tableDataPane.getTableDataWrapper(); + if (dataDefinition != null && tableDataWrapper != null){ + NameTableData nameTableData = new NameTableData(tableDataWrapper.getTableDataName()); + ((TableDataDefinition)dataDefinition).setTableData(nameTableData); + } + } + } + + /** + * 保存界面属性 新建ChartCollection + */ + public ChartCollection updateBean() { + return null; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java new file mode 100644 index 000000000..6754ca796 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java @@ -0,0 +1,172 @@ +package com.fr.design.mainframe.chart.gui.data.report; + +import com.fr.base.Formula; +import com.fr.base.Utils; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.constants.UIConstants; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.itable.UITable; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.layout.TableLayout; +import com.fr.stable.StableUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import java.awt.*; +import java.util.HashMap; +import java.util.List; + +/** + * 抽象的 属性表 单元格数据界面. +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2012-12-27 上午10:31:53 + */ +public abstract class AbstractReportDataContentPane extends BasicBeanPane{ + private static final double ROW = 6; + + protected UICorrelationPane seriesPane; + + protected abstract String[] columnNames(); + + protected void initEveryPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p, TableLayout.LEADING, f }; + double[] rowSize = {p, ROW, p, ROW, p, ROW, p}; + + this.setLayout(new TableLayout(columnSize, rowSize)); + + initSeriesPane(); + + this.add(seriesPane, "0,2,2,2"); + } + + //kunsnat: 用于重载, 甘特图, 股价图 第一列 默认应该不可编辑. + protected void initSeriesPane() { + seriesPane = new UICorrelationPane(columnNames()) { + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + + protected UITable initUITable() { + return new UITable(columnCount) { + + public UITableEditor createTableEditor() { + return createUITableEditor(); + } + + public void tableCellEditingStopped(ChangeEvent e) { + stopPaneEditing(e); + } + }; + } + }; + } + + /** + * 检查界面Box 联动 是否可用. + */ + public void checkBoxUse() { + + } + + /** + * 覆盖方法 doNothing + */ + @Override + public ChartCollection updateBean() { + return null; + } + + /** + * 用于直接更新 下拉列表之类的界面 + */ + protected void populateList(List list) { + seriesPane.populateBean(list); + } + + /** + * 用于更新得到最新的界面列表值 + */ + protected List updateList() { + return seriesPane.updateBean(); + } + + /** + * 界面标题: + */ + protected String title4PopupWindow() { + return ""; + } + + protected HashMap createNameValue(List list) { + HashMap values = new HashMap(); + + for(int i = 0; i < list.size(); i++) { + Object[] tmp = list.get(i); + values.put(tmp[0], tmp[1]); + } + + return values; + } + + protected Object canBeFormula(Object object) { + if(object == null) { + return null; + } + + return StableUtils.canBeFormula(object) ? new Formula(object.toString()) : object.toString(); + } + + protected class InnerTableEditor extends UITableEditor { + private TinyFormulaPane editorComponent; + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + return editorComponent.getUITextField().getText(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if(column == table.getModel().getColumnCount()) { + return null; + } + + seriesPane.stopCellEditing(); + + TinyFormulaPane editor = getEditorComponent(); + editor.getUITextField().setText(Utils.objectToString(value)); + return editor; + } + + private TinyFormulaPane getEditorComponent() { + editorComponent = null; + if (editorComponent == null) { + editorComponent = new TinyFormulaPane() { + @Override + public void okEvent() { + seriesPane.stopCellEditing(); + seriesPane.fireTargetChanged(); + } + }; + editorComponent.setBackground(UIConstants.FLESH_BLUE); + + editorComponent.getUITextField().registerChangeListener(new UIObserverListener() { + @Override + public void doChange() { + seriesPane.fireTargetChanged(); + } + }); + } + return editorComponent; + } + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java new file mode 100644 index 000000000..01ea8eec1 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java @@ -0,0 +1,98 @@ +package com.fr.design.mainframe.chart.gui.data.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.BubblePlot; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.BubbleReportDefinition; +import com.fr.chart.chartdata.BubbleSeriesValue; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.general.Inter; + +import java.util.ArrayList; +import java.util.List; + +/** + * 气泡图 属性表 单元格数据源界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-19 下午03:47:56 + */ +public class BubblePlotReportDataContentPane extends AbstractReportDataContentPane { + private static final int BUBBLE = 4; + private ChartDataFilterPane filterPane; + + public BubblePlotReportDataContentPane(ChartDataPane parent) { + initEveryPane(); + + this.add(new BoldFontTextLabel(Inter.getLocText("Data_Filter")), "0,4,2,4"); + this.add(filterPane = new ChartDataFilterPane(new BubblePlot(), parent), "0,6,2,4"); + } + + @Override + protected String[] columnNames() { + return new String[]{ + Inter.getLocText("Bubble-Series_Name"), + Inter.getLocText("ChartF-X_Axis"), + Inter.getLocText("ChartF-Y_Axis"), + Inter.getLocText("FRFont-Size") + }; + } + + public void checkBoxUse() { + } + + /** + * 更新气泡图 单元格界面内容 + */ + public void populateBean(ChartCollection collection) { + if(collection != null) { + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if(definition instanceof BubbleReportDefinition) { + seriesPane.populateBean(populateSeriesEntryList((BubbleReportDefinition)definition)); + } + } + filterPane.populateBean(collection); + } + + private List populateSeriesEntryList(BubbleReportDefinition seriesList) { + List array = new ArrayList(); + for(int i = 0; i < seriesList.size(); i++) { + BubbleSeriesValue seriesEntry = (BubbleSeriesValue)seriesList.get(i); + Object[] nameAndValue = new Object[BUBBLE]; + nameAndValue[0] = seriesEntry.getBubbleSereisName(); + nameAndValue[1] = seriesEntry.getBubbleSeriesX(); + nameAndValue[2] = seriesEntry.getBubbleSeriesY(); + nameAndValue[3] = seriesEntry.getBubbleSeriesSize(); + array.add(nameAndValue); + } + return array; + } + + /** + * 保存气泡图 单元格界面内容到collection + */ + public void updateBean(ChartCollection collection) { + if(collection != null) { + BubbleReportDefinition bubbleReport = new BubbleReportDefinition(); + collection.getSelectedChart().setFilterDefinition(bubbleReport); + + updateSeriesEntryList(bubbleReport, seriesPane.updateBean()); + filterPane.updateBean(collection); + } + } + + private void updateSeriesEntryList(BubbleReportDefinition list, List valueList) { + for (int i = 0; i < valueList.size(); i++) { + Object[] rowValueList = valueList.get(i); + + BubbleSeriesValue seriesEntry = new BubbleSeriesValue(); + + seriesEntry.setBubbleSeriesName(canBeFormula(rowValueList[0])); + seriesEntry.setBubbleSeriesX(canBeFormula(rowValueList[1])); + seriesEntry.setBubbleSeriesY(canBeFormula(rowValueList[2])); + seriesEntry.setBubbleSeriesSize(canBeFormula(rowValueList[3])); + list.add(seriesEntry); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java new file mode 100644 index 000000000..07d699dae --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java @@ -0,0 +1,182 @@ +package com.fr.design.mainframe.chart.gui.data.report; + +import com.fr.base.BaseUtils; +import com.fr.base.Utils; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.Bar2DPlot; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.NormalReportDataDefinition; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; + + +/** + * 多分类 单元格数据集 界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-9-4 下午02:23:46 + */ +public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotReportDataContentPane implements UIObserver{ + private static final long serialVersionUID = -1122313353777460534L; + + private JPanel boxPane; + private UIButton addButton; + + private ArrayList formualList = new ArrayList(); + private UIObserverListener uiobListener = null; + + public CategoryPlotMoreCateReportDataContentPane() { + + } + + public CategoryPlotMoreCateReportDataContentPane(ChartDataPane parent) { + initEveryPane(); + categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name") + ":"); + + JPanel catePane = new JPanel(); + catePane.setLayout(new BorderLayout(2, 2)); + + catePane.add(categoryName); + + addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); + addButton.setPreferredSize(new Dimension(20, 20)); + catePane.add(addButton, BorderLayout.EAST); + + boxPane = new JPanel(); + boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS)); + + boxPane.setBackground(Color.red); + + catePane.add(boxPane, BorderLayout.SOUTH); + + this.add(catePane, "0,0,2,0"); + this.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter")), "0,4,2,4"); + this.add(filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent), "0,6,2,4"); + + addButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + addNewCatePane(); + } + }); + + } + + /** + * 检查box 是否应该可用状态. + */ + public void checkBoxUse() { + super.checkBoxUse(); + String text = categoryName.getUITextField().getText(); + addButton.setEnabled(StringUtils.isNotEmpty(text)); + } + + private TinyFormulaPane addNewCatePane() { + final TinyFormulaPane pane = initCategoryBox(StringUtils.EMPTY); + pane.setPreferredSize(new Dimension(122, 16)); + + pane.registerChangeListener(uiobListener); + + formualList.add(pane); + + final JPanel newButtonPane = new JPanel(); + newButtonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); + newButtonPane.add(pane); + + UIButton delButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/close.png")); + newButtonPane.add(delButton); + + boxPane.add(newButtonPane); + + delButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + boxPane.remove(newButtonPane); + formualList.remove(pane); + checkAddButton(); + relayoutPane(); + } + }); + delButton.registerChangeListener(uiobListener); + + checkAddButton(); + relayoutPane(); + + return pane; + } + + private void checkAddButton() { + int size = formualList.size(); + addButton.setEnabled(size < 2); + } + + private void relayoutPane() { + this.revalidate(); + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(UIObserverListener listener) { + uiobListener = listener; + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } + + public void populateBean(ChartCollection collection) { + super.populateBean(collection); + + formualList.clear(); + + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if (definition instanceof NormalReportDataDefinition) { + NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition; + int size = reportDefinition.getMoreCateSize(); + if (reportDefinition.getCategoryName() != null && size > 0) { + for(int i = 0; i < size; i++) { + TinyFormulaPane pane = addNewCatePane(); + pane.populateBean(Utils.objectToString(reportDefinition.getMoreCateWithIndex(i))); + } + } + } + + checkAddButton(); + } + + public void updateBean(ChartCollection collection) { + super.updateBean(collection); + + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if (definition instanceof NormalReportDataDefinition) { + NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition; + + reportDefinition.clearMoreCate(); + + for(int i = 0, size = formualList.size(); i < size; i++) { + TinyFormulaPane pane = formualList.get(i); + reportDefinition.addMoreCate(canBeFormula(pane.updateBean())); + } + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java new file mode 100644 index 000000000..8be253677 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java @@ -0,0 +1,145 @@ +package com.fr.design.mainframe.chart.gui.data.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.Bar2DPlot; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.NormalReportDataDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +public class CategoryPlotReportDataContentPane extends AbstractReportDataContentPane { + protected static final int PRE_WIDTH = 210; + + protected TinyFormulaPane categoryName; + protected ChartDataFilterPane filterPane; + + public CategoryPlotReportDataContentPane(){ + + } + + public CategoryPlotReportDataContentPane(ChartDataPane parent) { + initEveryPane(); + categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name") + ":"); + + this.add(categoryName, "0,0,2,0"); + this.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter")), "0,4,2,4"); + this.add(filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent), "0,6,2,4"); + } + + protected TinyFormulaPane initCategoryBox(final String leftLabel) { + TinyFormulaPane categoryName = new TinyFormulaPane() { + @Override + protected void initLayout() { + this.setLayout(new BorderLayout(4, 0)); + + if(StringUtils.isNotEmpty(leftLabel)) { + UILabel label1 = new UILabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT); + label1.setPreferredSize(new Dimension(75, 20)); + this.add(label1, BorderLayout.WEST); + } + + formulaTextField.setPreferredSize(new Dimension(100, 20)); + this.add(formulaTextField, BorderLayout.CENTER); + this.add(formulaTextFieldButton, BorderLayout.EAST); + } + + public void okEvent() { + checkBoxUse(); + } + }; + + categoryName.getUITextField().getDocument().addDocumentListener(new DocumentListener() { + public void removeUpdate(DocumentEvent e) { + checkBoxUse(); + } + + public void insertUpdate(DocumentEvent e) { + checkBoxUse(); + } + + public void changedUpdate(DocumentEvent e) { + checkBoxUse(); + } + }); + + return categoryName; + } + + @Override + protected String[] columnNames() { + return new String[]{ + Inter.getLocText("FR-Chart-Series_Name"), + Inter.getLocText("Chart-Series_Value") + }; + } + + public void populateBean(ChartCollection collection) { + checkBoxUse(); + + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if (definition instanceof NormalReportDataDefinition) { + NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition; + if (reportDefinition.getCategoryName() != null) { + categoryName.getUITextField().setText(reportDefinition.getCategoryName().toString()); + + List list = getEntryList(reportDefinition); + if (!list.isEmpty()) { + populateList(list); + } + } + + seriesPane.doLayout(); + } + + filterPane.populateBean(collection); + } + + private List getEntryList(NormalReportDataDefinition seriesList) { + List list = new ArrayList(); + for (int i = 0; i < seriesList.size(); i++) { + SeriesDefinition seriesEntry = (SeriesDefinition) seriesList.get(i); + Object[] nameAndValue = new Object[2]; + nameAndValue[0] = seriesEntry.getSeriesName(); + nameAndValue[1] = seriesEntry.getValue(); + if (nameAndValue[0] != null && nameAndValue[1] != null) { + list.add(nameAndValue); + } + } + return list; + } + + public void updateBean(ChartCollection collection) { + collection.getSelectedChart().setFilterDefinition(new NormalReportDataDefinition()); + + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if (definition instanceof NormalReportDataDefinition) { + NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition; + + reportDefinition.setCategoryName(canBeFormula(categoryName.getUITextField().getText())); + + List list = updateList(); + for (int i = 0; i < list.size(); i++) { + Object[] value = (Object[]) list.get(i); + SeriesDefinition sd = new SeriesDefinition(); + + sd.setSeriesName(canBeFormula(value[0])); + sd.setValue(canBeFormula(value[1])); + reportDefinition.add(sd); + } + } + filterPane.updateBean(collection); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/GanttPlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/GanttPlotReportDataContentPane.java new file mode 100644 index 000000000..206bfcb3c --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/GanttPlotReportDataContentPane.java @@ -0,0 +1,112 @@ +package com.fr.design.mainframe.chart.gui.data.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.GanttReportDefinition; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.itable.UITable; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.general.Inter; + +import javax.swing.event.ChangeEvent; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +/** + * 甘特图 属性表 单元格数据界面 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-21 下午03:01:48 + */ +public class GanttPlotReportDataContentPane extends AbstractReportDataContentPane { + + private static final String STEP = Inter.getLocText("ChartF-Step"); + private static final String START = Inter.getLocText("ChartF-PlansToBegin"); + private static final String END = Inter.getLocText("ChartF-EndOfTheProject"); + + private static final String RESTART = Inter.getLocText("ChartF-TheActualStart"); + private static final String REEND = Inter.getLocText("ChartF-TheActualEnd"); + private static final String PERCENT = Inter.getLocText("StyleFormat-Percent"); + private static final String PRO = Inter.getLocText("Chart_Project"); + + public GanttPlotReportDataContentPane(ChartDataPane parent) { + initEveryPane(); + + List list = new ArrayList(); + list.add(new Object[]{STEP, ""}); + list.add(new Object[]{START, ""}); + list.add(new Object[]{END, ""}); + list.add(new Object[]{RESTART, ""}); + list.add(new Object[]{REEND, ""}); + list.add(new Object[]{PERCENT, ""}); + list.add(new Object[]{PRO, ""}); + seriesPane.populateBean(list); + seriesPane.noAddUse(); + } + + protected void initSeriesPane() { + seriesPane = new UICorrelationPane(columnNames()) { + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + + protected UITable initUITable() { + return new UITable(columnCount) { + + public UITableEditor createTableEditor() { + return createUITableEditor(); + } + + public void tableCellEditingStopped(ChangeEvent e) { + stopPaneEditing(e); + } + + public boolean isCellEditable(int row, int column) { + return column != 0; + } + }; + } + }; + } + + public void populateBean(ChartCollection collection) { + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if(definition instanceof GanttReportDefinition) { + GanttReportDefinition ganttDefinition = (GanttReportDefinition)definition; + + List list = new ArrayList(); + list.add(new Object[]{STEP, ganttDefinition.getStep()}); + list.add(new Object[]{START, ganttDefinition.getPlanStart()}); + list.add(new Object[]{END, ganttDefinition.getPlanEnd()}); + list.add(new Object[]{RESTART, ganttDefinition.getRealStart()}); + list.add(new Object[]{REEND, ganttDefinition.getRealEnd()}); + list.add(new Object[]{PERCENT, ganttDefinition.getProgress()}); + list.add(new Object[]{PRO, ganttDefinition.getItem()}); + seriesPane.populateBean(list); + } + } + + public void updateBean(ChartCollection collection) { + GanttReportDefinition ganttDefinition = new GanttReportDefinition(); + + List list = seriesPane.updateBean(); + HashMap map = createNameValue(list); + + ganttDefinition.setStep(canBeFormula(map.get(STEP))); + ganttDefinition.setPlanStart(canBeFormula(map.get(START))); + ganttDefinition.setPlanEnd(canBeFormula(map.get(END))); + ganttDefinition.setRealStart(canBeFormula(map.get(RESTART))); + ganttDefinition.setRealEnd(canBeFormula(map.get(REEND))); + ganttDefinition.setProgress(canBeFormula(map.get(PERCENT))); + ganttDefinition.setItem(canBeFormula(map.get(PRO))); + + collection.getSelectedChart().setFilterDefinition(ganttDefinition); + } + + @Override + protected String[] columnNames() { + return new String[]{"", ""}; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java new file mode 100644 index 000000000..e4001079b --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java @@ -0,0 +1,105 @@ +package com.fr.design.mainframe.chart.gui.data.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.MeterPlot; +import com.fr.chart.chartdata.MeterReportDefinition; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; + +/** + * 仪表盘 属性表 单元格数据界面 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-21 下午02:47:57 + */ +public class MeterPlotReportDataContentPane extends AbstractReportDataContentPane { + + private static final String CATENAME = Inter.getLocText(new String[]{"ChartF-Meter", "StyleFormat-Category", "WF-Name"}); + private static final String NVALUE = Inter.getLocText("Needle Value"); + + private TinyFormulaPane singCatePane; + private TinyFormulaPane singValuePane; + private ChartDataFilterPane filterPane; + + public MeterPlotReportDataContentPane(ChartDataPane parent) { +// initEveryPane(); +// +// List list = new ArrayList(); +// list.add(new Object[] { singCateName, "" }); +// list.add(new Object[] { singNeedleValue, "" }); +// seriesPane.populateBean(list); +// +// seriesPane.noAddUse(); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p, f }; + double[] rowSize = { p, p, p}; + + Component[][] components = new Component[][]{ + new Component[]{new UILabel(CATENAME), singCatePane = new TinyFormulaPane()}, + new Component[]{new UILabel(NVALUE), singValuePane = new TinyFormulaPane()}, + new Component[]{null, null} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + + this.setLayout(new BorderLayout()); + this.add(panel, BorderLayout.NORTH); + + double[] cs = {p}; + components = new Component[][]{ + new Component[]{new JSeparator()}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Data_Filter"))}, + new Component[]{filterPane = new ChartDataFilterPane(new MeterPlot(), parent)}, + }; + JPanel pane = TableLayoutHelper.createTableLayoutPane(components, rowSize, cs); + + this.add(pane, BorderLayout.CENTER); + } + + public void populateBean(ChartCollection collection) { + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if(definition instanceof MeterReportDefinition) { + MeterReportDefinition meterDefinition = (MeterReportDefinition)definition; + + if (meterDefinition.getName() != null) { + singCatePane.getUITextField().setText(meterDefinition.getName().toString()); + } + if (meterDefinition.getValue() != null) { + singValuePane.getUITextField().setText(meterDefinition.getValue().toString()); + } + } + + filterPane.populateBean(collection); + } + + public void updateBean(ChartCollection collection) { + + if (collection != null) { + MeterReportDefinition meterDefinition = new MeterReportDefinition(); + + meterDefinition.setName(canBeFormula(singCatePane.getUITextField().getText())); + meterDefinition.setValue(canBeFormula(singValuePane.getUITextField().getText())); + + collection.getSelectedChart().setFilterDefinition(meterDefinition); + + filterPane.updateBean(collection); + } + } + + @Override + protected String[] columnNames() { + return new String[]{"", ""}; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/PiePlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/PiePlotReportDataContentPane.java new file mode 100644 index 000000000..1bededb91 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/PiePlotReportDataContentPane.java @@ -0,0 +1,89 @@ +package com.fr.design.mainframe.chart.gui.data.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.PiePlot; +import com.fr.chart.chartdata.NormalReportDataDefinition; +import com.fr.chart.chartdata.SeriesDefinition; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.general.Inter; + +import java.util.ArrayList; +import java.util.List; + +/** + * 饼图 单元格数据 属性表 界面 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-19 上午10:42:27 + */ +public class PiePlotReportDataContentPane extends AbstractReportDataContentPane { + + private ChartDataFilterPane filterPane; + + public PiePlotReportDataContentPane(ChartDataPane parent) { + initEveryPane(); + + this.add(new BoldFontTextLabel(Inter.getLocText("Data_Filter")), "0,4,2,4"); + this.add(filterPane = new ChartDataFilterPane(new PiePlot(), parent), "0,6,2,4"); + } + + @Override + protected String[] columnNames() { + return new String[]{ + Inter.getLocText(new String[]{"Chart_Legend(Series)", "WF-Name"}), + Inter.getLocText(new String[]{"Chart_Legend(Series)", "Values"}) + }; + } + + + public void populateBean(ChartCollection collection) { + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if(definition instanceof NormalReportDataDefinition) { + NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition)definition; + List list = getEntryList(reportDefinition); + if(!list.isEmpty()) { + populateList(list); + } + } + + filterPane.populateBean(collection); + } + + private List getEntryList(NormalReportDataDefinition seriesList) { + List list = new ArrayList(); + for(int i = 0; i < seriesList.size(); i++) { + SeriesDefinition seriesEntry = (SeriesDefinition)seriesList.get(i); + Object[] nameAndValue = new Object[2]; + nameAndValue[0] = seriesEntry.getSeriesName(); + nameAndValue[1] = seriesEntry.getValue(); + if(nameAndValue[0] != null && nameAndValue[1] != null) { + list.add(nameAndValue); + } + } + return list; + } + + public void updateBean(ChartCollection collection) { + collection.getSelectedChart().setFilterDefinition(new NormalReportDataDefinition()); + + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if(definition instanceof NormalReportDataDefinition) { + NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition)definition; + reportDefinition.setCategoryName(""); + + List list = updateList(); + for(int i = 0; i < list.size(); i++) { + Object[] value = (Object[])list.get(i); + SeriesDefinition sd = new SeriesDefinition(); + + sd.setSeriesName(canBeFormula(value[0])); + sd.setValue(canBeFormula(value[1])); + reportDefinition.add(sd); + } + } + + filterPane.updateBean(collection); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/StockPlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/StockPlotReportDataContentPane.java new file mode 100644 index 000000000..526049521 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/StockPlotReportDataContentPane.java @@ -0,0 +1,283 @@ +package com.fr.design.mainframe.chart.gui.data.report; + +import com.fr.base.ScreenResolution; +import com.fr.base.Utils; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.base.GlyphUtils; +import com.fr.chart.base.TextAttr; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.StockLabel; +import com.fr.chart.chartdata.StockReportDefinition; +import com.fr.design.constants.UIConstants; +import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.itable.UITable; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itable.UITableUI; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRFont; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.plaf.TableUI; +import java.awt.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +/** + * 股价图 属性表 单元格数据源. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-19 下午04:10:47 + */ +public class StockPlotReportDataContentPane extends AbstractReportDataContentPane { + private static final String AXIS = Inter.getLocText("Chart_HorialTimeAxis"); + private static final String VOLUME = Inter.getLocText("ChartF_Stock_Volume"); + private static final String OPEN = Inter.getLocText("ChartF_Stock_Open"); + private static final String HIGHT = Inter.getLocText("ChartF_Stock_High"); + private static final String LOW = Inter.getLocText("ChartF_Stock_Low"); + private static final String CLOSE = Inter.getLocText("ChartF_Stock_Close"); + private static final int PRE_WIDTH = 210; + private static final int VOLUMN_INDEX = 0; + private static final int OPEN_INDEX = 1; + private static final int HIGH_INDEX = 2; + private static final int LOW_INDEX = 3; + private static final int CLOSE_INDEX = 4; + + private TinyFormulaPane axisTime; + + public StockPlotReportDataContentPane(ChartDataPane parent) { + initEveryPane(); + + axisTime = new TinyFormulaPane() { + @Override + protected void initLayout() { + this.setLayout(new BorderLayout(4, 0)); + this.add(new BoldFontTextLabel(AXIS), BorderLayout.WEST); + this.add(formulaTextField, BorderLayout.CENTER); + this.add(formulaTextFieldButton, BorderLayout.EAST); + } + + @Override + public Dimension getPreferredSize() { + Dimension dim = new Dimension(); + dim.width = PRE_WIDTH; + dim.height = super.getPreferredSize().height; + return dim; + } + }; + + this.add(axisTime, "0,0,2,0"); + + List list = new ArrayList(); + list.add(new Object[]{VOLUME, ""}); + list.add(new Object[]{OPEN, ""}); + list.add(new Object[]{HIGHT, ""}); + list.add(new Object[]{LOW, ""}); + list.add(new Object[]{CLOSE, ""}); + + seriesPane.populateBean(list); + seriesPane.noAddUse(); + } + + protected void initSeriesPane() { + seriesPane = new UICorrelationPane(columnNames()) { + public UITableEditor createUITableEditor() { + return new StockTableEditor(); + } + + protected boolean isDeletable(){ + return false; + } + + protected UITable initUITable() { + return new UITable(columnCount) { + + public UITableEditor createTableEditor() { + return createUITableEditor(); + } + + public void tableCellEditingStopped(ChangeEvent e) { + stopPaneEditing(e); + } + + public boolean isCellEditable(int row, int column) { + return column <= 1; + } + + public TableUI getUI() { + return new UITableUI(){ + protected boolean isDeletable(){ + return false; + } + }; + } + + public void dealWithRollOver(int index){ + String text =(String)this.getModel().getValueAt(index, 0); + double width = GlyphUtils.calculateTextDimensionWithNoRotation(text, new TextAttr(FRFont.getInstance()), ScreenResolution.getScreenResolution()).getWidth(); + double cellWidth = this.getCellRect(index,0,false).getWidth(); + if(width<=cellWidth){ + this.setToolTipText(null); + }else{ + this.setToolTipText(text); + } + } + }; + } + }; + } + + + public void populateBean(ChartCollection collection) { + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if (definition instanceof StockReportDefinition) { + StockReportDefinition stockDefinition = (StockReportDefinition) definition; + + if (stockDefinition.getCategoryName() != null) { + axisTime.getUITextField().setText(stockDefinition.getCategoryName().toString()); + } + populateSeriesPane(stockDefinition); + } + } + + private void populateSeriesPane(StockReportDefinition stockDefinition){ + StockLabel stockLabel = stockDefinition.getStockLabel(); + List list = new ArrayList(); + String volumeLabel = !ComparatorUtils.equals(stockLabel.getVolumeLabel(),VOLUME) ? + StringUtils.perfectEnd(stockLabel.getVolumeLabel(),"("+VOLUME+")"): stockLabel.getVolumeLabel(); + String openLabel = !ComparatorUtils.equals(stockLabel.getOpenLabel(),OPEN) ? + StringUtils.perfectEnd(stockLabel.getOpenLabel(),"("+OPEN+")"): stockLabel.getOpenLabel(); + String highLabel = !ComparatorUtils.equals(stockLabel.getHighLabel(),HIGHT) ? + StringUtils.perfectEnd(stockLabel.getHighLabel(),"("+HIGHT+")"): stockLabel.getHighLabel(); + String lowLabel = !ComparatorUtils.equals(stockLabel.getLowLabel(),LOW) ? + StringUtils.perfectEnd(stockLabel.getLowLabel(),"("+LOW+")"): stockLabel.getLowLabel(); + String closeLabel = !ComparatorUtils.equals(stockLabel.getCloseLabel(),CLOSE) ? + StringUtils.perfectEnd(stockLabel.getCloseLabel(),"("+CLOSE+")"): stockLabel.getCloseLabel(); + list.add(new Object[]{volumeLabel, stockDefinition.getStockVolumn()}); + list.add(new Object[]{openLabel, stockDefinition.getStockOpen()}); + list.add(new Object[]{highLabel, stockDefinition.getStockHigh()}); + list.add(new Object[]{lowLabel, stockDefinition.getStockLow()}); + list.add(new Object[]{closeLabel, stockDefinition.getStockClose()}); + + seriesPane.populateBean(list); + } + + + public void updateBean(ChartCollection collection) { + collection.getSelectedChart().setFilterDefinition(new StockReportDefinition()); + + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if (definition instanceof StockReportDefinition) { + StockReportDefinition stockDefinition = (StockReportDefinition) definition; + + stockDefinition.setCategoryName(axisTime.getUITextField().getText()); + + List list =seriesPane.updateBean(); + StockLabel stockLabel = new StockLabel((list.get(VOLUMN_INDEX)[0]).toString(),(list.get(OPEN_INDEX)[0]).toString(), + (list.get(HIGH_INDEX)[0]).toString(),(list.get(LOW_INDEX)[0]).toString(),(list.get(CLOSE_INDEX)[0]).toString()); + stockDefinition.setStockLabel(stockLabel); + stockDefinition.setStockVolumn(canBeFormula(list.get(VOLUMN_INDEX)[1])); + stockDefinition.setStockOpen(canBeFormula(list.get(OPEN_INDEX)[1])); + stockDefinition.setStockHigh(canBeFormula(list.get(HIGH_INDEX)[1])); + stockDefinition.setStockLow(canBeFormula(list.get(LOW_INDEX)[1])); + stockDefinition.setStockClose(canBeFormula(list.get(CLOSE_INDEX)[1])); + populateSeriesPane(stockDefinition); + } + + } + + protected HashMap createNameValue(List list) { + HashMap values = new HashMap(); + + for (int i = 0; i < list.size(); i++) { + Object[] tmp = list.get(i); + values.put(tmp[0], tmp[1]); + } + + return values; + } + + @Override + protected String[] columnNames() { + return new String[]{"", ""}; + } + + private class StockTableEditor extends UITableEditor { + private TinyFormulaPane formulaComponent; + private UITextField labelComponent; + private int currentEditColumn = 1; + + public StockTableEditor() { + labelComponent = new UITextField(); + formulaComponent = new TinyFormulaPane() { + @Override + public void okEvent() { + seriesPane.stopCellEditing(); + seriesPane.fireTargetChanged(); + } + }; + + formulaComponent.setBackground(UIConstants.FLESH_BLUE); + + formulaComponent.getUITextField().registerChangeListener(new UIObserverListener() { + @Override + public void doChange() { + seriesPane.fireTargetChanged(); + } + }); + } + + /** + * 返回当前编辑器的值 + */ + public Object getCellEditorValue() { + if (currentEditColumn == 0) { + return labelComponent.getText(); + } + return formulaComponent.getUITextField().getText(); + } + + /** + * 返回当前编辑器.. + */ + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { + if (column == table.getModel().getColumnCount()) { + return null; + } + seriesPane.stopCellEditing(); + + currentEditColumn = column; + if (currentEditColumn == 0) { + labelComponent.setText(getShowText(row,Utils.objectToString(value))); + return labelComponent; + } + + formulaComponent.getUITextField().setText(Utils.objectToString(value)); + return formulaComponent; + } + + private String getShowText(int row,String label){ + if(row == VOLUMN_INDEX){ + return StringUtils.cutStringEndWith(label,"("+VOLUME+")"); + }else if(row == OPEN_INDEX){ + return StringUtils.cutStringEndWith(label, "(" + OPEN + ")"); + }else if(row == HIGH_INDEX){ + return StringUtils.cutStringEndWith(label, "(" + HIGHT + ")"); + }else if(row == LOW_INDEX){ + return StringUtils.cutStringEndWith(label, "(" + LOW + ")"); + }else if(row == CLOSE_INDEX ){ + return StringUtils.cutStringEndWith(label, "(" + CLOSE + ")"); + }else { + return label; + } + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/XYScatterPlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/XYScatterPlotReportDataContentPane.java new file mode 100644 index 000000000..64b73bc59 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/XYScatterPlotReportDataContentPane.java @@ -0,0 +1,91 @@ +package com.fr.design.mainframe.chart.gui.data.report; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.XYScatterPlot; +import com.fr.chart.chartdata.ScatterReportDefinition; +import com.fr.chart.chartdata.ScatterSeriesValue; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.general.Inter; + +import java.util.ArrayList; +import java.util.List; + +/** + * 散点图 属性表 单元格数据源. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-19 下午03:42:37 + */ +public class XYScatterPlotReportDataContentPane extends AbstractReportDataContentPane { + + private ChartDataFilterPane filterPane; + + public XYScatterPlotReportDataContentPane(ChartDataPane parent) { + initEveryPane(); + + this.add(new BoldFontTextLabel(Inter.getLocText("Data_Filter")), "0,4,2,4"); + this.add(filterPane = new ChartDataFilterPane(new XYScatterPlot(), parent), "0,6,2,4"); + } + + protected String[] columnNames() { + return new String[]{ + Inter.getLocText("Series_Name"), + Inter.getLocText("Chart_Scatter") + "x", + Inter.getLocText("Chart_Scatter") + "y" + }; + } + + public void populateBean(ChartCollection collection) { + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if(definition instanceof ScatterReportDefinition) { + ScatterReportDefinition scatter = (ScatterReportDefinition)definition; + + List list = populateSeriesEntryList(scatter); + if(list != null && !list.isEmpty()) { + seriesPane.populateBean(list); + } + } + + filterPane.populateBean(collection); + } + + private List populateSeriesEntryList(ScatterReportDefinition seriesList) { + List list = new ArrayList(); + for(int i = 0; i < seriesList.size(); i++) { + ScatterSeriesValue seriesEntry = (ScatterSeriesValue)seriesList.get(i); + Object[] nameAndValue = new Object[3]; + nameAndValue[0] = seriesEntry.getScatterSeriesName(); + nameAndValue[1] = seriesEntry.getScatterSeriesX(); + nameAndValue[2] = seriesEntry.getScatterSeriesY(); + list.add(nameAndValue); + } + return list; + } + + /** + * 保存散点 单元格数据内容到ChartCollection. + */ + public void updateBean(ChartCollection collection) { + ScatterReportDefinition reportDataDefinition = new ScatterReportDefinition(); + collection.getSelectedChart().setFilterDefinition(reportDataDefinition); + + updateSeriesEntryList(reportDataDefinition, seriesPane.updateBean()); + + filterPane.updateBean(collection); + } + + private void updateSeriesEntryList(ScatterReportDefinition list, List valueList) { + for (int i = 0; i < valueList.size(); i++) { + Object[] rowValueList = valueList.get(i); + + ScatterSeriesValue seriesEntry = new ScatterSeriesValue(); + + seriesEntry.setScatterSeriesName(canBeFormula(rowValueList[0])); + seriesEntry.setScatterSeriesX(canBeFormula(rowValueList[1])); + seriesEntry.setScatterSeriesY(canBeFormula(rowValueList[2])); + list.add(seriesEntry); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java new file mode 100644 index 000000000..c87d28e00 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java @@ -0,0 +1,137 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.List; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.icombobox.UIComboBox; + +public abstract class AbstractTableDataContentPane extends BasicBeanPane{ + + private boolean isNeedSummaryCaculateMethod = true; + + public abstract void updateBean(ChartCollection ob); + + /** + * 检查box是否 需要使用 比如: 柱形图, 在分类轴未选择时, 不能选择使用 系列名 系列值 "系列名使用" + * @param hasUse 是否使用 + */ + public void checkBoxUse(boolean hasUse) { + + } + + /** + * 数据集变更时, 刷新box + * @param dataWrapper 二维表 + */ + public void onSelectTableData(TableDataWrapper dataWrapper) { + List columnNameList = dataWrapper.calculateColumnNameList(); + refreshBoxListWithSelectTableData(columnNameList); + } + + /** + * 清空所有的box设置 + */ + public abstract void clearAllBoxList(); + + protected abstract void refreshBoxListWithSelectTableData(List columnNameList); + + /** + * 刷新Box的选项. + */ + protected void refreshBoxItems(UIComboBox box, List list) { + if(box == null) { + return; + } + + Object ob = box.getSelectedItem(); + box.removeAllItems(); + + int length = list.size(); + for(int i = 0; i < length; i++) { + box.addItem(list.get(i)); + } + + box.getModel().setSelectedItem(ob); + } + + /** + * 清空box里所有东西 + * @param box 容器 + */ + protected void clearBoxItems(UIComboBox box){ + if(box == null){ + return; + } + box.removeAllItems(); + } + + protected ItemListener tooltipListener = new ItemListener() { + + @Override + public void itemStateChanged(ItemEvent e) { + if(e.getSource() instanceof UIComboBox) { + UIComboBox box = (UIComboBox)e.getSource(); + if(box.getSelectedItem() != null) { + box.setToolTipText(box.getSelectedItem().toString()); + } else { + box.setToolTipText(null); + } + } + } + }; + + /** + * 兼容以前 自定义的数据字段 + */ + protected void combineCustomEditValue(UIComboBox comBox, String value) { + if(comBox != null) { + comBox.setEditable(true); + comBox.setSelectedItem(value); + comBox.setEditable(false); + } + } + + @Override + protected String title4PopupWindow() { + return ""; + } + + @Override + public void populateBean(ChartCollection collection) { + if(collection == null) { + return; + } + } + + /** + * 重新layout整个面板 + */ + public void redoLayoutPane(){ + + } + + @Override + public ChartCollection updateBean() { + return null; + } + + /** + * 设置是否需要汇总方式 + * @param isNeedSummaryCaculateMethod 是否需要汇总 + */ + public void setNeedSummaryCaculateMethod(boolean isNeedSummaryCaculateMethod){ + this.isNeedSummaryCaculateMethod = isNeedSummaryCaculateMethod; + } + + /** + * 返回是否需要汇总方式 + * @return 是否需要汇总方式 + */ + public boolean isNeedSummaryCaculateMethod(){ + return this.isNeedSummaryCaculateMethod; + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java new file mode 100644 index 000000000..bdc8e6d79 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java @@ -0,0 +1,165 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.chartattr.BubblePlot; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.BubbleTableDefinition; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import java.awt.*; +import java.util.List; + +public class BubblePlotTableDataContentPane extends AbstractTableDataContentPane { + + private UIComboBox seriesName; + private UIComboBox xCombox; + private UIComboBox yCombox; + private UIComboBox bubbleSize; + + private ChartDataFilterPane dataScreeningPane; + + public BubblePlotTableDataContentPane(ChartDataPane parent) { + seriesName = new UIComboBox(); + xCombox = new UIComboBox(); + yCombox = new UIComboBox(); + bubbleSize = new UIComboBox(); + dataScreeningPane = new ChartDataFilterPane(new BubblePlot(), parent); + + seriesName.setPreferredSize(new Dimension(100, 20)); + xCombox.setPreferredSize(new Dimension(100, 20)); + yCombox.setPreferredSize(new Dimension(100, 20)); + bubbleSize.setPreferredSize(new Dimension(100, 20)); + + seriesName.addItem(Inter.getLocText("Chart-Use_None")); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = { p, p,p,p}; + + double[] columnSize_north = {p, f}; + double[] rowSize_north = {p, p, p, p}; + Component[][] components_north = new Component[][]{ + new Component[]{new UILabel(" "+Inter.getLocText("Chart-Series_Name")+":"), seriesName}, + new Component[]{new UILabel(" "+Inter.getLocText("Chart-Bubble_Value")+"x :"), xCombox}, + new Component[]{new UILabel(" "+Inter.getLocText("Chart-Bubble_Value")+"y :"), yCombox}, + new Component[]{new UILabel(" "+Inter.getLocText("Chart-Bubble_Size")+":"), bubbleSize}, + }; + JPanel north = TableLayoutHelper.createTableLayoutPane(components_north,rowSize_north,columnSize_north); + north.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); + + Component[][] components = new Component[][]{ + new Component[]{north}, + new Component[]{new JSeparator()}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))}, + new Component[]{dataScreeningPane} + }; + + + JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + this.setLayout(new BorderLayout()); + this.add(panel, BorderLayout.CENTER); + + seriesName.addItemListener(tooltipListener); + xCombox.addItemListener(tooltipListener); + yCombox.addItemListener(tooltipListener); + bubbleSize.addItemListener(tooltipListener); + } + + /** + * 检查box是否使用, donothing + * @param hasUse 是否使用. + */ + public void checkBoxUse(boolean hasUse) { + + } + + protected void refreshBoxListWithSelectTableData(List list) { + refreshBoxItems(seriesName, list); + seriesName.addItem(Inter.getLocText("Chart-Use_None")); + refreshBoxItems(xCombox, list); + refreshBoxItems(yCombox, list); + refreshBoxItems(bubbleSize, list); + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + clearBoxItems(seriesName); + seriesName.addItem(Inter.getLocText("Chart-Use_None")); + clearBoxItems(xCombox); + clearBoxItems(yCombox); + clearBoxItems(bubbleSize); + } + + @Override + public void populateBean(ChartCollection collection) { + super.populateBean(collection); + TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition(); + if (!(top instanceof BubbleTableDefinition)) { + return; + } + BubbleTableDefinition definition = (BubbleTableDefinition) top; + + if(definition.getSeriesName() == null || ComparatorUtils.equals(StringUtils.EMPTY, definition.getSeriesName())) { + seriesName.setSelectedItem(Inter.getLocText("Chart-Use_None")); + } else { + combineCustomEditValue(seriesName, definition.getSeriesName()); + } + + combineCustomEditValue(xCombox, definition.getBubbleX()); + combineCustomEditValue(yCombox, definition.getBubbleY()); + combineCustomEditValue(bubbleSize, definition.getBubbleSize()); + + dataScreeningPane.populateBean(collection); + } + + @Override + public void updateBean(ChartCollection collection) { + BubbleTableDefinition definition = new BubbleTableDefinition(); + collection.getSelectedChart().setFilterDefinition(definition); + + Object resultName = seriesName.getSelectedItem(); + Object resultX = xCombox.getSelectedItem(); + Object resultY = yCombox.getSelectedItem(); + Object resultSize = bubbleSize.getSelectedItem(); + + if(resultName == null || ArrayUtils.contains(ChartConstants.NONE_KEYS, resultName)) { + definition.setSeriesName(StringUtils.EMPTY); + } else { + definition.setSeriesName(resultName.toString()); + } + + if (resultX != null) { + definition.setBubbleX(resultX.toString()); + } + if (resultY != null) { + definition.setBubbleY(resultY.toString()); + } + if (resultSize != null) { + definition.setBubbleSize(resultSize.toString()); + } + + dataScreeningPane.updateBean(collection); + } + + /** + * 重新布局 + */ + public void redoLayoutPane(){ + dataScreeningPane.relayoutPane(this.isNeedSummaryCaculateMethod()); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java new file mode 100644 index 000000000..9ae7696d9 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java @@ -0,0 +1,234 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.base.BaseUtils; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.Bar2DPlot; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.NormalTableDataDefinition; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.ArrayList; +import java.util.List; + +/** + * 多分类轴 的数据集定义界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2013-9-3 上午10:00:28 + */ +public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableDataContentPane implements UIObserver{ + private static final long serialVersionUID = -3305681053750642843L; + private static final int COMBOX_GAP = 8; + private static final int COMBOX_WIDTH = 100; + private static final int COMBOX_HEIGHT = 20; + + private JPanel boxPane; + + private ArrayList boxList = new ArrayList(); + private UIButton addButton; + + private UIObserverListener uiobListener = null; + + public CategoryPlotMoreCateTableDataContentPane() { + // do nothing + } + + public CategoryPlotMoreCateTableDataContentPane(ChartDataPane parent) { + categoryCombox = new UIComboBox(); + categoryCombox.setPreferredSize(new Dimension(100,20)); + + JPanel categoryPane = new JPanel(new BorderLayout(4,0)); + categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); + UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT) ; + categoryLabel.setPreferredSize(new Dimension(75,20)); + + addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); + addButton.setPreferredSize(new Dimension(20, 20)); + + categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton,null,categoryLabel,null})); + + boxPane = new JPanel(); + boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS)); + + categoryPane.add(boxPane, BorderLayout.SOUTH); + + this.setLayout(new BorderLayout()); + this.add(categoryPane, BorderLayout.NORTH); + seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot()); + this.add(seriesTypeComboxPane, BorderLayout.SOUTH); + + addButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + if(boxList.size() < 2) { + addNewCombox(); + relayoutPane(); + } + + checkSeriseUse(categoryCombox.getSelectedItem() != null); + } + }); + + categoryCombox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + checkSeriseUse(categoryCombox.getSelectedItem() != null); + makeToolTipUse(categoryCombox); + + checkAddButton(); + } + }); + } + + protected void checkSeriseUse(boolean hasUse) { + super.checkSeriseUse(hasUse); + + addButton.setEnabled(hasUse); + } + + private UIComboBox addNewCombox() { + final JPanel buttonPane = new JPanel(); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 2)); + + final UIComboBox combox = new UIComboBox(); + combox.setPreferredSize(new Dimension(COMBOX_WIDTH, COMBOX_HEIGHT)); + + int count = categoryCombox.getItemCount(); + for(int i = 0; i < count; i++) { + combox.addItem(categoryCombox.getItemAt(i)); + } + + combox.registerChangeListener(uiobListener); + combox.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + makeToolTipUse(combox); + } + }); + + combox.setSelectedItem(categoryCombox.getItemAt(0)); + makeToolTipUse(combox); + + buttonPane.add(combox); + UIButton delButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/close.png")); + buttonPane.add(delButton); + boxPane.add(buttonPane); + boxList.add(combox); + + checkAddButton(); + + delButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + boxPane.remove(buttonPane); + boxList.remove(combox); + checkAddButton(); + relayoutPane(); + } + }); + delButton.registerChangeListener(uiobListener); + + return combox; + } + + private void checkAddButton() { + int size = boxList.size(); + addButton.setEnabled(size < 2 && categoryCombox.getSelectedItem() != null); + } + + private void relayoutPane() { + this.revalidate(); + } + + + /** + *检查 某些Box是否可用 + * @param hasUse 是否使用. + */ + public void checkBoxUse(boolean hasUse) { + super.checkBoxUse(hasUse); + + checkAddButton(); + } + + protected void refreshBoxListWithSelectTableData(List list) { + super.refreshBoxListWithSelectTableData(list); + + for(int i = 0, size = boxList.size(); i < size; i++) { + refreshBoxItems(boxList.get(i), list); + } + } + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(UIObserverListener listener) { + uiobListener = listener; + } + + /** + * 组件是否需要响应添加的观察者事件 + * + * @return 如果需要响应观察者事件则返回true,否则返回false + */ + public boolean shouldResponseChangeListener() { + return true; + } + + /** + * 更新 多分类相关界面 + * @param collection + */ + public void populateBean(ChartCollection collection) { + super.populateBean(collection); + + boxList.clear(); + + TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition(); + if(top instanceof NormalTableDataDefinition) { + NormalTableDataDefinition normal = (NormalTableDataDefinition)top; + int size = normal.getMoreCateSize(); + for(int i = 0; i < size; i++) { + UIComboBox box = addNewCombox(); + box.setSelectedItem(normal.getMoreCateWithIndex(i)); + } + } + + checkAddButton(); + checkSeriseUse(categoryCombox.getSelectedItem() != null); + } + + /** + * 保存多分类界面到collection + * @param collection + */ + public void updateBean(ChartCollection collection) { + super.updateBean(collection); + + TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition(); + if(top instanceof NormalTableDataDefinition) { + NormalTableDataDefinition normal = (NormalTableDataDefinition)top; + normal.clearMoreCate(); + for(int i = 0, size = boxList.size(); i < size; i++) { + UIComboBox box = boxList.get(i); + if(box.getSelectedItem() != null) { + normal.addMoreCate(box.getSelectedItem().toString()); + } + } + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java new file mode 100644 index 000000000..3f1e53268 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java @@ -0,0 +1,167 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.chart.chartdata.TopDefinition; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.chartattr.Bar2DPlot; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.NormalTableDataDefinition; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.StringUtils; +import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.List; + +/** + * 属性表, 矩形类的 数据集 数据界面. +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2012-12-26 下午04:48:01 + */ +public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPane{ + private static final long serialVersionUID = 7284078589672079657L; + + protected UIComboBox categoryCombox; + protected SeriesTypeUseComboxPane seriesTypeComboxPane; + + public CategoryPlotTableDataContentPane() { + + } + + public CategoryPlotTableDataContentPane(ChartDataPane parent) { + + categoryCombox = new UIComboBox(); + JPanel categoryPane = new JPanel(new BorderLayout(4,0)); + categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); + UILabel label1 = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT) ; + label1.setPreferredSize(new Dimension(75,20)); + categoryCombox.setPreferredSize(new Dimension(100,20)); + + categoryCombox.addItem(Inter.getLocText("Chart-Use_None")); + categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox,null,null,label1,null})); + + this.setLayout(new BorderLayout()); + + this.add(categoryPane, BorderLayout.NORTH); + + seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot()); + this.add(seriesTypeComboxPane, BorderLayout.SOUTH); + + categoryCombox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + checkSeriseUse(categoryCombox.getSelectedItem() != null); + makeToolTipUse(categoryCombox); + } + }); + } + + 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) { + categoryCombox.setEnabled(hasUse); + checkSeriseUse(hasUse); + } + + protected void checkSeriseUse(boolean hasUse) { + if(seriesTypeComboxPane != null) { + seriesTypeComboxPane.checkUseBox(hasUse && categoryCombox.getSelectedItem() != null); + } + } + + protected void refreshBoxListWithSelectTableData(List list) { + refreshBoxItems(categoryCombox, list); + categoryCombox.addItem(Inter.getLocText("Chart-Use_None")); + + seriesTypeComboxPane.refreshBoxListWithSelectTableData(list); + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + clearBoxItems(categoryCombox); + categoryCombox.addItem(Inter.getLocText("Chart-Use_None")); + seriesTypeComboxPane.clearAllBoxList(); + } + + /** + * 保存界面内容到ChartCollection + */ + public void updateBean(ChartCollection collection) { + seriesTypeComboxPane.updateBean(collection); + NormalTableDataDefinition dataDefinition = (NormalTableDataDefinition)collection.getSelectedChart().getFilterDefinition(); + if(dataDefinition == null) { + return; + } + Object categoryName = categoryCombox.getSelectedItem(); + + if(ArrayUtils.contains(ChartConstants.NONE_KEYS, categoryName)) { + dataDefinition.setCategoryName(StringUtils.EMPTY); + } else { + dataDefinition.setCategoryName(categoryName == null ? null : categoryName.toString()); + } + + } + + /** + * 根据ChartCollection 更新界面 + */ + public void populateBean(ChartCollection collection) { + super.populateBean(collection); + TopDefinition top = (TopDefinition)collection.getSelectedChart().getFilterDefinition(); + + if(!(top instanceof NormalTableDataDefinition)) { + return; + } + NormalTableDataDefinition data = (NormalTableDataDefinition)top; + + if(data == null || ComparatorUtils.equals(data.getCategoryName(), StringUtils.EMPTY)) { + categoryCombox.setSelectedItem(Inter.getLocText("Chart-Use_None")); + } else if(data!= null && !this.boxItemsContainsObject(categoryCombox,data.getCategoryName())){ + categoryCombox.setSelectedItem(null); + }else { + combineCustomEditValue(categoryCombox, data == null ? null : data.getCategoryName()); + } + + seriesTypeComboxPane.populateBean(collection,this.isNeedSummaryCaculateMethod()); + } + + private boolean boxItemsContainsObject(UIComboBox box,Object item){ + if(box == null){ + return false; + } + + ComboBoxModel dataModel = box.getModel(); + for (int i = 0; i < dataModel.getSize(); i++) { + if(ComparatorUtils.equals(dataModel.getElementAt(i),item)){ + return true; + } + } + return false; + } + + /** + * 重新布局整个面板 + */ + public void redoLayoutPane(){ + seriesTypeComboxPane.relayoutPane(this.isNeedSummaryCaculateMethod()); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/Factory4TableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/Factory4TableDataContentPane.java new file mode 100644 index 000000000..e02e0ba80 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/Factory4TableDataContentPane.java @@ -0,0 +1,61 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.base.FRContext; +import com.fr.chart.chartattr.*; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.style.axis.*; + +import java.lang.reflect.Constructor; +import java.util.HashMap; +import java.util.Map; + +/** + * Created by IntelliJ IDEA. + * Author : daisy + * Version: 6.5.6 + * Date: 14-10-23 + * Time: 上午11:08 + */ +public class Factory4TableDataContentPane { + + private static Map, Class> map = new HashMap, Class>(); + + static { + map.put(PiePlot.class, PiePlotTableDataContentPane.class); + map.put(Pie3DPlot.class,PiePlotTableDataContentPane.class); + map.put(BubblePlot.class, BubblePlotTableDataContentPane.class); + map.put(XYScatterPlot.class, XYScatterPlotTableDataContentPane.class); + map.put(GanttPlot.class, GanttPlotTableDataContentPane.class); + map.put(StockPlot.class, StockPlotTableDataContentPane.class); + map.put(MeterPlot.class,MeterPlotTableDataContentPane.class); + map.put(MeterBluePlot.class,MeterPlotTableDataContentPane.class); + map.put(SimpleMeterPlot.class,MeterPlotTableDataContentPane.class); + } + + /** + * 根据plot生产对应的数据面板 + * @param plot 图表 + * @param parentPane 父面板 + * @return 对应的数据面板 + */ + public static AbstractTableDataContentPane createTableDataContenetPaneWithPlotType(Plot plot, ChartDataPane parentPane){ + try { + Class classname = map.get(plot.getClass()); + if(classname == null){ + return new CategoryPlotTableDataContentPane(parentPane); + } + Constructor tabledataPaneClass = classname.getConstructor(ChartDataPane.class); + if(tabledataPaneClass !=null){ + return tabledataPaneClass.newInstance(parentPane); + }else{ + return new CategoryPlotTableDataContentPane(parentPane); + } + } catch (InstantiationException e) { + FRContext.getLogger().error(e.getMessage(), e); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + return new CategoryPlotTableDataContentPane(parentPane); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java new file mode 100644 index 000000000..f65a21332 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/GanttPlotTableDataContentPane.java @@ -0,0 +1,198 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.GanttPlot; +import com.fr.chart.chartdata.GanttTableDefinition; +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.ChartDataPane; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.List; + +public class GanttPlotTableDataContentPane extends AbstractTableDataContentPane{ + + private UIComboBox step; + private UIComboBox planStart; + private UIComboBox planEnd; + private UIComboBox finalStart; + private UIComboBox finalEnd; + private UIComboBox percent; + private UIComboBox project; + + public GanttPlotTableDataContentPane(ChartDataPane parent) { + step = new UIComboBox(); + planStart = new UIComboBox(); + planEnd = new UIComboBox(); + finalStart = new UIComboBox(); + finalEnd = new UIComboBox(); + percent = new UIComboBox(); + project = new UIComboBox(); + + step.setPreferredSize(new Dimension(100, 20)); + planStart.setPreferredSize(new Dimension(100, 20)); + planEnd.setPreferredSize(new Dimension(100, 20)); + finalStart.setPreferredSize(new Dimension(100, 20)); + finalEnd.setPreferredSize(new Dimension(100, 20)); + percent.setPreferredSize(new Dimension(100, 20)); + project.setPreferredSize(new Dimension(100, 20)); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p, f}; + double[] rowSize = { p,p,p,p,p,p,p,p,p,p}; + + Component[][] components = new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Step_Name") + ":", SwingConstants.RIGHT),step}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_Start") + ":", SwingConstants.RIGHT),planStart}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Plan_End") + ":", SwingConstants.RIGHT),planEnd}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_Start") + ":", SwingConstants.RIGHT),finalStart}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Actual_End") + ":", SwingConstants.RIGHT),finalEnd}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Percent") + ":", SwingConstants.RIGHT),percent}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Use_Items") + ":", SwingConstants.RIGHT),project}, + } ; + JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + this.setLayout(new BorderLayout()); + this.add(panel,BorderLayout.CENTER); + + finalStart.addItem(GanttPlot.NONE); + finalEnd.addItem(GanttPlot.NONE); + percent.addItem(GanttPlot.NONE); + project.addItem(GanttPlot.NONE); + + finalStart.setSelectedItem(GanttPlot.NONE); + finalEnd.setSelectedItem(GanttPlot.NONE); + percent.setSelectedItem(GanttPlot.NONE); + project.setSelectedItem(GanttPlot.NONE); + + step.addItemListener(check); + planStart.addItemListener(check); + planEnd.addItemListener(check); + + step.addItemListener(tooltipListener); + planStart.addItemListener(tooltipListener); + planEnd.addItemListener(tooltipListener); + finalStart.addItemListener(tooltipListener); + finalEnd.addItemListener(tooltipListener); + percent.addItemListener(tooltipListener); + project.addItemListener(tooltipListener); + } + + ItemListener check = new ItemListener() { + + @Override + public void itemStateChanged(ItemEvent e) { + checkBoxUse(); + } + }; + + private void checkBoxUse() { + boolean hasStep = step.getSelectedItem() != null; + planStart.setEnabled(hasStep); + planEnd.setEnabled(hasStep); + finalStart.setEnabled(hasStep); + finalEnd.setEnabled(hasStep); + percent.setEnabled(hasStep); + project.setEnabled(hasStep); + + if(planStart.isEnabled() && planEnd.isEnabled()) { + project.setEnabled(planStart.getSelectedItem() != null && planEnd.getSelectedItem() != null); + } + } + + @Override + public void updateBean(ChartCollection collection) { + GanttTableDefinition data = new GanttTableDefinition(); + + Object resultProgress = step.getSelectedItem(); + Object resultPlanStart = planStart.getSelectedItem(); + Object resultPlanEnd = planEnd.getSelectedItem(); + Object resultFinalStart = finalStart.getSelectedItem(); + Object resultFinalEnd = finalEnd.getSelectedItem(); + Object resultPercent = percent.getSelectedItem(); + Object resultProject = project.getSelectedItem(); + + if(resultProgress != null) { + data.setStepString(resultProgress.toString()); + } + if(resultPlanStart != null) { + data.setPlanStart(resultPlanStart.toString()); + } + if(resultPlanEnd != null) { + data.setPlanEnd(resultPlanEnd.toString()); + } + if(resultFinalStart != null) { + data.setRealStart(resultFinalStart.toString()); + } + if(resultFinalEnd != null) { + data.setRealEnd(resultFinalEnd.toString()); + } + if(resultPercent != null) { + data.setProgress(resultPercent.toString()); + } + if(resultProject != null) { + data.setItem(resultProject.toString()); + } + collection.getSelectedChart().setFilterDefinition(data); + } + + @Override + public void populateBean(ChartCollection collection) { + super.populateBean(collection); + TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition(); + if(top instanceof GanttTableDefinition) { + GanttTableDefinition data = (GanttTableDefinition)top; + + combineCustomEditValue(step, data.getStepString()); + combineCustomEditValue(planStart, data.getPlanStart()); + combineCustomEditValue(planEnd, data.getPlanEnd()); + combineCustomEditValue(finalStart, data.getRealStart()); + combineCustomEditValue(finalEnd, data.getRealEnd()); + combineCustomEditValue(percent, data.getProgress()); + combineCustomEditValue(project, data.getItem()); + } + + checkBoxUse(); + } + + protected void refreshBoxListWithSelectTableData(List list) { + refreshBoxItems(step, list); + refreshBoxItems(planStart, list); + refreshBoxItems(planEnd, list); + refreshBoxItems(finalStart, list); + refreshBoxItems(finalEnd, list); + refreshBoxItems(percent, list); + refreshBoxItems(project, list); + + finalStart.addItem(GanttPlot.NONE); + finalEnd.addItem(GanttPlot.NONE); + percent.addItem(GanttPlot.NONE); + project.addItem(GanttPlot.NONE); + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + clearBoxItems(step); + clearBoxItems(planStart); + clearBoxItems(planEnd); + clearBoxItems(finalStart); + clearBoxItems(finalEnd); + clearBoxItems(percent); + clearBoxItems(project); + + finalStart.addItem(GanttPlot.NONE); + finalEnd.addItem(GanttPlot.NONE); + percent.addItem(GanttPlot.NONE); + project.addItem(GanttPlot.NONE); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java new file mode 100644 index 000000000..5ea4e8fe6 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java @@ -0,0 +1,116 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.util.List; + +import javax.swing.JPanel; +import javax.swing.JSeparator; +import javax.swing.SwingConstants; + +import com.fr.base.Utils; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.MeterPlot; +import com.fr.chart.chartdata.MeterTableDefinition; +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.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.general.Inter; + +/** + * 仪表盘, 属性表, 数据集数据界面. + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-21 下午04:51:50 + */ +public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane { + private static final String METER_NAME = Inter.getLocText("Chart-Category_Use_Name") + ":"; + private static final String METER_VALUE = Inter.getLocText("Chart-Pointer_Value") + ":"; + + private UIComboBox nameBox; + private UIComboBox valueBox; + private ChartDataFilterPane filterPane; + + public MeterPlotTableDataContentPane(ChartDataPane parent) { + this.setLayout(new BorderLayout()); + + nameBox = new UIComboBox(); + valueBox = new UIComboBox(); + filterPane = new ChartDataFilterPane(new MeterPlot(), parent); + + nameBox.setPreferredSize(new Dimension(100, 20)); + valueBox.setPreferredSize(new Dimension(100, 20)); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p,f}; + double[] rowSize = { p, p,p,p,p,p,p,p, p}; + + Component[][] components = new Component[][]{ + new Component[]{new BoldFontTextLabel(METER_NAME, SwingConstants.RIGHT), nameBox}, + new Component[]{new BoldFontTextLabel(METER_VALUE, SwingConstants.RIGHT), valueBox}, + new Component[]{new JSeparator(), null}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))}, + new Component[]{filterPane, null} + + } ; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + this.add(panel,BorderLayout.CENTER); + + nameBox.addItemListener(tooltipListener); + valueBox.addItemListener(tooltipListener); + } + + protected void refreshBoxListWithSelectTableData(List list) { + refreshBoxItems(nameBox, list); + refreshBoxItems(valueBox, list); + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + clearBoxItems(nameBox); + clearBoxItems(valueBox); + } + + /** + * 更新仪表盘数据界面 + */ + public void populateBean(ChartCollection ob) { + if(ob != null && ob.getSelectedChart().getFilterDefinition() instanceof MeterTableDefinition) { + MeterTableDefinition meter = (MeterTableDefinition)ob.getSelectedChart().getFilterDefinition(); + + nameBox.setSelectedItem(meter.getName()); + valueBox.setSelectedItem(meter.getValue()); + filterPane.populateBean(ob); + } + } + + /** + * 保存界面属性. + */ + public void updateBean(ChartCollection ob) { + if(ob != null) { + MeterTableDefinition meter = new MeterTableDefinition(); + ob.getSelectedChart().setFilterDefinition(meter); + + meter.setName(Utils.objectToString(nameBox.getSelectedItem())); + meter.setValue(Utils.objectToString(valueBox.getSelectedItem())); + filterPane.updateBean(ob); + } + } + + /** + * 重新布局整个面板 + */ + public void redoLayoutPane(){ + filterPane.relayoutPane(this.isNeedSummaryCaculateMethod()); + } + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/PiePlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/PiePlotTableDataContentPane.java new file mode 100644 index 000000000..a9eabca2e --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/PiePlotTableDataContentPane.java @@ -0,0 +1,54 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import java.awt.BorderLayout; +import java.util.List; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.PiePlot; +import com.fr.design.mainframe.chart.gui.ChartDataPane; + +public class PiePlotTableDataContentPane extends AbstractTableDataContentPane{ + private SeriesTypeUseComboxPane typeChoosePane; + + public PiePlotTableDataContentPane(ChartDataPane parent) { + typeChoosePane = new SeriesTypeUseComboxPane(parent, new PiePlot()); + this.setLayout(new BorderLayout()); + this.add(typeChoosePane, BorderLayout.CENTER); + } + + /** + * 判断时候使用typeChoosePane + * @param hasUse 是否使用 + */ + public void checkBoxUse(boolean hasUse) { + typeChoosePane.checkUseBox(hasUse); + } + + protected void refreshBoxListWithSelectTableData(List list) { + typeChoosePane.refreshBoxListWithSelectTableData(list); + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + typeChoosePane.clearAllBoxList(); + } + + @Override + public void updateBean(ChartCollection collection) { + typeChoosePane.updateBean(collection); + } + + @Override + public void populateBean(ChartCollection collection) { + typeChoosePane.populateBean(collection,this.isNeedSummaryCaculateMethod()); + } + + /** + * 重新布局整个面板 + */ + public void redoLayoutPane(){ + typeChoosePane.relayoutPane(this.isNeedSummaryCaculateMethod()); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java new file mode 100644 index 000000000..8e6784d92 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java @@ -0,0 +1,356 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.base.Utils; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.ChartSummaryColumn; +import com.fr.chart.chartdata.MoreNameCDDefinition; +import com.fr.data.util.function.DataFunction; +import com.fr.data.util.function.NoneFunction; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.frpane.UICorrelationPane; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.itable.UITable; +import com.fr.design.gui.itable.UITableEditor; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.ArrayList; +import java.util.List; + +/** + * 属性表 数据集界面: 系列名 使用字段名. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-26 下午04:39:46 + */ +public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane { + private static final String[] HEADS = {Inter.getLocText("FR-Chart-Field_Name"), Inter.getLocText("FR-Chart-Series_Name"), Inter.getLocText("FR-Chart-Data_Summary")}; + private static final String[] HEADS_NO_SUMMARY = {Inter.getLocText("FR-Chart-Field_Name"), Inter.getLocText("FR-Chart-Series_Name")}; + private UICorrelationPane seriesDataPane; + private List field = new ArrayList(); + private JPanel centerPane; + private boolean isNeedSummary = true; + private UIObserverListener observerListener; + + + public SeriesNameUseFieldNamePane() { + isNeedSummary = true; + initCenterPane(HEADS); + } + + private void initCenterPane(final String[] heads) { + seriesDataPane = new UICorrelationPane(heads) { + + @Override + protected ActionListener getAddButtonListener() { + return new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String[] blank =heads.length == 3?new String[]{StringUtils.EMPTY, StringUtils.EMPTY, Inter.getLocText("FR-Chart-Data_None")}: + new String[]{StringUtils.EMPTY, StringUtils.EMPTY}; + tablePane.addLine(blank); + fireTargetChanged(); + } + }; + } + + public UITableEditor createUITableEditor() { + return new InnerTableEditor(); + } + + public void stopPaneEditing(ChangeEvent e) { + fireTargetChanged(); + } + + public void registerChangeListener(UIObserverListener listener) { + super.registerChangeListener(listener); + observerListener = listener; + } + + }; + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p}; + Component[][] components = new Component[][]{ + new Component[]{seriesDataPane}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter"))}, + }; + centerPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + this.setLayout(new BorderLayout()); + this.add(centerPane, BorderLayout.CENTER); + } + + /** + * 判断是都接受 + * @param ob 传过来得 + * @return 是则返回true + */ + public boolean accept(Object ob) { + ChartCollection collection = (ChartCollection) ob; + return collection.getSelectedChart().getFilterDefinition() instanceof MoreNameCDDefinition; + } + + /** + * 标题 + * @return 标题 + */ + public String title4PopupWindow() { + return Inter.getLocText(new String[]{"FR-Chart-Data_Use", "FR-Chart-Field_Name"}); + } + + /** + * 重置. + */ + public void reset() { + + } + + + /** + * 数据集变更时 + * @param list 数据集 + */ + public void refreshBoxListWithSelectTableData(List list) { + field.clear(); + + for (int i = 0, length = list.size(); i < length; i++) { + Object ob = list.get(i); + if (ob != null) { + field.add(ob.toString()); + } + } + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + field.clear(); + } + + private void fireStop() { + seriesDataPane.stopCellEditing(); + seriesDataPane.fireTargetChanged(); + } + + /** + * 重新布局面板 + * @param isNeedSummary 是都需要汇总(图表设计器得时候不需要) + */ + public void relayoutPane(boolean isNeedSummary){ + if(this.isNeedSummary != isNeedSummary){ + this.remove(centerPane); + initCenterPane(isNeedSummary?HEADS:HEADS_NO_SUMMARY); + initListener(this); + this.validate(); + this.isNeedSummary = isNeedSummary; + } + } + + private void initListener(Container parentComponent) { + for (int i = 0; i < parentComponent.getComponentCount(); i++) { + Component tmpComp = parentComponent.getComponent(i); + + if (tmpComp instanceof Container) { + initListener((Container) tmpComp); + } + if (tmpComp instanceof UIObserver) { + ((UIObserver) tmpComp).registerChangeListener(observerListener); + } + } + } + + public void populateBean(ChartCollection collection,boolean isNeedSummary){ + relayoutPane(isNeedSummary); + TopDefinitionProvider topDefinition = collection.getSelectedChart().getFilterDefinition(); + if (topDefinition instanceof MoreNameCDDefinition) { + MoreNameCDDefinition moreDefinition = (MoreNameCDDefinition) topDefinition; + ChartSummaryColumn[] chartSummaryColumnArray = moreDefinition.getChartSummaryColumn(); + if (chartSummaryColumnArray == null || chartSummaryColumnArray.length == 0) { + return; + } + List list = new ArrayList(); + for (int i = 0; i < chartSummaryColumnArray.length; i++) { + ChartSummaryColumn column = chartSummaryColumnArray[i]; + String[] nameArray = {column.getName(), column.getCustomName(), getFunctionString(column.getFunction())}; + list.add(nameArray); + } + seriesDataPane.populateBean(list); + } + } + + /** + * 根据ChartCollection 更新界面 + */ + public void populateBean(ChartCollection collection) { + this.populateBean(collection,true); + } + + private String getFunctionString(DataFunction function) { + for (int i = 0; i < CalculateComboBox.CLASS_ARRAY.length; i++) { + Class tmp = function.getClass(); + if (ComparatorUtils.equals(tmp, CalculateComboBox.CLASS_ARRAY[i])) { + return CalculateComboBox.CALCULATE_ARRAY[i]; + } + } + return CalculateComboBox.CALCULATE_ARRAY[0]; + } + + /** + * 保存界面属性到ChartCollection + */ + public void updateBean(ChartCollection collection) { + TopDefinitionProvider normalDefinition = collection.getSelectedChart().getFilterDefinition(); + MoreNameCDDefinition moreDefinition = null; + if (normalDefinition instanceof MoreNameCDDefinition) { + moreDefinition = (MoreNameCDDefinition) normalDefinition; + } else { + moreDefinition = new MoreNameCDDefinition(); + } + + List data = seriesDataPane.updateBean(); + ChartSummaryColumn[] dataArray = new ChartSummaryColumn[data.size()]; + for (int i = 0; i < dataArray.length; i++) { + Object[] line = data.get(i); + String first = Utils.objectToString(line[0]); + String second = Utils.objectToString(line[1]); + if(isNeedSummary){ + String third = Utils.objectToString(line[2]); + dataArray[i] = new ChartSummaryColumn(first, second, getFcuntionByName(third)); + } else{ + dataArray[i] = new ChartSummaryColumn(first,second,new NoneFunction()); + } + } + moreDefinition.setChartSummaryColumn(dataArray); + collection.getSelectedChart().setFilterDefinition(moreDefinition); + } + + private DataFunction getFcuntionByName(String name) { + int index = 0; + for (int i = 0; i < CalculateComboBox.CALCULATE_ARRAY.length; i++) { + if (ComparatorUtils.equals(name, CalculateComboBox.CALCULATE_ARRAY[i])) { + index = i; + } + } + try { + return (DataFunction) CalculateComboBox.CLASS_ARRAY[index].newInstance(); + } catch (InstantiationException e) { + FRLogger.getLogger().error("Function Error"); + } catch (IllegalAccessException e) { + FRLogger.getLogger().error("Function Error"); + } + return new NoneFunction(); + } + + /** + * 保存为新的ChartCollection + */ + public ChartCollection updateBean() { + return null; + } + + private void checkRow(int row) { + UITable table = seriesDataPane.getTable(); + Object object = table.getValueAt(row, 0); + if (object != null) { + table.setValueAt(object, row, 1); + } + } + + private class InnerTableEditor extends UITableEditor { + private JComponent editorComponent; + + @Override + public Object getCellEditorValue() { + if (editorComponent instanceof UIComboBox) { + return ((UIComboBox) editorComponent).getSelectedItem(); + } else if (editorComponent instanceof UITextField) { + return ((UITextField) editorComponent).getText(); + } else if (editorComponent instanceof CalculateComboBox) { + return ((CalculateComboBox) editorComponent).getSelectedItem(); + } + return super.getCellEditorValue(); + } + + @Override + public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, final int row, int column) { + + switch (column) { + case 0: + return createComboxEdit(row, value); + case 1: + return createTextEdit(value); + default: + CalculateComboBox calculateComboBox = new CalculateComboBox(); + if (value != null) { + calculateComboBox.setSelectedItem(value); + } + calculateComboBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + fireStop(); + } + }); + editorComponent = calculateComboBox; + return calculateComboBox; + } + } + + private UIComboBox createComboxEdit(final int row, Object value) { + UIComboBox uiComboBox = new UIComboBox(field.toArray()); + + uiComboBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + fireStop(); + checkRow(row); + seriesDataPane.fireTargetChanged(); + } + }); + editorComponent = uiComboBox; + + if (value != null && StringUtils.isNotEmpty(value.toString())) { + uiComboBox.getModel().setSelectedItem(value); + } else { + uiComboBox.getModel().setSelectedItem(value); + } + + return uiComboBox; + } + + private UITextField createTextEdit(Object value) { + UITextField uiTextField = new UITextField(); + editorComponent = uiTextField; + if (value != null) { + uiTextField.setText(value.toString()); + } + + uiTextField.registerChangeListener(new UIObserverListener() { + @Override + public void doChange() { + seriesDataPane.fireTargetChanged();// kunsnat: 不能停止编辑, 因为输入会中断. + } + }); + + return uiTextField; + } + } + + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java new file mode 100644 index 000000000..f068bbbdd --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java @@ -0,0 +1,279 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.OneValueCDDefinition; +import com.fr.data.util.function.AbstractDataFunction; +import com.fr.data.util.function.NoneFunction; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.List; + +/** + * 属性表 数据集 系列名使用 系列值 界面. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-26 下午03:29:53 + */ +public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane { + private UIComboBox seriesName; + private UIComboBox seriesValue; + private CalculateComboBox calculateCombox; + private JPanel centerPane; + private boolean isNeedSummary = true; + + public SeriesNameUseFieldValuePane() { + seriesName = new UIComboBox(); + seriesValue = new UIComboBox(); + calculateCombox = new CalculateComboBox(); + calculateCombox.reset(); + isNeedSummary = true; + seriesName.setPreferredSize(new Dimension(100, 75)); + seriesValue.setPreferredSize(new Dimension(100, 75)); + calculateCombox.setPreferredSize(new Dimension(100, 75)); + seriesName.addItemListener(new ItemListener() { + + @Override + public void itemStateChanged(ItemEvent e) { + if (seriesName.getSelectedItem() != null) { + seriesName.setToolTipText(seriesName.getSelectedItem().toString()); + } else { + seriesName.setToolTipText(null); + } + } + + }); + + seriesValue.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + calculateCombox.setEnabled(seriesValue.getSelectedItem() != null); + if (seriesValue.getSelectedItem() != null) { + seriesValue.setToolTipText(seriesValue.getSelectedItem().toString()); + } else { + seriesValue.setToolTipText(null); + } + } + }); + initCenterPane(); + } + + private void initCenterPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p, p, p}; + UILabel Label1 = new UILabel(Inter.getLocText("Chart-Series_Name") + ":", SwingConstants.RIGHT); + Label1.setPreferredSize(new Dimension(75, 20)); + UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value") + ":", SwingConstants.RIGHT); + Label2.setPreferredSize(new Dimension(75, 20)); + UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method") + ":", SwingConstants.RIGHT); + Label3.setPreferredSize(new Dimension(75, 20)); + Component[][] components = new Component[][]{ + new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})}, + new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})}, + new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{calculateCombox, null, null, Label3, null})}, + new Component[]{new JSeparator()}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))}, + }; + + centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 4, 6); + centerPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); + this.setLayout(new BorderLayout()); + this.add(centerPane, BorderLayout.CENTER); + } + + private void initCenterPaneWithOutCaculateSummary(){ + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p, p, p, p}; + UILabel Label1 = new UILabel(Inter.getLocText("Chart-Series_Name") + ":", SwingConstants.RIGHT); + Label1.setPreferredSize(new Dimension(75, 20)); + UILabel Label2 = new UILabel(Inter.getLocText("Chart-Series_Value") + ":", SwingConstants.RIGHT); + Label2.setPreferredSize(new Dimension(75, 20)); + UILabel Label3 = new UILabel(Inter.getLocText("Chart-Summary_Method") + ":", SwingConstants.RIGHT); + Label3.setPreferredSize(new Dimension(75, 20)); + Component[][] components = new Component[][]{ + new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesName, null, null, Label1, null})}, + new Component[]{GUICoreUtils.createBorderLayoutPane(new Component[]{seriesValue, null, null, Label2, null})}, + new Component[]{new JSeparator()}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))}, + }; + + centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 4, 6); + centerPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); + this.setLayout(new BorderLayout()); + this.add(centerPane, BorderLayout.CENTER); + } + + /** + * 检查box是否已经使用. + * @param hasUse 是否使用 + */ + public void checkUse(boolean hasUse) { + seriesName.setEnabled(hasUse); + seriesValue.setEnabled(hasUse); + calculateCombox.setEnabled(seriesValue.getSelectedItem() != null); + } + + /** + * 数据集变更时, 刷新Box选中项 + * @param list 列表 + */ + public void refreshBoxListWithSelectTableData(List list) { + refreshBoxItems(seriesName, list); + refreshBoxItems(seriesValue, list); + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + clearBoxItems(seriesName); + clearBoxItems(seriesValue); + } + + private void clearBoxItems(UIComboBox box){ + if(box != null){ + box.removeAllItems(); + } + } + + private boolean boxItemsContainsObject(UIComboBox box,Object item){ + if(box == null){ + return false; + } + + ComboBoxModel dataModel = box.getModel(); + for (int i = 0; i < dataModel.getSize(); i++) { + if(ComparatorUtils.equals(dataModel.getElementAt(i),item)){ + return true; + } + } + return false; + } + + private void refreshBoxItems(UIComboBox box, List list) { + if (box == null) { + return; + } + + Object ob = box.getSelectedItem(); + box.removeAllItems(); + + int length = list.size(); + for (int i = 0; i < length; i++) { + box.addItem(list.get(i)); + } + + box.getModel().setSelectedItem(ob); + } + + /** + * 判断界面是否接受 + * @param ob 接受的对象 + * @return 判断是否接受 + */ + public boolean accept(Object ob) { + ChartCollection collection = (ChartCollection) ob; + return collection.getSelectedChart().getFilterDefinition() instanceof OneValueCDDefinition; + } + + /** + * 界面标题. + * @return 界面标题 + */ + public String title4PopupWindow() { + return Inter.getLocText(new String[]{"Use", "Field", "Value"}); + } + + /** + * 重置 + */ + public void reset() { + + } + + /** + * 重新布局整个面板 + * @param isNeedSummary 是否需要汇总 + */ + public void relayoutPane(boolean isNeedSummary){ + if(this.isNeedSummary != isNeedSummary){ + this.remove(centerPane); + if(isNeedSummary){ + initCenterPane(); + }else{ + initCenterPaneWithOutCaculateSummary(); + } + this.validate(); + this.isNeedSummary = isNeedSummary; + } + } + + public void populateBean(ChartCollection ob , boolean isNeedSummary){ + relayoutPane(isNeedSummary); + TopDefinitionProvider topDefinition = ob.getSelectedChart().getFilterDefinition(); + if (topDefinition instanceof OneValueCDDefinition) { + OneValueCDDefinition oneDefinition = (OneValueCDDefinition) topDefinition; + seriesName.setEditable(true); + seriesName.setSelectedItem(this.boxItemsContainsObject(seriesName,oneDefinition.getSeriesColumnName()) + ? oneDefinition.getSeriesColumnName() : null); + seriesName.setEditable(false); + seriesValue.setEditable(true); + seriesValue.setSelectedItem(this.boxItemsContainsObject(seriesValue,oneDefinition.getValueColumnName()) + ? oneDefinition.getValueColumnName() : null); + seriesValue.setEditable(false); + if(this.isNeedSummary){ + calculateCombox.populateBean((AbstractDataFunction) oneDefinition.getDataFunction()); + } + } + } + + /** + * 更新界面内容: 字段值 + */ + public void populateBean(ChartCollection ob) { + populateBean(ob,true); + } + + /** + * 保存界面内容 字段值 + */ + public void updateBean(ChartCollection collection) { + OneValueCDDefinition oneDefinition = new OneValueCDDefinition(); + + String seriesName = (String) this.seriesName.getSelectedItem(); + oneDefinition.setSeriesColumnName(seriesName); + String valueName = (String) this.seriesValue.getSelectedItem(); + oneDefinition.setValueColumnName(valueName); + if(this.isNeedSummary){ + oneDefinition.setDataFunction(calculateCombox.updateBean()); + }else{ + oneDefinition.setDataFunction(new NoneFunction()); + } + collection.getSelectedChart().setFilterDefinition(oneDefinition); + } + + /** + * 保存界面属性 新的ChartCollection + */ + public ChartCollection updateBean() { + return null; + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java new file mode 100644 index 000000000..419af6bf3 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/SeriesTypeUseComboxPane.java @@ -0,0 +1,158 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartdata.MoreNameCDDefinition; +import com.fr.chart.chartdata.OneValueCDDefinition; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; +import java.util.List; + +/** + * 属性表: 柱形, 饼图 数据集界面, "系列名使用"界面. + * + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-26 下午03:17:08 + */ +public class SeriesTypeUseComboxPane extends UIComboBoxPane { + + private SeriesNameUseFieldValuePane nameFieldValuePane; + private SeriesNameUseFieldNamePane nameFieldNamePane; + + private ChartDataFilterPane dataScreeningPane; + + private ChartDataPane parent; + private Plot initplot; + private boolean isNeedSummary = true; + + public SeriesTypeUseComboxPane(ChartDataPane parent, Plot initplot) { + this.initplot = initplot; + this.parent = parent; + cards = initPaneList(); + this.isNeedSummary = true; + initComponents(); + } + + protected void initLayout() { + this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM)); + JPanel northPane = new JPanel(new BorderLayout(4, 0)); + UILabel label1 = new UILabel(Inter.getLocText("ChartF-Series_Name_From") + ":", SwingConstants.RIGHT); + label1.setPreferredSize(new Dimension(75, 20)); + northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); + northPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); + this.add(northPane, BorderLayout.NORTH); + this.add(cardPane, BorderLayout.CENTER); + this.add(dataScreeningPane = new ChartDataFilterPane(this.initplot, parent), BorderLayout.SOUTH); + } + + /** + * 检查box 是否使用, hasUse, 表示上层已经使用, 否则, 则此界面都可使用 + * @param hasUse 是否使用 + */ + public void checkUseBox(boolean hasUse) { + jcb.setEnabled(hasUse); + nameFieldValuePane.checkUse(hasUse); + dataScreeningPane.checkBoxUse(); + } + + /** + * 切换 变更数据集时, 刷新Box选中项目 + * @param list 列表 + */ + public void refreshBoxListWithSelectTableData(List list) { + nameFieldValuePane.refreshBoxListWithSelectTableData(list); + nameFieldNamePane.refreshBoxListWithSelectTableData(list); + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + nameFieldValuePane.clearAllBoxList(); + nameFieldNamePane.clearAllBoxList(); + } + + /** + * 界面标题 + * @return 界面标题 + */ + protected String title4PopupWindow() { + return Inter.getLocText("ChartF-Series_Name_From"); + } + + @Override + protected List> initPaneList() { + nameFieldValuePane = new SeriesNameUseFieldValuePane(); + nameFieldNamePane = new SeriesNameUseFieldNamePane(); + List> paneList = new ArrayList>(); + paneList.add(nameFieldValuePane); + paneList.add(nameFieldNamePane); + return paneList; + } + + public void populateBean(ChartCollection ob, boolean isNeedSummary) { + this.isNeedSummary = isNeedSummary; + TopDefinitionProvider definition = ob.getSelectedChart().getFilterDefinition(); + if (definition instanceof OneValueCDDefinition) { + this.setSelectedIndex(0); + nameFieldValuePane.populateBean(ob, isNeedSummary); + } else if (definition instanceof MoreNameCDDefinition) { + this.setSelectedIndex(1); + nameFieldNamePane.populateBean(ob, isNeedSummary); + } + dataScreeningPane.populateBean(ob, isNeedSummary); + } + + /** + * 重新布局整个面板 + * @param isNeedSummary 是否需要汇总 + */ + public void relayoutPane(boolean isNeedSummary) { + this.isNeedSummary = isNeedSummary; + if (jcb.getSelectedIndex() == 0) { + nameFieldValuePane.relayoutPane(this.isNeedSummary); + } else { + nameFieldNamePane.relayoutPane(this.isNeedSummary); + } + dataScreeningPane.relayoutPane(this.isNeedSummary); + } + + + @Override + protected void comboBoxItemStateChanged() { + if (jcb.getSelectedIndex() == 0) { + nameFieldValuePane.relayoutPane(this.isNeedSummary); + } else { + nameFieldNamePane.relayoutPane(this.isNeedSummary); + } + } + + public void populateBean(ChartCollection ob) { + this.populateBean(ob, true); + } + + /** + * 保存界面属性到Ob-ChartCollection + */ + public void updateBean(ChartCollection ob) { + if (this.getSelectedIndex() == 0) { + nameFieldValuePane.updateBean(ob); + } else { + nameFieldNamePane.updateBean(ob); + } + + dataScreeningPane.updateBean(ob); + } + +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/StockPlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/StockPlotTableDataContentPane.java new file mode 100644 index 000000000..fa9489794 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/StockPlotTableDataContentPane.java @@ -0,0 +1,197 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.base.Utils; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.StockPlot; +import com.fr.chart.chartdata.StockLabel; +import com.fr.chart.chartdata.StockTableDefinition; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.design.mainframe.chart.gui.UIEditLabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.util.List; + +/** + * 股价图 属性表 数据集 数据界面 + * @author kunsnat E-mail:kunsnat@gmail.com + * @version 创建时间:2012-12-19 下午04:38:28 + */ +public class StockPlotTableDataContentPane extends AbstractTableDataContentPane { + + private static final String TIMEAXIS = Inter.getLocText("Chart-Horizontal_TimeAxis"); + private static final int LABEL_WIDTH = 105; + + private UIComboBox axisBox; + private UIComboBox volumeBox; + private UIComboBox openBox; + private UIComboBox highBox; + private UIComboBox lowBox; + private UIComboBox closeBox; + + private UIEditLabel volumeLabel = new UIEditLabel(StockLabel.VOLUMEN,SwingConstants.RIGHT){ + protected void doAfterMousePress(){ + clearBackGround(); + } + }; + private UIEditLabel openLabel = new UIEditLabel(StockLabel.OPEN,SwingConstants.RIGHT){ + protected void doAfterMousePress(){ + clearBackGround(); + } + }; + private UIEditLabel highLabel = new UIEditLabel(StockLabel.HIGHT,SwingConstants.RIGHT){ + protected void doAfterMousePress(){ + clearBackGround(); + } + }; + private UIEditLabel lowLabel = new UIEditLabel(StockLabel.LOW,SwingConstants.RIGHT){ + protected void doAfterMousePress(){ + clearBackGround(); + } + }; + private UIEditLabel closeLabel = new UIEditLabel(StockLabel.CLOSE,SwingConstants.RIGHT){ + protected void doAfterMousePress(){ + clearBackGround(); + } + }; + + public StockPlotTableDataContentPane(ChartDataPane parent) {// TODO 更改统一的定义模式: 原先的坏处: 名字不容易很属性对应 + this.setLayout(new BorderLayout()); + + axisBox = new UIComboBox(); + volumeBox = new UIComboBox(); + openBox = new UIComboBox(); + highBox = new UIComboBox(); + lowBox = new UIComboBox(); + closeBox = new UIComboBox(); + + //ember:为了英文版正常显示将下拉框宽度从100改成了80 + axisBox.setPreferredSize(new Dimension(90, 20)); + volumeBox.setPreferredSize(new Dimension(90, 20)); + openBox.setPreferredSize(new Dimension(90, 20)); + highBox.setPreferredSize(new Dimension(90, 20)); + lowBox.setPreferredSize(new Dimension(90, 20)); + closeBox.setPreferredSize(new Dimension(90, 20)); + + double p = TableLayout.PREFERRED; + double[] columnSize = {LABEL_WIDTH,p}; + double[] rowSize = { p, p,p,p,p,p,p, p, p}; + + Component[][] components = new Component[][]{ + new Component[]{new BoldFontTextLabel(TIMEAXIS+":",SwingConstants.RIGHT),axisBox}, + new Component[]{volumeLabel,volumeBox}, + new Component[]{openLabel,openBox}, + new Component[]{highLabel,highBox}, + new Component[]{lowLabel,lowBox}, + new Component[]{closeLabel,closeBox} , + + } ; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + this.add(panel,BorderLayout.CENTER); + + volumeBox.addItem(StockPlot.NONE); + openBox.addItem(StockPlot.NONE); + + axisBox.addItemListener(tooltipListener); + volumeBox.addItemListener(tooltipListener); + openBox.addItemListener(tooltipListener); + highBox.addItemListener(tooltipListener); + lowBox.addItemListener(tooltipListener); + closeBox.addItemListener(tooltipListener); + } + + + private void clearBackGround(){ + volumeLabel.resetNomalrBackground(); + openLabel.resetNomalrBackground(); + highLabel.resetNomalrBackground(); + lowLabel.resetNomalrBackground(); + closeLabel.resetNomalrBackground(); + } + + protected void refreshBoxListWithSelectTableData(List list) { + refreshBoxItems(axisBox, list); + refreshBoxItems(volumeBox, list); + refreshBoxItems(openBox, list); + refreshBoxItems(highBox, list); + refreshBoxItems(lowBox, list); + refreshBoxItems(closeBox, list); + + volumeBox.addItem(StockPlot.NONE); + openBox.addItem(StockPlot.NONE); + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + clearBoxItems(axisBox); + clearBoxItems(volumeBox); + clearBoxItems(openBox); + clearBoxItems(highBox); + clearBoxItems(lowBox); + clearBoxItems(closeBox); + + volumeBox.addItem(StockPlot.NONE); + openBox.addItem(StockPlot.NONE); + } + + /** + * 更新股价图 数据界面. + */ + public void populateBean(ChartCollection collection) { + if(collection == null) { + return; + } + + TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); + if(definition instanceof StockTableDefinition) { + StockTableDefinition stock = (StockTableDefinition)definition; + + StockLabel stockLabel = stock.getStockLabel(); + volumeLabel.setText(stockLabel.getVolumeLabel()); + openLabel.setText(stockLabel.getOpenLabel()); + highLabel.setText(stockLabel.getHighLabel()); + lowLabel.setText(stockLabel.getLowLabel()); + closeLabel.setText(stockLabel.getLowLabel()); + + combineCustomEditValue(axisBox, stock.getCateTime()); + combineCustomEditValue(volumeBox, stock.getVolumnString()); + combineCustomEditValue(openBox, stock.getOpenString()); + combineCustomEditValue(highBox, stock.getHighString()); + combineCustomEditValue(lowBox, stock.getLowString()); + combineCustomEditValue(closeBox, stock.getCloseString()); + } + } + + @Override + public void updateBean(ChartCollection ob) { + if(ob != null) { + StockTableDefinition stock = new StockTableDefinition(); + ob.getSelectedChart().setFilterDefinition(stock); + + stock.setStockLabels(new StockLabel(volumeLabel.getText(),openLabel.getText(),highLabel.getText(),lowLabel.getText(),closeLabel.getText())); + + stock.setCateTime(Utils.objectToString(axisBox.getSelectedItem())); + stock.setVolumnString(Utils.objectToString(volumeBox.getSelectedItem())); + stock.setOpenString(Utils.objectToString(openBox.getSelectedItem())); + stock.setHighString(Utils.objectToString(highBox.getSelectedItem())); + stock.setLowString(Utils.objectToString(lowBox.getSelectedItem())); + stock.setCloseString(Utils.objectToString(closeBox.getSelectedItem())); + + StockLabel stockLabel = stock.getStockLabel(); + volumeLabel.setText(stockLabel.getVolumeLabel()); + openLabel.setText(stockLabel.getOpenLabel()); + highLabel.setText(stockLabel.getHighLabel()); + lowLabel.setText(stockLabel.getLowLabel()); + closeLabel.setText(stockLabel.getCloseLabel()); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/XYScatterPlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/XYScatterPlotTableDataContentPane.java new file mode 100644 index 000000000..c27b4322c --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/XYScatterPlotTableDataContentPane.java @@ -0,0 +1,153 @@ +package com.fr.design.mainframe.chart.gui.data.table; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.XYScatterPlot; +import com.fr.chart.chartdata.ScatterTableDefinition; +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.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import java.awt.*; +import java.util.List; + +/** + * 属性表 数据界面 散点图 数据集数据界面. +* @author kunsnat E-mail:kunsnat@gmail.com +* @version 创建时间:2012-12-27 下午04:12:59 + */ +public class XYScatterPlotTableDataContentPane extends AbstractTableDataContentPane{ + + private UIComboBox seriesName; + private UIComboBox xCombox; + private UIComboBox yCombox; + + private ChartDataFilterPane dataScreeningPane; + + public XYScatterPlotTableDataContentPane(ChartDataPane parent) { + seriesName = new UIComboBox(); + xCombox = new UIComboBox(); + yCombox = new UIComboBox(); + dataScreeningPane = new ChartDataFilterPane(new XYScatterPlot(), parent); + + seriesName.addItem(Inter.getLocText("Chart-Use_None")); + + seriesName.setPreferredSize(new Dimension(100, 20)); + xCombox.setPreferredSize(new Dimension(100, 20)); + yCombox.setPreferredSize(new Dimension(100, 20)); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p,f}; + double[] rowSize = { p,p,p,p,p,p}; + + Component[][] components = new Component[][]{ + new Component[]{new BoldFontTextLabel(" " + Inter.getLocText("Chart-Series_Name") + ":"),seriesName}, + new Component[]{new BoldFontTextLabel(" " + Inter.getLocText("Chart-Scatter_Name") + "x" + ":"), xCombox}, + new Component[]{new BoldFontTextLabel(" " + Inter.getLocText("Chart-Scatter_Name") + "y" + ":"), yCombox}, + new Component[]{new JSeparator(),null}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))}, + new Component[]{dataScreeningPane,null} + }; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + this.setLayout(new BorderLayout()); + this.add(panel,BorderLayout.CENTER); + + seriesName.addItemListener(tooltipListener); + xCombox.addItemListener(tooltipListener); + yCombox.addItemListener(tooltipListener); + } + + /** + * 联动 box是否可用. + * @param hasUse 是否使用. + */ + public void checkBoxUse(boolean hasUse) { + seriesName.setEnabled(hasUse); + xCombox.setEnabled(hasUse); + yCombox.setEnabled(hasUse); + } + + protected void refreshBoxListWithSelectTableData(List columnNameList) { + refreshBoxItems(seriesName, columnNameList); + seriesName.addItem(Inter.getLocText("Chart-Use_None")); + refreshBoxItems(xCombox, columnNameList); + refreshBoxItems(yCombox, columnNameList); + } + + /** + * 清空所有的box设置 + */ + public void clearAllBoxList(){ + clearBoxItems(seriesName); + seriesName.addItem(Inter.getLocText("Chart-Use_None")); + clearBoxItems(xCombox); + clearBoxItems(yCombox); + } + + /** + * 保存散点图 的数据集数据界面. + */ + public void updateBean(ChartCollection collection) { + + ScatterTableDefinition definition = new ScatterTableDefinition(); + collection.getSelectedChart().setFilterDefinition(definition); + + Object resultName = seriesName.getSelectedItem(); + Object resultX = xCombox.getSelectedItem(); + Object resultY = yCombox.getSelectedItem(); + + if(resultName == null || ArrayUtils.contains(ChartConstants.NONE_KEYS, resultName)) { + definition.setSeriesName(StringUtils.EMPTY); + } else { + definition.setSeriesName(resultName.toString()); + } + + if(resultX != null) { + definition.setScatterX(resultX.toString()); + } + + if(resultY != null) { + definition.setScatterY(resultY.toString()); + } + + dataScreeningPane.updateBean(collection); + } + + /** + * 更新散点图的数据集数据. + */ + public void populateBean(ChartCollection collection) { + TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition(); + if(top instanceof ScatterTableDefinition) { + ScatterTableDefinition definition = (ScatterTableDefinition)top; + + if(definition.getSeriesName() == null || ComparatorUtils.equals(StringUtils.EMPTY, definition.getSeriesName())) { + seriesName.setSelectedItem(Inter.getLocText("Chart-Use_None")); + } else { + combineCustomEditValue(seriesName, definition.getSeriesName()); + } + + combineCustomEditValue(xCombox, definition.getScatterX()); + combineCustomEditValue(yCombox, definition.getScatterY()); + } + dataScreeningPane.populateBean(collection); + } + + /** + * 重新布局 + */ + public void redoLayoutPane(){ + dataScreeningPane.relayoutPane(this.isNeedSummaryCaculateMethod()); + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartConditionAttrPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartConditionAttrPane.java new file mode 100644 index 000000000..79d315e3d --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartConditionAttrPane.java @@ -0,0 +1,84 @@ +package com.fr.design.mainframe.chart.gui.other; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.CustomPlot; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartglyph.ConditionAttr; +import com.fr.chart.chartglyph.ConditionCollection; +import com.fr.chart.chartglyph.CustomAttr; +import com.fr.design.ChartTypeInterfaceManager; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.dialog.BasicScrollPane; +import com.fr.design.gui.frpane.UICorrelationComboBoxPane; +import com.fr.design.gui.imenutable.UIMenuNameableCreator; +import com.fr.general.Inter; + +import javax.swing.*; +import java.util.ArrayList; +import java.util.List; + +public class ChartConditionAttrPane extends BasicScrollPane { + private static final long serialVersionUID = 5725969986029470291L; + private UICorrelationComboBoxPane conditionPane; + + public ChartConditionAttrPane() { + super(); + } + + @Override + protected JPanel createContentPane() { + if (conditionPane == null) { + conditionPane = new UICorrelationComboBoxPane(); + } + + return conditionPane; + } + + /** + * 面板标题 + * @return 标题 + */ + public String title4PopupWindow() { + return Inter.getLocText("Chart-Condition_Display"); + } + + @Override + public void populateBean(Chart chart) { + Plot plot = chart.getPlot(); + Class showPane = ChartTypeInterfaceManager.getInstance().getPlotConditionPane(chart.getPlot()).getClass(); + List list = new ArrayList(); + + if(plot instanceof CustomPlot) { + list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Condition_Attributes"), new CustomAttr(), showPane)); + } else { + list.add(new UIMenuNameableCreator(Inter.getLocText("Chart-Condition_Attributes"), new ConditionAttr(), showPane)); + } + + conditionPane.refreshMenuAndAddMenuAction(list); + + ConditionCollection collection = chart.getPlot().getConditionCollection(); + List valueList = new ArrayList(); + + for(int i = 0; i < collection.getConditionAttrSize(); i++) { + valueList.add(new UIMenuNameableCreator(collection.getConditionAttr(i).getName(), collection.getConditionAttr(i), showPane)); + } + + conditionPane.populateBean(valueList); + conditionPane.doLayout(); + } + + @Override + public void updateBean(Chart chart) { + List list = conditionPane.updateBean(); + + ConditionCollection cc = chart.getPlot().getConditionCollection(); + + cc.clearConditionAttr(); + for(int i = 0; i < list.size(); i++) { + UIMenuNameableCreator nameMenu = list.get(i); + ConditionAttr ca = (ConditionAttr)nameMenu.getObj(); + ca.setName(nameMenu.getName()); + cc.addConditionAttr(ca); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerConditionAttrPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerConditionAttrPane.java new file mode 100644 index 000000000..ff05b6ba2 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerConditionAttrPane.java @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.chart.gui.other; + +/** + * Created by IntelliJ IDEA. + * Author : DAISY + * Version: 6.5.6 + * Date: 14-10-16 + * Time: 下午2:17 + */ +public class ChartDesignerConditionAttrPane extends ChartConditionAttrPane { +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java new file mode 100644 index 000000000..c655e0800 --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartDesignerInteractivePane.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2001-2014,FineReport Inc, All Rights Reserved. + */ + +package com.fr.design.mainframe.chart.gui.other; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartdata.TopDefinition; +import com.fr.design.gui.imenutable.UIMenuNameableCreator; +import com.fr.design.mainframe.chart.gui.ChartOtherPane; +import com.fr.general.Inter; +import com.fr.js.*; +import com.fr.third.org.hsqldb.lib.HashMap; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by IntelliJ IDEA. + * Author : Richer + * Version: 6.5.6 + * Date: 14-10-16 + * Time: 下午2:12 + */ +public class ChartDesignerInteractivePane extends ChartInteractivePane { + public ChartDesignerInteractivePane(ChartOtherPane parent) { + super(parent); + } + + protected List refreshList(HashMap map) { + List list = new ArrayList(); + + list.add(new UIMenuNameableCreator(Inter.getLocText("Hyperlink-Web_link"), + new WebHyperlink(), getUseMap(map, WebHyperlink.class))); + list.add(new UIMenuNameableCreator("JavaScript", new JavaScriptImpl(), getUseMap(map, JavaScriptImpl.class))); + list.add(new UIMenuNameableCreator(Inter.getLocText("RelatedChart"),null,null)); + + return list; + } + + protected void populateAutoRefresh(Chart chart){ + super.populateAutoRefresh(chart); + if(chart.getFilterDefinition() != null){ + TopDefinition definition = (TopDefinition)chart.getFilterDefinition(); + isAutoRefresh.setEnabled(definition.isSupportAutoRefresh()); + if(!isAutoRefresh.isEnabled()){ + isAutoRefresh.setSelected(false); + } + autoRefreshTime.setEnabled(definition.isSupportAutoRefresh()); + } + } +} \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java new file mode 100644 index 000000000..f8b002bcf --- /dev/null +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java @@ -0,0 +1,1068 @@ +package com.fr.design.mainframe.chart.gui.other; + +import com.fr.base.CoreDecimalFormat; +import com.fr.base.Style; +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.base.AttrContents; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.base.TimeSwitchAttr; +import com.fr.chart.chartattr.*; +import com.fr.chart.chartdata.GisMapReportDefinition; +import com.fr.chart.chartdata.GisMapTableDefinition; +import com.fr.chart.web.ChartHyperPoplink; +import com.fr.chart.web.ChartHyperRelateCellLink; +import com.fr.chart.web.ChartHyperRelateFloatLink; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.javascript.ChartEmailPane; +import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; +import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateCellLinkPane; +import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateFloatLinkPane; +import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane; +import com.fr.design.dialog.BasicScrollPane; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; +import com.fr.design.gui.frpane.UIBubbleFloatPane; +import com.fr.design.gui.frpane.UICorrelationComboBoxPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.imenutable.UIMenuNameableCreator; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.gui.style.FormatPane; +import com.fr.design.hyperlink.ReportletHyperlinkPane; +import com.fr.design.hyperlink.WebHyperlinkPane; +import com.fr.design.javascript.JavaScriptImplPane; +import com.fr.design.javascript.ParameterJavaScriptPane; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.ChartOtherPane; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.Inter; +import com.fr.js.*; +import com.fr.stable.Constants; +import com.fr.stable.StringUtils; +import com.fr.stable.bridge.StableFactory; +import com.fr.third.org.hsqldb.lib.HashMap; +import com.fr.third.org.hsqldb.lib.Iterator; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; +import java.text.DecimalFormat; +import java.text.Format; +import java.util.ArrayList; +import java.util.List; + +public class ChartInteractivePane extends BasicScrollPane implements UIObserver{ + private static final long serialVersionUID = 3477409806918835992L; + private static HashMap normalMap = new HashMap(); + private static HashMap gisMap = new HashMap(); + private static HashMap mapMap = new HashMap(); + private static HashMap pieMap = new HashMap(); + + private static HashMap xyMap = new HashMap(); + private static HashMap bubbleMap = new HashMap(); + private static HashMap stockMap = new HashMap(); + private static HashMap ganttMap = new HashMap(); + private static HashMap meterMap = new HashMap(); + + private static final int TIME_SWITCH_GAP = 40; + + private UICheckBox isChartAnimation;// 动态 + private UICheckBox isSeriesDragEnable; //系列拖拽 + + private UICheckBox isAxisZoom;// 缩放 + + private UICheckBox isDatapointValue;// 数据点提示 + private UIButton dataPointValueFormat; + + private UICheckBox isDatapointPercent; + private UIButton dataPointPercentFormat; + + private UILabel tooltipStyleLabel; + private UIComboBox tooltipStyle; + + private UILabel tooltipShowTypeLabel; + private UIComboBox tooltipShowType; + + private UICheckBox isAddressTittle; + private UICheckBox isAddress; + private UICheckBox isAddressName; + + private UICheckBox isAxisShowToolTip;// 坐标轴提示 + + protected UICheckBox isAutoRefresh;// 自动刷新 + protected UISpinner autoRefreshTime; + + private UICorrelationComboBoxPane superLink;// 超链 + + private FormatPane valueFormatPane; + private FormatPane percentFormatPane; + private Format valueFormat; + private Format percentFormat; + + private JPanel tooltipPane; + private JPanel axisShowPane; + private JPanel autoRefreshPane; + private JPanel superlinkPane; + + private ChartOtherPane parent; + + private UICheckBox timeSwitch; + + private JPanel timeSwitchContainer; + private TimeSwitchPane timeSwitchPane; + + private static final int SIZEX = 258; + private static final int SIZEY = 209; + private static final int DET = 20; + public ChartInteractivePane(ChartOtherPane parent) { + super(); + this.parent = parent; + } + + /** + * 界面标题. + * @return 返回标题. + */ + public String title4PopupWindow() { + return Inter.getLocText("Chart-Interactive_Tab"); + } + + @Override + protected JPanel createContentPane() { + isChartAnimation = new UICheckBox(Inter.getLocText("Chart-Animation_JSShow")); + isSeriesDragEnable = new UICheckBox(Inter.getLocText("Chart-Series_Drag")); + + isDatapointValue = new UICheckBox(Inter.getLocText("Chart-Use_Value")); + dataPointValueFormat = new UIButton(Inter.getLocText("Chart-Use_Format")); + isDatapointPercent = new UICheckBox(Inter.getLocText("Chart-Value_Percent")); + dataPointPercentFormat = new UIButton(Inter.getLocText("Chart-Use_Format")); + tooltipStyle = new UIComboBox(new String []{Inter.getLocText("Chart-White_Black"), Inter.getLocText("Chart-Black_White")}); + tooltipStyleLabel = new UILabel(Inter.getLocText("Chart-Style_Name")); + tooltipShowType = new UIComboBox(new String []{Inter.getLocText("Chart-Series_SingleData"), Inter.getLocText("Chart-Series_AllData")}); + tooltipShowTypeLabel = new UILabel(Inter.getLocText("Chart-Use_Show")); + + isAddressTittle = new UICheckBox(Inter.getLocText("Chart-Area_Title")); + isAddress = new UICheckBox(Inter.getLocText("Chart-Gis_Address")); + isAddressName = new UICheckBox(Inter.getLocText("Chart-Address_Name")); + + isAxisShowToolTip = new UICheckBox(Inter.getLocText("Chart-Interactive_AxisTooltip")); + isAxisZoom = new UICheckBox(Inter.getLocText("Chart-Use_Zoom")); + isAutoRefresh = new UICheckBox(Inter.getLocText(new String[]{"Chart-Use_Auto", "Chart-Use_Refresh"})); + autoRefreshTime = new UISpinner(1, Integer.MAX_VALUE, 1); + superLink = new UICorrelationComboBoxPane(); + + isAutoRefresh.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + checkAutoRefresh(); + } + }); + timeSwitch = new UICheckBox(Inter.getLocText("FR-Chart-Interactive_timeSwitch")); + timeSwitchPane = new TimeSwitchPane(); + initFormatListener(); + return initPaneWithListener(); + } + + + private void initFormatListener() { + initValueFormatListener(); + initPercentFormatListener(); + isAxisZoom.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + timeSwitch.setEnabled(isAxisZoom.isSelected()); + if(!isAxisZoom.isSelected()){ + timeSwitch.setSelected(false); + } + } + }); + + timeSwitch.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + relayoutTimeSwitchPane(); + } + }); + } + + private void initValueFormatListener() { + dataPointValueFormat.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + if (valueFormatPane == null) { + valueFormatPane = new FormatPane(); + } + Point comPoint = dataPointValueFormat.getLocationOnScreen(); + Point arrowPoint = new Point(comPoint.x - DET, comPoint.y + dataPointValueFormat.getHeight()); + UIBubbleFloatPane