本文整理汇总了Java中org.jfree.chart.plot.PolarPlot.getAngleOffset方法的典型用法代码示例。如果您正苦于以下问题:Java PolarPlot.getAngleOffset方法的具体用法?Java PolarPlot.getAngleOffset怎么用?Java PolarPlot.getAngleOffset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.plot.PolarPlot
的用法示例。
在下文中一共展示了PolarPlot.getAngleOffset方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawRadialGridLines
import org.jfree.chart.plot.PolarPlot; //导入方法依赖的package包/类
/**
* Draw the radial gridlines - the rings.
*
* @param g2 the drawing surface (<code>null</code> not permitted).
* @param plot the plot (<code>null</code> not permitted).
* @param radialAxis the radial axis (<code>null</code> not permitted).
* @param ticks the ticks (<code>null</code> not permitted).
* @param dataArea the data area.
*/
@Override
public void drawRadialGridLines(Graphics2D g2, PolarPlot plot,
ValueAxis radialAxis, List ticks, Rectangle2D dataArea) {
ParamChecks.nullNotPermitted(radialAxis, "radialAxis");
g2.setFont(radialAxis.getTickLabelFont());
g2.setPaint(plot.getRadiusGridlinePaint());
g2.setStroke(plot.getRadiusGridlineStroke());
double centerValue;
if (radialAxis.isInverted()) {
centerValue = radialAxis.getUpperBound();
} else {
centerValue = radialAxis.getLowerBound();
}
Point center = plot.translateToJava2D(0, centerValue, radialAxis, dataArea);
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
NumberTick tick = (NumberTick) iterator.next();
double angleDegrees = plot.isCounterClockwise()
? plot.getAngleOffset() : -plot.getAngleOffset();
Point p = plot.translateToJava2D(angleDegrees,
tick.getNumber().doubleValue(), radialAxis, dataArea);
int r = p.x - center.x;
int upperLeftX = center.x - r;
int upperLeftY = center.y - r;
int d = 2 * r;
Ellipse2D ring = new Ellipse2D.Double(upperLeftX, upperLeftY, d, d);
g2.setPaint(plot.getRadiusGridlinePaint());
g2.draw(ring);
}
}
示例2: DefaultPolarPlotEditor
import org.jfree.chart.plot.PolarPlot; //导入方法依赖的package包/类
/**
* Standard constructor - constructs a panel for editing the properties of
* the specified plot.
*
* @param plot the plot, which should be changed.
*/
public DefaultPolarPlotEditor(PolarPlot plot) {
super(plot);
this.angleOffsetValue = plot.getAngleOffset();
this.angleOffset.setText(Double.toString(this.angleOffsetValue));
this.manualTickUnitValue = plot.getAngleTickUnit().getSize();
this.manualTickUnit.setText(Double.toString(this.manualTickUnitValue));
}
示例3: drawRadialGridLines
import org.jfree.chart.plot.PolarPlot; //导入方法依赖的package包/类
/**
* Draw the radial gridlines - the rings.
*
* @param g2 the drawing surface ({@code null} not permitted).
* @param plot the plot ({@code null} not permitted).
* @param radialAxis the radial axis ({@code null} not permitted).
* @param ticks the ticks ({@code null} not permitted).
* @param dataArea the data area.
*/
@Override
public void drawRadialGridLines(Graphics2D g2, PolarPlot plot,
ValueAxis radialAxis, List ticks, Rectangle2D dataArea) {
Args.nullNotPermitted(radialAxis, "radialAxis");
g2.setFont(radialAxis.getTickLabelFont());
g2.setPaint(plot.getRadiusGridlinePaint());
g2.setStroke(plot.getRadiusGridlineStroke());
double centerValue;
if (radialAxis.isInverted()) {
centerValue = radialAxis.getUpperBound();
} else {
centerValue = radialAxis.getLowerBound();
}
Point center = plot.translateToJava2D(0, centerValue, radialAxis, dataArea);
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
NumberTick tick = (NumberTick) iterator.next();
double angleDegrees = plot.isCounterClockwise()
? plot.getAngleOffset() : -plot.getAngleOffset();
Point p = plot.translateToJava2D(angleDegrees,
tick.getNumber().doubleValue(), radialAxis, dataArea);
int r = p.x - center.x;
int upperLeftX = center.x - r;
int upperLeftY = center.y - r;
int d = 2 * r;
Ellipse2D ring = new Ellipse2D.Double(upperLeftX, upperLeftY, d, d);
g2.setPaint(plot.getRadiusGridlinePaint());
g2.draw(ring);
}
}
示例4: drawRadialGridLines
import org.jfree.chart.plot.PolarPlot; //导入方法依赖的package包/类
/**
* Draw the radial gridlines - the rings.
*
* @param g2 the drawing surface (<code>null</code> not permitted).
* @param plot the plot (<code>null</code> not permitted).
* @param radialAxis the radial axis (<code>null</code> not permitted).
* @param ticks the ticks (<code>null</code> not permitted).
* @param dataArea the data area.
*/
public void drawRadialGridLines(Graphics2D g2, PolarPlot plot,
ValueAxis radialAxis, List ticks, Rectangle2D dataArea) {
ParamChecks.nullNotPermitted(radialAxis, "radialAxis");
g2.setFont(radialAxis.getTickLabelFont());
g2.setPaint(plot.getRadiusGridlinePaint());
g2.setStroke(plot.getRadiusGridlineStroke());
double centerValue;
if (radialAxis.isInverted()) {
centerValue = radialAxis.getUpperBound();
} else {
centerValue = radialAxis.getLowerBound();
}
Point center = plot.translateToJava2D(0, centerValue, radialAxis, dataArea);
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
NumberTick tick = (NumberTick) iterator.next();
double angleDegrees = plot.isCounterClockwise()
? plot.getAngleOffset() : -plot.getAngleOffset();
Point p = plot.translateToJava2D(angleDegrees,
tick.getNumber().doubleValue(), radialAxis, dataArea);
int r = p.x - center.x;
int upperLeftX = center.x - r;
int upperLeftY = center.y - r;
int d = 2 * r;
Ellipse2D ring = new Ellipse2D.Double(upperLeftX, upperLeftY, d, d);
g2.setPaint(plot.getRadiusGridlinePaint());
g2.draw(ring);
}
}