Browse Source

Merge pull request #1273 in BA/design from ~MANGO/m_design:release/9.0 to release/9.0

* commit '50756270be6f6567b6e500203b9185b107b07b27':
  格式化代码
  添加超链过滤helper类,处理单元格、图表超链下拉选项
  修改雷达图警戒线、间隔背景bug 聚合报表和表单中,添加对超链下拉选项的过滤 更换不透明度控件,修改组件bug
master
superman 7 years ago
parent
commit
5a70acacf4
  1. 59
      designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java
  2. 21
      designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java
  3. 25
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  4. 61
      designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java
  5. 6
      designer_base/src/com/fr/design/gui/style/NumberDragBar.java
  6. 27
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java
  7. 20
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  8. 11
      designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java
  9. 11
      designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java
  10. 12
      designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java
  11. 22
      designer_chart/src/com/fr/plugin/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java

59
designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java

@ -0,0 +1,59 @@
package com.fr.design.gui;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.BaseJForm;
import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
/**
* Created by mengao on 2017/9/22.
* 单元格超链图表超链在不同类型模版中下拉选项不同
*/
public class HyperlinkFilterHelper {
public static boolean whetherAddHyperlink4cell(String itemName) {
JTemplate jTemplate = getCurrentEditingTemplate();
if (jTemplate == null) {
return false;
}
//先屏蔽掉这个,之后还有别的
String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float")};
for (String name : names) {
if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) {
return false;
}
}
return whetherAddFormLink(jTemplate, itemName);
}
public static boolean whetherAddHyperlink4Chart(String itemName) {
JTemplate jTemplate = getCurrentEditingTemplate();
if (jTemplate == null) {
return false;
}
//先屏蔽掉这个,之后还有别的
String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float"), Inter.getLocText("FR-Hyperlink_Chart_Cell")};
for (String name : names) {
if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) {
if (jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])) {
//表单报表块中图表悬浮元素超链,只屏蔽联动悬浮元素
return false;
} else if (jTemplate.getEditingReportIndex() == BaseJForm.FORM_TAB) {
//表单图表超链屏蔽掉联动悬浮元素和联动单元格
return false;
}
}
}
return whetherAddFormLink(jTemplate, itemName);
}
private static JTemplate getCurrentEditingTemplate() {
return HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
}
private static boolean whetherAddFormLink(JTemplate jTemplate, String itemName) {
String formName = Inter.getLocText("Hyperlink-Form_link");
return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName));
}
}

21
designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java

