Browse Source

Merge pull request #1600 in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit '0a530fdd684101bf0054bb7e99f0ba64abba90aa':
  CHART-13559 大数据下动画特效和高亮的label也要变灰
feature/big-screen
Bjorn 5 years ago
parent
commit
f283c66e92
  1. 18
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java
  2. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

18
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java

@ -14,6 +14,7 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
@ -60,6 +61,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
private UIComboBox largeDataMode;
private UISpinner largeModeThresholdNumber;
protected UILabel chartAnimationLabel;
protected UIButtonGroup isChartAnimation;
//坐标轴翻转属性
@ -371,7 +373,17 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
protected JPanel createAnimationPane() {
isChartAnimation = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")});
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation_Effects"), isChartAnimation);
chartAnimationLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Animation_Effects"));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{chartAnimationLabel,isChartAnimation}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation"), panel);
}
@ -499,7 +511,9 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
private void populateChartAnimate(Chart chart, Plot plot) {
if (plot.isSupportAnimate()) {
isChartAnimation.setSelectedIndex(chart.isJSDraw() ? 0 : 1);
isChartAnimation.setEnabled(!largeModel(plot));
boolean largeModel = largeModel(plot);
isChartAnimation.setEnabled(!largeModel);
chartAnimationLabel.setEnabled(!largeModel);
}
}

9
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

@ -70,6 +70,7 @@ public class VanChartPlotLegendPane extends BasicPane {
//private LimitPane limitPane;
//高亮显示的按钮
private UILabel highlightLabel;
private UIButtonGroup<Boolean> highlightButton;
private JPanel highlightPane;
@ -318,7 +319,7 @@ public class VanChartPlotLegendPane extends BasicPane {
private JPanel createHighlightPane(){
highlightButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_On"), Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false});
highlightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Highlight"));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
@ -326,7 +327,7 @@ public class VanChartPlotLegendPane extends BasicPane {
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Highlight")),highlightButton}
new Component[]{highlightLabel, highlightButton}
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
}
@ -429,7 +430,9 @@ public class VanChartPlotLegendPane extends BasicPane {
//limitPane.populateBean(legend.getLimitAttribute());
if(highlightButton != null){
highlightButton.setSelectedItem(legend.isHighlight());
highlightButton.setEnabled(!PlotFactory.largeDataModel(plot));
boolean largeDataModel = PlotFactory.largeDataModel(plot);
highlightButton.setEnabled(!largeDataModel);
highlightLabel.setEnabled(!largeDataModel);
}
}

Loading…
Cancel
Save