本文整理汇总了Java中org.jfree.chart.labels.PieSectionLabelGenerator类的典型用法代码示例。如果您正苦于以下问题:Java PieSectionLabelGenerator类的具体用法?Java PieSectionLabelGenerator怎么用?Java PieSectionLabelGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PieSectionLabelGenerator类属于org.jfree.chart.labels包,在下文中一共展示了PieSectionLabelGenerator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createChart
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
private JFreeChart createChart(PieDataset dataset, String title) {
JFreeChart chart = ChartFactory.createPieChart3D(title, // chart title
dataset, // data
true, // include legend
true,
true);
PiePlot3D plot = (PiePlot3D) chart.getPlot();
plot.setStartAngle(290);
PieSectionLabelGenerator gen = new StandardPieSectionLabelGenerator(
"{0}: {1} ({2})", new DecimalFormat("0"), new DecimalFormat("0%"));
plot.setLabelGenerator(gen);
plot.setDirection(Rotation.CLOCKWISE);
plot.setForegroundAlpha(0.5f);
return chart;
}
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:21,代码来源:DatabaseSummaryDialog.java
示例2: customize
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
public void customize(JFreeChart chart, JRChart jasperChart) {
PiePlot plot = (PiePlot) chart.getPlot();
plot.setSectionPaint(4, new Color(0, 70, 120));
plot.setSectionPaint(3, new Color(0, 70, 120));
plot.setSectionPaint(2, new Color(189, 216, 77));
plot.setSectionPaint(1, new Color(253, 224, 94));
plot.setSectionPaint(0, new Color(219, 109, 29));
PieSectionLabelGenerator generator = new StandardPieSectionLabelGenerator("{0}: {1} ({2})");
plot.setLabelGenerator(generator);
plot.setLabelBackgroundPaint(new Color(255,255,255));
Font font = new Font(Font.SANS_SERIF, Font.PLAIN, 12);
plot.setLabelFont(font);
}
开发者ID:jqxin2006,项目名称:threadfixRack,代码行数:20,代码来源:PointInTimeChartCustomizer.java
示例3: showVehicleInStore
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
private void showVehicleInStore() {
DefaultPieDataset dataset = new DefaultPieDataset();
List<Vehicle> vs = vehicleService.getAll();
for (Vehicle vehicle : vs) {
if (vehicle.getQuantity() > 0) {
dataset.setValue(vehicle.getModelNumber(), vehicle.getQuantity());
}
}
JFreeChart chart = ChartFactory.createPieChart3D("Vehicle In Store", // chart title
dataset, // data
true, // include legend
true,
false);
PiePlot3D plot = (PiePlot3D) chart.getPlot();
PieSectionLabelGenerator generator = new StandardPieSectionLabelGenerator(
"Model No {0} : {2}({1})", new DecimalFormat("0"), new DecimalFormat("0.00%"));
plot.setLabelGenerator(generator);
plot.setStartAngle(290);
plot.setDirection(Rotation.CLOCKWISE);
plot.setForegroundAlpha(0.5f);
// we put the chart into a panel
ChartPanel chartPanel = new ChartPanel(chart);
changePanelReport(chartPanel);
}
开发者ID:MrLoog,项目名称:Vehicle-ShowRoom-Management-System,代码行数:26,代码来源:StatisticVehicle.java
示例4: createChart
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
@Secured({"ROLE_ADMIN","ROLE_SURVEY_ADMIN"})
private JFreeChart createChart(PieDataset pieDataset, String title) {
try{
JFreeChart chart = ChartFactory.createPieChart(title, pieDataset, false,true,false);
chart.setBackgroundPaint(null);//this line necessary for transparency of background
final ChartPanel chartPanel = new ChartPanel(chart);
chartPanel.setOpaque(false); //this line necessary for transparency of background
chartPanel.setBackground(new Color(0, 0, 0, 0)); //this line necessary for transparency of background
PiePlot plot = (PiePlot) chart.getPlot();
//Color[] colors = {new Color(170, 195, 217, 255),new Color(246, 140, 31, 255),new Color(204, 204, 204, 255),new Color(231, 238, 144, 255),new Color(51, 51, 51, 255),new Color(101, 125, 151, 255),new Color(0, 102, 255, 255)};
//PieRenderer renderer = new PieRenderer(colors);
//renderer.setColor(plot, pieDataset);
PieSectionLabelGenerator generator = new StandardPieSectionLabelGenerator("{0}:{1}%");
plot.setLabelGenerator(generator);
plot.setStartAngle(270);
plot.setDirection(Rotation.CLOCKWISE);
return chart;
} catch (Exception e) {
log.error(e.getMessage(),e);
throw (new RuntimeException(e));
}
}
开发者ID:JD-Software,项目名称:JDeSurvey,代码行数:30,代码来源:StatisticsController.java
示例5: setLegendLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Sets the legend label generator and sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param generator the generator (<code>null</code> not permitted).
*
* @see #getLegendLabelGenerator()
*/
public void setLegendLabelGenerator(PieSectionLabelGenerator generator) {
if (generator == null) {
throw new IllegalArgumentException("Null 'generator' argument.");
}
this.legendLabelGenerator = generator;
notifyListeners(new PlotChangeEvent(this));
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:16,代码来源:PiePlot.java
示例6: setLegendLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Sets the legend label generator and sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param generator the generator (<code>null</code> not permitted).
*
* @see #getLegendLabelGenerator()
*/
public void setLegendLabelGenerator(PieSectionLabelGenerator generator) {
if (generator == null) {
throw new IllegalArgumentException("Null 'generator' argument.");
}
this.legendLabelGenerator = generator;
fireChangeEvent();
}
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:16,代码来源:PiePlot.java
示例7: getLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Returns the section label generator.
*
* @return The generator (possibly <code>null</code>).
*/
public PieSectionLabelGenerator getLabelGenerator() {
return this.labelGenerator;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:PiePlot.java
示例8: setLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Sets the section label generator and sends a {@link PlotChangeEvent} to all registered
* listeners.
*
* @param generator the generator (<code>null</code> permitted).
*/
public void setLabelGenerator(PieSectionLabelGenerator generator) {
this.labelGenerator = generator;
notifyListeners(new PlotChangeEvent(this));
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:11,代码来源:PiePlot.java
示例9: getLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Returns the section label generator.
*
* @return The generator (possibly <code>null</code>).
*
* @see #setLabelGenerator(PieSectionLabelGenerator)
*/
public PieSectionLabelGenerator getLabelGenerator() {
return this.labelGenerator;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:11,代码来源:PiePlot.java
示例10: setLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Sets the section label generator and sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param generator the generator (<code>null</code> permitted).
*
* @see #getLabelGenerator()
*/
public void setLabelGenerator(PieSectionLabelGenerator generator) {
this.labelGenerator = generator;
notifyListeners(new PlotChangeEvent(this));
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:13,代码来源:PiePlot.java
示例11: getLegendLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Returns the legend label generator.
*
* @return The legend label generator (never <code>null</code>).
*
* @see #setLegendLabelGenerator(PieSectionLabelGenerator)
*/
public PieSectionLabelGenerator getLegendLabelGenerator() {
return this.legendLabelGenerator;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:11,代码来源:PiePlot.java
示例12: getLegendLabelToolTipGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Returns the legend label tool tip generator.
*
* @return The legend label tool tip generator (possibly <code>null</code>).
*
* @see #setLegendLabelToolTipGenerator(PieSectionLabelGenerator)
*/
public PieSectionLabelGenerator getLegendLabelToolTipGenerator() {
return this.legendLabelToolTipGenerator;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:11,代码来源:PiePlot.java
示例13: setLegendLabelToolTipGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Sets the legend label tool tip generator and sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param generator the generator (<code>null</code> permitted).
*
* @see #getLegendLabelToolTipGenerator()
*/
public void setLegendLabelToolTipGenerator(
PieSectionLabelGenerator generator) {
this.legendLabelToolTipGenerator = generator;
notifyListeners(new PlotChangeEvent(this));
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:PiePlot.java
示例14: getLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Returns the section label generator.
*
* @return The generator (possibly <code>null</code>).
*
* @see #setLabelGenerator(PieSectionLabelGenerator)
*/
public PieSectionLabelGenerator getLabelGenerator() {
return this.labelGenerator;
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:11,代码来源:PiePlot.java
示例15: setLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Sets the section label generator and sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param generator the generator (<code>null</code> permitted).
*
* @see #getLabelGenerator()
*/
public void setLabelGenerator(PieSectionLabelGenerator generator) {
this.labelGenerator = generator;
fireChangeEvent();
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:13,代码来源:PiePlot.java
示例16: getLegendLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Returns the legend label generator.
*
* @return The legend label generator (never <code>null</code>).
*
* @see #setLegendLabelGenerator(PieSectionLabelGenerator)
*/
public PieSectionLabelGenerator getLegendLabelGenerator() {
return this.legendLabelGenerator;
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:11,代码来源:PiePlot.java
示例17: setLegendLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Sets the legend label generator and sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param generator the generator (<code>null</code> not permitted).
*
* @see #getLegendLabelGenerator()
*/
public void setLegendLabelGenerator(PieSectionLabelGenerator generator) {
ParamChecks.nullNotPermitted(generator, "generator");
this.legendLabelGenerator = generator;
fireChangeEvent();
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:14,代码来源:PiePlot.java
示例18: getLegendLabelToolTipGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Returns the legend label tool tip generator.
*
* @return The legend label tool tip generator (possibly <code>null</code>).
*
* @see #setLegendLabelToolTipGenerator(PieSectionLabelGenerator)
*/
public PieSectionLabelGenerator getLegendLabelToolTipGenerator() {
return this.legendLabelToolTipGenerator;
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:11,代码来源:PiePlot.java
示例19: setLegendLabelToolTipGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Sets the legend label tool tip generator and sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param generator the generator (<code>null</code> permitted).
*
* @see #getLegendLabelToolTipGenerator()
*/
public void setLegendLabelToolTipGenerator(
PieSectionLabelGenerator generator) {
this.legendLabelToolTipGenerator = generator;
fireChangeEvent();
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:14,代码来源:PiePlot.java
示例20: getLabelGenerator
import org.jfree.chart.labels.PieSectionLabelGenerator; //导入依赖的package包/类
/**
* Returns the section label generator.
*
* @return The generator (possibly {@code null}).
*
* @see #setLabelGenerator(PieSectionLabelGenerator)
*/
public PieSectionLabelGenerator getLabelGenerator() {
return this.labelGenerator;
}
开发者ID:jfree,项目名称:jfreechart,代码行数:11,代码来源:PiePlot.java
注:本文中的org.jfree.chart.labels.PieSectionLabelGenerator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论