forked from fanruan/design
pengda
5 years ago
193 changed files with 2499 additions and 2944 deletions
@ -1,8 +1,11 @@ |
|||||||
package com.fr.design.dialog; |
package com.fr.design.dialog; |
||||||
|
|
||||||
|
import com.fr.common.annotations.Open; |
||||||
|
|
||||||
|
@Open |
||||||
public interface DialogActionListener { |
public interface DialogActionListener { |
||||||
|
|
||||||
public void doOk(); |
void doOk(); |
||||||
|
|
||||||
public void doCancel(); |
void doCancel(); |
||||||
} |
} |
@ -0,0 +1,139 @@ |
|||||||
|
package com.fr.design.chart.fun; |
||||||
|
|
||||||
|
import com.fr.chart.chartattr.Plot; |
||||||
|
import com.fr.design.beans.BasicBeanPane; |
||||||
|
import com.fr.design.condition.ConditionAttributesPane; |
||||||
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
||||||
|
import com.fr.design.mainframe.chart.AbstractChartAttrPane; |
||||||
|
import com.fr.design.mainframe.chart.ChartEditPane; |
||||||
|
import com.fr.design.mainframe.chart.ChartsConfigPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.ChartDataPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
||||||
|
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
||||||
|
import com.fr.plugin.injectable.SpecialLevel; |
||||||
|
import com.fr.stable.fun.Level; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by eason on 14/12/29. |
||||||
|
* |
||||||
|
* @since 8.0 |
||||||
|
* 自定义 图表类型 界面接口 |
||||||
|
*/ |
||||||
|
public interface ChartTypeUIProvider extends Level { |
||||||
|
|
||||||
|
String XML_TAG = SpecialLevel.IndependentChartUIProvider.getTagName(); |
||||||
|
|
||||||
|
int CURRENT_API_LEVEL = 3; |
||||||
|
|
||||||
|
/** |
||||||
|
* 图表 类型定义界面类型,就是属性表的第一个界面 |
||||||
|
* 可以返回null 代表没有 图表类型切换界面 |
||||||
|
* |
||||||
|
* @return 图表的类型定义界面类型 |
||||||
|
*/ |
||||||
|
AbstractChartTypePane getPlotTypePane(); |
||||||
|
|
||||||
|
/** |
||||||
|
* 图表 数据配置界面 即属性表的第二个界面 |
||||||
|
* 可以返回null 代表没有数据配置界面 |
||||||
|
*/ |
||||||
|
ChartDataPane getChartDataPane(AttributeChangeListener listener); |
||||||
|
|
||||||
|
/** |
||||||
|
* 图表 属性界面数组 其他样式界面数组 |
||||||
|
* 可以返回空数组 代表没有其他样式界面 |
||||||
|
* |
||||||
|
* @return 属性界面 |
||||||
|
*/ |
||||||
|
AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener); |
||||||
|
|
||||||
|
/** |
||||||
|
* 图表 名称 |
||||||
|
* eg:柱形图 |
||||||
|
* |
||||||
|
* @return 图表 名称 |
||||||
|
*/ |
||||||
|
String getName(); |
||||||
|
|
||||||
|
/** |
||||||
|
* 图表 名称 |
||||||
|
* 柱形图 堆积柱形图 等 |
||||||
|
* |
||||||
|
* @return 图表 名称 |
||||||
|
*/ |
||||||
|
String[] getSubName(); |
||||||
|
|
||||||
|
/** |
||||||
|
* 图表 demo图片路径 |
||||||
|
* 400*225 |
||||||
|
* 1.图表选择界面的图的路径 原样渲染 |
||||||
|
* 2.图表属性第一个界面 类型界面 缩放渲染 |
||||||
|
* |
||||||
|
* @return demo图片路径 |
||||||
|
*/ |
||||||
|
String[] getDemoImagePath(); |
||||||
|
|
||||||
|
/** |
||||||
|
* 小图标路径 |
||||||
|
* 表单 工具栏 图表小图标 |
||||||
|
* 16*16 |
||||||
|
* |
||||||
|
* @return 图标路径 |
||||||
|
*/ |
||||||
|
String getIconPath(); |
||||||
|
|
||||||
|
|
||||||
|
//todo:把下面这些接口删除
|
||||||
|
@Deprecated |
||||||
|
boolean needChartChangePane(); |
||||||
|
|
||||||
|
/** |
||||||
|
* 数据集数据源的界面 |
||||||
|
* |
||||||
|
* @return 数据集数据源的界面 |
||||||
|
*/ |
||||||
|
@Deprecated |
||||||
|
AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 单元格数据源的界面 |
||||||
|
* |
||||||
|
* @return 单元格数据源的界面 |
||||||
|
*/ |
||||||
|
@Deprecated |
||||||
|
AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent); |
||||||
|
|
||||||
|
/** |
||||||
|
* 条件属性界面 |
||||||
|
* |
||||||
|
* @return 条件属性界面 |
||||||
|
*/ |
||||||
|
@Deprecated |
||||||
|
ConditionAttributesPane getPlotConditionPane(Plot plot); |
||||||
|
|
||||||
|
/** |
||||||
|
* 系列界面 |
||||||
|
* |
||||||
|
* @return 系列界面 |
||||||
|
*/ |
||||||
|
@Deprecated |
||||||
|
BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot); |
||||||
|
|
||||||
|
/** |
||||||
|
* 是否使用默认的界面,为了避免界面来回切换 |
||||||
|
* |
||||||
|
* @return 是否使用默认的界面 |
||||||
|
*/ |
||||||
|
@Deprecated |
||||||
|
boolean isUseDefaultPane(); |
||||||
|
|
||||||
|
@Deprecated |
||||||
|
ChartEditPane getChartEditPane(String plotID); |
||||||
|
|
||||||
|
@Deprecated |
||||||
|
ChartsConfigPane getChartConfigPane(String plotID); |
||||||
|
|
||||||
|
} |
@ -1,102 +1,11 @@ |
|||||||
package com.fr.design.chart.fun; |
package com.fr.design.chart.fun; |
||||||
|
|
||||||
import com.fr.chart.chartattr.Plot; |
import com.fr.common.annotations.Compatible; |
||||||
import com.fr.design.beans.BasicBeanPane; |
|
||||||
import com.fr.design.condition.ConditionAttributesPane; |
|
||||||
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
||||||
import com.fr.design.mainframe.chart.AbstractChartAttrPane; |
|
||||||
import com.fr.design.mainframe.chart.ChartEditPane; |
|
||||||
import com.fr.design.mainframe.chart.ChartsConfigPane; |
|
||||||
import com.fr.design.mainframe.chart.gui.ChartDataPane; |
|
||||||
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
|
||||||
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; |
|
||||||
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; |
|
||||||
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
|
||||||
import com.fr.plugin.injectable.SpecialLevel; |
|
||||||
import com.fr.stable.fun.Level; |
|
||||||
|
|
||||||
/** |
/** |
||||||
* Created by eason on 14/12/29. |
* Created by shine on 2019/09/05. |
||||||
* |
|
||||||
* @since 8.0 |
|
||||||
* 自定义图表类型设设计界面接口 |
|
||||||
*/ |
*/ |
||||||
public interface IndependentChartUIProvider extends Level { |
@Compatible |
||||||
|
public interface IndependentChartUIProvider extends ChartTypeUIProvider { |
||||||
String XML_TAG = SpecialLevel.IndependentChartUIProvider.getTagName(); |
|
||||||
|
|
||||||
int CURRENT_API_LEVEL = 3; |
|
||||||
|
|
||||||
boolean needChartChangePane(); |
|
||||||
|
|
||||||
/** |
|
||||||
* 图表的类型定义界面类型,就是属性表的第一个界面 |
|
||||||
* |
|
||||||
* @return 图表的类型定义界面类型 |
|
||||||
*/ |
|
||||||
AbstractChartTypePane getPlotTypePane(); |
|
||||||
|
|
||||||
/** |
|
||||||
* 数据集数据源的界面 |
|
||||||
* |
|
||||||
* @return 数据集数据源的界面 |
|
||||||
*/ |
|
||||||
AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent); |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 单元格数据源的界面 |
|
||||||
* |
|
||||||
* @return 单元格数据源的界面 |
|
||||||
*/ |
|
||||||
AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent); |
|
||||||
|
|
||||||
/** |
|
||||||
* 条件属性界面 |
|
||||||
* |
|
||||||
* @return 条件属性界面 |
|
||||||
*/ |
|
||||||
ConditionAttributesPane getPlotConditionPane(Plot plot); |
|
||||||
|
|
||||||
/** |
|
||||||
* 系列界面 |
|
||||||
* |
|
||||||
* @return 系列界面 |
|
||||||
*/ |
|
||||||
BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot); |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 图表的属性界面数组 |
|
||||||
* |
|
||||||
* @return 属性界面 |
|
||||||
*/ |
|
||||||
AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener); |
|
||||||
|
|
||||||
ChartDataPane getChartDataPane(AttributeChangeListener listener); |
|
||||||
|
|
||||||
/** |
|
||||||
* 是否使用默认的界面,为了避免界面来回切换 |
|
||||||
* |
|
||||||
* @return 是否使用默认的界面 |
|
||||||
*/ |
|
||||||
boolean isUseDefaultPane(); |
|
||||||
|
|
||||||
/** |
|
||||||
* 图标路径 |
|
||||||
* |
|
||||||
* @return 图标路径 |
|
||||||
*/ |
|
||||||
String getIconPath(); |
|
||||||
|
|
||||||
/** |
|
||||||
* plot面板的标题 |
|
||||||
*/ |
|
||||||
String getPlotTypeTitle4PopupWindow(); |
|
||||||
|
|
||||||
ChartEditPane getChartEditPane(String plotID); |
|
||||||
|
|
||||||
|
|
||||||
ChartsConfigPane getChartConfigPane(String plotID); |
|
||||||
|
|
||||||
} |
} |
@ -0,0 +1,91 @@ |
|||||||
|
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.ChartTypeUIProvider; |
||||||
|
import com.fr.design.chartx.impl.AbstractDataPane; |
||||||
|
import com.fr.design.chartx.impl.AbstractOtherPane; |
||||||
|
import com.fr.design.chartx.impl.DefaultTypePane; |
||||||
|
import com.fr.design.condition.ConditionAttributesPane; |
||||||
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
||||||
|
import com.fr.design.mainframe.chart.ChartEditPane; |
||||||
|
import com.fr.design.mainframe.chart.ChartsConfigPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.ChartDataPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
||||||
|
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
||||||
|
import com.fr.stable.fun.impl.AbstractProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by shine on 2019/09/03. |
||||||
|
*/ |
||||||
|
public abstract class AbstractChartTypeUI extends AbstractProvider implements ChartTypeUIProvider { |
||||||
|
|
||||||
|
@Override |
||||||
|
public AbstractChartTypePane getPlotTypePane() { |
||||||
|
return new DefaultTypePane(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public abstract AbstractDataPane getChartDataPane(AttributeChangeListener listener); |
||||||
|
|
||||||
|
@Override |
||||||
|
public abstract AbstractOtherPane[] getAttrPaneArray(AttributeChangeListener listener); |
||||||
|
|
||||||
|
@Override |
||||||
|
public String[] getSubName() { |
||||||
|
return new String[]{getName()}; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public int currentAPILevel() { |
||||||
|
return CURRENT_API_LEVEL; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String mark4Provider() { |
||||||
|
return getClass().getName(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean needChartChangePane() { |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean isUseDefaultPane() { |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public ChartEditPane getChartEditPane(String plotID) { |
||||||
|
return new ChartEditPane(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public ConditionAttributesPane getPlotConditionPane(Plot plot) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public ChartsConfigPane getChartConfigPane(String plotID) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -1,66 +0,0 @@ |
|||||||
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.ChartEditPane; |
|
||||||
import com.fr.design.mainframe.chart.ChartsConfigPane; |
|
||||||
import com.fr.design.mainframe.chart.gui.ChartDataPane; |
|
||||||
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
|
||||||
import com.fr.general.ComparatorUtils; |
|
||||||
import com.fr.stable.StableUtils; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 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]; |
|
||||||
} |
|
||||||
|
|
||||||
public ChartDataPane getChartDataPane(AttributeChangeListener listener){ |
|
||||||
return new ChartDataPane(listener); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 是否使用默认的界面,为了避免界面来回切换 |
|
||||||
* @return 是否使用默认的界面 |
|
||||||
*/ |
|
||||||
public boolean isUseDefaultPane(){ |
|
||||||
return true; |
|
||||||
} |
|
||||||
|
|
||||||
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){ |
|
||||||
return getPlotSeriesPane(); |
|
||||||
} |
|
||||||
|
|
||||||
public BasicBeanPane<Plot> 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(); |
|
||||||
} |
|
||||||
|
|
||||||
public ChartEditPane getChartEditPane(String plotID){ return StableUtils.construct(ChartEditPane.class);} |
|
||||||
|
|
||||||
public ChartsConfigPane getChartConfigPane(String plotID){return null;} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,97 +0,0 @@ |
|||||||
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<String, Class> glyphMap = new HashMap<String, Class>(); |
|
||||||
|
|
||||||
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; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,161 +0,0 @@ |
|||||||
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) { |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
@ -1,38 +0,0 @@ |
|||||||
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(); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,43 +0,0 @@ |
|||||||
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; |
|
||||||
} |
|
||||||
} |
|
@ -1,19 +0,0 @@ |
|||||||
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); |
|
||||||
} |
|
||||||
} |
|
@ -1,39 +0,0 @@ |
|||||||
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(); |
|
||||||
} |
|
||||||
} |
|
@ -1,44 +0,0 @@ |
|||||||
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<TextGlyph> allDataPointLableGlyph = new ArrayList<TextGlyph>(); |
|
||||||
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(); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,53 +0,0 @@ |
|||||||
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.PaneTitleConstants; |
|
||||||
import com.fr.design.module.DesignModuleFactory; |
|
||||||
|
|
||||||
/** |
|
||||||
* 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; |
|
||||||
} |
|
||||||
|
|
||||||
DesignModuleFactory.getChartPropertyPane().getChartEditPane().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()); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,30 +0,0 @@ |
|||||||
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(); |
|
||||||
} |
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
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); |
|
||||||
} |
|
||||||
} |
|
@ -1,30 +0,0 @@ |
|||||||
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(); |
|
||||||
} |
|
||||||
} |
|
@ -1,34 +0,0 @@ |
|||||||
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); |
|
||||||
} |
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
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); |
|
||||||
} |
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
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); |
|
||||||
} |
|
||||||
} |
|
@ -1,35 +0,0 @@ |
|||||||
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(); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,43 +0,0 @@ |
|||||||
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<TrendLineGlyph> list = new ArrayList<TrendLineGlyph>(); |
|
||||||
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(); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,19 +0,0 @@ |
|||||||
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); |
|
||||||
} |
|
||||||
} |
|
@ -1,37 +0,0 @@ |
|||||||
package com.fr.design.chart.gui.active.action; |
|
||||||
|
|
||||||
import com.fr.chart.chartattr.ChartCollection; |
|
||||||
import com.fr.chart.chartglyph.AxisGlyph; |
|
||||||
import com.fr.design.actions.UpdateAction; |
|
||||||
import com.fr.design.chart.gui.ChartComponent; |
|
||||||
|
|
||||||
/** |
|
||||||
* 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 ChartCollection getChartCollection() { |
|
||||||
return chartComponent.getChartCollection(); |
|
||||||
} |
|
||||||
|
|
||||||
public AxisGlyph getActiveAxisGlyph() { |
|
||||||
return chartComponent.getActiveAxisGlyph(); |
|
||||||
} |
|
||||||
} |
|
@ -1,27 +0,0 @@ |
|||||||
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.PaneTitleConstants; |
|
||||||
import com.fr.design.module.DesignModuleFactory; |
|
||||||
|
|
||||||
|
|
||||||
public class SetAnalysisLineStyleAction extends ChartComponentAction{ |
|
||||||
|
|
||||||
public SetAnalysisLineStyleAction(ChartComponent chartComponent) { |
|
||||||
super(chartComponent); |
|
||||||
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Analysis_Line")); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void actionPerformed(ActionEvent e) { |
|
||||||
showAnalysisLineStylePane(); |
|
||||||
} |
|
||||||
|
|
||||||
public void showAnalysisLineStylePane(){ |
|
||||||
DesignModuleFactory.getChartPropertyPane().getChartEditPane().gotoPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_LINE_TITLE); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,33 +0,0 @@ |
|||||||
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.PaneTitleConstants; |
|
||||||
import com.fr.design.module.DesignModuleFactory; |
|
||||||
|
|
||||||
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(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Axis_Format")); |
|
||||||
} |
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent e) { |
|
||||||
showAxisStylePane(); |
|
||||||
} |
|
||||||
|
|
||||||
public void showAxisStylePane() { |
|
||||||
String axisType = getActiveAxisGlyph() == null ? StringUtils.EMPTY : getActiveAxisGlyph().getAxisType(); |
|
||||||
|
|
||||||
DesignModuleFactory.getChartPropertyPane().getChartEditPane().gotoPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_AXIS_TITLE, axisType); |
|
||||||
} |
|
||||||
} |
|
@ -1,31 +0,0 @@ |
|||||||
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.PaneTitleConstants; |
|
||||||
import com.fr.design.module.DesignModuleFactory; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 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(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Pattern")); |
|
||||||
} |
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent e) { |
|
||||||
showChartStylePane(); |
|
||||||
} |
|
||||||
|
|
||||||
public void showChartStylePane() { |
|
||||||
DesignModuleFactory.getChartPropertyPane().getChartEditPane().gotoPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_AREA_TITLE, PaneTitleConstants.CHART_STYLE_AREA_AREA_TITLE); |
|
||||||
} |
|
||||||
} |
|
@ -1,26 +0,0 @@ |
|||||||
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.PaneTitleConstants; |
|
||||||
import com.fr.design.module.DesignModuleFactory; |
|
||||||
|
|
||||||
|
|
||||||
public class SetDataLabelStyleAction extends ChartComponentAction{ |
|
||||||
|
|
||||||
public SetDataLabelStyleAction(ChartComponent chartComponent) { |
|
||||||
super(chartComponent); |
|
||||||
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Data_Label")); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void actionPerformed(ActionEvent e) { |
|
||||||
showDataLabelStylePane(); |
|
||||||
} |
|
||||||
|
|
||||||
public void showDataLabelStylePane() { |
|
||||||
DesignModuleFactory.getChartPropertyPane().getChartEditPane().gotoPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_LABEL_TITLE); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,33 +0,0 @@ |
|||||||
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.PaneTitleConstants; |
|
||||||
import com.fr.design.module.DesignModuleFactory; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 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(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Data_Sheet")); |
|
||||||
} |
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent e) { |
|
||||||
showDataSheetStylePane(); |
|
||||||
} |
|
||||||
|
|
||||||
public void showDataSheetStylePane() { |
|
||||||
DesignModuleFactory.getChartPropertyPane().getChartEditPane().gotoPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_DATA_TITLE); |
|
||||||
} |
|
||||||
} |
|
@ -1,32 +0,0 @@ |
|||||||
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.PaneTitleConstants; |
|
||||||
import com.fr.design.module.DesignModuleFactory; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 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(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Legend_Sytle")); |
|
||||||
} |
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent e) { |
|
||||||
showLegendStylePane(); |
|
||||||
} |
|
||||||
|
|
||||||
public void showLegendStylePane() { |
|
||||||
DesignModuleFactory.getChartPropertyPane().getChartEditPane().gotoPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_LEGNED_TITLE); |
|
||||||
} |
|
||||||
} |
|
@ -1,32 +0,0 @@ |
|||||||
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.PaneTitleConstants; |
|
||||||
import com.fr.design.module.DesignModuleFactory; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 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(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Plot")); |
|
||||||
} |
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent e) { |
|
||||||
showPlotPane(); |
|
||||||
} |
|
||||||
|
|
||||||
public void showPlotPane() { |
|
||||||
DesignModuleFactory.getChartPropertyPane().getChartEditPane().gotoPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_AREA_TITLE, PaneTitleConstants.CHART_STYLE_AREA_PLOT_TITLE); |
|
||||||
} |
|
||||||
} |
|
@ -1,32 +0,0 @@ |
|||||||
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.PaneTitleConstants; |
|
||||||
import com.fr.design.module.DesignModuleFactory; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 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(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Set_Title_Style")); |
|
||||||
} |
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent e) { |
|
||||||
showTitlePane(); |
|
||||||
} |
|
||||||
|
|
||||||
public void showTitlePane() { |
|
||||||
DesignModuleFactory.getChartPropertyPane().getChartEditPane().gotoPane(PaneTitleConstants.CHART_STYLE_TITLE, PaneTitleConstants.CHART_STYLE_TITLE_TITLE); |
|
||||||
} |
|
||||||
} |
|
@ -1,21 +0,0 @@ |
|||||||
package com.fr.design.chartx; |
|
||||||
|
|
||||||
import com.fr.design.chartx.fields.diff.MultiPieCellDataFieldsPane; |
|
||||||
import com.fr.design.chartx.fields.diff.MultiPieDataSetFieldsPane; |
|
||||||
import com.fr.design.chartx.single.SingleDataPane; |
|
||||||
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
||||||
|
|
||||||
/** |
|
||||||
* Created by shine on 2019/6/18. |
|
||||||
*/ |
|
||||||
public class MultiPieChartDataPane extends MultiCategoryChartDataPane { |
|
||||||
|
|
||||||
public MultiPieChartDataPane(AttributeChangeListener listener) { |
|
||||||
super(listener); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
protected SingleDataPane createSingleDataPane() { |
|
||||||
return new SingleDataPane(new MultiPieDataSetFieldsPane(), new MultiPieCellDataFieldsPane()); |
|
||||||
} |
|
||||||
} |
|
@ -1,20 +0,0 @@ |
|||||||
package com.fr.design.chartx; |
|
||||||
|
|
||||||
import com.fr.design.chartx.fields.diff.WordCloudCellDataFieldsPane; |
|
||||||
import com.fr.design.chartx.fields.diff.WordCloudDataSetFieldsPane; |
|
||||||
import com.fr.design.chartx.single.SingleDataPane; |
|
||||||
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
||||||
|
|
||||||
/** |
|
||||||
* Created by shine on 2019/5/22. |
|
||||||
*/ |
|
||||||
public class WordCloudChartDataPane extends MultiCategoryChartDataPane { |
|
||||||
public WordCloudChartDataPane(AttributeChangeListener listener) { |
|
||||||
super(listener); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
protected SingleDataPane createSingleDataPane() { |
|
||||||
return new SingleDataPane(new WordCloudDataSetFieldsPane(), new WordCloudCellDataFieldsPane()); |
|
||||||
} |
|
||||||
} |
|
@ -0,0 +1,86 @@ |
|||||||
|
package com.fr.design.chartx.fields.diff; |
||||||
|
|
||||||
|
import com.fr.chartx.data.field.diff.StructureColumnFieldCollection; |
||||||
|
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; |
||||||
|
import com.fr.design.formula.TinyFormulaPane; |
||||||
|
import com.fr.design.gui.itextfield.UITextField; |
||||||
|
import com.fr.design.i18n.Toolkit; |
||||||
|
|
||||||
|
import java.awt.Component; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author Bjorn |
||||||
|
* @version 10.0 |
||||||
|
* Created by Bjorn on 2019-09-02 |
||||||
|
*/ |
||||||
|
public class StructureCellDataFieldsPane extends AbstractCellDataFieldsPane<StructureColumnFieldCollection> { |
||||||
|
|
||||||
|
private TinyFormulaPane nodeName; |
||||||
|
private TinyFormulaPane nodeId; |
||||||
|
private TinyFormulaPane parentId; |
||||||
|
private UITextField seriesName; |
||||||
|
private TinyFormulaPane nodeValue; |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void initComponents() { |
||||||
|
seriesName = new UITextField(); |
||||||
|
nodeName = new TinyFormulaPane(); |
||||||
|
nodeId = new TinyFormulaPane(); |
||||||
|
parentId = new TinyFormulaPane(); |
||||||
|
nodeValue = new TinyFormulaPane(); |
||||||
|
|
||||||
|
super.initComponents(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String[] fieldLabels() { |
||||||
|
return new String[]{ |
||||||
|
Toolkit.i18nText("Fine-Design_Chart_Node_Name"), |
||||||
|
"id", |
||||||
|
Toolkit.i18nText("Fine-Design_Chart_Parent_ID"), |
||||||
|
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), |
||||||
|
Toolkit.i18nText("Fine-Design_Chart_Series_Value"), |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected TinyFormulaPane[] formulaPanes() { |
||||||
|
return new TinyFormulaPane[]{ |
||||||
|
nodeName, |
||||||
|
nodeId, |
||||||
|
parentId, |
||||||
|
nodeValue |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected Component[] fieldComponents() { |
||||||
|
return new Component[]{ |
||||||
|
nodeName, |
||||||
|
nodeId, |
||||||
|
parentId, |
||||||
|
nodeValue, |
||||||
|
nodeValue, |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void populateBean(StructureColumnFieldCollection ob) { |
||||||
|
seriesName.setText(ob.getSeriesName()); |
||||||
|
populateField(nodeName, ob.getNodeName()); |
||||||
|
populateField(nodeId, ob.getNodeId()); |
||||||
|
populateField(parentId, ob.getParentId()); |
||||||
|
populateField(nodeValue, ob.getNodeValue()); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public StructureColumnFieldCollection updateBean() { |
||||||
|
StructureColumnFieldCollection result = new StructureColumnFieldCollection(); |
||||||
|
result.setSeriesName(seriesName.getText()); |
||||||
|
updateField(nodeName, result.getNodeName()); |
||||||
|
updateField(nodeId, result.getNodeId()); |
||||||
|
updateField(parentId, result.getParentId()); |
||||||
|
updateField(nodeValue, result.getNodeValue()); |
||||||
|
return result; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,91 @@ |
|||||||
|
package com.fr.design.chartx.fields.diff; |
||||||
|
|
||||||
|
import com.fr.chartx.data.field.diff.StructureColumnFieldCollection; |
||||||
|
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane; |
||||||
|
import com.fr.design.gui.icombobox.UIComboBox; |
||||||
|
import com.fr.design.gui.itextfield.UITextField; |
||||||
|
import com.fr.design.i18n.Toolkit; |
||||||
|
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; |
||||||
|
|
||||||
|
import java.awt.Component; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author Bjorn |
||||||
|
* @version 10.0 |
||||||
|
* Created by Bjorn on 2019-09-02 |
||||||
|
*/ |
||||||
|
public class StructureDataSetFieldsPane extends AbstractDataSetFieldsPane<StructureColumnFieldCollection> { |
||||||
|
|
||||||
|
private UIComboBox nodeName; |
||||||
|
private UIComboBox nodeId; |
||||||
|
private UIComboBox parentId; |
||||||
|
private UITextField seriesName; |
||||||
|
private UIComboBox nodeValue; |
||||||
|
private CalculateComboBox calculateCombox; |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void initComponents() { |
||||||
|
nodeName = new UIComboBox(); |
||||||
|
nodeId = new UIComboBox(); |
||||||
|
parentId = new UIComboBox(); |
||||||
|
seriesName = new UITextField(); |
||||||
|
nodeValue = new UIComboBox(); |
||||||
|
calculateCombox = new CalculateComboBox(); |
||||||
|
|
||||||
|
super.initComponents(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String[] fieldLabels() { |
||||||
|
return new String[]{ |
||||||
|
Toolkit.i18nText("Fine-Design_Chart_Node_Name"), |
||||||
|
"id", |
||||||
|
Toolkit.i18nText("Fine-Design_Chart_Parent_ID"), |
||||||
|
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), |
||||||
|
Toolkit.i18nText("Fine-Design_Chart_Series_Value"), |
||||||
|
Toolkit.i18nText("Fine-Design_Chart_Summary_Method") |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected UIComboBox[] filedComboBoxes() { |
||||||
|
return new UIComboBox[]{ |
||||||
|
nodeName, |
||||||
|
nodeId, |
||||||
|
parentId, |
||||||
|
nodeValue |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected Component[] fieldComponents() { |
||||||
|
return new Component[]{ |
||||||
|
nodeName, |
||||||
|
nodeId, |
||||||
|
parentId, |
||||||
|
nodeValue, |
||||||
|
nodeValue, |
||||||
|
calculateCombox |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void populateBean(StructureColumnFieldCollection ob) { |
||||||
|
seriesName.setText(ob.getSeriesName()); |
||||||
|
populateField(nodeName, ob.getNodeName()); |
||||||
|
populateField(nodeId, ob.getNodeId()); |
||||||
|
populateField(parentId, ob.getParentId()); |
||||||
|
populateFunctionField(nodeValue, calculateCombox, ob.getNodeValue()); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public StructureColumnFieldCollection updateBean() { |
||||||
|
StructureColumnFieldCollection result = new StructureColumnFieldCollection(); |
||||||
|
result.setSeriesName(seriesName.getText()); |
||||||
|
updateField(nodeName, result.getNodeName()); |
||||||
|
updateField(nodeId, result.getNodeId()); |
||||||
|
updateField(parentId, result.getParentId()); |
||||||
|
updateFunctionField(nodeValue, calculateCombox, result.getNodeValue()); |
||||||
|
return result; |
||||||
|
} |
||||||
|
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue