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


Java IntervalMarker.setPaint方法代码示例

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


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

示例1: createChart

import org.jfree.chart.plot.IntervalMarker; //导入方法依赖的package包/类
/**
 * Creates a sample chart.
 * 
 * @param dataset  the dataset.
 * 
 * @return A sample chart.
 */
private JFreeChart createChart(IntervalXYDataset dataset,String s) {
    final JFreeChart chart = ChartFactory.createXYBarChart(
        "Histogram Plot: "+s,
        "Keyword index", 
        false,
        "frequency", 
        dataset,
        PlotOrientation.VERTICAL,
        true,
        true,
        false
    );
    
    XYPlot plot = (XYPlot) chart.getPlot();
    final IntervalMarker target = new IntervalMarker(400.0, 700.0);
    //target.setLabel("Target Range");
    target.setLabelFont(new Font("SansSerif", Font.ITALIC, 11));
    target.setLabelAnchor(RectangleAnchor.LEFT);
    target.setLabelTextAnchor(TextAnchor.CENTER_LEFT);
    target.setPaint(new Color(222, 222, 255, 128));
    plot.addRangeMarker(target, Layer.BACKGROUND);
    return chart;    
}
 
开发者ID:Subarno,项目名称:SentimentAnalysisJava,代码行数:31,代码来源:HistogramExample.java

示例2: addMarker

import org.jfree.chart.plot.IntervalMarker; //导入方法依赖的package包/类
/**
 * @param plot plot for the marker
 * @param startVal start postion
 * @param endVal end position
 */
protected void addMarker(XYPlot plot, int startVal, int endVal) {
  IntervalMarker marker = new IntervalMarker(startVal, endVal);
  marker.setLabelOffsetType(LengthAdjustmentType.EXPAND);
  marker.setPaint(new Color(134, 254, 225));
  marker.setAlpha((float) 0.60);
  marker.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
  marker.setLabelPaint(Color.green);
  marker.setLabelAnchor(RectangleAnchor.TOP_LEFT);
  marker.setLabelTextAnchor(TextAnchor.TOP_LEFT);

  plot.addDomainMarker(marker, Layer.BACKGROUND);

  ValueMarker markStart = new ValueMarker(startVal, new Color(31, 254, 225),
      new BasicStroke(2.0f));
  ValueMarker markEnd = new ValueMarker(endVal, new Color(31, 254, 225), new BasicStroke(2.0f));
  plot.addDomainMarker(markStart, Layer.BACKGROUND);
  plot.addDomainMarker(markEnd, Layer.BACKGROUND);
}
 
开发者ID:GrammarViz2,项目名称:grammarviz2_src,代码行数:24,代码来源:GrammarvizChartPanel.java

示例3: addPeriodMarker

import org.jfree.chart.plot.IntervalMarker; //导入方法依赖的package包/类
/**
 * Adds a periodicity marker.
 * 
 * @param plot plot for the marker
 * @param startVal start postion
 * @param endVal end position
 */
protected void addPeriodMarker(XYPlot plot, int startVal, int endVal) {

  IntervalMarker marker = new IntervalMarker(startVal, endVal);

  marker.setLabelOffsetType(LengthAdjustmentType.EXPAND);
  marker.setPaint(new Color(134, 254, 225));
  marker.setAlpha((float) 0.60);
  marker.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
  marker.setLabelPaint(Color.blue);
  marker.setLabelAnchor(RectangleAnchor.TOP_LEFT);
  marker.setLabelTextAnchor(TextAnchor.TOP_LEFT);

  marker.setPaint(Color.blue);

  plot.addDomainMarker(marker, Layer.BACKGROUND);
}
 
开发者ID:GrammarViz2,项目名称:grammarviz2_src,代码行数:24,代码来源:GrammarvizChartPanel.java

示例4: addAnomalyMarker

import org.jfree.chart.plot.IntervalMarker; //导入方法依赖的package包/类
/**
 * Adds an anomaly marker.
 * 
 * @param plot plot for the marker
 * @param startVal start postion
 * @param endVal end position
 */
protected void addAnomalyMarker(XYPlot plot, int startVal, int endVal) {

  IntervalMarker marker = new IntervalMarker(startVal, endVal);

  marker.setLabelOffsetType(LengthAdjustmentType.EXPAND);
  marker.setPaint(new Color(134, 254, 225));
  marker.setAlpha((float) 0.60);
  marker.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
  marker.setLabelPaint(Color.pink);
  marker.setLabelAnchor(RectangleAnchor.TOP_LEFT);
  marker.setLabelTextAnchor(TextAnchor.TOP_LEFT);

  marker.setPaint(Color.pink);

  plot.addDomainMarker(marker, Layer.BACKGROUND);
}
 
开发者ID:GrammarViz2,项目名称:grammarviz2_src,代码行数:24,代码来源:GrammarvizChartPanel.java

示例5: createChart

import org.jfree.chart.plot.IntervalMarker; //导入方法依赖的package包/类
/**
 * Creates a sample chart.
 *
 * @param dataset  the dataset.
 *
 * @return A sample chart.
 */
private JFreeChart createChart(IntervalXYDataset dataset) {
    final JFreeChart chart = ChartFactory.createXYBarChart(
        "XY Series Demo",
        "X",
        false,
        "Y",
        dataset,
        PlotOrientation.VERTICAL,
        true,
        true,
        false
    );
    XYPlot plot = (XYPlot) chart.getPlot();
    final IntervalMarker target = new IntervalMarker(400.0, 700.0);
    target.setLabel("Target Range");
    target.setLabelFont(new Font("SansSerif", Font.ITALIC, 11));
    target.setLabelAnchor(RectangleAnchor.LEFT);
    target.setLabelTextAnchor(TextAnchor.CENTER_LEFT);
    target.setPaint(new Color(222, 222, 255, 128));
    plot.addRangeMarker(target, Layer.BACKGROUND);
    return chart;
}
 
开发者ID:josejamilena,项目名称:pfc-jose,代码行数:30,代码来源:XYSeriesDemo3.java

示例6: addRangeMarker

import org.jfree.chart.plot.IntervalMarker; //导入方法依赖的package包/类
public void addRangeMarker(CategoryPlot plot, cfCHARTRANGEMARKERData rmData) throws cfmRunTimeException {
	IntervalMarker rangeMarker = new IntervalMarker(rmData.getStart(), rmData.getEnd());
	rangeMarker.setPaint(convertStringToColor(rmData.getColor()));
	if (rmData.getLabel() != null) {
		rangeMarker.setLabel(rmData.getLabel());
		rangeMarker.setLabelPaint(convertStringToColor(rmData.getLabelColor()));
		String labelPos = rmData.getLabelPosition();
		if (labelPos.equals("top_left")) {
			rangeMarker.setLabelAnchor(RectangleAnchor.TOP_LEFT);
			rangeMarker.setLabelTextAnchor(TextAnchor.TOP_LEFT);
		} else if (labelPos.equals("top")) {
			rangeMarker.setLabelAnchor(RectangleAnchor.TOP);
			rangeMarker.setLabelTextAnchor(TextAnchor.TOP_CENTER);
		} else if (labelPos.equals("top_right")) {
			rangeMarker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
			rangeMarker.setLabelTextAnchor(TextAnchor.TOP_RIGHT);
		} else if (labelPos.equals("left")) {
			rangeMarker.setLabelAnchor(RectangleAnchor.LEFT);
			rangeMarker.setLabelTextAnchor(TextAnchor.CENTER_LEFT);
		} else if (labelPos.equals("center")) {
			rangeMarker.setLabelAnchor(RectangleAnchor.CENTER);
			rangeMarker.setLabelTextAnchor(TextAnchor.CENTER);
		} else if (labelPos.equals("right")) {
			rangeMarker.setLabelAnchor(RectangleAnchor.RIGHT);
			rangeMarker.setLabelTextAnchor(TextAnchor.CENTER_RIGHT);
		} else if (labelPos.equals("bottom_left")) {
			rangeMarker.setLabelAnchor(RectangleAnchor.BOTTOM_LEFT);
			rangeMarker.setLabelTextAnchor(TextAnchor.BOTTOM_LEFT);
		} else if (labelPos.equals("bottom")) {
			rangeMarker.setLabelAnchor(RectangleAnchor.BOTTOM);
			rangeMarker.setLabelTextAnchor(TextAnchor.BOTTOM_CENTER);
		} else if (labelPos.equals("bottom_right")) {
			rangeMarker.setLabelAnchor(RectangleAnchor.BOTTOM_RIGHT);
			rangeMarker.setLabelTextAnchor(TextAnchor.BOTTOM_RIGHT);
		}
		rangeMarker.setLabelOffsetType(LengthAdjustmentType.NO_CHANGE);
		rangeMarker.setLabelFont(getFont(rmData.getFont(), rmData.getFontBold(), rmData.getFontItalic(), rmData.getFontSize()));
	}
	plot.addRangeMarker(rangeMarker, Layer.BACKGROUND);
}
 
开发者ID:OpenBD,项目名称:openbd-core,代码行数:41,代码来源:cfCHART.java

示例7: doCreateMarker

import org.jfree.chart.plot.IntervalMarker; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
protected Marker doCreateMarker() {
	IntervalMarker marker = new IntervalMarker(startDate.getTime(), endDate
			.getTime());
	marker.setPaint(color);
	return marker;
}
 
开发者ID:vimaier,项目名称:conqat,代码行数:9,代码来源:IntervalEventAnnotation.java

示例8: updateUIState

import org.jfree.chart.plot.IntervalMarker; //导入方法依赖的package包/类
private void updateUIState() {
    if (!isInitialized) {
        return;
    }

    xAxisRangeControl.getBindingContext().setComponentsEnabled(PROPERTY_NAME_MARK_SEGMENTS,
                                                               profileData != null &&
                                                                       profileData.getShapeVertices().length > 2);
    xAxisRangeControl.setComponentsEnabled(profileData != null);
    yAxisRangeControl.setComponentsEnabled(profileData != null);
    adjustPlotAxes();

    if (dataSourceConfig.computeInBetweenPoints) {
        chart.getXYPlot().setRenderer(deviationRenderer);
    } else {
        chart.getXYPlot().setRenderer(pointRenderer);
    }

    chart.getXYPlot().getRangeAxis().setLabel(StatisticChartStyling.getAxisLabel(getRaster(), DEFAULT_SAMPLE_DATASET_NAME, false));

    boolean markSegments = xAxisRangeControl.getBindingContext().getPropertySet().getValue(PROPERTY_NAME_MARK_SEGMENTS);
    if (markSegments && profileData != null && profileData.getNumShapeVertices() > 1) {
        final int[] shapeVertexIndexes = profileData.getShapeVertexIndexes();
        removeIntervalMarkers();
        for (int i = 0; i < shapeVertexIndexes.length - 1; i++) {
            if (i % 2 != 0) {
                final IntervalMarker marker = new IntervalMarker(shapeVertexIndexes[i], shapeVertexIndexes[i + 1]);
                marker.setPaint(new Color(120, 122, 125));
                marker.setAlpha(0.3F);
                chart.getXYPlot().addDomainMarker(marker, Layer.BACKGROUND);
                intervalMarkers.add(marker);
            }
        }
    } else {
        removeIntervalMarkers();
    }

    pointDataSourceEnablement.apply();
    dataFieldEnablement.apply();

}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:42,代码来源:ProfilePlotPanel.java


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