当前位置: 首页>>代码示例>>Java>>正文


Java HighLowRenderer.setDrawCloseTicks方法代码示例

本文整理汇总了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));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:33,代码来源:HighLowRendererTests.java

示例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));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:39,代码来源:HighLowRendererTests.java

示例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;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:46,代码来源:GenericChartTheme.java

示例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;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:48,代码来源:SimpleChartTheme.java

示例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;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:45,代码来源:DefaultChartTheme.java


注:本文中的org.jfree.chart.renderer.xy.HighLowRenderer.setDrawCloseTicks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。