本文整理汇总了Java中org.jfree.chart.plot.dial.DialValueIndicator类的典型用法代码示例。如果您正苦于以下问题:Java DialValueIndicator类的具体用法?Java DialValueIndicator怎么用?Java DialValueIndicator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DialValueIndicator类属于org.jfree.chart.plot.dial包,在下文中一共展示了DialValueIndicator类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createStandardDialChart
import org.jfree.chart.plot.dial.DialValueIndicator; //导入依赖的package包/类
public JFreeChart createStandardDialChart(String s, String s1, ValueDataset valuedataset, double d, double d1, double d2, int i) {
DialPlot dialplot = new DialPlot();
dialplot.setDataset(valuedataset);
dialplot.setDialFrame(new StandardDialFrame());
dialplot.setBackground(new DialBackground());
DialTextAnnotation dialtextannotation = new DialTextAnnotation(s1);
dialtextannotation.setFont(new Font("Dialog", 1, 14));
dialtextannotation.setRadius(0.69999999999999996D);
dialplot.addLayer(dialtextannotation);
DialValueIndicator dialvalueindicator = new DialValueIndicator(0);
dialplot.addLayer(dialvalueindicator);
StandardDialScale standarddialscale = new StandardDialScale(d, d1, -120D, -300D, 10D, 4);
standarddialscale.setMajorTickIncrement(d2);
standarddialscale.setMinorTickCount(i);
standarddialscale.setTickRadius(0.88D);
standarddialscale.setTickLabelOffset(0.14999999999999999D);
standarddialscale.setTickLabelFont(new Font("Dialog", 0, 14));
dialplot.addScale(0, standarddialscale);
dialplot.addPointer(new org.jfree.chart.plot.dial.DialPointer.Pin());
DialCap dialcap = new DialCap();
dialplot.setCap(dialcap);
return new JFreeChart(s, dialplot);
}
开发者ID:mars-sim,项目名称:mars-sim,代码行数:24,代码来源:TemperatureDial.java
示例2: buildDialPlot
import org.jfree.chart.plot.dial.DialValueIndicator; //导入依赖的package包/类
private ChartPanel buildDialPlot(int minimumValue, int maximumValue,int majorTickGap) {
plot = new DialPlot(dataset);
plot.setDialFrame(new StandardDialFrame());
plot.addLayer(new DialValueIndicator());
plot.addLayer(new DialPointer.Pointer());
StandardDialScale scale = new StandardDialScale(minimumValue, maximumValue,-120, -300, majorTickGap, majorTickGap - 1);
scale.setTickRadius(0.88);
scale.setTickLabelOffset(0.20);
plot.addScale(0, scale);
return new ChartPanel(new JFreeChart(plot));
}
开发者ID:miracatici,项目名称:MakamBox,代码行数:13,代码来源:DialChart.java
示例3: testHashCode
import org.jfree.chart.plot.dial.DialValueIndicator; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashCode() {
DialValueIndicator i1 = new DialValueIndicator(0);
DialValueIndicator i2 = new DialValueIndicator(0);
assertTrue(i1.equals(i2));
int h1 = i1.hashCode();
int h2 = i2.hashCode();
assertEquals(h1, h2);
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:12,代码来源:DialValueIndicatorTests.java
示例4: fillChart
import org.jfree.chart.plot.dial.DialValueIndicator; //导入依赖的package包/类
private void fillChart(String title, float value, int lowerBound, int upperBound) throws Exception {
DefaultValueDataset dataset = new DefaultValueDataset();
dataset.setValue(value);
DialPlot plot = new DialPlot();
plot.setView(0.0d, 0.0d, 1.0d, 1.0d);
plot.setDataset(0, dataset);
StandardDialFrame frame = new StandardDialFrame();
plot.setDialFrame(frame);
DialBackground dialBackground = new DialBackground();
dialBackground.setGradientPaintTransformer(
new StandardGradientPaintTransformer(GradientPaintTransformType.VERTICAL));
plot.setBackground(dialBackground);
DialTextAnnotation textAnnotation = new DialTextAnnotation( title );
textAnnotation.setRadius(0.555555555555555555D);
plot.addLayer(textAnnotation);
DialValueIndicator valueIndicator = new DialValueIndicator(0);
plot.addLayer(valueIndicator);
StandardDialScale scale1 = new StandardDialScale();
scale1.setLowerBound( lowerBound );
scale1.setUpperBound( upperBound );
scale1.setStartAngle( -140 ); // -120
scale1.setExtent( -260D ); // -300D
scale1.setTickRadius(0.88D);
scale1.setTickLabelOffset(0.14999999999999999D);
scale1.setTickLabelFont(new Font("", Font.TRUETYPE_FONT, 14));
plot.addScale(0, scale1);
StandardDialRange standarddialrange0 = new StandardDialRange( lowerBound, (upperBound*0.6), Color.red);
standarddialrange0.setInnerRadius(0.52000000000000002D);
standarddialrange0.setOuterRadius(0.55000000000000004D);
plot.addLayer(standarddialrange0);
StandardDialRange standarddialrange1 = new StandardDialRange( (upperBound*0.6), (upperBound*0.8), Color.orange);
standarddialrange1.setInnerRadius(0.52000000000000002D);
standarddialrange1.setOuterRadius(0.55000000000000004D);
plot.addLayer(standarddialrange1);
StandardDialRange standarddialrange2 = new StandardDialRange( (upperBound*0.8), upperBound, Color.green);
standarddialrange2.setInnerRadius(0.52000000000000002D);
standarddialrange2.setOuterRadius(0.55000000000000004D);
plot.addLayer(standarddialrange2);
Pointer pointer = new Pointer(0);
pointer.setFillPaint(new Color(144, 196, 246));
plot.addPointer(pointer);
plot.mapDatasetToScale(0, 0);
DialCap dialcap = new DialCap();
dialcap.setRadius(0.0700000000000001D);
plot.setCap(dialcap);
this.chart = new JFreeChart(plot);
//this.chart.setBackgroundPaint(new Color(234, 244, 253));
this.chart.setBackgroundPaint( Color.white );
}
开发者ID:billchen198318,项目名称:bamboobsc,代码行数:60,代码来源:CommonMeterChartAction.java
注:本文中的org.jfree.chart.plot.dial.DialValueIndicator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论