|
|
@ -3,10 +3,8 @@ package com.fr.van.chart.designer.other.condition.item; |
|
|
|
import com.fr.base.background.ColorBackground; |
|
|
|
import com.fr.base.background.ColorBackground; |
|
|
|
import com.fr.chart.base.AttrBackground; |
|
|
|
import com.fr.chart.base.AttrBackground; |
|
|
|
import com.fr.chart.base.DataSeriesCondition; |
|
|
|
import com.fr.chart.base.DataSeriesCondition; |
|
|
|
import com.fr.design.condition.ConditionAttrSingleConditionPane; |
|
|
|
|
|
|
|
import com.fr.design.condition.ConditionAttributesPane; |
|
|
|
import com.fr.design.condition.ConditionAttributesPane; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.style.background.gradient.FixedGradientBar; |
|
|
|
import com.fr.design.style.background.gradient.FixedGradientBar; |
|
|
@ -20,7 +18,7 @@ import java.awt.Component; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
|
|
|
|
|
|
public class VanChartColumnSeriesColorConditionPane extends ConditionAttrSingleConditionPane<DataSeriesCondition> { |
|
|
|
public class VanChartColumnSeriesColorConditionPane extends AbstractNormalMultiLineConditionPane { |
|
|
|
|
|
|
|
|
|
|
|
private UIButtonGroup matchColorTypeBox; |
|
|
|
private UIButtonGroup matchColorTypeBox; |
|
|
|
|
|
|
|
|
|
|
@ -31,41 +29,47 @@ public class VanChartColumnSeriesColorConditionPane extends ConditionAttrSingleC |
|
|
|
private JPanel colorGradientPane; |
|
|
|
private JPanel colorGradientPane; |
|
|
|
|
|
|
|
|
|
|
|
public VanChartColumnSeriesColorConditionPane(ConditionAttributesPane conditionAttributesPane) { |
|
|
|
public VanChartColumnSeriesColorConditionPane(ConditionAttributesPane conditionAttributesPane) { |
|
|
|
this(conditionAttributesPane, true); |
|
|
|
super(conditionAttributesPane, null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public VanChartColumnSeriesColorConditionPane(ConditionAttributesPane conditionAttributesPane, boolean isRemove) { |
|
|
|
protected String getItemLabelString() { |
|
|
|
super(conditionAttributesPane, isRemove); |
|
|
|
return nameForPopupMenuItem(); |
|
|
|
|
|
|
|
|
|
|
|
if (isRemove) { |
|
|
|
|
|
|
|
this.add(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Match_Color"))); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.add(createComponents()); |
|
|
|
protected JPanel initContentPane() { |
|
|
|
|
|
|
|
colorSelectionBox = new ColorSelectBox(80); |
|
|
|
|
|
|
|
colorGradient = new FixedGradientBar(4, 150); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
colorSelectPane = createJPanelWithComponent(colorSelectionBox); |
|
|
|
|
|
|
|
colorGradientPane = createJPanelWithComponent(colorGradient); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel panel = new JPanel(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
panel.setLayout(new BorderLayout()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
panel.add(initColorButtonPane(), BorderLayout.NORTH); |
|
|
|
|
|
|
|
panel.add(colorSelectPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
panel.add(colorGradientPane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
|
|
initListener(); |
|
|
|
initListener(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return panel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createComponents() { |
|
|
|
private JPanel initColorButtonPane() { |
|
|
|
String[] names = new String[]{ |
|
|
|
String[] names = new String[]{ |
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Solid_Color"), |
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Solid_Color"), |
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Style_TopDownShade") |
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Style_TopDownShade") |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
matchColorTypeBox = new UIButtonGroup(names); |
|
|
|
matchColorTypeBox = new UIButtonGroup(names); |
|
|
|
colorSelectionBox = new ColorSelectBox(80); |
|
|
|
|
|
|
|
colorGradient = new FixedGradientBar(4, 150); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
colorSelectPane = createJPanelWithComponent(colorSelectionBox); |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
colorGradientPane = createJPanelWithComponent(colorGradient); |
|
|
|
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; |
|
|
|
|
|
|
|
|
|
|
|
JPanel panel = new JPanel(); |
|
|
|
Component[][] components = new Component[][]{new Component[]{matchColorTypeBox}}; |
|
|
|
panel.setLayout(new BorderLayout()); |
|
|
|
|
|
|
|
panel.add(createJPanelWithComponent(matchColorTypeBox), BorderLayout.NORTH); |
|
|
|
|
|
|
|
panel.add(colorSelectPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
panel.add(colorGradientPane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return panel; |
|
|
|
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p}, new double[]{e}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void initListener() { |
|
|
|
private void initListener() { |
|
|
@ -137,14 +141,13 @@ public class VanChartColumnSeriesColorConditionPane extends ConditionAttrSingleC |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createJPanelWithComponent(Component component) { |
|
|
|
private JPanel createJPanelWithComponent(Component component) { |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
|
|
|
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; |
|
|
|
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; |
|
|
|
|
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{null, null}, |
|
|
|
new Component[]{null}, |
|
|
|
new Component[]{null, component}, |
|
|
|
new Component[]{component} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p}, new double[]{f, e}); |
|
|
|
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p}, new double[]{e}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |