白岳
4 years ago
10 changed files with 115 additions and 61 deletions
@ -1,49 +0,0 @@
|
||||
package com.fr.van.chart.designer.component.background; |
||||
|
||||
import com.fr.chart.chartglyph.GeneralInfo; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane; |
||||
import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane; |
||||
import com.fr.design.mainframe.backgroundpane.VanChartGradientPane; |
||||
|
||||
/** |
||||
* @author Bjorn |
||||
* @version 10.0 |
||||
* Created by Bjorn on 2020-09-11 |
||||
*/ |
||||
public class VanChartBackgroundPaneWithAutoColor extends VanChartBackgroundPane { |
||||
|
||||
private static final int AUTO = 0; |
||||
|
||||
public VanChartBackgroundPaneWithAutoColor() { |
||||
super(); |
||||
} |
||||
|
||||
protected void initList() { |
||||
paneList.add(new NullBackgroundQuickPane() { |
||||
public String title4PopupWindow() { |
||||
return Toolkit.i18nText("Fine-Design_Chart_Automatic"); |
||||
} |
||||
}); |
||||
paneList.add(new NullBackgroundQuickPane()); |
||||
paneList.add(new ColorBackgroundQuickPane()); |
||||
paneList.add(new VanChartGradientPane()); |
||||
} |
||||
|
||||
public void populateBackground(GeneralInfo attr, int begin) { |
||||
if (attr.isAutoBackground()) { |
||||
typeComboBox.setSelectedIndex(AUTO); |
||||
return; |
||||
} |
||||
super.populateBackground(attr, begin + 1); |
||||
} |
||||
|
||||
public void updateBackground(GeneralInfo attr) { |
||||
if (typeComboBox.getSelectedIndex() == AUTO) { |
||||
attr.setAutoBackground(true); |
||||
return; |
||||
} |
||||
attr.setAutoBackground(false); |
||||
super.updateBackground(attr); |
||||
} |
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.fr.van.chart.designer.style; |
||||
|
||||
import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutShadowWithRadiusPane; |
||||
|
||||
/** |
||||
* @author Bjorn |
||||
* @version 10.0 |
||||
* Created by Bjorn on 2020-10-20 |
||||
*/ |
||||
public class VanChartTitleWithAutoBackground extends VanChartTitlePane { |
||||
|
||||
public VanChartTitleWithAutoBackground(VanChartStylePane parent) { |
||||
super(parent); |
||||
} |
||||
|
||||
protected VanChartBackgroundWithOutShadowWithRadiusPane createBackgroundPane() { |
||||
return new VanChartBackgroundWithOutShadowWithRadiusPane(true); |
||||
} |
||||
} |
Loading…
Reference in new issue