Browse Source

CHART-11549 初始化箱型图界面

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
002b56f0cc
  1. 3
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  2. 85
      designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java
  3. 53
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxConditionPane.java
  4. 45
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotPane.java
  5. 12
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java
  6. BIN
      designer-chart/src/main/resources/com/fr/design/images/form/toolbar/box.png
  7. BIN
      designer-chart/src/main/resources/com/fr/van/chart/box.images/box.png

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

@ -49,6 +49,7 @@ import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.PiePlot4VanChart; import com.fr.plugin.chart.PiePlot4VanChart;
import com.fr.plugin.chart.area.VanChartAreaPlot; import com.fr.plugin.chart.area.VanChartAreaPlot;
import com.fr.plugin.chart.box.VanChartBoxPlot;
import com.fr.plugin.chart.bubble.VanChartBubblePlot; import com.fr.plugin.chart.bubble.VanChartBubblePlot;
import com.fr.plugin.chart.column.VanChartColumnPlot; import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot;
@ -79,6 +80,7 @@ import com.fr.stable.StringUtils;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import com.fr.van.chart.area.AreaIndependentVanChartInterface; import com.fr.van.chart.area.AreaIndependentVanChartInterface;
import com.fr.van.chart.bar.BarIndependentVanChartInterface; import com.fr.van.chart.bar.BarIndependentVanChartInterface;
import com.fr.van.chart.box.BoxIndependentVanChartInterface;
import com.fr.van.chart.bubble.BubbleIndependentVanChartInterface; import com.fr.van.chart.bubble.BubbleIndependentVanChartInterface;
import com.fr.van.chart.column.VanColumnChartTypeUI; import com.fr.van.chart.column.VanColumnChartTypeUI;
import com.fr.van.chart.custom.CustomIndependentVanChartInterface; import com.fr.van.chart.custom.CustomIndependentVanChartInterface;
@ -202,6 +204,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartWordCloudPlot.WORD_CLOUD_PLOT_ID, new WordCloudIndependentVanChartInterface()); addChartTypeInterface(VAN_CHART_PRIORITY, VanChartWordCloudPlot.WORD_CLOUD_PLOT_ID, new WordCloudIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface()); addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new VanStructureChartTypeUI()); addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new VanStructureChartTypeUI());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartBoxPlot.VAN_CHART_BOX_PLOT_ID, new BoxIndependentVanChartInterface());
} }

85
designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java

@ -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};
}
}

53
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxConditionPane.java

@ -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;
}
}

45
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotPane.java

@ -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];
}
}

12
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java

@ -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);
}
}

BIN
designer-chart/src/main/resources/com/fr/design/images/form/toolbar/box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/box.images/box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

Loading…
Cancel
Save