From 6f1fa596446448698da5ba8afbf7bea36f38b0da Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Sun, 30 Sep 2018 11:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=8C=BA=E9=97=B4=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=9C=80=E4=B8=8B=E9=9D=A2=E9=A2=9C=E8=89=B2=E8=A2=AB=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SectionIntervalConfigPaneWithOutNum.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/range/component/SectionIntervalConfigPaneWithOutNum.java b/designer-chart/src/main/java/com/fr/van/chart/range/component/SectionIntervalConfigPaneWithOutNum.java index eff506062..1c8cfdb46 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/range/component/SectionIntervalConfigPaneWithOutNum.java +++ b/designer-chart/src/main/java/com/fr/van/chart/range/component/SectionIntervalConfigPaneWithOutNum.java @@ -3,7 +3,6 @@ package com.fr.van.chart.range.component; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.mainframe.chart.gui.style.series.MapColorPickerPaneWithFormula; - import com.fr.van.chart.designer.TableLayout4VanChartHelper; import javax.swing.JPanel; @@ -16,7 +15,7 @@ import java.awt.Dimension; * Created by Mitisky on 16/10/20. * 没有主题颜色,自动的时候没有划分阶段 */ -public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithFormula{ +public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithFormula { private BoldFontTextLabel numLabel; public SectionIntervalConfigPaneWithOutNum(AbstractAttrNoScrollPane container) { @@ -24,7 +23,7 @@ public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithF getDesignTypeButtonGroup().addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - if(getDesignTypeButtonGroup().getSelectedIndex() == 0){ + if (getDesignTypeButtonGroup().getSelectedIndex() == 0) { setRegionVisible(false); } else { setRegionVisible(true); @@ -33,15 +32,16 @@ public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithF }); } - protected JPanel getUpControlPane (Component[][] components) { + @Override + protected JPanel getUpControlPane(Component[][] components) { double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double[] columnSize = {d, e}; - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze (), columnSize); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze(), columnSize); return panel; } - private void setRegionVisible(boolean visible){ + private void setRegionVisible(boolean visible) { getRegionNumPane().setVisible(visible); numLabel.setVisible(visible); } @@ -53,13 +53,14 @@ public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithF setRegionVisible(false); return new Component[][]{ - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Range_Num")),getDesignTypeButtonGroup()}, + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Range_Num")), getDesignTypeButtonGroup()}, new Component[]{numLabel, getRegionNumPane()}, }; } - public Dimension getPreferredSize(){ + @Override + public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); - return new Dimension((int)dim.getWidth(), (int) dim.getHeight() - (numLabel.isVisible() ? 0 : 30)); + return new Dimension((int) dim.getWidth(), (int) dim.getHeight() - (getDesignTypeButtonGroup().getSelectedIndex() == 1 ? 0 : 30)); } }