@ -0,0 +1,28 @@ |
|||||||
|
/* |
||||||
|
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved. |
||||||
|
*/ |
||||||
|
package com.fr.design.actions.cell; |
||||||
|
|
||||||
|
import com.fr.base.BaseUtils; |
||||||
|
import com.fr.design.actions.UpdateAction; |
||||||
|
import com.fr.design.mainframe.EastRegionContainerPane; |
||||||
|
import com.fr.design.menu.KeySetUtils; |
||||||
|
|
||||||
|
import java.awt.event.ActionEvent; |
||||||
|
|
||||||
|
/** |
||||||
|
* Condition Attributes. |
||||||
|
*/ |
||||||
|
public class ConditionAttributesAction extends UpdateAction { |
||||||
|
public ConditionAttributesAction() { |
||||||
|
this.setMenuKeySet(KeySetUtils.CONDITION_ATTR); |
||||||
|
this.setName(getMenuKeySet().getMenuKeySetName()); |
||||||
|
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||||
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/highlight.png")); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void actionPerformed(ActionEvent e) { |
||||||
|
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CONDITION_ATTR); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
/* |
||||||
|
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved. |
||||||
|
*/ |
||||||
|
package com.fr.design.actions.edit; |
||||||
|
|
||||||
|
import com.fr.base.BaseUtils; |
||||||
|
import com.fr.design.actions.UpdateAction; |
||||||
|
import com.fr.design.mainframe.EastRegionContainerPane; |
||||||
|
import com.fr.design.menu.KeySetUtils; |
||||||
|
|
||||||
|
import java.awt.event.ActionEvent; |
||||||
|
|
||||||
|
/** |
||||||
|
* HyperlinkAction. |
||||||
|
*/ |
||||||
|
public class HyperlinkAction extends UpdateAction { |
||||||
|
|
||||||
|
public HyperlinkAction() { |
||||||
|
this.setMenuKeySet(KeySetUtils.HYPER_LINK); |
||||||
|
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); |
||||||
|
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||||
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/hyperLink.png")); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void actionPerformed(ActionEvent e) { |
||||||
|
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_HYPERLINK); |
||||||
|
} |
||||||
|
} |
@ -1,32 +0,0 @@ |
|||||||
package com.fr.design.report.mobile; |
|
||||||
|
|
||||||
import com.fr.design.dialog.mobile.MobileUseHtmlGroupBeanPane; |
|
||||||
import com.fr.report.mobile.ElementCaseMobileAttr; |
|
||||||
|
|
||||||
/** |
|
||||||
* Created by kunsnat on 2016/8/3. |
|
||||||
*/ |
|
||||||
public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane<ElementCaseMobileAttr> { |
|
||||||
public MobileUseHtmlGroupPane(String annotation) { |
|
||||||
super(annotation); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void populateBean(ElementCaseMobileAttr mobileAttr) { |
|
||||||
if(mobileAttr != null) { |
|
||||||
selectIndexButton(mobileAttr.isUseHTML() ? 1 : 0); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public ElementCaseMobileAttr updateBean() { |
|
||||||
return null; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void updateBean(ElementCaseMobileAttr mobileAttr) { |
|
||||||
if(mobileAttr != null) { |
|
||||||
mobileAttr.setUseHTML(getSelectRadioIndex() == 1); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,112 +0,0 @@ |
|||||||
package com.fr.design.dialog.mobile; |
|
||||||
|
|
||||||
import com.fr.design.beans.BasicBeanPane; |
|
||||||
import com.fr.design.border.UITitledBorder; |
|
||||||
import com.fr.design.gui.ibutton.UIRadioButton; |
|
||||||
import com.fr.design.gui.ilable.UILabel; |
|
||||||
import com.fr.design.layout.FRGUIPaneFactory; |
|
||||||
import com.fr.design.layout.TableLayout; |
|
||||||
import com.fr.design.layout.TableLayoutHelper; |
|
||||||
import com.fr.general.Inter; |
|
||||||
|
|
||||||
import javax.swing.*; |
|
||||||
import java.awt.*; |
|
||||||
import java.awt.event.ActionListener; |
|
||||||
import java.util.ArrayList; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* 由于MobileUserHtmlGroupPane 现在在report和form中均会用到,会出现重复代码,故放入base中 |
|
||||||
* Created by fanglei on 2016/12/28. |
|
||||||
*/ |
|
||||||
public abstract class MobileUseHtmlGroupBeanPane<T> extends BasicBeanPane<T> { |
|
||||||
|
|
||||||
private List<UIRadioButton> radioButtons = new ArrayList<UIRadioButton>(); |
|
||||||
|
|
||||||
public MobileUseHtmlGroupBeanPane(String annotation) { |
|
||||||
initComponents(annotation); |
|
||||||
} |
|
||||||
|
|
||||||
private void initComponents(String annotation) { |
|
||||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
||||||
this.setBorder(UITitledBorder.createBorderWithTitle(this.title4PopupWindow())); |
|
||||||
|
|
||||||
double p = TableLayout.PREFERRED; |
|
||||||
double[] rowSize = {p, p}; |
|
||||||
double[] columnSize = {p, p, p}; |
|
||||||
|
|
||||||
UIRadioButton useApp = new UIRadioButton(Inter.getLocText("FR-mobile_native_analysis")); |
|
||||||
useApp.setSelected(true); |
|
||||||
UIRadioButton useHTML5 = new UIRadioButton(Inter.getLocText("FR-mobile_html_analysis")); |
|
||||||
|
|
||||||
addToButtonGroup(useApp, useHTML5); |
|
||||||
|
|
||||||
Component[][] components = new Component[][]{ |
|
||||||
new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_style")), useApp, useHTML5}, |
|
||||||
new Component[]{new UILabel(annotation), null, null} |
|
||||||
}; |
|
||||||
JPanel usePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
||||||
usePane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10)); |
|
||||||
|
|
||||||
this.add(usePane); |
|
||||||
} |
|
||||||
|
|
||||||
private void addToButtonGroup(UIRadioButton... radios) { |
|
||||||
ButtonGroup buttonGroup = new ButtonGroup(); |
|
||||||
for (UIRadioButton radio : radios) { |
|
||||||
radioButtons.add(radio); |
|
||||||
buttonGroup.add(radio); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 设置按钮状态 |
|
||||||
*/ |
|
||||||
public void setEnabled(boolean enabled) { |
|
||||||
for (UIRadioButton radioButton : radioButtons) { |
|
||||||
radioButton.setEnabled(enabled); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取当前选中的按钮index |
|
||||||
* |
|
||||||
* @return 按钮index |
|
||||||
*/ |
|
||||||
public int getSelectRadioIndex() { |
|
||||||
for (int i = 0, len = radioButtons.size(); i < len; i++) { |
|
||||||
if (radioButtons.get(i).isSelected()) { |
|
||||||
return i; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
return 0; |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 选中指定index的按钮 |
|
||||||
*/ |
|
||||||
public void selectIndexButton(int index) { |
|
||||||
if (index < 0 || index > radioButtons.size() - 1) { |
|
||||||
return; |
|
||||||
} |
|
||||||
|
|
||||||
UIRadioButton button = radioButtons.get(index); |
|
||||||
button.setSelected(true); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 给所有的按钮加上监听 |
|
||||||
*/ |
|
||||||
public void addActionListener(ActionListener actionListener) { |
|
||||||
for (UIRadioButton radioButton : radioButtons) { |
|
||||||
radioButton.addActionListener(actionListener); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
protected String title4PopupWindow() { |
|
||||||
return Inter.getLocText("FR-mobile_report_analysis"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
After Width: | Height: | Size: 374 B |
After Width: | Height: | Size: 178 B |
After Width: | Height: | Size: 493 B |
After Width: | Height: | Size: 179 B |
After Width: | Height: | Size: 306 B |
After Width: | Height: | Size: 344 B |
After Width: | Height: | Size: 276 B |
After Width: | Height: | Size: 982 B |
After Width: | Height: | Size: 431 B |
After Width: | Height: | Size: 750 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 344 B |
After Width: | Height: | Size: 861 B |
After Width: | Height: | Size: 372 B |
After Width: | Height: | Size: 723 B |
After Width: | Height: | Size: 429 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 269 B |
After Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 423 B |
After Width: | Height: | Size: 503 B |
After Width: | Height: | Size: 306 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 423 B |
After Width: | Height: | Size: 861 B |
After Width: | Height: | Size: 1002 B |
After Width: | Height: | Size: 329 B |
After Width: | Height: | Size: 269 B |
@ -1 +1,92 @@ |
|||||||
package com.fr.design.module;
import com.fr.chart.base.ChartInternationalNameContentBean;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.chart.ChartDialog;
import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.chart.gui.ChartWidgetOption;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.mainframe.App;
import com.fr.design.mainframe.ChartPropertyPane;
import com.fr.form.ui.ChartEditor;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import javax.swing.*;
/**
* Created by IntelliJ IDEA.
* Author : Richer
* Version: 7.0.3
* Date: 13-7-8
* Time: 上午9:13
*/
public class ChartDesignerModule extends DesignModule {
public void start() {
super.start();
dealBeforeRegister();
register();
registerFloatEditor();
}
protected void dealBeforeRegister(){
StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class);
StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class);
}
private void register(){
DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup());
DesignModuleFactory.registerChartEditorClass(ChartEditor.class);
DesignModuleFactory.registerChartComponentClass(ChartComponent.class);
DesignModuleFactory.registerChartDialogClass(ChartDialog.class);
DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class);
ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction());
}
protected void registerFloatEditor() {
ActionFactory.registerChartCollection(ChartCollection.class);
}
/**
* 返回设计器能打开的模板类型的一个数组列表
*
* @return 可以打开的模板类型的数组
*/
public App<?>[] apps4TemplateOpener() {
return new App[0];
}
protected WidgetOption[] options4Show() {
ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames();
ChartWidgetOption[] child = new ChartWidgetOption[typeName.length];
for (int i = 0; i < typeName.length; i++) {
String plotID = typeName[i].getPlotID();
Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID);
if (ArrayUtils.isEmpty(rowChart)) {
continue;
}
String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID);
Icon icon = IOUtils.readIcon(iconPath);
child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]);
}
return child;
}
public String getInterNationalName() {
return Inter.getLocText("FR-Chart-Design_ChartModule");
}
} |
package com.fr.design.module; |
||||||
|
|
||||||
|
import com.fr.chart.base.ChartInternationalNameContentBean; |
||||||
|
import com.fr.chart.chartattr.Chart; |
||||||
|
import com.fr.chart.chartattr.ChartCollection; |
||||||
|
import com.fr.chart.charttypes.ChartTypeManager; |
||||||
|
import com.fr.design.ChartTypeInterfaceManager; |
||||||
|
import com.fr.design.actions.core.ActionFactory; |
||||||
|
import com.fr.design.chart.ChartDialog; |
||||||
|
import com.fr.design.chart.gui.ChartComponent; |
||||||
|
import com.fr.design.chart.gui.ChartWidgetOption; |
||||||
|
import com.fr.design.gui.core.WidgetOption; |
||||||
|
import com.fr.design.mainframe.App; |
||||||
|
import com.fr.design.mainframe.ChartPropertyPane; |
||||||
|
import com.fr.form.ui.ChartEditor; |
||||||
|
import com.fr.general.IOUtils; |
||||||
|
import com.fr.general.Inter; |
||||||
|
import com.fr.plugin.chart.map.server.ChartMapEditorAction; |
||||||
|
import com.fr.stable.ArrayUtils; |
||||||
|
import com.fr.stable.bridge.StableFactory; |
||||||
|
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; |
||||||
|
|
||||||
|
import javax.swing.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by IntelliJ IDEA. |
||||||
|
* Author : Richer |
||||||
|
* Version: 7.0.3 |
||||||
|
* Date: 13-7-8 |
||||||
|
* Time: 上午9:13 |
||||||
|
*/ |
||||||
|
public class ChartDesignerModule extends DesignModule { |
||||||
|
public void start() { |
||||||
|
super.start(); |
||||||
|
dealBeforeRegister(); |
||||||
|
register(); |
||||||
|
registerFloatEditor(); |
||||||
|
} |
||||||
|
|
||||||
|
protected void dealBeforeRegister(){ |
||||||
|
StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); |
||||||
|
StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class); |
||||||
|
} |
||||||
|
|
||||||
|
private void register(){ |
||||||
|
DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); |
||||||
|
|
||||||
|
DesignModuleFactory.registerChartEditorClass(ChartEditor.class); |
||||||
|
DesignModuleFactory.registerChartComponentClass(ChartComponent.class); |
||||||
|
|
||||||
|
DesignModuleFactory.registerChartDialogClass(ChartDialog.class); |
||||||
|
|
||||||
|
DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); |
||||||
|
|
||||||
|
ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); |
||||||
|
ActionFactory.registerChartMapEditorAction(new ChartMapEditorAction()); |
||||||
|
} |
||||||
|
|
||||||
|
protected void registerFloatEditor() { |
||||||
|
ActionFactory.registerChartCollection(ChartCollection.class); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回设计器能打开的模板类型的一个数组列表 |
||||||
|
* |
||||||
|
* @return 可以打开的模板类型的数组 |
||||||
|
*/ |
||||||
|
public App<?>[] apps4TemplateOpener() { |
||||||
|
return new App[0]; |
||||||
|
} |
||||||
|
protected WidgetOption[] options4Show() { |
||||||
|
ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); |
||||||
|
ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; |
||||||
|
for (int i = 0; i < typeName.length; i++) { |
||||||
|
String plotID = typeName[i].getPlotID(); |
||||||
|
Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); |
||||||
|
if (ArrayUtils.isEmpty(rowChart)) { |
||||||
|
continue; |
||||||
|
} |
||||||
|
String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); |
||||||
|
Icon icon = IOUtils.readIcon(iconPath); |
||||||
|
child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); |
||||||
|
} |
||||||
|
return child; |
||||||
|
} |
||||||
|
|
||||||
|
public String getInterNationalName() { |
||||||
|
return Inter.getLocText("FR-Chart-Design_ChartModule"); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
@ -0,0 +1,40 @@ |
|||||||
|
package com.fr.plugin.chart.area; |
||||||
|
|
||||||
|
import com.fr.chart.chartattr.Plot; |
||||||
|
import com.fr.design.beans.BasicBeanPane; |
||||||
|
import com.fr.design.condition.ConditionAttributesPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
||||||
|
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
||||||
|
import com.fr.plugin.chart.vanchart.AbstractMultiCategoryVanChartUI; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Mitisky on 15/11/18. |
||||||
|
*/ |
||||||
|
public class AreaIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI { |
||||||
|
@Override |
||||||
|
public String getIconPath() { |
||||||
|
return "com/fr/design/images/form/toolbar/area.png"; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public AbstractChartTypePane getPlotTypePane() { |
||||||
|
return new VanChartAreaPlotPane(); |
||||||
|
} |
||||||
|
|
||||||
|
public ConditionAttributesPane getPlotConditionPane(Plot plot){ |
||||||
|
return new VanChartAreaConditionPane(plot); |
||||||
|
} |
||||||
|
|
||||||
|
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){ |
||||||
|
return new VanChartAreaSeriesPane(parent, plot); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* plot面板的标题 |
||||||
|
* 插件兼容 |
||||||
|
*/ |
||||||
|
public String getPlotTypeTitle4PopupWindow(){ |
||||||
|
return VanChartAreaPlotPane.TITLE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,96 @@ |
|||||||
|
package com.fr.plugin.chart.area; |
||||||
|
|
||||||
|
import com.fr.chart.base.AttrBackground; |
||||||
|
import com.fr.chart.base.ChartConstants; |
||||||
|
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.plugin.chart.attr.EffectHelper; |
||||||
|
import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground; |
||||||
|
import com.fr.plugin.chart.base.AttrDataSheet; |
||||||
|
import com.fr.plugin.chart.base.AttrEffect; |
||||||
|
import com.fr.plugin.chart.base.AttrLabel; |
||||||
|
import com.fr.plugin.chart.base.AttrTooltip; |
||||||
|
import com.fr.plugin.chart.base.VanChartAttrLine; |
||||||
|
import com.fr.plugin.chart.base.VanChartAttrMarker; |
||||||
|
import com.fr.plugin.chart.base.VanChartAttrTrendLine; |
||||||
|
import com.fr.plugin.chart.designer.PlotFactory; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartAreaFillColorConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartDataSheetContentPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartEffectConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartLabelConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartLineTypeConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartMarkerConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartSeriesColorConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartTooltipConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartTrendLineConditionPane; |
||||||
|
import com.fr.plugin.chart.glyph.VanChartMultiCategoryDataPoint; |
||||||
|
import com.fr.plugin.chart.scatter.large.VanChartLargeModelMarkerConditionPane; |
||||||
|
|
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Mitisky on 15/11/18. |
||||||
|
*/ |
||||||
|
public class VanChartAreaConditionPane extends DataSeriesConditionPane { |
||||||
|
private static final long serialVersionUID = -7180705321732069806L; |
||||||
|
|
||||||
|
public VanChartAreaConditionPane(Plot plot) { |
||||||
|
super(plot); |
||||||
|
} |
||||||
|
|
||||||
|
protected void initComponents() { |
||||||
|
super.initComponents(); |
||||||
|
//添加全部条件属性后被遮挡
|
||||||
|
liteConditionPane.setPreferredSize(new Dimension(300, 400)); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void addBasicAction() { |
||||||
|
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this)); |
||||||
|
classPaneMap.put(VanChartAttrTrendLine.class, new VanChartTrendLineConditionPane(this)); |
||||||
|
classPaneMap.put(AttrAreaSeriesFillColorBackground.class, new VanChartAreaFillColorConditionPane(this, plot)); |
||||||
|
classPaneMap.put(VanChartAttrLine.class, new VanChartLineTypeConditionPane(this)); |
||||||
|
classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot)); |
||||||
|
//是否使用数据表
|
||||||
|
if (plot.getDataSheet().isVisible()) { |
||||||
|
classPaneMap.put(AttrDataSheet.class, new VanChartDataSheetContentPane(this, plot)); |
||||||
|
} |
||||||
|
if(PlotFactory.largeDataModel(plot)){ |
||||||
|
classPaneMap.put(VanChartAttrMarker.class, new VanChartLargeModelMarkerConditionPane(this)); |
||||||
|
} else { |
||||||
|
classPaneMap.put(VanChartAttrMarker.class, new VanChartMarkerConditionPane(this)); |
||||||
|
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getAreaPlotDefaultEffect())); |
||||||
|
classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot)); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
protected void addStyleAction() { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected ChartConditionPane createListConditionPane() { |
||||||
|
return new ChartConditionPane(){ |
||||||
|
@Override |
||||||
|
public String[] columns2Populate() { |
||||||
|
return new String[]{ |
||||||
|
ChartConstants.CATEGORY_INDEX, |
||||||
|
ChartConstants.CATEGORY_NAME, |
||||||
|
ChartConstants.SERIES_INDEX, |
||||||
|
ChartConstants.SERIES_NAME, |
||||||
|
ChartConstants.VALUE, |
||||||
|
VanChartMultiCategoryDataPoint.CATEGORY_ARRAY, |
||||||
|
}; |
||||||
|
} |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回图表class对象 |
||||||
|
* @return class对象 |
||||||
|
*/ |
||||||
|
public Class<? extends Plot> class4Correspond() { |
||||||
|
return VanChartAreaPlot.class; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,95 @@ |
|||||||
|
package com.fr.plugin.chart.area; |
||||||
|
|
||||||
|
import com.fr.chart.chartattr.Chart; |
||||||
|
import com.fr.chart.chartattr.Plot; |
||||||
|
import com.fr.design.mainframe.chart.gui.type.ChartImagePane; |
||||||
|
import com.fr.general.FRLogger; |
||||||
|
import com.fr.general.Inter; |
||||||
|
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Mitisky on 15/11/18. |
||||||
|
*/ |
||||||
|
public class VanChartAreaPlotPane extends AbstractVanChartTypePane { |
||||||
|
public static final String TITLE = Inter.getLocText("Plugin-ChartF_NewArea"); |
||||||
|
private static final long serialVersionUID = -8161581682558781651L; |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String[] getTypeIconPath() { |
||||||
|
|
||||||
|
return new String[]{"/com/fr/plugin/chart/area/images/area.png", |
||||||
|
"/com/fr/plugin/chart/area/images/stack.png", |
||||||
|
"/com/fr/plugin/chart/area/images/percentStack.png", |
||||||
|
"/com/fr/plugin/chart/area/images/custom.png", |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String[] getTypeTipName() { |
||||||
|
String area = Inter.getLocText("FR-Chart-Type_Area"); |
||||||
|
String stack = Inter.getLocText("FR-Chart-Type_Stacked"); |
||||||
|
String percent = Inter.getLocText("FR-Chart-Use_Percent"); |
||||||
|
return new String[]{ |
||||||
|
area, |
||||||
|
stack + area, |
||||||
|
percent + stack + area, |
||||||
|
Inter.getLocText("FR-Chart-Mode_Custom") |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回界面标题 |
||||||
|
* @return 界面标题 |
||||||
|
*/ |
||||||
|
public String title4PopupWindow() { |
||||||
|
return Inter.getLocText("Plugin-ChartF_NewArea"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新界面内容 |
||||||
|
*/ |
||||||
|
public void populateBean(Chart chart) { |
||||||
|
for(ChartImagePane imagePane : typeDemo) { |
||||||
|
imagePane.isPressing = false; |
||||||
|
} |
||||||
|
Plot plot = chart.getPlot(); |
||||||
|
if(plot instanceof VanChartAreaPlot) { |
||||||
|
lastTypeIndex = ((VanChartAreaPlot) plot).getVanChartPlotType().ordinal(); |
||||||
|
typeDemo.get(lastTypeIndex).isPressing = true; |
||||||
|
} |
||||||
|
checkDemosBackground(); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取各图表类型界面ID, 本质是plotID |
||||||
|
* |
||||||
|
* @return 图表类型界面ID |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected String getPlotTypeID() { |
||||||
|
return VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID; |
||||||
|
} |
||||||
|
|
||||||
|
protected Plot getSelectedClonedPlot(){ |
||||||
|
VanChartAreaPlot newPlot = null; |
||||||
|
Chart[] areaChart = AreaIndependentVanChart.AreaVanChartTypes; |
||||||
|
for(int i = 0, len = areaChart.length; i < len; i++){ |
||||||
|
if(typeDemo.get(i).isPressing){ |
||||||
|
newPlot = (VanChartAreaPlot)areaChart[i].getPlot(); |
||||||
|
} |
||||||
|
} |
||||||
|
Plot cloned = null; |
||||||
|
try { |
||||||
|
cloned = (Plot)newPlot.clone(); |
||||||
|
} catch (CloneNotSupportedException e) { |
||||||
|
FRLogger.getLogger().error("Error In AreaChart"); |
||||||
|
} |
||||||
|
return cloned; |
||||||
|
} |
||||||
|
|
||||||
|
public Chart getDefaultChart() { |
||||||
|
return AreaIndependentVanChart.AreaVanChartTypes[0]; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,46 @@ |
|||||||
|
package com.fr.plugin.chart.area; |
||||||
|
|
||||||
|
import com.fr.chart.chartattr.Plot; |
||||||
|
import com.fr.design.beans.BasicBeanPane; |
||||||
|
import com.fr.design.layout.TableLayout; |
||||||
|
import com.fr.design.layout.TableLayoutHelper; |
||||||
|
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
||||||
|
import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane; |
||||||
|
import com.fr.plugin.chart.line.VanChartLineSeriesPane; |
||||||
|
|
||||||
|
import javax.swing.*; |
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
public class VanChartAreaSeriesPane extends VanChartLineSeriesPane{ |
||||||
|
|
||||||
|
private static final long serialVersionUID = 5497989595104913025L; |
||||||
|
|
||||||
|
public VanChartAreaSeriesPane(ChartStylePane parent, Plot plot){ |
||||||
|
super(parent, plot); |
||||||
|
} |
||||||
|
|
||||||
|
protected JPanel getContentInPlotType(){ |
||||||
|
|
||||||
|
double p = TableLayout.PREFERRED; |
||||||
|
double f = TableLayout.FILL; |
||||||
|
double[] row = {p,p,p,p,p,p,p}; |
||||||
|
double[] col = {f}; |
||||||
|
|
||||||
|
Component[][] components = new Component[][]{ |
||||||
|
new Component[]{getColorPane()}, |
||||||
|
new Component[]{createLineTypePane()}, |
||||||
|
new Component[]{createMarkerPane()}, |
||||||
|
new Component[]{createAreaFillColorPane()}, |
||||||
|
new Component[]{createStackedAndAxisPane()}, |
||||||
|
new Component[]{createLargeDataModelPane()}, |
||||||
|
new Component[]{createTrendLinePane()}, |
||||||
|
}; |
||||||
|
|
||||||
|
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col); |
||||||
|
return contentPane; |
||||||
|
} |
||||||
|
|
||||||
|
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() { |
||||||
|
return VanChartCustomStackAndAxisConditionPane.class; |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 760 B |
After Width: | Height: | Size: 728 B |
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,56 @@ |
|||||||
|
package com.fr.plugin.chart.bar; |
||||||
|
|
||||||
|
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.gui.ChartStylePane; |
||||||
|
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
||||||
|
import com.fr.plugin.chart.column.VanChartColumnConditionPane; |
||||||
|
import com.fr.plugin.chart.column.VanChartColumnSeriesPane; |
||||||
|
import com.fr.plugin.chart.designer.other.VanChartOtherPane; |
||||||
|
import com.fr.plugin.chart.designer.style.VanChartStylePane; |
||||||
|
import com.fr.plugin.chart.vanchart.AbstractMultiCategoryVanChartUI; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Mitisky on 15/10/20. |
||||||
|
*/ |
||||||
|
public class BarIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI { |
||||||
|
@Override |
||||||
|
public String getIconPath() { |
||||||
|
return "com/fr/design/images/form/toolbar/bar.png"; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public AbstractChartTypePane getPlotTypePane() { |
||||||
|
return new VanChartBarPlotPane(); |
||||||
|
} |
||||||
|
|
||||||
|
public ConditionAttributesPane getPlotConditionPane(Plot plot){ |
||||||
|
return new VanChartColumnConditionPane(plot); |
||||||
|
} |
||||||
|
|
||||||
|
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){ |
||||||
|
return new VanChartColumnSeriesPane(parent, plot); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 图表的属性界面数组 |
||||||
|
* @return 属性界面 |
||||||
|
*/ |
||||||
|
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){ |
||||||
|
VanChartStylePane stylePane = new VanChartBarStylePane(listener); |
||||||
|
VanChartOtherPane otherPane = new VanChartOtherPane(); |
||||||
|
return new AbstractChartAttrPane[]{stylePane, otherPane}; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* plot面板的标题 |
||||||
|
* 插件兼容 |
||||||
|
*/ |
||||||
|
public String getPlotTypeTitle4PopupWindow(){ |
||||||
|
return VanChartBarPlotPane.TITLE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,96 @@ |
|||||||
|
package com.fr.plugin.chart.bar; |
||||||
|
|
||||||
|
import com.fr.chart.chartattr.Chart; |
||||||
|
import com.fr.chart.chartattr.Plot; |
||||||
|
import com.fr.design.mainframe.chart.gui.type.ChartImagePane; |
||||||
|
import com.fr.general.FRLogger; |
||||||
|
import com.fr.general.Inter; |
||||||
|
import com.fr.plugin.chart.column.VanChartColumnPlot; |
||||||
|
import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Mitisky on 15/10/20. |
||||||
|
*/ |
||||||
|
public class VanChartBarPlotPane extends AbstractVanChartTypePane { |
||||||
|
public static final String TITLE = Inter.getLocText("Plugin-ChartF_NewBar"); |
||||||
|
|
||||||
|
private static final long serialVersionUID = 2879689884048643002L; |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String[] getTypeIconPath() { |
||||||
|
return new String[]{"/com/fr/plugin/chart/bar/images/bar.png", |
||||||
|
"/com/fr/plugin/chart/bar/images/stack.png", |
||||||
|
"/com/fr/plugin/chart/bar/images/percentstack.png", |
||||||
|
"/com/fr/plugin/chart/bar/images/custom.png", |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String[] getTypeTipName() { |
||||||
|
String bar = Inter.getLocText("FR-Chart-Type_Bar"); |
||||||
|
String stack = Inter.getLocText("FR-Chart-Type_Stacked"); |
||||||
|
String percent = Inter.getLocText("FR-Chart-Use_Percent"); |
||||||
|
return new String[]{ |
||||||
|
bar, |
||||||
|
stack + bar, |
||||||
|
percent + stack + bar, |
||||||
|
Inter.getLocText("FR-Chart-Mode_Custom") |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回界面标题 |
||||||
|
* @return 界面标题 |
||||||
|
*/ |
||||||
|
public String title4PopupWindow() { |
||||||
|
return Inter.getLocText("Plugin-ChartF_NewBar"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新界面内容 |
||||||
|
*/ |
||||||
|
public void populateBean(Chart chart) { |
||||||
|
for(ChartImagePane imagePane : typeDemo) { |
||||||
|
imagePane.isPressing = false; |
||||||
|
} |
||||||
|
Plot plot = chart.getPlot(); |
||||||
|
if(plot instanceof VanChartColumnPlot) { |
||||||
|
lastTypeIndex = ((VanChartColumnPlot)plot).getVanChartPlotType().ordinal(); |
||||||
|
typeDemo.get(lastTypeIndex).isPressing = true; |
||||||
|
} |
||||||
|
checkDemosBackground(); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取各图表类型界面ID, 本质是plotID |
||||||
|
* |
||||||
|
* @return 图表类型界面ID |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected String getPlotTypeID() { |
||||||
|
return VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID; |
||||||
|
} |
||||||
|
|
||||||
|
protected Plot getSelectedClonedPlot(){ |
||||||
|
VanChartColumnPlot newPlot = null; |
||||||
|
Chart[] barChart = BarIndependentVanChart.BarVanChartTypes; |
||||||
|
for(int i = 0, len = barChart.length; i < len; i++){ |
||||||
|
if(typeDemo.get(i).isPressing){ |
||||||
|
newPlot = (VanChartColumnPlot)barChart[i].getPlot(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Plot cloned = null; |
||||||
|
try { |
||||||
|
cloned = (Plot)newPlot.clone(); |
||||||
|
} catch (CloneNotSupportedException e) { |
||||||
|
FRLogger.getLogger().error("Error In ColumnChart"); |
||||||
|
} |
||||||
|
return cloned; |
||||||
|
} |
||||||
|
|
||||||
|
public Chart getDefaultChart() { |
||||||
|
return BarIndependentVanChart.BarVanChartTypes[0]; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
package com.fr.plugin.chart.bar; |
||||||
|
|
||||||
|
import com.fr.design.dialog.BasicPane; |
||||||
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
||||||
|
import com.fr.plugin.chart.attr.plot.VanChartAxisPlot; |
||||||
|
import com.fr.plugin.chart.designer.style.VanChartStylePane; |
||||||
|
import com.fr.plugin.chart.designer.style.axis.bar.VanChartBarAxisPane; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Mitisky on 16/6/8. |
||||||
|
*/ |
||||||
|
public class VanChartBarStylePane extends VanChartStylePane { |
||||||
|
public VanChartBarStylePane(AttributeChangeListener listener) { |
||||||
|
super(listener); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void createVanChartAxisPane(List<BasicPane> paneList, VanChartAxisPlot plot) { |
||||||
|
paneList.add(new VanChartBarAxisPane(plot, VanChartBarStylePane.this)); |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 290 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 247 B |
After Width: | Height: | Size: 256 B |
@ -0,0 +1,85 @@ |
|||||||
|
package com.fr.plugin.chart.bubble; |
||||||
|
|
||||||
|
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.mainframe.chart.AbstractChartAttrPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.ChartDataPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
||||||
|
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContentPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; |
||||||
|
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; |
||||||
|
import com.fr.plugin.chart.bubble.data.VanChartBubblePlotTableDataContentPane; |
||||||
|
import com.fr.plugin.chart.designer.other.VanChartOtherPane; |
||||||
|
import com.fr.plugin.chart.designer.style.VanChartStylePane; |
||||||
|
import com.fr.plugin.chart.vanchart.AbstractIndependentVanChartUI; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Mitisky on 16/3/31. |
||||||
|
*/ |
||||||
|
public class BubbleIndependentVanChartInterface extends AbstractIndependentVanChartUI { |
||||||
|
/** |
||||||
|
* 图表的类型定义界面类型,就是属性表的第一个界面 |
||||||
|
* |
||||||
|
* @return 图表的类型定义界面类型 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public AbstractChartTypePane getPlotTypePane() { |
||||||
|
return new VanChartBubblePlotPane(); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 图标路径 |
||||||
|
* |
||||||
|
* @return 图标路径 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getIconPath() { |
||||||
|
return "com/fr/design/images/form/toolbar/bubble.png"; |
||||||
|
} |
||||||
|
@Override |
||||||
|
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){ |
||||||
|
return new VanChartBubbleSeriesPane(parent, plot); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ |
||||||
|
if(((VanChartBubblePlot) plot).isForceBubble()){ |
||||||
|
return super.getTableDataSourcePane(plot, parent); |
||||||
|
} |
||||||
|
return new VanChartBubblePlotTableDataContentPane(parent); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent){ |
||||||
|
if(((VanChartBubblePlot) plot).isForceBubble()){ |
||||||
|
return super.getReportDataSourcePane(plot, parent); |
||||||
|
} |
||||||
|
return new BubblePlotReportDataContentPane(parent); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 图表的属性界面数组 |
||||||
|
* @return 属性界面 |
||||||
|
*/ |
||||||
|
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener){ |
||||||
|
VanChartStylePane stylePane = new VanChartBubbleStylePane(listener); |
||||||
|
VanChartOtherPane otherPane = new VanChartOtherPane(){ |
||||||
|
protected BasicBeanPane<Chart> createInteractivePane() { |
||||||
|
return new VanChartBubbleInteractivePane(); |
||||||
|
} |
||||||
|
}; |
||||||
|
return new AbstractChartAttrPane[]{stylePane, otherPane}; |
||||||
|
} |
||||||
|
|
||||||
|
public ConditionAttributesPane getPlotConditionPane(Plot plot){ |
||||||
|
return new VanChartBubbleConditionPane(plot); |
||||||
|
} |
||||||
|
|
||||||
|
public String getPlotTypeTitle4PopupWindow(){ |
||||||
|
return VanChartBubblePlotPane.TITLE; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,94 @@ |
|||||||
|
package com.fr.plugin.chart.bubble; |
||||||
|
|
||||||
|
import com.fr.chart.base.AttrAlpha; |
||||||
|
import com.fr.chart.base.AttrBackground; |
||||||
|
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.attr.EffectHelper; |
||||||
|
import com.fr.plugin.chart.base.AttrEffect; |
||||||
|
import com.fr.plugin.chart.base.AttrLabel; |
||||||
|
import com.fr.plugin.chart.base.AttrTooltip; |
||||||
|
import com.fr.plugin.chart.bubble.attr.VanChartAttrBubble; |
||||||
|
import com.fr.plugin.chart.designer.PlotFactory; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartBubbleSetConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartEffectConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartLabelConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartSeriesColorConditionPane; |
||||||
|
import com.fr.plugin.chart.designer.other.condition.item.VanChartTooltipConditionPane; |
||||||
|
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel; |
||||||
|
import com.fr.plugin.chart.scatter.attr.ScatterAttrTooltip; |
||||||
|
import com.fr.plugin.chart.scatter.component.label.VanChartScatterLabelConditionPane; |
||||||
|
import com.fr.plugin.chart.scatter.component.tooltip.VanChartScatterTooltipConditionPane; |
||||||
|
|
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Mitisky on 16/3/31. |
||||||
|
*/ |
||||||
|
public class VanChartBubbleConditionPane extends DataSeriesConditionPane { |
||||||
|
private static final long serialVersionUID = -7180705321732069806L; |
||||||
|
|
||||||
|
public VanChartBubbleConditionPane(Plot plot) { |
||||||
|
super(plot); |
||||||
|
} |
||||||
|
|
||||||
|
protected void initComponents() { |
||||||
|
super.initComponents(); |
||||||
|
//添加全部条件属性后被遮挡
|
||||||
|
liteConditionPane.setPreferredSize(new Dimension(300, 400)); |
||||||
|
} |
||||||
|
|
||||||
|
private boolean forceBubble() { |
||||||
|
return plot instanceof VanChartBubblePlot && ((VanChartBubblePlot) plot).isForceBubble(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected ChartConditionPane createListConditionPane() { |
||||||
|
return forceBubble() ? new ChartConditionPane() : new VanChartBubbleConditionSelectionPane(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void addBasicAction() { |
||||||
|
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this)); |
||||||
|
classPaneMap.put(VanChartAttrBubble.class, new VanChartBubbleSetConditionPane(this)); |
||||||
|
classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this)); |
||||||
|
|
||||||
|
if(forceBubble()){ |
||||||
|
addForceAction(); |
||||||
|
} else if(PlotFactory.largeDataModel(plot)){ |
||||||
|
addLargeAction(); |
||||||
|
} else { |
||||||
|
addNormalAction(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private void addNormalAction() { |
||||||
|
classPaneMap.put(ScatterAttrLabel.class, new VanChartScatterLabelConditionPane(this, plot)); |
||||||
|
classPaneMap.put(ScatterAttrTooltip.class, new VanChartScatterTooltipConditionPane(this, plot)); |
||||||
|
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getBubblePlotDefaultEffect())); |
||||||
|
} |
||||||
|
|
||||||
|
private void addForceAction() { |
||||||
|
classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot)); |
||||||
|
classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot)); |
||||||
|
classPaneMap.put(AttrEffect.class, new VanChartEffectConditionPane(this, EffectHelper.getBubblePlotDefaultEffect())); |
||||||
|
} |
||||||
|
|
||||||
|
private void addLargeAction() { |
||||||
|
classPaneMap.put(ScatterAttrTooltip.class, new VanChartScatterTooltipConditionPane(this, plot)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
protected void addStyleAction() { |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回图表class对象 |
||||||
|
* @return class对象 |
||||||
|
*/ |
||||||
|
public Class<? extends Plot> class4Correspond() { |
||||||
|
return VanChartBubblePlot.class; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,22 @@ |
|||||||
|
package com.fr.plugin.chart.bubble; |
||||||
|
|
||||||
|
import com.fr.chart.base.ChartConstants; |
||||||
|
import com.fr.design.chart.series.SeriesCondition.ChartConditionPane; |
||||||
|
import com.fr.plugin.chart.scatter.VanChartScatterDataPoint; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by Mitisky on 16/3/31. |
||||||
|
*/ |
||||||
|
public class VanChartBubbleConditionSelectionPane extends ChartConditionPane { |
||||||
|
|
||||||
|
|
||||||
|
public String[] columns2Populate() { |
||||||
|
return new String[]{ |
||||||
|
ChartConstants.SERIES_INDEX, |
||||||
|
ChartConstants.SERIES_NAME, |
||||||
|
VanChartScatterDataPoint.X, |
||||||
|
VanChartScatterDataPoint.Y, |
||||||
|
ChartConstants.VALUE |
||||||
|
}; |
||||||
|
} |
||||||
|
} |