|
|
|
@ -34,6 +34,7 @@ import com.fr.stable.StringUtils;
|
|
|
|
|
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
|
|
|
import com.fr.van.chart.designer.component.VanChartHtmlLabelPane; |
|
|
|
|
import com.fr.van.chart.designer.style.VanChartStylePane; |
|
|
|
|
import com.fr.van.chart.designer.style.axis.component.AxisLabelDisplayComboBox; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.Icon; |
|
|
|
@ -66,6 +67,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
protected ChartTextAttrPane labelTextAttrPane; |
|
|
|
|
protected UINumberDragPane labelTextRotation; |
|
|
|
|
|
|
|
|
|
private AxisLabelDisplayComboBox labelDisplayComboBox; |
|
|
|
|
|
|
|
|
|
//轴标签缩略间隔显示 恢复用注释。下面6行删除。
|
|
|
|
|
protected UITextField labelGapValue; |
|
|
|
|
|
|
|
|
@ -75,8 +78,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
//protected UISpinner labelGapValue;
|
|
|
|
|
|
|
|
|
|
protected JPanel labelPanel; |
|
|
|
|
private JPanel labelGapPane; |
|
|
|
|
private JPanel labelGapStylePane; |
|
|
|
|
private JPanel labelGapValuePane; |
|
|
|
|
private JPanel labelDisplayPane; |
|
|
|
|
|
|
|
|
|
protected LineComboBox axisLineStyle; |
|
|
|
|
protected ColorSelectBox axisLineColor; |
|
|
|
@ -116,6 +121,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
this.add(createContentPane(isXAxis), BorderLayout.CENTER); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected boolean showLabelDisplay() { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel createContentPane(boolean isXAxis) { |
|
|
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
@ -127,7 +136,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
double[] rowSize = {p, p, p, p, p, p, p, p}; |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, column, isXAxis), null}, |
|
|
|
|
new Component[]{createLabelPane(new double[]{p, p}, column), null}, |
|
|
|
|
new Component[]{createLabelPane(new double[]{p, p, p}, column), null}, |
|
|
|
|
new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null}, |
|
|
|
|
new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null}, |
|
|
|
|
new Component[]{createDisplayStrategy(), null}, |
|
|
|
@ -142,7 +151,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
titleAlignPane = isXAxis ? getXAxisTitleAlignPane() : getYAxisTitleAlignPane(); |
|
|
|
|
titleAlignPane.setSelectedItem(Constants.CENTER); |
|
|
|
|
titleContent = new TinyFormulaPane(); |
|
|
|
|
titleUseHtml = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Html")); |
|
|
|
|
titleUseHtml = new UIToggleButton(Toolkit.i18nText("Fine-Design_Chart_Html")); |
|
|
|
|
UIComponentUtils.setLineWrap(titleUseHtml); |
|
|
|
|
titleTextAttrPane = getChartTextAttrPane(); |
|
|
|
|
titleTextRotation = new UINumberDragPane(-ROTATION_MAX, ROTATION_MAX); |
|
|
|
@ -153,12 +162,12 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
} |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")), titleContent}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Content")), titleContent}, |
|
|
|
|
new Component[]{null, titleUseHtml}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position")), titleAlignPane}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Layout_Position")), titleAlignPane}, |
|
|
|
|
new Component[]{titleTextAttrPane, null}, |
|
|
|
|
new Component[]{ |
|
|
|
|
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TextRotation")), |
|
|
|
|
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_TextRotation")), |
|
|
|
|
UIComponentUtils.wrapWithBorderLayoutPane(titleTextRotation) |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
@ -199,54 +208,95 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel createLabelPane(double[] row, double[] col) { |
|
|
|
|
showLabel = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Show"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hidden")}); |
|
|
|
|
labelTextAttrPane = getChartTextAttrPane(); |
|
|
|
|
initLabelComponents(); |
|
|
|
|
|
|
|
|
|
labelGapPane = createLabelGapPane(row, col); |
|
|
|
|
labelPanel = createLabelDetailPanel(); |
|
|
|
|
|
|
|
|
|
addComponentsListener(); |
|
|
|
|
|
|
|
|
|
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label"), showLabel); |
|
|
|
|
|
|
|
|
|
JPanel labelPane = new JPanel(new BorderLayout()); |
|
|
|
|
labelPane.add(showLabelPane, BorderLayout.NORTH); |
|
|
|
|
labelPane.add(labelPanel, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, labelPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initLabelComponents() { |
|
|
|
|
showLabel = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")}); |
|
|
|
|
|
|
|
|
|
labelDisplayComboBox = new AxisLabelDisplayComboBox(); |
|
|
|
|
labelDisplayPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show"), labelDisplayComboBox); |
|
|
|
|
labelDisplayPane.setVisible(showLabelDisplay()); |
|
|
|
|
|
|
|
|
|
labelTextAttrPane = getChartTextAttrPane(); |
|
|
|
|
labelTextRotation = new UINumberDragPane(-ROTATION_MAX, ROTATION_MAX); |
|
|
|
|
labelGapStyle = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Automatic"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Fixed")}); |
|
|
|
|
labelGapStyle = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Automatic"), Toolkit.i18nText("Fine-Design_Chart_Fixed")}); |
|
|
|
|
labelGapValue = new UITextField(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createLabelGapPane(double[] row, double[] col) { |
|
|
|
|
Component[][] gapComponents = new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
new Component[]{ |
|
|
|
|
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TextRotation")), |
|
|
|
|
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_TextRotation")), |
|
|
|
|
UIComponentUtils.wrapWithBorderLayoutPane(labelTextRotation) |
|
|
|
|
}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Label_Interval")), labelGapStyle}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Label_Interval")), labelGapStyle} |
|
|
|
|
}; |
|
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, row, col); |
|
|
|
|
labelGapValuePane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText(""), labelGapValue, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
JPanel gapPanel = new JPanel(new BorderLayout()); |
|
|
|
|
gapPanel.add(panel, BorderLayout.CENTER); |
|
|
|
|
gapPanel.add(labelGapValuePane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{labelTextAttrPane, null}, |
|
|
|
|
new Component[]{gapPanel, null}, |
|
|
|
|
}; |
|
|
|
|
JPanel gapDetailPane = TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, row, col); |
|
|
|
|
labelGapValuePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText(""), labelGapValue, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
|
|
|
|
|
JPanel panel = new JPanel(new BorderLayout()); |
|
|
|
|
panel.add(gapDetailPane, BorderLayout.CENTER); |
|
|
|
|
panel.add(labelGapValuePane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
return panel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createLabelDetailPanel() { |
|
|
|
|
JPanel panel = new JPanel(new BorderLayout()); |
|
|
|
|
panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); |
|
|
|
|
|
|
|
|
|
panel.add(labelDisplayPane, BorderLayout.NORTH); |
|
|
|
|
panel.add(labelTextAttrPane, BorderLayout.CENTER); |
|
|
|
|
panel.add(labelGapPane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Label"), showLabel); |
|
|
|
|
labelPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); |
|
|
|
|
labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); |
|
|
|
|
return panel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void addComponentsListener() { |
|
|
|
|
// 显示/隐藏
|
|
|
|
|
showLabel.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
checkLabelPane(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 间隔/缩略/换行
|
|
|
|
|
labelDisplayComboBox.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
checkLabelGapPane(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 自动/固定
|
|
|
|
|
labelGapStyle.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
checkLabelGapValuePane(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
JPanel jPanel = new JPanel(new BorderLayout()); |
|
|
|
|
jPanel.add(showLabelPane, BorderLayout.NORTH); |
|
|
|
|
jPanel.add(labelPanel, BorderLayout.CENTER); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, jPanel); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// protected JPanel createLabelPane(double[] row, double[] col){
|
|
|
|
|
// double p = TableLayout.PREFERRED;
|
|
|
|
|
// showLabel = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Show"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hidden")});
|
|
|
|
|
// showLabel = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")});
|
|
|
|
|
// labelTextAttrPane = getChartTextAttrPane();
|
|
|
|
|
//
|
|
|
|
|
// JPanel rotationPane = createLabelRotationPane(col);
|
|
|
|
@ -259,7 +309,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
// new Component[]{overlapPane, null},
|
|
|
|
|
// };
|
|
|
|
|
//
|
|
|
|
|
// JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Label"),showLabel);
|
|
|
|
|
// JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label"),showLabel);
|
|
|
|
|
// labelPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p}, col);
|
|
|
|
|
// labelPanel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
|
|
|
|
|
// showLabel.addActionListener(new ActionListener() {
|
|
|
|
@ -279,7 +329,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
|
|
|
|
|
Component[][] gapComponents = new Component[][]{ |
|
|
|
|
new Component[]{ |
|
|
|
|
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TextRotation")), |
|
|
|
|
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_TextRotation")), |
|
|
|
|
UIComponentUtils.wrapWithBorderLayoutPane(labelTextRotation) |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -345,13 +395,13 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
protected JPanel createLineStylePane(double[] row, double[] col) { |
|
|
|
|
axisLineStyle = createLineComboBox(); |
|
|
|
|
axisLineColor = new ColorSelectBox(100); |
|
|
|
|
String[] strings = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")}; |
|
|
|
|
String[] strings = new String[]{Toolkit.i18nText("Fine-Design_Chart_Open"), Toolkit.i18nText("Fine-Design_Chart_Close")}; |
|
|
|
|
AxisTickLineType[] values = new AxisTickLineType[]{AxisTickLineType.TICK_LINE_OUTSIDE, AxisTickLineType.TICK_LINE_NONE}; |
|
|
|
|
mainTick = new UIButtonGroup<AxisTickLineType>(strings, values); |
|
|
|
|
secondTick = new UIButtonGroup<AxisTickLineType>(strings, values); |
|
|
|
|
|
|
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getLineStylePaneComponents(), row, col); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Line_Style"), panel); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Axis_Line_Style"), panel); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected LineComboBox createLineComboBox() { |
|
|
|
@ -361,34 +411,34 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
protected Component[][] getLineStylePaneComponents() { |
|
|
|
|
return new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Type")), axisLineStyle}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")), axisLineColor}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Main_Graduation_Line")), mainTick}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Second_Graduation_Line")), secondTick}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Type")), axisLineStyle}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), axisLineColor}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Main_Graduation_Line")), mainTick}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Second_Graduation_Line")), secondTick}, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel createAxisPositionPane(double[] row, double[] col, boolean isXAxis) { |
|
|
|
|
position = new UIButtonGroup<Integer>(getAxisPositionNameArray(isXAxis), getAxisPositionValueArray(isXAxis)); |
|
|
|
|
reversed = new UIButtonGroup<Boolean>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_On"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false}); |
|
|
|
|
reversed = new UIButtonGroup<Boolean>(new String[]{Toolkit.i18nText("Fine-Design_Chart_On"), Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false}); |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
new Component[]{ |
|
|
|
|
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Position")), |
|
|
|
|
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Position")), |
|
|
|
|
UIComponentUtils.wrapWithBorderLayoutPane(position) |
|
|
|
|
}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_AxisReversed")), reversed}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_AxisReversed")), reversed}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), panel); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), panel); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String[] getAxisPositionNameArray(boolean isXAxis) { |
|
|
|
|
if (isXAxis) { |
|
|
|
|
return new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Top"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Vertical_Zero")}; |
|
|
|
|
return new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Top"), Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom"), Toolkit.i18nText("Fine-Design_Chart_Axis_Vertical_Zero")}; |
|
|
|
|
} else { |
|
|
|
|
return new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Left"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Right"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Vertical_Zero")}; |
|
|
|
|
return new String[]{Toolkit.i18nText("Fine-Design_Chart_Layout_Left"), Toolkit.i18nText("Fine-Design_Chart_Layout_Right"), Toolkit.i18nText("Fine-Design_Chart_Axis_Vertical_Zero")}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -403,10 +453,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
protected JPanel createDisplayStrategy() { |
|
|
|
|
//区域显示策略 恢复用注释。删除到return,即除了注释的代码都删除。
|
|
|
|
|
maxProportion = new UISpinner(0, 100, 1, 30); |
|
|
|
|
axisLimitSize = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Limit"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Not_Limit")}); |
|
|
|
|
axisLimitSize = new UIButtonGroup<Integer>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Limit"), Toolkit.i18nText("Fine-Design_Chart_Not_Limit")}); |
|
|
|
|
|
|
|
|
|
JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Size"), axisLimitSize); |
|
|
|
|
maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Max_Proportion"), maxProportion, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Area_Size"), axisLimitSize); |
|
|
|
|
maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Max_Proportion"), maxProportion, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); |
|
|
|
|
JPanel panel = new JPanel(new BorderLayout()); |
|
|
|
|
panel.add(limitSizePane, BorderLayout.NORTH); |
|
|
|
@ -419,7 +469,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Display_Strategy"), panel); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Display_Strategy"), panel); |
|
|
|
|
|
|
|
|
|
//区域显示策略 恢复用注释。取消注释。
|
|
|
|
|
// limitPane = new LimitPane();
|
|
|
|
@ -427,8 +477,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel createValueStylePane() { |
|
|
|
|
valueFormatStyle = new UIButtonGroup<Integer>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Common"), |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom")}); |
|
|
|
|
valueFormatStyle = new UIButtonGroup<Integer>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Common"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Custom")}); |
|
|
|
|
|
|
|
|
|
valueFormat = createFormatPane(); |
|
|
|
|
checkFormatType(); |
|
|
|
@ -436,8 +486,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
htmlLabelPane = new VanChartHtmlLabelPane(); |
|
|
|
|
|
|
|
|
|
centerPane = new JPanel(new CardLayout()); |
|
|
|
|
centerPane.add(valueFormat, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Common")); |
|
|
|
|
centerPane.add(htmlLabelPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom")); |
|
|
|
|
centerPane.add(valueFormat, Toolkit.i18nText("Fine-Design_Chart_Common")); |
|
|
|
|
centerPane.add(htmlLabelPane, Toolkit.i18nText("Fine-Design_Chart_Custom")); |
|
|
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
@ -445,7 +495,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
double[] rowSize = {p, p, p}; |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{null, null}, |
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Format"), SwingConstants.LEFT), valueFormatStyle}, |
|
|
|
|
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Format"), SwingConstants.LEFT), valueFormatStyle}, |
|
|
|
|
new Component[]{null, centerPane}, |
|
|
|
|
}; |
|
|
|
|
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); |
|
|
|
@ -458,7 +508,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Format"), contentPane); |
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Use_Format"), contentPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected FormatPane createFormatPane() { |
|
|
|
@ -480,6 +530,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
protected void checkAllUse() { |
|
|
|
|
checkCardPane(); |
|
|
|
|
checkLabelPane(); |
|
|
|
|
checkLabelGapPane(); |
|
|
|
|
checkTitlePane(); |
|
|
|
|
//区域显示策略 恢复用注释。删除下面一行。
|
|
|
|
|
checkMaxProPortionUse(); |
|
|
|
@ -502,9 +553,9 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
if (centerPane != null && valueFormatStyle != null) { |
|
|
|
|
CardLayout cardLayout = (CardLayout) centerPane.getLayout(); |
|
|
|
|
if (valueFormatStyle.getSelectedIndex() == 1) { |
|
|
|
|
cardLayout.show(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom")); |
|
|
|
|
cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Custom")); |
|
|
|
|
} else { |
|
|
|
|
cardLayout.show(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Common")); |
|
|
|
|
cardLayout.show(centerPane, Toolkit.i18nText("Fine-Design_Chart_Common")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -539,6 +590,16 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
checkLabelGapValuePane(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void checkLabelGapPane() { |
|
|
|
|
boolean visible = true; |
|
|
|
|
|
|
|
|
|
if (showLabelDisplay() && labelDisplayPane != null && labelDisplayComboBox != null) { |
|
|
|
|
visible = labelDisplayComboBox.getSelectedIndex() == 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
labelGapPane.setVisible(visible); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void checkLabelGapValuePane() { |
|
|
|
|
if (labelGapValuePane != null && labelGapStyle != null) { |
|
|
|
|
boolean visible = labelGapStyle.getSelectedIndex() == 1; |
|
|
|
@ -568,7 +629,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public String title4PopupWindow() { |
|
|
|
|
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Category_Axis"); |
|
|
|
|
return Toolkit.i18nText("Fine-Design_Chart_Category_Axis"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -639,6 +700,9 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
// if (overlapHandleTypeGroup != null) {
|
|
|
|
|
// overlapHandleTypeGroup.setSelectedItem(axis.getOverlapHandleType());
|
|
|
|
|
// }
|
|
|
|
|
if (labelDisplayComboBox != null) { |
|
|
|
|
labelDisplayComboBox.populateBean(axis.getLabelDisplay()); |
|
|
|
|
} |
|
|
|
|
if (labelGapStyle != null) { |
|
|
|
|
labelGapStyle.setSelectedIndex(axis.isAutoLabelGap() ? 0 : 1); |
|
|
|
|
} |
|
|
|
@ -775,6 +839,9 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
// if (overlapHandleTypeGroup != null) {
|
|
|
|
|
// axis.setOverlapHandleType(overlapHandleTypeGroup.getSelectedItem());
|
|
|
|
|
// }
|
|
|
|
|
if (labelDisplayComboBox != null) { |
|
|
|
|
axis.setLabelDisplay(labelDisplayComboBox.updateBean()); |
|
|
|
|
} |
|
|
|
|
if (labelGapStyle != null) { |
|
|
|
|
axis.setAutoLabelGap(labelGapStyle.getSelectedIndex() == 0); |
|
|
|
|
} |
|
|
|
|