|
|
@ -13,8 +13,8 @@ import com.fr.design.gui.ibutton.UIToggleButton; |
|
|
|
import com.fr.design.gui.icombobox.LineComboBox; |
|
|
|
import com.fr.design.gui.icombobox.LineComboBox; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ispinner.UISpinner; |
|
|
|
import com.fr.design.gui.ispinner.UISpinner; |
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
|
|
|
|
import com.fr.design.gui.style.FormatPane; |
|
|
|
import com.fr.design.gui.style.FormatPane; |
|
|
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.mainframe.chart.PaneTitleConstants; |
|
|
|
import com.fr.design.mainframe.chart.PaneTitleConstants; |
|
|
@ -23,19 +23,24 @@ import com.fr.design.style.color.ColorSelectBox; |
|
|
|
import com.fr.design.utils.gui.UIComponentUtils; |
|
|
|
import com.fr.design.utils.gui.UIComponentUtils; |
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.base.OverlapHandleType; |
|
|
|
import com.fr.plugin.chart.base.VanChartConstants; |
|
|
|
import com.fr.plugin.chart.base.VanChartConstants; |
|
|
|
import com.fr.plugin.chart.type.AxisTickLineType; |
|
|
|
import com.fr.plugin.chart.type.AxisTickLineType; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.CoreConstants; |
|
|
|
import com.fr.stable.CoreConstants; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
|
|
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
|
|
import com.fr.van.chart.designer.component.VanChartHtmlLabelPane; |
|
|
|
import com.fr.van.chart.designer.component.VanChartHtmlLabelPane; |
|
|
|
import com.fr.van.chart.designer.style.VanChartStylePane; |
|
|
|
import com.fr.van.chart.designer.style.VanChartStylePane; |
|
|
|
|
|
|
|
import com.fr.van.chart.designer.style.component.LimitPane; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.SwingConstants; |
|
|
|
import javax.swing.SwingConstants; |
|
|
|
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.CardLayout; |
|
|
|
import java.awt.CardLayout; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
@ -58,10 +63,14 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
protected UIButtonGroup showLabel; |
|
|
|
protected UIButtonGroup showLabel; |
|
|
|
protected ChartTextAttrPane labelTextAttrPane; |
|
|
|
protected ChartTextAttrPane labelTextAttrPane; |
|
|
|
protected UINumberDragPane labelTextRotation; |
|
|
|
protected UINumberDragPane labelTextRotation; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private UIButtonGroup<OverlapHandleType> overlapHandleTypeGroup; |
|
|
|
protected UIButtonGroup<Integer> labelGapStyle; |
|
|
|
protected UIButtonGroup<Integer> labelGapStyle; |
|
|
|
protected UITextField labelGapValue; |
|
|
|
protected UISpinner labelGapValue; |
|
|
|
protected JPanel labelPanel; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected JPanel labelPanel; |
|
|
|
|
|
|
|
private JPanel labelGapStylePane; |
|
|
|
|
|
|
|
private JPanel labelGapValuePane; |
|
|
|
|
|
|
|
|
|
|
|
protected LineComboBox axisLineStyle; |
|
|
|
protected LineComboBox axisLineStyle; |
|
|
|
protected ColorSelectBox axisLineColor; |
|
|
|
protected ColorSelectBox axisLineColor; |
|
|
@ -71,15 +80,12 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
protected UIButtonGroup<Integer> position; |
|
|
|
protected UIButtonGroup<Integer> position; |
|
|
|
protected UIButtonGroup<Boolean> reversed; |
|
|
|
protected UIButtonGroup<Boolean> reversed; |
|
|
|
|
|
|
|
|
|
|
|
protected UIButtonGroup<Integer> axisLimitSize; |
|
|
|
private LimitPane limitPane; |
|
|
|
protected UISpinner maxProportion; |
|
|
|
|
|
|
|
protected JPanel maxProportionPane; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected UIButtonGroup valueFormatStyle; |
|
|
|
protected UIButtonGroup valueFormatStyle; |
|
|
|
protected FormatPane valueFormat; |
|
|
|
protected FormatPane valueFormat; |
|
|
|
protected JPanel centerPane; |
|
|
|
protected JPanel centerPane; |
|
|
|
private VanChartHtmlLabelPane htmlLabelPane; |
|
|
|
private VanChartHtmlLabelPane htmlLabelPane; |
|
|
|
private JPanel labelGapValuePane; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public VanChartBaseAxisPane(){ |
|
|
|
public VanChartBaseAxisPane(){ |
|
|
|
this(true); |
|
|
|
this(true); |
|
|
@ -166,32 +172,22 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createLabelPane(double[] row, double[] col){ |
|
|
|
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[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Show"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hidden")}); |
|
|
|
labelTextAttrPane = getChartTextAttrPane(); |
|
|
|
labelTextAttrPane = getChartTextAttrPane(); |
|
|
|
|
|
|
|
|
|
|
|
labelTextRotation = new UINumberDragPane(-ROTATION_MAX,ROTATION_MAX); |
|
|
|
JPanel rotationPane = createLabelRotationPane(col); |
|
|
|
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")}); |
|
|
|
JPanel overlapPane = createLabelOverlapPane(); |
|
|
|
labelGapValue = new UITextField(); |
|
|
|
|
|
|
|
Component[][] gapComponents = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{ |
|
|
|
|
|
|
|
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.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}, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
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[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{labelTextAttrPane, null}, |
|
|
|
new Component[]{labelTextAttrPane, null}, |
|
|
|
new Component[]{gapPanel,null}, |
|
|
|
new Component[]{rotationPane, null}, |
|
|
|
|
|
|
|
new Component[]{overlapPane, null}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Label"),showLabel); |
|
|
|
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Label"),showLabel); |
|
|
|
labelPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); |
|
|
|
labelPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p}, col); |
|
|
|
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0)); |
|
|
|
labelPanel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0)); |
|
|
|
showLabel.addActionListener(new ActionListener() { |
|
|
|
showLabel.addActionListener(new ActionListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -199,16 +195,61 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
checkLabelPane(); |
|
|
|
checkLabelPane(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel createLabelRotationPane(double[] col) { |
|
|
|
|
|
|
|
labelTextRotation = new UINumberDragPane(-ROTATION_MAX, ROTATION_MAX); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Component[][] gapComponents = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{ |
|
|
|
|
|
|
|
FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_TextRotation")), |
|
|
|
|
|
|
|
UIComponentUtils.wrapWithBorderLayoutPane(labelTextRotation) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, new double[]{TableLayout.PREFERRED}, col); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel createLabelOverlapPane() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
labelGapStyle = new UIButtonGroup<Integer>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Automatic"), Toolkit.i18nText("Fine-Design_Chart_Fixed")}); |
|
|
|
|
|
|
|
labelGapStylePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Label_Interval"), labelGapStyle, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
labelGapValue = new UISpinner(0, Integer.MAX_VALUE, 1, 1); |
|
|
|
|
|
|
|
labelGapValuePane = TableLayout4VanChartHelper.createGapTableLayoutPane(StringUtils.EMPTY, labelGapValue, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel panel = new JPanel(new BorderLayout(0, 0)); |
|
|
|
|
|
|
|
addOverlapGroupButton(panel); |
|
|
|
|
|
|
|
panel.add(labelGapStylePane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
panel.add(labelGapValuePane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
|
|
labelGapStyle.addActionListener(new ActionListener() { |
|
|
|
labelGapStyle.addActionListener(new ActionListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
checkLabelGapValuePane(); |
|
|
|
checkLabelGapValuePane(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
JPanel jPanel = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
jPanel.add(showLabelPane, BorderLayout.NORTH); |
|
|
|
return panel; |
|
|
|
jPanel.add(labelPanel, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, jPanel); |
|
|
|
|
|
|
|
|
|
|
|
protected void addOverlapGroupButton(JPanel panel) { |
|
|
|
|
|
|
|
overlapHandleTypeGroup = new UIButtonGroup<OverlapHandleType>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Label_OverlapAbbreviate"), Toolkit.i18nText("Fine-Design_Chart_Label_OverlapInterval")}, |
|
|
|
|
|
|
|
new OverlapHandleType[]{OverlapHandleType.ABBREVIATE, OverlapHandleType.INTERVAL}); |
|
|
|
|
|
|
|
JPanel north = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Label_WhenOverlap"), overlapHandleTypeGroup, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
panel.add(north, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overlapHandleTypeGroup.addChangeListener(new ChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
|
|
|
checkLabelGapAndStylePane(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected ChartTextAttrPane getChartTextAttrPane(){ |
|
|
|
protected ChartTextAttrPane getChartTextAttrPane(){ |
|
|
@ -286,24 +327,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createDisplayStrategy(double[] row, double[] col){ |
|
|
|
protected JPanel createDisplayStrategy(double[] row, double[] col){ |
|
|
|
maxProportion = new UISpinner(0,100,1,30); |
|
|
|
limitPane = new LimitPane(); |
|
|
|
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")}); |
|
|
|
return limitPane; |
|
|
|
|
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); |
|
|
|
|
|
|
|
JPanel panel = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
panel.add(limitSizePane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
panel.add(maxProportionPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
axisLimitSize.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
checkMaxProPortionUse(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Display_Strategy"), panel); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createValueStylePane(){ |
|
|
|
protected JPanel createValueStylePane(){ |
|
|
@ -360,7 +385,6 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
protected void checkAllUse() { |
|
|
|
protected void checkAllUse() { |
|
|
|
checkCardPane(); |
|
|
|
checkCardPane(); |
|
|
|
checkLabelPane(); |
|
|
|
checkLabelPane(); |
|
|
|
checkMaxProPortionUse(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void checkCardPane() { |
|
|
|
protected void checkCardPane() { |
|
|
@ -381,24 +405,31 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
labelPanel.setVisible(enabled); |
|
|
|
labelPanel.setVisible(enabled); |
|
|
|
} |
|
|
|
} |
|
|
|
if(enabled){ |
|
|
|
if(enabled){ |
|
|
|
checkLabelGapValuePane(); |
|
|
|
checkLabelGapAndStylePane(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void checkLabelGapValuePane() { |
|
|
|
private void checkLabelGapAndStylePane() { |
|
|
|
if(labelGapValuePane != null && labelGapStyle != null){ |
|
|
|
if (overlapHandleTypeGroup != null && labelGapStylePane != null) { |
|
|
|
labelGapValuePane.setVisible(labelGapStyle.getSelectedIndex() == 1); |
|
|
|
boolean visible = overlapHandleTypeGroup.getSelectedItem() == OverlapHandleType.INTERVAL; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
labelGapStylePane.setVisible(visible); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
checkLabelGapValuePane(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//检查最大显示占比是否可用
|
|
|
|
protected void checkLabelGapValuePane() { |
|
|
|
private void checkMaxProPortionUse() { |
|
|
|
if (labelGapValuePane != null && labelGapStyle != null) { |
|
|
|
if(maxProportionPane != null && axisLimitSize != null){ |
|
|
|
boolean visible = labelGapStyle.getSelectedIndex() == 1; |
|
|
|
maxProportionPane.setVisible(axisLimitSize.getSelectedIndex() == 0 && axisLimitSize.isEnabled()); |
|
|
|
if (overlapHandleTypeGroup != null) { |
|
|
|
|
|
|
|
visible = visible && overlapHandleTypeGroup.getSelectedItem() == OverlapHandleType.INTERVAL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
labelGapValuePane.setVisible(visible); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 是否是指定类型 |
|
|
|
* 是否是指定类型 |
|
|
|
* @param ob 对象 |
|
|
|
* @param ob 对象 |
|
|
@ -477,11 +508,14 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
if(labelTextRotation != null){ |
|
|
|
if(labelTextRotation != null){ |
|
|
|
labelTextRotation.populateBean((double)labelTextAttr.getRotation()); |
|
|
|
labelTextRotation.populateBean((double)labelTextAttr.getRotation()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (overlapHandleTypeGroup != null) { |
|
|
|
|
|
|
|
overlapHandleTypeGroup.setSelectedItem(axis.getOverlapHandleType()); |
|
|
|
|
|
|
|
} |
|
|
|
if(labelGapStyle != null){ |
|
|
|
if(labelGapStyle != null){ |
|
|
|
labelGapStyle.setSelectedIndex(axis.isAutoLabelGap() ? 0 : 1); |
|
|
|
labelGapStyle.setSelectedIndex(axis.isAutoLabelGap() ? 0 : 1); |
|
|
|
} |
|
|
|
} |
|
|
|
if(labelGapValue != null){ |
|
|
|
if(labelGapValue != null){ |
|
|
|
labelGapValue.setText(axis.getLabelNumber().getContent()); |
|
|
|
labelGapValue.setValue(axis.getIntervalNumber()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -516,13 +550,9 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
|
|
|
|
|
|
|
|
//显示策略
|
|
|
|
//显示策略
|
|
|
|
private void populateDisplayStrategy(VanChartAxis axis) { |
|
|
|
private void populateDisplayStrategy(VanChartAxis axis) { |
|
|
|
if(axisLimitSize != null){ |
|
|
|
if (limitPane != null) { |
|
|
|
axisLimitSize.setSelectedIndex(axis.isLimitSize() ? 0 : 1); |
|
|
|
limitPane.populateBean(axis.getLimitAttribute()); |
|
|
|
} |
|
|
|
} |
|
|
|
if(maxProportion != null){ |
|
|
|
|
|
|
|
maxProportion.setValue(axis.getMaxHeight()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//格式
|
|
|
|
//格式
|
|
|
@ -597,15 +627,14 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
if(labelTextRotation != null){ |
|
|
|
if(labelTextRotation != null){ |
|
|
|
labelTextAttr.setRotation(labelTextRotation.updateBean().intValue()); |
|
|
|
labelTextAttr.setRotation(labelTextRotation.updateBean().intValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (overlapHandleTypeGroup != null) { |
|
|
|
|
|
|
|
axis.setOverlapHandleType(overlapHandleTypeGroup.getSelectedItem()); |
|
|
|
|
|
|
|
} |
|
|
|
if(labelGapStyle != null){ |
|
|
|
if(labelGapStyle != null){ |
|
|
|
axis.setAutoLabelGap(labelGapStyle.getSelectedIndex() == 0); |
|
|
|
axis.setAutoLabelGap(labelGapStyle.getSelectedIndex() == 0); |
|
|
|
} |
|
|
|
} |
|
|
|
if(labelGapValue != null){ |
|
|
|
if(labelGapValue != null){ |
|
|
|
if(axis.isAutoLabelGap()){ |
|
|
|
axis.setIntervalNumber((int) labelGapValue.getValue()); |
|
|
|
axis.setLabelIntervalNumber(BaseFormula.createFormulaBuilder().build("1")); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
axis.setLabelIntervalNumber(BaseFormula.createFormulaBuilder().build(labelGapValue.getText())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -637,11 +666,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> { |
|
|
|
|
|
|
|
|
|
|
|
//显示策略
|
|
|
|
//显示策略
|
|
|
|
private void updateDisplayStrategy(VanChartAxis axis){ |
|
|
|
private void updateDisplayStrategy(VanChartAxis axis){ |
|
|
|
if(axisLimitSize != null){ |
|
|
|
if (limitPane != null) { |
|
|
|
axis.setLimitSize(axisLimitSize.getSelectedIndex() == 0); |
|
|
|
axis.setLimitAttribute(limitPane.updateBean()); |
|
|
|
} |
|
|
|
|
|
|
|
if(maxProportion != null){ |
|
|
|
|
|
|
|
axis.setMaxHeight(maxProportion.getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|