Browse Source

修改代码质量

master
mengao 7 years ago
parent
commit
f2ef53ee2b
  1. 19
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java

19
designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java

@ -449,16 +449,14 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private Component[] getChartAnimatePane(Plot plot, double[] row, double[] col) { private Component[] getChartAnimatePane(Plot plot, double[] row, double[] col) {
if (plot.isSupportAnimate() && plot.isSupportSeriesDrag()) { if (plot.isSupportAnimate() && plot.isSupportSeriesDrag()) {
return new Component[]{TableLayoutHelper.createTableLayoutPane( return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{ new Component[][]{new Component[]{isChartAnimation},
new Component[]{isChartAnimation},
new Component[]{isSeriesDragEnable}, new Component[]{isSeriesDragEnable},
new Component[]{new JSeparator()} new Component[]{new JSeparator()}
}, row, col) }, row, col)
}; };
} else if (plot.isSupportAnimate() && !plot.isSupportSeriesDrag()) { } else if (plot.isSupportAnimate() && !plot.isSupportSeriesDrag()) {
return new Component[]{TableLayoutHelper.createTableLayoutPane( return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{ new Component[][]{new Component[]{isChartAnimation},
new Component[]{isChartAnimation},
new Component[]{new JSeparator()} new Component[]{new JSeparator()}
}, row, col) }, row, col)
}; };
@ -487,15 +485,13 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
boolean isNeedTimeSwitch = plot.getxAxis() != null && plot.getxAxis().isDate(); boolean isNeedTimeSwitch = plot.getxAxis() != null && plot.getxAxis().isDate();
if (plot.isSupportZoomCategoryAxis() && !isNeedTimeSwitch) { if (plot.isSupportZoomCategoryAxis() && !isNeedTimeSwitch) {
return new Component[]{TableLayoutHelper.createTableLayoutPane( return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{ new Component[][]{new Component[]{isAxisZoom},
new Component[]{isAxisZoom},
new Component[]{new JSeparator()} new Component[]{new JSeparator()}
}, row, col) }, row, col)
}; };
} else if (plot.isSupportZoomCategoryAxis() && isNeedTimeSwitch) { } else if (plot.isSupportZoomCategoryAxis() && isNeedTimeSwitch) {
return new Component[]{TableLayoutHelper.createTableLayoutPane( return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{ new Component[][]{new Component[]{isAxisZoom},
new Component[]{isAxisZoom},
new Component[]{timeSwitchContainer}, new Component[]{timeSwitchContainer},
new Component[]{new JSeparator()} new Component[]{new JSeparator()}
}, row, col) }, row, col)
@ -525,8 +521,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private Component[] getAutoRefreshPane(Plot plot, double[] row, double[] col) { private Component[] getAutoRefreshPane(Plot plot, double[] row, double[] col) {
if (plot.isSupportAutoRefresh()) { if (plot.isSupportAutoRefresh()) {
return new Component[]{TableLayoutHelper.createTableLayoutPane( return new Component[]{TableLayoutHelper.createTableLayoutPane(
new Component[][]{ new Component[][]{new Component[]{autoRefreshPane},
new Component[]{autoRefreshPane},
new Component[]{new JSeparator()} new Component[]{new JSeparator()}
}, row, col) }, row, col)
}; };
@ -760,13 +755,11 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
} }
seriesAttrContents.setFormat(valueFormat); seriesAttrContents.setFormat(valueFormat);
if (plot.isSupportValuePercent()) { if (plot.isSupportValuePercent() && percentFormat != null) {
if (percentFormat != null) {
seriesAttrContents.setPercentFormat(percentFormat); seriesAttrContents.setPercentFormat(percentFormat);
} }
} }
} }
}
private String getTooltipContent(Plot plot) { private String getTooltipContent(Plot plot) {
String contents = StringUtils.EMPTY; String contents = StringUtils.EMPTY;

Loading…
Cancel
Save