|
|
|
@ -208,6 +208,23 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel createLabelPane(double[] row, double[] col) { |
|
|
|
|
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(); |
|
|
|
@ -218,7 +235,9 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
labelTextRotation = new UINumberDragPane(-ROTATION_MAX, ROTATION_MAX); |
|
|
|
|
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[]{ |
|
|
|
@ -231,42 +250,48 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
|
|
|
|
|
JPanel gapDetailPane = TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, row, col); |
|
|
|
|
labelGapValuePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText(""), labelGapValue, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
|
|
|
|
|
labelGapPane = new JPanel(new BorderLayout()); |
|
|
|
|
labelGapPane.add(gapDetailPane, BorderLayout.CENTER); |
|
|
|
|
labelGapPane.add(labelGapValuePane, BorderLayout.SOUTH); |
|
|
|
|
JPanel panel = new JPanel(new BorderLayout()); |
|
|
|
|
panel.add(gapDetailPane, BorderLayout.CENTER); |
|
|
|
|
panel.add(labelGapValuePane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label"), showLabel); |
|
|
|
|
return panel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createLabelDetailPanel() { |
|
|
|
|
JPanel panel = new JPanel(new BorderLayout()); |
|
|
|
|
panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); |
|
|
|
|
|
|
|
|
|
labelPanel = new JPanel(new BorderLayout()); |
|
|
|
|
labelPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); |
|
|
|
|
labelPanel.add(labelDisplayPane, BorderLayout.NORTH); |
|
|
|
|
labelPanel.add(labelTextAttrPane, BorderLayout.CENTER); |
|
|
|
|
labelPanel.add(labelGapPane, BorderLayout.SOUTH); |
|
|
|
|
panel.add(labelDisplayPane, BorderLayout.NORTH); |
|
|
|
|
panel.add(labelTextAttrPane, BorderLayout.CENTER); |
|
|
|
|
panel.add(labelGapPane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
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 labelPane = new JPanel(new BorderLayout()); |
|
|
|
|
labelPane.add(showLabelPane, BorderLayout.NORTH); |
|
|
|
|
labelPane.add(labelPanel, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, labelPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// protected JPanel createLabelPane(double[] row, double[] col){
|
|
|
|
|