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

x33g5p2x  于2022-02-02 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(61)

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

XYPlot.getParent介绍

暂无

代码示例

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

/**
 * Returns the domain axis with the specified index, or {@code null} if 
 * there is no axis with that index.
 *
 * @param index  the axis index.
 *
 * @return The axis ({@code null} possible).
 *
 * @see #setDomainAxis(int, ValueAxis)
 */
public ValueAxis getDomainAxis(int index) {
  ValueAxis result = this.domainAxes.get(index);
  if (result == null) {
    Plot parent = getParent();
    if (parent instanceof XYPlot) {
      XYPlot xy = (XYPlot) parent;
      result = xy.getDomainAxis(index);
    }
  }
  return result;
}

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

/**
 * Returns the range axis with the specified index, or {@code null} if 
 * there is no axis with that index.
 *
 * @param index  the axis index (must be >= 0).
 *
 * @return The axis ({@code null} possible).
 *
 * @see #setRangeAxis(int, ValueAxis)
 */
public ValueAxis getRangeAxis(int index) {
  ValueAxis result = this.rangeAxes.get(index);
  if (result == null) {
    Plot parent = getParent();
    if (parent instanceof XYPlot) {
      XYPlot xy = (XYPlot) parent;
      result = xy.getRangeAxis(index);
    }
  }
  return result;
}

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

/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
public void annotationChanged(AnnotationChangeEvent event) {
  if (getParent() != null) {
    getParent().annotationChanged(event);
  }
  else {
    PlotChangeEvent e = new PlotChangeEvent(this);
    notifyListeners(e);
  }
}

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

/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
  if (getParent() != null) {
    getParent().annotationChanged(event);
  }
  else {
    PlotChangeEvent e = new PlotChangeEvent(this);
    notifyListeners(e);
  }
}

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

/**
 * Returns the index of the given range axis.
 *
 * @param axis  the axis.
 *
 * @return The axis index.
 *
 * @see #getDomainAxisIndex(ValueAxis)
 */
public int getRangeAxisIndex(ValueAxis axis) {
  int result = this.rangeAxes.indexOf(axis);
  if (result < 0) {
    // try the parent plot
    Plot parent = getParent();
    if (parent instanceof XYPlot) {
      XYPlot p = (XYPlot) parent;
      result = p.getRangeAxisIndex(axis);
    }
  }
  return result;
}

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

/**
 * Returns the index of the given range axis.
 *
 * @param axis  the axis.
 *
 * @return The axis index.
 *
 * @see #getDomainAxisIndex(ValueAxis)
 */
public int getRangeAxisIndex(ValueAxis axis) {
  int result = findRangeAxisIndex(axis);
  if (result < 0) {
    // try the parent plot
    Plot parent = getParent();
    if (parent instanceof XYPlot) {
      XYPlot p = (XYPlot) parent;
      result = p.getRangeAxisIndex(axis);
    }
  }
  return result;
}

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

/**
 * Returns the index of the given domain axis.
 *
 * @param axis  the axis.
 *
 * @return The axis index.
 *
 * @see #getRangeAxisIndex(ValueAxis)
 */
public int getDomainAxisIndex(ValueAxis axis) {
  int result = findDomainAxisIndex(axis);
  if (result < 0) {
    // try the parent plot
    Plot parent = getParent();
    if (parent instanceof XYPlot) {
      XYPlot p = (XYPlot) parent;
      result = p.getDomainAxisIndex(axis);
    }
  }
  return result;
}

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

/**
 * Returns the index of the given domain axis.
 *
 * @param axis  the axis.
 *
 * @return The axis index.
 *
 * @see #getRangeAxisIndex(ValueAxis)
 */
public int getDomainAxisIndex(ValueAxis axis) {
  int result = this.domainAxes.indexOf(axis);
  if (result < 0) {
    // try the parent plot
    Plot parent = getParent();
    if (parent instanceof XYPlot) {
      XYPlot p = (XYPlot) parent;
      result = p.getDomainAxisIndex(axis);
    }
  }
  return result;
}

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

/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The axis ranges are updated if necessary.
 *
 * @param event  information about the event (not used here).
 */
@Override
public void datasetChanged(DatasetChangeEvent event) {
  configureDomainAxes();
  configureRangeAxes();
  if (getParent() != null) {
    getParent().datasetChanged(event);
  }
  else {
    PlotChangeEvent e = new PlotChangeEvent(this);
    e.setType(ChartChangeEventType.DATASET_UPDATED);
    notifyListeners(e);
  }
}

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

/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The axis ranges are updated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {
  configureDomainAxes();
  configureRangeAxes();
  if (getParent() != null) {
    getParent().datasetChanged(event);
  }
  else {
    PlotChangeEvent e = new PlotChangeEvent(this);
    e.setType(ChartChangeEventType.DATASET_UPDATED);
    notifyListeners(e);
  }
}

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

/**
 * Returns the domain axis with the specified index, or <code>null</code>.
 *
 * @param index  the axis index.
 *
 * @return The axis (<code>null</code> possible).
 *
 * @see #setDomainAxis(int, ValueAxis)
 */
public ValueAxis getDomainAxis(int index) {
  ValueAxis result = null;
  if (index < this.domainAxes.size()) {
    result = (ValueAxis) this.domainAxes.get(index);
  }
  if (result == null) {
    Plot parent = getParent();
    if (parent instanceof XYPlot) {
      XYPlot xy = (XYPlot) parent;
      result = xy.getDomainAxis(index);
    }
  }
  return result;
}

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

/**
 * Returns a range axis.
 *
 * @param index  the axis index.
 *
 * @return The axis (<code>null</code> possible).
 *
 * @see #setRangeAxis(int, ValueAxis)
 */
public ValueAxis getRangeAxis(int index) {
  ValueAxis result = null;
  if (index < this.rangeAxes.size()) {
    result = (ValueAxis) this.rangeAxes.get(index);
  }
  if (result == null) {
    Plot parent = getParent();
    if (parent instanceof XYPlot) {
      XYPlot xy = (XYPlot) parent;
      result = xy.getRangeAxis(index);
    }
  }
  return result;
}

相关文章

微信公众号

最新文章

更多

XYPlot类方法