jinbokai
5 years ago
50 changed files with 302 additions and 1181 deletions
@ -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); |
||||
} |
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.fr.design.chartx; |
||||
|
||||
import com.fr.design.chartx.fields.diff.StructureCellDataFieldsPane; |
||||
import com.fr.design.chartx.fields.diff.StructureDataSetFieldsPane; |
||||
import com.fr.design.chartx.single.SingleDataPane; |
||||
import com.fr.design.gui.frpane.AttributeChangeListener; |
||||
|
||||
/** |
||||
* @author Bjorn |
||||
* @version 10.0 |
||||
* Created by Bjorn on 2019-09-02 |
||||
*/ |
||||
public class StructureChartDataPane extends MultiCategoryChartDataPane { |
||||
|
||||
public StructureChartDataPane(AttributeChangeListener listener) { |
||||
super(listener); |
||||
} |
||||
|
||||
@Override |
||||
protected SingleDataPane createSingleDataPane() { |
||||
return new SingleDataPane(new StructureDataSetFieldsPane(), new StructureCellDataFieldsPane()); |
||||
} |
||||
} |
@ -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; |
||||
} |
||||
} |
Loading…
Reference in new issue