@ -8,13 +8,12 @@ import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.HyperlinkFilterHelper;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilist.JNameEdList;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.ilist.ModNameActionListener;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.LineSeparator;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
@ -384,7 +383,7 @@ public abstract class JListControlPane extends JControlPane {
private void wrapActionListener(NameableCreator[] creators) {
for (final NameableCreator creator : creators) {
if (!whetherAdd(creator.menuName())) {
if (!HyperlinkFilterHelper.whetherAddHyperlink4cell(creator.menuName())) {
continue;
}
boolean isTrue = ComparatorUtils.equals(creator.menuName(), Inter.getLocText("Datasource-Stored_Procedure")) ||
@ -414,22 +413,6 @@ public abstract class JListControlPane extends JControlPane {
});
}
}
private boolean whetherAdd(String itemName) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate == null) {
return false;
}
//先屏蔽掉这个,之后还有别的
String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float")};
for (String name : names) {
if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) {
return false;
}
}
String formName = Inter.getLocText("Hyperlink-Form_link");
return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName));
}
}
/*

25
designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java

@ -11,7 +11,7 @@ import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.HyperlinkFilterHelper;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilist.ListModelElement;
@ -19,7 +19,6 @@ import com.fr.design.gui.ilist.ModNameActionListener;
import com.fr.design.gui.ilist.UINameEdList;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.LineSeparator;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
@ -162,11 +161,15 @@ public abstract class UIListControlPane extends UIControlPane {
if (creators.length == 1) {
addItemShortCut = new AddItemUpdateAction(creators);
} else {
addItemShortCut = new AddItemMenuDef(creators);
addItemShortCut = getAddItemMenuDef(creators);
}
return new AbsoluteEnableShortCut(addItemShortCut);
}
protected AddItemMenuDef getAddItemMenuDef (NameableCreator[] creators) {
return new AddItemMenuDef(creators);
}
@Override
protected ShortCut4JControlPane removeItemShortCut() {
return new NormalEnableShortCut(new RemoveItemAction());
@ -557,20 +560,8 @@ public abstract class UIListControlPane extends UIControlPane {
}
}
private boolean whetherAdd(String itemName) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate == null) {
return false;
}
//先屏蔽掉这个,之后还有别的
String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float")};
for (String name : names) {
if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) {
return false;
}
}
String formName = Inter.getLocText("Hyperlink-Form_link");
return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName));
protected boolean whetherAdd(String itemName){
return HyperlinkFilterHelper.whetherAddHyperlink4cell(itemName);
}
}

61
designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java

@ -1,28 +1,14 @@
package com.fr.design.gui.frpane;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.LayoutManager;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.UIDialog;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.HyperlinkFilterHelper;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
@ -30,11 +16,7 @@ import com.fr.design.gui.imenutable.UIMenuTable;
import com.fr.design.hyperlink.ReportletHyperlinkPane;
import com.fr.design.hyperlink.WebHyperlinkPane;
import com.fr.design.javascript.EmailPane;
import com.fr.design.mainframe.BaseJForm;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.UIDialog;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.js.AbstractJavaScript;
@ -43,7 +25,15 @@ import com.fr.js.ReportletHyperlink;
import com.fr.js.WebHyperlink;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
public class UICorrelationComboBoxPane extends JPanel implements UIObserver {
private static final Dimension DIALOG_SIZE = new Dimension(500, 500);
@ -98,7 +88,7 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver {
if (values.size() > 1) {
for (UIMenuNameableCreator value : values) {
final String itemName = value.getName();
if(!whetherAdd(itemName)){
if(!HyperlinkFilterHelper.whetherAddHyperlink4Chart(itemName)){
continue;
}
UIMenuItem item = new UIMenuItem(itemName);
@ -135,25 +125,6 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver {
initAddButtonListener();
}
private boolean whetherAdd(String itemName){
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
//先屏蔽掉这个,之后还有别的
String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float"), Inter.getLocText("FR-Hyperlink_Chart_Cell")};
for (String name : names){
if(!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName,name)){
if(jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])){
//表单报表块中图表悬浮元素超链,只屏蔽联动悬浮元素
return false;
} else if(jTemplate.getEditingReportIndex() == BaseJForm.FORM_TAB) {
//表单图表超链屏蔽掉联动悬浮元素和联动单元格
return false;
}
}
}
String formName = Inter.getLocText("Hyperlink-Form_link");
return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName));
}
private String createUnrepeatedName(String prefix) {
List<UIMenuNameableCreator> all = tablePane.updateBean();
// richer:生成的名字从1开始. kunsnat: 添加属性从0开始.

6
designer_base/src/com/fr/design/gui/style/NumberDragBar.java

@ -53,6 +53,8 @@ public class NumberDragBar extends JComponent {
@Override
protected void paintComponent(Graphics g) {
int width = this.getWidth();
//x值在这里计算,setValue时,有时会因为组件还没画,获取到的是0
x = (value - minValue) * (width - WIDTH_ADJUST) / (maxValue - minValue) + X_ADJUST;
Graphics2D g2 = (Graphics2D)g;
RenderingHints qualityHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
qualityHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
@ -118,8 +120,8 @@ public class NumberDragBar extends JComponent {
if(getWidth() <= 0) {
Thread.sleep(500);
}
int width = getWidth();
x = (value - minValue) * (width - WIDTH_ADJUST) / (maxValue - minValue) + X_ADJUST;
// int width = getWidth();
// x = (value - minValue) * (width - WIDTH_ADJUST) / (maxValue - minValue) + X_ADJUST;
validate();
repaint();
revalidate();

27
designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java

@ -4,20 +4,26 @@ import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.style.AlphaPane;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
/**
* @author richie
* @date 2015-03-26
* @since 8.0
*/
public class LabelAlphaPane extends ConditionAttrSingleConditionPane<DataSeriesCondition> {
private static final int ALPHASIZE = 100;
private static final double ALPHASIZE = 100.0;
private static final int PANEL_WIDTH = 200;
private static final int PANEL_HIGHT = 20;
private UILabel nameLabel;
private AlphaPane alphaPane;
private UINumberDragPane alphaPane;
private AttrAlpha attrAlpha = new AttrAlpha();
@ -25,10 +31,17 @@ public class LabelAlphaPane extends ConditionAttrSingleConditionPane<DataSeriesC
super(conditionAttributesPane, true);
nameLabel = new UILabel(Inter.getLocText("ChartF-Alpha"));
alphaPane = new AlphaPane();
UILabel label = new UILabel(Inter.getLocText("ChartF-Alpha") + ":");
alphaPane = new UINumberDragPane(0, ALPHASIZE);
JPanel panel = new JPanel(new BorderLayout());
panel.add(label, BorderLayout.WEST);
panel.add(alphaPane, BorderLayout.CENTER);
panel.setPreferredSize(new Dimension(PANEL_WIDTH, PANEL_HIGHT));
this.add(nameLabel);
this.add(alphaPane);
this.add(panel);
}
@Override
@ -44,12 +57,12 @@ public class LabelAlphaPane extends ConditionAttrSingleConditionPane<DataSeriesC
public void populate(DataSeriesCondition condition) {
if (condition instanceof AttrAlpha) {
attrAlpha = (AttrAlpha) condition;
alphaPane.populate((int) (attrAlpha.getAlpha() * ALPHASIZE));
alphaPane.populateBean(attrAlpha.getAlpha() * ALPHASIZE);
}
}
public DataSeriesCondition update() {
attrAlpha.setAlpha(this.alphaPane.update());
attrAlpha.setAlpha((float) (this.alphaPane.updateBean() / ALPHASIZE));
return attrAlpha;
}

20
designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java

