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


Java ValueMarker.setPaint方法代码示例

本文整理汇总了Java中org.jfree.chart.plot.ValueMarker.setPaint方法的典型用法代码示例。如果您正苦于以下问题:Java ValueMarker.setPaint方法的具体用法?Java ValueMarker.setPaint怎么用?Java ValueMarker.setPaint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.plot.ValueMarker的用法示例。


在下文中一共展示了ValueMarker.setPaint方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testGetSetPaint

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
/**
 * Some checks for the getPaint() and setPaint() methods.
 */
public void testGetSetPaint() {
    // we use ValueMarker for the tests, because we need a concrete 
    // subclass...
    ValueMarker m = new ValueMarker(1.1);
    m.addChangeListener(this);
    this.lastEvent = null;
    assertEquals(Color.gray, m.getPaint());
    m.setPaint(Color.blue);
    assertEquals(Color.blue, m.getPaint());
    assertEquals(m, this.lastEvent.getMarker());
    
    // check null argument...
    try {
        m.setPaint(null);
        fail("Expected an IllegalArgumentException for null.");
    }
    catch (IllegalArgumentException e) {
        assertTrue(true);
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:MarkerTests.java

示例2: testGetSetPaint

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
/**
 * Some checks for the getPaint() and setPaint() methods.
 */
public void testGetSetPaint() {
    // we use ValueMarker for the tests, because we need a concrete
    // subclass...
    ValueMarker m = new ValueMarker(1.1);
    m.addChangeListener(this);
    this.lastEvent = null;
    assertEquals(Color.gray, m.getPaint());
    m.setPaint(Color.blue);
    assertEquals(Color.blue, m.getPaint());
    assertEquals(m, this.lastEvent.getMarker());

    // check null argument...
    try {
        m.setPaint(null);
        fail("Expected an IllegalArgumentException for null.");
    }
    catch (IllegalArgumentException e) {
        assertTrue(true);
    }
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:24,代码来源:MarkerTests.java

示例3: Curva3

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
public Curva3() {
	super();
	KCritico = 10.0;
	PCritico = 0.9472;
	puntoXInicio = 9.495;
	puntoXFin = puntoXInicio + PCritico;
	puntoYInicio = 0.0;
	puntoYFin = 1.80;
	comment.setText(title[0]);
	marcadores = new ValueMarker[2];
	marcadores[0] = new ValueMarker(step[1]);
	marcadores[1] = new ValueMarker(step[2]);
	for(ValueMarker marcador : marcadores) {
		marcador.setStroke(new BasicStroke(1.0f));
		marcador.setPaint(Color.BLACK);
	}
}
 
开发者ID:pablopatarca,项目名称:proyecto-teoria-control-utn-frro,代码行数:18,代码来源:Curva3.java

示例4: Curva2

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
public Curva2() {
	super();
	KCritico = 8.0;
	PCritico = 3.63;
	puntoXInicio = 30.745;
	puntoXFin = puntoXInicio + PCritico;
	puntoYInicio = 0.0;
	puntoYFin = 1.80;
	comment.setText(title[0]);
	marcadores = new ValueMarker[2];
	marcadores[0] = new ValueMarker(step[1]);
	marcadores[1] = new ValueMarker(step[2]);
	for(ValueMarker marcador : marcadores) {
		marcador.setStroke(new BasicStroke(1.0f));
		marcador.setPaint(Color.BLACK);
	}
}
 
开发者ID:pablopatarca,项目名称:proyecto-teoria-control-utn-frro,代码行数:18,代码来源:Curva2.java

示例5: Curva1

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
public Curva1() {
	super();
	KCritico = 10.0;
	PCritico = 1.895;
	puntoXInicio = 26.53;
	puntoXFin = puntoXInicio + PCritico;
	puntoYInicio = -0.50;
	puntoYFin = 2.25;
	comment.setText(title[0]);
	marcadores = new ValueMarker[2];
	marcadores[0] = new ValueMarker(step[1]);
	marcadores[1] = new ValueMarker(step[2]);
	for(ValueMarker marcador : marcadores) {
		marcador.setStroke(new BasicStroke(1.0f));
		marcador.setPaint(Color.BLACK);
	}
}
 
开发者ID:pablopatarca,项目名称:proyecto-teoria-control-utn-frro,代码行数:18,代码来源:Curva1.java

示例6: addSliceMarker

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
/**
 * adds the slice marker to the plot
 */
private void addSliceMarker() {
    sliceMarker = new ValueMarker(currentSlice);
    sliceMarker.setPaint(Color.gray);
    sliceMarker.setStroke(new BasicStroke(1.0f, // Width
            BasicStroke.CAP_SQUARE, // End cap
            BasicStroke.JOIN_MITER, // Join style
            10.0f, // Miter limit
            new float[]{10.0f, 10.0f}, // Dash pattern
            0.0f)); // Dash phase
    sliceMarker.setLabel("Slice");
    plot.addDomainMarker(sliceMarker);
}
 
开发者ID:fact-project,项目名称:fact-tools,代码行数:16,代码来源:MainPlotPanel.java

示例7: addAnomalies

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
/**
 * Add anomalies to the plot.
 */
public void addAnomalies(XYPlot plot, ArrayList<Anomaly> anomalyList) {
    for (Anomaly a : anomalyList) {
        IntervalSequence is = a.intervals;
        for (Interval i : is) {
        	ValueMarker marker = new ValueMarker(i.index);
            marker.setPaint(Color.black);
            plot.addDomainMarker(marker);
        }
    }
}
 
开发者ID:yahoo,项目名称:egads,代码行数:14,代码来源:GUIUtils.java

示例8: addKillEvent

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
private static void addKillEvent(XYPlot xyplot, long pos) {
	ValueMarker vm = new ValueMarker(pos);
	vm.setPaint(ChartColor.VERY_DARK_GREEN);
	vm.setLabelOffset(new RectangleInsets(10.0D, 1.0D, 1.0D, 1.0D));
	vm.setLabel("Container Kill Event");
	vm.setStroke(new BasicStroke(2));
	xyplot.addDomainMarker(vm);
}
 
开发者ID:project-flink,项目名称:flink-perf,代码行数:9,代码来源:KafkaFT.java

示例9: addIllegalEvent

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
private static void addIllegalEvent(XYPlot xyplot, long pos) {
	ValueMarker vm = new ValueMarker(pos);
	vm.setPaint(ChartColor.LIGHT_YELLOW);
	vm.setLabelOffset(new RectangleInsets(10.0D, 1.0D, 1.0D, 1.0D));
	vm.setLabel("Illegal State");
	vm.setStroke(new BasicStroke(2));
	xyplot.addDomainMarker(vm);
}
 
开发者ID:project-flink,项目名称:flink-perf,代码行数:9,代码来源:KafkaFT.java

示例10: makeMarker

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
protected ValueMarker makeMarker( final double value )
{
	final ValueMarker valueMarker = new ValueMarker( value );
	valueMarker.setStroke( new BasicStroke ( 2f ) );
	valueMarker.setPaint( new Color( 0f/255f, 0f/255f, 255f/255f ) );
	valueMarker.setLabel( " Distance=" + value );
	valueMarker.setLabelPaint( Color.BLUE );
	valueMarker.setLabelAnchor( RectangleAnchor.TOP );
	valueMarker.setLabelTextAnchor( TextAnchor.TOP_LEFT );

	return valueMarker;
}
 
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:13,代码来源:MouseListenerValue.java

示例11: makeMarker

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
protected ValueMarker makeMarker( final int timePoint )
{
	final ValueMarker valueMarker = new ValueMarker( timePoint );
	valueMarker.setStroke( new BasicStroke ( 1.5f ) );
	valueMarker.setPaint( new Color( 0.0f, 93f/255f, 9f/255f ) );
	valueMarker.setLabel( " Reference\n Timepoint " + timePoint );
	valueMarker.setLabelAnchor(RectangleAnchor.BOTTOM );
	valueMarker.setLabelTextAnchor( TextAnchor.BOTTOM_LEFT );
	
	return valueMarker;
}
 
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:12,代码来源:MouseListenerTimelapse.java

示例12: addData

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
public void addData(int datasetIndex, double x, double y){
	XYSeries series = dataCollection.get(datasetIndex).getSeries(0);
	series.add(x, y);

	if(showCurrentAverage){
		if(markers[datasetIndex] != null){
			plot.removeRangeMarker(markers[datasetIndex]);
		}
		
		pastData[datasetIndex].add(y);

		double average = pastData[datasetIndex].getAverage();
		
		ValueMarker marker = new ValueMarker(average);
		marker.setPaint(Color.black);
		String label = String.format(labelFormat, average);

		marker.setLabel(label);
		marker.setLabelOffset(new RectangleInsets(10, 0, 0, 10));
		marker.setLabelAnchor(RectangleAnchor.RIGHT);

		markers[datasetIndex] = marker;
		plot.addRangeMarker(marker);
	}


}
 
开发者ID:yeokm1,项目名称:odroid-power-measure,代码行数:28,代码来源:Chart.java

示例13: createRocChart

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
private JFreeChart createRocChart(XYDataset dataset) {
  JFreeChart chart = ChartFactory.createXYLineChart("ROC", // chart title
                                                    "False positive rate", // x axis label
                                                    "True positive rate", // y axis label
                                                    dataset, // data
                                                    PlotOrientation.VERTICAL, false, // include
                                                    // legend
                                                    true, // tooltips
                                                    false // urls
                                 );

  chart.setAntiAlias(false);
  RenderingHints hints = new RenderingHints(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED);
  chart.setRenderingHints(hints);

  XYPlot plot = (XYPlot) chart.getPlot();
  plot.setBackgroundPaint(Color.lightGray);
  plot.setDomainGridlinePaint(Color.white);
  plot.setRangeGridlinePaint(Color.white);

  lower_tprMarker = new ValueMarker(0.5);
  lower_tprMarker.setPaint(Color.blue);
  lower_fprMarker = new ValueMarker(0.5);
  lower_fprMarker.setPaint(Color.blue);
  plot.addRangeMarker(lower_tprMarker);
  plot.addDomainMarker(lower_fprMarker);

  upper_tprMarker = new ValueMarker(0.5);
  upper_tprMarker.setPaint(Color.red);
  upper_fprMarker = new ValueMarker(0.5);
  upper_fprMarker.setPaint(Color.red);
  plot.addRangeMarker(upper_tprMarker);
  plot.addDomainMarker(upper_fprMarker);

  return chart;

}
 
开发者ID:sunsern,项目名称:jboost,代码行数:38,代码来源:HistogramFrame.java

示例14: addValueMarker

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
protected void addValueMarker(final JFreeChart chart,
		final double position, final String label) {
	final ValueMarker marker = new ValueMarker(position);
	marker.setPaint(Color.black);
	marker.setLabel(label);
	final XYPlot plot = (XYPlot) chart.getPlot();
	plot.addDomainMarker(marker);
}
 
开发者ID:uwol,项目名称:ComputationalEconomy,代码行数:9,代码来源:HouseholdsPanel.java

示例15: addDomainMarker

import org.jfree.chart.plot.ValueMarker; //导入方法依赖的package包/类
/**
 * Add a domain marker to the plot
 */
public void addDomainMarker(double position){
	ValueMarker marker = new ValueMarker(position);  // position is the value on the axis
	marker.setPaint(Color.red);
	plot.addDomainMarker(marker);
}
 
开发者ID:seqcode,项目名称:seqcode-core,代码行数:9,代码来源:ScatterPlot.java


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