org.jfree.chart.plot.Plot.resolveDomainAxisLocation()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中org.jfree.chart.plot.Plot.resolveDomainAxisLocation()方法的一些代码示例,展示了Plot.resolveDomainAxisLocation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plot.resolveDomainAxisLocation()方法的具体详情如下:
包路径:org.jfree.chart.plot.Plot
类名称:Plot
方法名:resolveDomainAxisLocation

Plot.resolveDomainAxisLocation介绍

[英]Resolves a domain axis location for a given plot 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 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: 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: jfree/jfreechart

/**
 * Returns the edge for a domain axis.
 *
 * @param index  the axis index.
 *
 * @return The edge (never {@code null}).
 */
public RectangleEdge getDomainAxisEdge(int index) {
  RectangleEdge result;
  AxisLocation location = getDomainAxisLocation(index);
  if (location != null) {
    result = Plot.resolveDomainAxisLocation(location, this.orientation);
  } else {
    result = RectangleEdge.opposite(getDomainAxisEdge(0));
  }
  return result;
}

代码示例来源: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 edge for a domain axis.
 *
 * @param index  the axis index.
 *
 * @return The edge (never <code>null</code>).
 */
public RectangleEdge getDomainAxisEdge(int index) {
  RectangleEdge result = null;
  AxisLocation location = getDomainAxisLocation(index);
  if (location != null) {
    result = Plot.resolveDomainAxisLocation(location, this.orientation);
  }
  else {
    result = RectangleEdge.opposite(getDomainAxisEdge(0));
  }
  return result;
}

代码示例来源: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: 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: jfree/jfreechart

RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
    plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

代码示例来源:origin: jfree/jfreechart

RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
    plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
    plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
    plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

double lineY2 = 0.0f;
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
  plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

代码示例来源:origin: jfree/jfreechart

double lineY2 = 0.0f;
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
  plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

代码示例来源:origin: jfree/jfreechart

float anchorY = 0.0f;
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
    plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

float anchorY = 0.0f;
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
    plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

代码示例来源:origin: jfree/jfreechart

RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
    getDomainAxisLocation(), this.orientation);
if (this.drawSharedDomainAxis) {

代码示例来源:origin: bcdev/beam

RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
    plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

代码示例来源:origin: senbox-org/snap-desktop

RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
    plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(

相关文章