本文整理汇总了Java中org.jfree.chart.renderer.xy.HighLowRenderer.setDrawCloseTicks方法的典型用法代码示例。如果您正苦于以下问题:Java HighLowRenderer.setDrawCloseTicks方法的具体用法?Java HighLowRenderer.setDrawCloseTicks怎么用?Java HighLowRenderer.setDrawCloseTicks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.renderer.xy.HighLowRenderer
的用法示例。
在下文中一共展示了HighLowRenderer.setDrawCloseTicks方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEquals
import org.jfree.chart.renderer.xy.HighLowRenderer; //导入方法依赖的package包/类
/**
* Check that the equals() method distinguishes all fields.
*/
public void testEquals() {
HighLowRenderer r1 = new HighLowRenderer();
HighLowRenderer r2 = new HighLowRenderer();
assertEquals(r1, r2);
// drawOpenTicks
r1.setDrawOpenTicks(false);
assertFalse(r1.equals(r2));
r2.setDrawOpenTicks(false);
assertTrue(r1.equals(r2));
// drawCloseTicks
r1.setDrawCloseTicks(false);
assertFalse(r1.equals(r2));
r2.setDrawCloseTicks(false);
assertTrue(r1.equals(r2));
// openTickPaint
r1.setOpenTickPaint(Color.red);
assertFalse(r1.equals(r2));
r2.setOpenTickPaint(Color.red);
assertTrue(r1.equals(r2));
// closeTickPaint
r1.setCloseTickPaint(Color.blue);
assertFalse(r1.equals(r2));
r2.setCloseTickPaint(Color.blue);
assertTrue(r1.equals(r2));
}
示例2: testEquals
import org.jfree.chart.renderer.xy.HighLowRenderer; //导入方法依赖的package包/类
/**
* Check that the equals() method distinguishes all fields.
*/
public void testEquals() {
HighLowRenderer r1 = new HighLowRenderer();
HighLowRenderer r2 = new HighLowRenderer();
assertEquals(r1, r2);
// drawOpenTicks
r1.setDrawOpenTicks(false);
assertFalse(r1.equals(r2));
r2.setDrawOpenTicks(false);
assertTrue(r1.equals(r2));
// drawCloseTicks
r1.setDrawCloseTicks(false);
assertFalse(r1.equals(r2));
r2.setDrawCloseTicks(false);
assertTrue(r1.equals(r2));
// openTickPaint
r1.setOpenTickPaint(Color.red);
assertFalse(r1.equals(r2));
r2.setOpenTickPaint(Color.red);
assertTrue(r1.equals(r2));
// closeTickPaint
r1.setCloseTickPaint(Color.blue);
assertFalse(r1.equals(r2));
r2.setCloseTickPaint(Color.blue);
assertTrue(r1.equals(r2));
// tickLength
r1.setTickLength(99.9);
assertFalse(r1.equals(r2));
r2.setTickLength(99.9);
assertTrue(r1.equals(r2));
}
示例3: createHighLowChart
import org.jfree.chart.renderer.xy.HighLowRenderer; //导入方法依赖的package包/类
/**
*
* @param evaluation
* @throws JRException
*/
protected JFreeChart createHighLowChart() throws JRException
{
ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
JFreeChart jfreeChart =
ChartFactory.createHighLowChart(
evaluateTextExpression(getChart().getTitleExpression()),
evaluateTextExpression(((JRHighLowPlot)getPlot()).getTimeAxisLabelExpression()),
evaluateTextExpression(((JRHighLowPlot)getPlot()).getValueAxisLabelExpression()),
(DefaultHighLowDataset)getDataset(),
isShowLegend()
);
configureChart(jfreeChart, getPlot());
XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
JRHighLowPlot highLowPlot = (JRHighLowPlot)getPlot();
HighLowRenderer hlRenderer = (HighLowRenderer) xyPlot.getRenderer();
boolean isShowOpenTicks = highLowPlot.getShowOpenTicks() == null ? false : highLowPlot.getShowOpenTicks().booleanValue();
boolean isShowCloseTicks = highLowPlot.getShowCloseTicks() == null ? false : highLowPlot.getShowCloseTicks().booleanValue();
hlRenderer.setDrawOpenTicks(isShowOpenTicks);
hlRenderer.setDrawCloseTicks(isShowCloseTicks);
// Handle the axis formating for the category axis
configureAxis(xyPlot.getDomainAxis(), highLowPlot.getTimeAxisLabelFont(),
highLowPlot.getTimeAxisLabelColor(), highLowPlot.getTimeAxisTickLabelFont(),
highLowPlot.getTimeAxisTickLabelColor(), highLowPlot.getTimeAxisTickLabelMask(), highLowPlot.getTimeAxisVerticalTickLabels(),
highLowPlot.getOwnTimeAxisLineColor(), false,
(Comparable<?>)evaluateExpression(highLowPlot.getDomainAxisMinValueExpression()),
(Comparable<?>)evaluateExpression(highLowPlot.getDomainAxisMaxValueExpression()));
// Handle the axis formating for the value axis
configureAxis(xyPlot.getRangeAxis(), highLowPlot.getValueAxisLabelFont(),
highLowPlot.getValueAxisLabelColor(), highLowPlot.getValueAxisTickLabelFont(),
highLowPlot.getValueAxisTickLabelColor(), highLowPlot.getValueAxisTickLabelMask(), highLowPlot.getValueAxisVerticalTickLabels(),
highLowPlot.getOwnValueAxisLineColor(), true,
(Comparable<?>)evaluateExpression(highLowPlot.getRangeAxisMinValueExpression()),
(Comparable<?>)evaluateExpression(highLowPlot.getRangeAxisMaxValueExpression()));
return jfreeChart;
}
示例4: createHighLowChart
import org.jfree.chart.renderer.xy.HighLowRenderer; //导入方法依赖的package包/类
/**
*
* @param evaluation
* @throws JRException
*/
protected JFreeChart createHighLowChart() throws JRException
{
ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
JFreeChart jfreeChart =
ChartFactory.createHighLowChart(
evaluateTextExpression(getChart().getTitleExpression()),
evaluateTextExpression(((JRHighLowPlot)getPlot()).getTimeAxisLabelExpression()),
evaluateTextExpression(((JRHighLowPlot)getPlot()).getValueAxisLabelExpression()),
(DefaultHighLowDataset)getDataset(),
isShowLegend()
);
configureChart(jfreeChart, getPlot());
XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
JRHighLowPlot highLowPlot = (JRHighLowPlot)getPlot();
HighLowRenderer hlRenderer = (HighLowRenderer) xyPlot.getRenderer();
boolean isShowOpenTicks = highLowPlot.getShowOpenTicks() == null ? false : highLowPlot.getShowOpenTicks().booleanValue();
boolean isShowCloseTicks = highLowPlot.getShowCloseTicks() == null ? false : highLowPlot.getShowCloseTicks().booleanValue();
hlRenderer.setDrawOpenTicks(isShowOpenTicks);
hlRenderer.setDrawCloseTicks(isShowCloseTicks);
// Handle the axis formating for the category axis
configureAxis(xyPlot.getDomainAxis(), highLowPlot.getTimeAxisLabelFont(),
highLowPlot.getTimeAxisLabelColor(), highLowPlot.getTimeAxisTickLabelFont(),
highLowPlot.getTimeAxisTickLabelColor(), highLowPlot.getTimeAxisTickLabelMask(), highLowPlot.getTimeAxisVerticalTickLabels(),
highLowPlot.getOwnTimeAxisLineColor(), getDomainAxisSettings(),
(Comparable<?>)evaluateExpression(highLowPlot.getDomainAxisMinValueExpression()),
(Comparable<?>)evaluateExpression(highLowPlot.getDomainAxisMaxValueExpression())
);
// Handle the axis formating for the value axis
configureAxis(xyPlot.getRangeAxis(), highLowPlot.getValueAxisLabelFont(),
highLowPlot.getValueAxisLabelColor(), highLowPlot.getValueAxisTickLabelFont(),
highLowPlot.getValueAxisTickLabelColor(), highLowPlot.getValueAxisTickLabelMask(), highLowPlot.getValueAxisVerticalTickLabels(),
highLowPlot.getOwnValueAxisLineColor(), getRangeAxisSettings(),
(Comparable<?>)evaluateExpression(highLowPlot.getRangeAxisMinValueExpression()),
(Comparable<?>)evaluateExpression(highLowPlot.getRangeAxisMaxValueExpression())
);
return jfreeChart;
}
示例5: createHighLowChart
import org.jfree.chart.renderer.xy.HighLowRenderer; //导入方法依赖的package包/类
/**
*
*/
protected JFreeChart createHighLowChart() throws JRException
{
ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
JFreeChart jfreeChart =
ChartFactory.createHighLowChart(
evaluateTextExpression(getChart().getTitleExpression()),
evaluateTextExpression(((JRHighLowPlot)getPlot()).getTimeAxisLabelExpression()),
evaluateTextExpression(((JRHighLowPlot)getPlot()).getValueAxisLabelExpression()),
(DefaultHighLowDataset)getDataset(),
isShowLegend()
);
configureChart(jfreeChart);
XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
JRHighLowPlot highLowPlot = (JRHighLowPlot)getPlot();
HighLowRenderer hlRenderer = (HighLowRenderer) xyPlot.getRenderer();
boolean isShowOpenTicks = highLowPlot.getShowOpenTicks() == null ? false : highLowPlot.getShowOpenTicks().booleanValue();
boolean isShowCloseTicks = highLowPlot.getShowCloseTicks() == null ? false : highLowPlot.getShowCloseTicks().booleanValue();
hlRenderer.setDrawOpenTicks(isShowOpenTicks);
hlRenderer.setDrawCloseTicks(isShowCloseTicks);
// Handle the axis formating for the category axis
configureAxis(xyPlot.getDomainAxis(), highLowPlot.getTimeAxisLabelFont(),
highLowPlot.getTimeAxisLabelColor(), highLowPlot.getTimeAxisTickLabelFont(),
highLowPlot.getTimeAxisTickLabelColor(), highLowPlot.getTimeAxisTickLabelMask(), highLowPlot.getTimeAxisVerticalTickLabels(),
highLowPlot.getTimeAxisLineColor(), false,
(Comparable<?>)evaluateExpression(highLowPlot.getDomainAxisMinValueExpression()),
(Comparable<?>)evaluateExpression(highLowPlot.getDomainAxisMaxValueExpression()));
// Handle the axis formating for the value axis
configureAxis(xyPlot.getRangeAxis(), highLowPlot.getValueAxisLabelFont(),
highLowPlot.getValueAxisLabelColor(), highLowPlot.getValueAxisTickLabelFont(),
highLowPlot.getValueAxisTickLabelColor(), highLowPlot.getValueAxisTickLabelMask(), highLowPlot.getValueAxisVerticalTickLabels(),
highLowPlot.getValueAxisLineColor(), true,
(Comparable<?>)evaluateExpression(highLowPlot.getRangeAxisMinValueExpression()),
(Comparable<?>)evaluateExpression(highLowPlot.getRangeAxisMaxValueExpression()));
return jfreeChart;
}