forked from fanruan/design
7 changed files with 198 additions and 0 deletions
@ -0,0 +1,85 @@
|
||||
package com.fr.van.chart.box; |
||||
|
||||
import com.fr.chart.chartattr.Chart; |
||||
import com.fr.chart.chartattr.Plot; |
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.condition.ConditionAttributesPane; |
||||
import com.fr.design.gui.frpane.AttributeChangeListener; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.mainframe.chart.AbstractChartAttrPane; |
||||
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
||||
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
||||
import com.fr.van.chart.bar.VanChartBarStylePane; |
||||
import com.fr.van.chart.designer.other.VanChartInteractivePane; |
||||
import com.fr.van.chart.designer.other.VanChartOtherPane; |
||||
import com.fr.van.chart.designer.other.zoom.ZoomPane; |
||||
import com.fr.van.chart.designer.style.VanChartStylePane; |
||||
import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI; |
||||
|
||||
import java.awt.Component; |
||||
|
||||
public class BoxIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI { |
||||
|
||||
public String getName() { |
||||
return Toolkit.i18nText("Fine-Design_Chart_New_Box"); |
||||
} |
||||
|
||||
public String[] getSubName() { |
||||
return new String[]{ |
||||
Toolkit.i18nText("Fine-Design_Chart_New_Box") |
||||
}; |
||||
} |
||||
|
||||
public String[] getDemoImagePath() { |
||||
return new String[]{ |
||||
"com/fr/plugin/chart/demo/image/box.png" |
||||
}; |
||||
} |
||||
|
||||
public String getIconPath() { |
||||
return "com/fr/design/images/form/toolbar/box.png"; |
||||
} |
||||
|
||||
public AbstractChartTypePane getPlotTypePane() { |
||||
return new VanChartBoxPlotPane(); |
||||
} |
||||
|
||||
public ConditionAttributesPane getPlotConditionPane(Plot plot) { |
||||
return new VanChartBoxConditionPane(plot); |
||||
} |
||||
|
||||
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot) { |
||||
return new VanChartBoxSeriesPane(parent, plot); |
||||
} |
||||
|
||||
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener) { |
||||
VanChartStylePane stylePane = new VanChartBarStylePane(listener); |
||||
VanChartOtherPane otherPane = new VanChartOtherPane() { |
||||
|
||||
protected BasicBeanPane<Chart> createInteractivePane() { |
||||
return new VanChartInteractivePane() { |
||||
|
||||
protected Component[][] createToolBarComponents() { |
||||
return new Component[][]{ |
||||
new Component[]{null, exportImages}, |
||||
new Component[]{null, fullScreenDisplay} |
||||
}; |
||||
} |
||||
|
||||
protected double[] getToolBarRowSize() { |
||||
double p = TableLayout.PREFERRED; |
||||
return new double[]{p, p}; |
||||
} |
||||
|
||||
protected ZoomPane createZoomPane() { |
||||
return new ZoomPane(); |
||||
} |
||||
}; |
||||
} |
||||
}; |
||||
|
||||
return new AbstractChartAttrPane[]{stylePane, otherPane}; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,53 @@
|
||||
package com.fr.van.chart.box; |
||||
|
||||
import com.fr.chart.base.AttrAlpha; |
||||
import com.fr.chart.base.AttrBackground; |
||||
import com.fr.chart.base.AttrBorder; |
||||
import com.fr.chart.chartattr.Plot; |
||||
import com.fr.design.chart.series.SeriesCondition.ChartConditionPane; |
||||
import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; |
||||
import com.fr.design.chart.series.SeriesCondition.LabelAlphaPane; |
||||
import com.fr.plugin.chart.box.VanChartBoxPlot; |
||||
import com.fr.plugin.chart.type.ConditionKeyType; |
||||
import com.fr.van.chart.column.VanChartColumnLabelBorderPane; |
||||
import com.fr.van.chart.designer.other.condition.item.VanChartColumnSeriesColorConditionPane; |
||||
|
||||
import java.awt.Dimension; |
||||
|
||||
public class VanChartBoxConditionPane extends DataSeriesConditionPane { |
||||
|
||||
public VanChartBoxConditionPane(Plot plot) { |
||||
super(plot); |
||||
} |
||||
|
||||
protected void initComponents() { |
||||
super.initComponents(); |
||||
|
||||
liteConditionPane.setPreferredSize(new Dimension(300, 400)); |
||||
} |
||||
|
||||
protected void addBasicAction() { |
||||
classPaneMap.put(AttrBackground.class, new VanChartColumnSeriesColorConditionPane(this)); |
||||
classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this)); |
||||
classPaneMap.put(AttrBorder.class, new VanChartColumnLabelBorderPane(this)); |
||||
} |
||||
|
||||
protected void addStyleAction() { |
||||
} |
||||
|
||||
protected ChartConditionPane createListConditionPane() { |
||||
|
||||
return new ChartConditionPane() { |
||||
|
||||
@Override |
||||
protected ConditionKeyType[] conditionKeyTypes() { |
||||
return ConditionKeyType.BOX_CONDITION_KEY_TYPES; |
||||
} |
||||
}; |
||||
} |
||||
|
||||
|
||||
public Class<? extends Plot> class4Correspond() { |
||||
return VanChartBoxPlot.class; |
||||
} |
||||
} |
@ -0,0 +1,45 @@
|
||||
package com.fr.van.chart.box; |
||||
|
||||
import com.fr.chart.chartattr.Chart; |
||||
import com.fr.chart.chartattr.Plot; |
||||
import com.fr.log.FineLoggerFactory; |
||||
import com.fr.plugin.chart.box.BoxIndependentVanChart; |
||||
import com.fr.plugin.chart.box.VanChartBoxPlot; |
||||
import com.fr.van.chart.designer.type.AbstractVanChartTypePane; |
||||
|
||||
public class VanChartBoxPlotPane extends AbstractVanChartTypePane { |
||||
|
||||
protected String[] getTypeIconPath() { |
||||
return new String[]{"/com/fr/van/chart/box.images/box.png" |
||||
}; |
||||
} |
||||
|
||||
protected Plot getSelectedClonedPlot() { |
||||
VanChartBoxPlot newPlot = null; |
||||
|
||||
Chart[] boxChartGroup = BoxIndependentVanChart.BoxVanChartTypes; |
||||
|
||||
for (int i = 0, len = boxChartGroup.length; i < len; i++) { |
||||
if (typeDemo.get(i).isPressing) { |
||||
newPlot = boxChartGroup[i].getPlot(); |
||||
} |
||||
} |
||||
|
||||
Plot cloned = null; |
||||
|
||||
try { |
||||
if (newPlot != null) { |
||||
cloned = (Plot) newPlot.clone(); |
||||
} |
||||
} catch (CloneNotSupportedException e) { |
||||
FineLoggerFactory.getLogger().error("Error In ColumnChart"); |
||||
} |
||||
|
||||
return cloned; |
||||
} |
||||
|
||||
public Chart getDefaultChart() { |
||||
return BoxIndependentVanChart.BoxVanChartTypes[0]; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.fr.van.chart.box; |
||||
|
||||
import com.fr.chart.chartattr.Plot; |
||||
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
||||
import com.fr.van.chart.column.VanChartColumnSeriesPane; |
||||
|
||||
public class VanChartBoxSeriesPane extends VanChartColumnSeriesPane { |
||||
|
||||
public VanChartBoxSeriesPane(ChartStylePane parent, Plot plot) { |
||||
super(parent, plot); |
||||
} |
||||
} |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 918 B |
Loading…
Reference in new issue