|
|
@ -1,9 +1,9 @@ |
|
|
|
package com.fr.van.chart.range.component; |
|
|
|
package com.fr.van.chart.range.component; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.chart.chartglyph.MapHotAreaColor; |
|
|
|
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; |
|
|
|
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; |
|
|
|
import com.fr.design.gui.ilable.BoldFontTextLabel; |
|
|
|
import com.fr.design.gui.ilable.BoldFontTextLabel; |
|
|
|
import com.fr.design.mainframe.chart.gui.style.series.MapColorPickerPaneWithFormula; |
|
|
|
import com.fr.design.mainframe.chart.gui.style.series.MapColorPickerPaneWithFormula; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
|
|
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
@ -16,7 +16,7 @@ import java.awt.Dimension; |
|
|
|
* Created by Mitisky on 16/10/20. |
|
|
|
* Created by Mitisky on 16/10/20. |
|
|
|
* 没有主题颜色,自动的时候没有划分阶段 |
|
|
|
* 没有主题颜色,自动的时候没有划分阶段 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithFormula{ |
|
|
|
public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithFormula { |
|
|
|
private BoldFontTextLabel numLabel; |
|
|
|
private BoldFontTextLabel numLabel; |
|
|
|
|
|
|
|
|
|
|
|
public SectionIntervalConfigPaneWithOutNum(AbstractAttrNoScrollPane container) { |
|
|
|
public SectionIntervalConfigPaneWithOutNum(AbstractAttrNoScrollPane container) { |
|
|
@ -24,7 +24,7 @@ public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithF |
|
|
|
getDesignTypeButtonGroup().addChangeListener(new ChangeListener() { |
|
|
|
getDesignTypeButtonGroup().addChangeListener(new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
if(getDesignTypeButtonGroup().getSelectedIndex() == 0){ |
|
|
|
if (getDesignTypeButtonGroup().getSelectedIndex() == 0) { |
|
|
|
setRegionVisible(false); |
|
|
|
setRegionVisible(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
setRegionVisible(true); |
|
|
|
setRegionVisible(true); |
|
|
@ -33,15 +33,16 @@ public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithF |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected JPanel getUpControlPane (Component[][] components) { |
|
|
|
@Override |
|
|
|
|
|
|
|
protected JPanel getUpControlPane(Component[][] components) { |
|
|
|
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; |
|
|
|
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; |
|
|
|
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; |
|
|
|
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; |
|
|
|
double[] columnSize = {d, e}; |
|
|
|
double[] columnSize = {d, e}; |
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze (), columnSize); |
|
|
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, getRowSIze(), columnSize); |
|
|
|
return panel; |
|
|
|
return panel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void setRegionVisible(boolean visible){ |
|
|
|
private void setRegionVisible(boolean visible) { |
|
|
|
getRegionNumPane().setVisible(visible); |
|
|
|
getRegionNumPane().setVisible(visible); |
|
|
|
numLabel.setVisible(visible); |
|
|
|
numLabel.setVisible(visible); |
|
|
|
} |
|
|
|
} |
|
|
@ -53,13 +54,20 @@ public class SectionIntervalConfigPaneWithOutNum extends MapColorPickerPaneWithF |
|
|
|
setRegionVisible(false); |
|
|
|
setRegionVisible(false); |
|
|
|
|
|
|
|
|
|
|
|
return new Component[][]{ |
|
|
|
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()}, |
|
|
|
new Component[]{numLabel, getRegionNumPane()}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Dimension getPreferredSize(){ |
|
|
|
@Override |
|
|
|
|
|
|
|
public Dimension getPreferredSize() { |
|
|
|
Dimension dim = super.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() - (numLabel.isVisible() ? 0 : 30)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void populateBean(MapHotAreaColor hotAreaColor) { |
|
|
|
|
|
|
|
super.populateBean(hotAreaColor); |
|
|
|
|
|
|
|
setRegionVisible(hotAreaColor.getUseType() == 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|