@ -8,6 +8,7 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.HyperlinkFilterHelper;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.imenutable.UIMenuNameableCreator;
@ -75,6 +76,11 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
return Inter.getLocText("FR-Designer_Add_Hyperlink");
}
@Override
protected AddItemMenuDef getAddItemMenuDef (NameableCreator[] creators) {
return new AddVanChartItemMenuDef(creators);
}
public void populate(NameJavaScriptGroup nameHyperlink_array) {
java.util.List<NameObject> list = new ArrayList<NameObject>();
if (nameHyperlink_array != null) {
@ -218,4 +224,18 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
}
return null;
}
protected class AddVanChartItemMenuDef extends AddItemMenuDef {
public AddVanChartItemMenuDef(NameableCreator[] creators) {
super(creators);
}
@Override
protected boolean whetherAdd(String itemName) {
return HyperlinkFilterHelper.whetherAddHyperlink4Chart(itemName);
}
}
}

11
designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java

@ -1,6 +1,7 @@
package com.fr.plugin.chart.designer.style.background;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.ComparatorUtils;
@ -52,7 +53,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList);
ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(axisNames, Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, VanChartAlertValuePane.class)};
ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(getAlertAxisName(axisNames), Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, getAlertPaneClass())};
refreshNameableCreator(creators);
@ -111,4 +112,12 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
axis.setAlertValues(axisAlerts);
}
}
protected Class<? extends BasicBeanPane> getAlertPaneClass() {
return VanChartAlertValuePane.class;
}
protected String[] getAlertAxisName(String[] axisNames) {
return axisNames;
}
}

11
designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java

@ -1,6 +1,7 @@
package com.fr.plugin.chart.designer.style.background;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.ComparatorUtils;
@ -54,7 +55,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList);
BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(axisNames, Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, VanChartCustomIntervalBackgroundPane.class)};
BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(getCustomIntervalBackgroundAxisName(axisNames), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, getIntervalPaneClass())};
refreshNameableCreator(creators);
@ -123,4 +124,12 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
axis.setCustomIntervalBackgroundArray(axisCustomBackground);
}
}
protected Class<? extends BasicBeanPane> getIntervalPaneClass() {
return VanChartCustomIntervalBackgroundPane.class;
}
protected String[] getCustomIntervalBackgroundAxisName(String[] axisNames) {
return axisNames;
}
}

12
designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java

@ -75,12 +75,16 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
}
protected JPanel createAlertLinePane() {
alertLine = new AlertLineListControlPane();
alertLine = getAlertLinePane();
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_AlertLine"), alertLine);
alertLine.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
return panel;
}
protected AlertLineListControlPane getAlertLinePane () {
return new AlertLineListControlPane();
}
protected JPanel createIntervalPane(double[] row, double[] col) {
isDefaultIntervalBackground = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Default_Interval"), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground")});
horizontalColorBackground = new ColorSelectBox(100);
@ -88,7 +92,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
Component[][] components = getIntervalPaneComponents();
JPanel defaultPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
defaultPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0));
customIntervalBackground = new BackgroundListControlPane();
customIntervalBackground = getBackgroundListControlPane();
cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout);
@ -109,6 +113,10 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
return panel;
}
protected BackgroundListControlPane getBackgroundListControlPane() {
return new BackgroundListControlPane();
}
protected Component[][] getIntervalPaneComponents() {
return new Component[][]{
new Component[]{null, null},

22
designer_chart/src/com/fr/plugin/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java

@ -3,8 +3,8 @@ package com.fr.plugin.chart.designer.style.background.radar;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.Inter;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground;
import com.fr.plugin.chart.designer.style.background.AlertLineListControlPane;
import com.fr.plugin.chart.designer.style.background.BackgroundListControlPane;
import com.fr.plugin.chart.designer.style.background.VanChartAxisAreaPane;
import java.awt.*;
@ -30,19 +30,29 @@ public class VanChartRadarAxisAreaPane extends VanChartAxisAreaPane {
};
}
@Override
protected AlertLineListControlPane getAlertLinePane() {
return new AlertLineListControlPane(){
protected Class<? extends BasicBeanPane> getAlertPaneClass() {
return VanChartRadarAlertValuePane.class;
}
protected void setAlertDemoAxisName(VanChartAlertValue demo, String[] axisNames) {
demo.setAxisName(axisNames[axisNames.length - 1]);//默认y轴,居左居右
protected String[] getAlertAxisName(String[] axisNames) {
return new String[]{axisNames[axisNames.length - 1]};//默认y轴,居左居右
}
};
}
@Override
protected BackgroundListControlPane getBackgroundListControlPane() {
return new BackgroundListControlPane(){
protected Class<? extends BasicBeanPane> getIntervalPaneClass() {
return VanChartRadarCustomIntervalBackgroundPane.class;
}
protected void setCustomIntervalBackgroundDemoAxisName(VanChartCustomIntervalBackground demo, String[] axisNames) {
demo.setAxisName(axisNames[axisNames.length - 1]);
protected String[] getCustomIntervalBackgroundAxisName(String[] axisNames) {
return new String[]{axisNames[axisNames.length - 1]};
}
};
}
}
Loading…
Cancel
Save