|
|
|
@ -20,6 +20,8 @@ import com.fr.plugin.chart.base.AttrTooltipContent;
|
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
import com.fr.van.chart.designer.PlotFactory; |
|
|
|
|
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
|
|
|
import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutImagePane; |
|
|
|
|
import com.fr.van.chart.designer.component.border.VanChartBorderWithRadiusPane; |
|
|
|
|
import com.fr.van.chart.designer.style.VanChartStylePane; |
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
@ -43,6 +45,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
|
|
|
|
|
private UIToggleButton tractionLine; |
|
|
|
|
|
|
|
|
|
private ColorSelectBox backgroundColor; |
|
|
|
|
private VanChartBorderWithRadiusPane borderPane; |
|
|
|
|
private VanChartBackgroundWithOutImagePane backgroundPane; |
|
|
|
|
|
|
|
|
|
private JPanel tractionLinePane; |
|
|
|
|
private JPanel positionPane; |
|
|
|
@ -98,15 +102,48 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
|
|
|
|
|
|
|
|
|
|
protected Component[][] getLabelPaneComponents(Plot plot, double p, double[] columnSize) { |
|
|
|
|
if(hasLabelPosition(plot)){ |
|
|
|
|
|
|
|
|
|
// 仅饼图、柱形图、条形图、折线图、面积图含有边框和背景
|
|
|
|
|
if (hasBorderAndBackground(plot)) { |
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{dataLabelContentPane,null}, |
|
|
|
|
new Component[]{createLabelPositionPane(Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), plot), null}, |
|
|
|
|
new Component[]{createLabelBorderPane(), null}, |
|
|
|
|
new Component[]{createLabelBackgroundPane(), null} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{dataLabelContentPane,null}, |
|
|
|
|
new Component[]{createLabelPositionPane(Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), plot), null} |
|
|
|
|
}; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{dataLabelContentPane,null} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createLabelBorderPane() { |
|
|
|
|
borderPane = new VanChartBorderWithRadiusPane(); |
|
|
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Border"), borderPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createLabelBackgroundPane() { |
|
|
|
|
backgroundPane = new VanChartBackgroundWithOutImagePane(){ |
|
|
|
|
|
|
|
|
|
protected Component[][] getPaneComponents() { |
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Report_Fill")), typeComboBox}, |
|
|
|
|
new Component[]{null, centerPane}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Report_Alpha")), transparent}, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Background"), backgroundPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected double[] getLabelStyleRowSize(double p) { |
|
|
|
@ -121,6 +158,10 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
|
|
|
|
|
return plot instanceof VanChartLabelPositionPlot; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean hasBorderAndBackground(Plot plot) { |
|
|
|
|
return PlotFactory.hasBorderAndBackgroundPlotLabel(plot); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) { |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel); |
|
|
|
|
} |
|
|
|
@ -296,6 +337,12 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
|
|
|
|
|
if(backgroundColor != null){ |
|
|
|
|
backgroundColor.setSelectObject(detail.getBackgroundColor()); |
|
|
|
|
} |
|
|
|
|
if(borderPane != null){ |
|
|
|
|
borderPane.populate(detail.getGeneralInfo()); |
|
|
|
|
} |
|
|
|
|
if(backgroundPane != null){ |
|
|
|
|
backgroundPane.populate(detail.getGeneralInfo()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
checkAllUse(); |
|
|
|
|
} |
|
|
|
@ -322,6 +369,12 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
|
|
|
|
|
if(backgroundColor != null){ |
|
|
|
|
detail.setBackgroundColor(backgroundColor.getSelectObject()); |
|
|
|
|
} |
|
|
|
|
if(borderPane != null){ |
|
|
|
|
borderPane.update(detail.getGeneralInfo()); |
|
|
|
|
} |
|
|
|
|
if(backgroundPane != null){ |
|
|
|
|
backgroundPane.update(detail.getGeneralInfo()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|