本文整理了Java中org.jfree.chart.plot.XYPlot.getDomainAxisLocation()
方法的一些代码示例,展示了XYPlot.getDomainAxisLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYPlot.getDomainAxisLocation()
方法的具体详情如下:
包路径:org.jfree.chart.plot.XYPlot
类名称:XYPlot
方法名:getDomainAxisLocation
[英]Returns the location of the primary domain axis.
[中]返回主域轴的位置。
代码示例来源:origin: jfree/jfreechart
/**
* Returns the edge for the primary domain axis (taking into account the
* plot's orientation).
*
* @return The edge.
*
* @see #getDomainAxisLocation()
* @see #getOrientation()
*/
public RectangleEdge getDomainAxisEdge() {
return Plot.resolveDomainAxisLocation(getDomainAxisLocation(),
this.orientation);
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns the edge for a domain axis.
*
* @param index the axis index.
*
* @return The edge.
*
* @see #getRangeAxisEdge(int)
*/
public RectangleEdge getDomainAxisEdge(int index) {
AxisLocation location = getDomainAxisLocation(index);
return Plot.resolveDomainAxisLocation(location, this.orientation);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns the edge for the primary domain axis (taking into account the
* plot's orientation).
*
* @return The edge.
*
* @see #getDomainAxisLocation()
* @see #getOrientation()
*/
public RectangleEdge getDomainAxisEdge() {
return Plot.resolveDomainAxisLocation(getDomainAxisLocation(),
this.orientation);
}
代码示例来源:origin: jfree/jfreechart
/**
* Returns the location for a domain axis. If this hasn't been set
* explicitly, the method returns the location that is opposite to the
* primary domain axis location.
*
* @param index the axis index (must be >= 0).
*
* @return The location (never {@code null}).
*
* @see #setDomainAxisLocation(int, AxisLocation)
*/
public AxisLocation getDomainAxisLocation(int index) {
AxisLocation result = this.domainAxisLocations.get(index);
if (result == null) {
result = AxisLocation.getOpposite(getDomainAxisLocation());
}
return result;
}
代码示例来源:origin: superad/pdf-kit
public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) {
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(plot.getRangeAxisLocation(), orientation);
double j2DX = domainAxis.valueToJava2D(this.getX(), dataArea, domainEdge);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns the edge for a domain axis.
*
* @param index the axis index.
*
* @return The edge.
*
* @see #getRangeAxisEdge(int)
*/
public RectangleEdge getDomainAxisEdge(int index) {
AxisLocation location = getDomainAxisLocation(index);
RectangleEdge result = Plot.resolveDomainAxisLocation(location,
this.orientation);
if (result == null) {
result = RectangleEdge.opposite(getDomainAxisEdge());
}
return result;
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Returns the location for a domain axis. If this hasn't been set
* explicitly, the method returns the location that is opposite to the
* primary domain axis location.
*
* @param index the axis index.
*
* @return The location (never <code>null</code>).
*
* @see #setDomainAxisLocation(int, AxisLocation)
*/
public AxisLocation getDomainAxisLocation(int index) {
AxisLocation result = null;
if (index < this.domainAxisLocations.size()) {
result = (AxisLocation) this.domainAxisLocations.get(index);
}
if (result == null) {
result = AxisLocation.getOpposite(getDomainAxisLocation());
}
return result;
}
代码示例来源:origin: bcdev/beam
private Shape createShape() {
XYPlot plot = chartPanel.getChart().getXYPlot();
Rectangle2D dataArea = chartPanel.getScreenDataArea();
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(plot.getRangeAxisLocation(), orientation);
double vx1 = areaType == AreaType.Y_RANGE ? dataArea.getX() : point1.x;
double vy1 = areaType == AreaType.X_RANGE ? dataArea.getY() : point1.y;
double vx2 = areaType == AreaType.Y_RANGE ? dataArea.getX() + dataArea.getWidth() : point2.x;
double vy2 = areaType == AreaType.X_RANGE ? dataArea.getY() + dataArea.getHeight() : point2.y;
double x1 = plot.getDomainAxis().java2DToValue(vx1, dataArea, domainEdge);
double x2 = plot.getDomainAxis().java2DToValue(vx2, dataArea, domainEdge);
double y1 = plot.getRangeAxis().java2DToValue(vy1, dataArea, rangeEdge);
double y2 = plot.getRangeAxis().java2DToValue(vy2, dataArea, rangeEdge);
double dx = abs(x2 - x1);
double dy = abs(y2 - y1);
final Shape shape;
if (areaType == AreaType.ELLIPSE) {
shape = new Ellipse2D.Double(x1 - dx, y1 - dy, 2.0 * dx, 2.0 * dy);
} else if (areaType == AreaType.RECTANGLE) {
shape = new Rectangle2D.Double(x1 - dx, y1 - dy, 2.0 * dx, 2.0 * dy);
} else if (areaType == AreaType.X_RANGE || areaType == AreaType.Y_RANGE) {
shape = new Rectangle2D.Double(min(x1, x2), min(y1, y2), dx, dy);
} else {
throw new IllegalStateException("areaType = " + areaType);
}
return shape;
}
代码示例来源:origin: senbox-org/snap-desktop
private Shape createShape() {
XYPlot plot = chartPanel.getChart().getXYPlot();
Rectangle2D dataArea = chartPanel.getScreenDataArea();
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(plot.getRangeAxisLocation(), orientation);
double vx1 = areaType == AreaType.Y_RANGE ? dataArea.getX() : point1.x;
double vy1 = areaType == AreaType.X_RANGE ? dataArea.getY() : point1.y;
double vx2 = areaType == AreaType.Y_RANGE ? dataArea.getX() + dataArea.getWidth() : point2.x;
double vy2 = areaType == AreaType.X_RANGE ? dataArea.getY() + dataArea.getHeight() : point2.y;
double x1 = plot.getDomainAxis().java2DToValue(vx1, dataArea, domainEdge);
double x2 = plot.getDomainAxis().java2DToValue(vx2, dataArea, domainEdge);
double y1 = plot.getRangeAxis().java2DToValue(vy1, dataArea, rangeEdge);
double y2 = plot.getRangeAxis().java2DToValue(vy2, dataArea, rangeEdge);
double dx = abs(x2 - x1);
double dy = abs(y2 - y1);
final Shape shape;
if (areaType == AreaType.ELLIPSE) {
shape = new Ellipse2D.Double(x1 - dx, y1 - dy, 2.0 * dx, 2.0 * dy);
} else if (areaType == AreaType.RECTANGLE) {
shape = new Rectangle2D.Double(x1 - dx, y1 - dy, 2.0 * dx, 2.0 * dy);
} else if (areaType == AreaType.X_RANGE || areaType == AreaType.Y_RANGE) {
shape = new Rectangle2D.Double(min(x1, x2), min(y1, y2), dx, dy);
} else {
throw new IllegalStateException("areaType = " + areaType);
}
return shape;
}
代码示例来源:origin: jfree/jfreechart
AxisLocation domainAxisLocation = plot.getDomainAxisLocation();
AxisLocation rangeAxisLocation = plot.getRangeAxisLocation();
RectangleEdge domainEdge
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
AxisLocation domainAxisLocation = plot.getDomainAxisLocation();
AxisLocation rangeAxisLocation = plot.getRangeAxisLocation();
RectangleEdge domainEdge
代码示例来源:origin: jfree/jfreechart
plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
plot.getRangeAxisLocation(), orientation);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
plot.getRangeAxisLocation(), orientation);
代码示例来源:origin: jfree/jfreechart
plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
plot.getRangeAxisLocation(), orientation);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
plot.getRangeAxisLocation(), orientation);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
AxisLocation xAxisLocation = plot.getDomainAxisLocation();
AxisLocation yAxisLocation = plot.getRangeAxisLocation();
RectangleEdge xEdge = Plot.resolveDomainAxisLocation(xAxisLocation,
代码示例来源:origin: jfree/jfreechart
plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
plot.getRangeAxisLocation(), orientation);
代码示例来源:origin: bcdev/beam
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
plot.getRangeAxisLocation(), orientation);
代码示例来源:origin: bcdev/beam
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
plot.getRangeAxisLocation(), orientation);
代码示例来源:origin: senbox-org/snap-desktop
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
plot.getRangeAxisLocation(), orientation);
内容来源于网络,如有侵权,请联系作者删除!