Package com.positive.charts.axis

Examples of com.positive.charts.axis.ValueAxis


   *            the paint to use.
   */
  protected void drawVerticalLine(final GC gc, final Rectangle dataArea,
      final double value) {

    ValueAxis axis = this.getDomainAxis();
    if (this.getOrientation() == PlotOrientation.HORIZONTAL) {
      axis = this.getRangeAxis();
    }
    if (axis.getRange().contains(value)) {
      final int xx = (int) axis.valueToJava2D(value, dataArea,
          RectangleEdge.BOTTOM);
      gc.drawLine(xx, RectangleUtil.getMinY(dataArea), xx, RectangleUtil
          .getMaxY(dataArea));
    }

View Full Code Here


   *            the axis index.
   *
   * @return The axis (<code>null</code> possible).
   */
  public ValueAxis getDomainAxis(final int index) {
    ValueAxis result = null;
    if (index < this.domainAxes.size()) {
      result = (ValueAxis) this.domainAxes.get(index);
    }
    if (result == null) {
      final Plot parent = this.getParent();
View Full Code Here

    if ((index < 0) || (index >= this.getDatasetCount())) {
      throw new IllegalArgumentException("Index 'index' out of bounds.");
    }

    ValueAxis valueAxis = null;
    final Integer axisIndex = (Integer) this.datasetToDomainAxisMap
        .get(new Integer(index));
    if (axisIndex != null) {
      valueAxis = this.getDomainAxis(axisIndex.intValue());
    } else {
View Full Code Here

   *            the axis index.
   *
   * @return The axis (<code>null</code> possible).
   */
  public ValueAxis getRangeAxis(final int index) {
    ValueAxis result = null;
    if (index < this.rangeAxes.size()) {
      result = (ValueAxis) this.rangeAxes.get(index);
    }
    if (result == null) {
      final Plot parent = this.getParent();
View Full Code Here

    if ((index < 0) || (index >= this.getDatasetCount())) {
      throw new IllegalArgumentException("Index 'index' out of bounds.");
    }

    ValueAxis valueAxis = null;
    final Integer axisIndex = (Integer) this.datasetToRangeAxisMap
        .get(new Integer(index));
    if (axisIndex != null) {
      valueAxis = this.getRangeAxis(axisIndex.intValue());
    } else {
View Full Code Here

      final PlotRenderingInfo info) {

    final Rectangle dataArea = info.getDataArea();
    if (dataArea.contains(x, y)) {
      // set the anchor value for the horizontal axis...
      final ValueAxis da = this.getDomainAxis();
      if (da != null) {
        final double hvalue = da.java2DToValue(x, info.getDataArea(),
            this.getDomainAxisEdge());
        this.setDomainCrosshairValue(hvalue);
      }

      // set the anchor value for the vertical axis...
      final ValueAxis ra = this.getRangeAxis();
      if (ra != null) {
        final double vvalue = ra.java2DToValue(y, info.getDataArea(),
            this.getRangeAxisEdge());
        this.setRangeCrosshairValue(vvalue);
      }
    }
  }
View Full Code Here

    final XYDataset dataset = this.getDataset(index);
    if (DatasetUtilities.isEmptyOrNull(dataset)) {
      return false;
    }

    final ValueAxis xAxis = this.getDomainAxisForDataset(index);
    final ValueAxis yAxis = this.getRangeAxisForDataset(index);
    XYItemRenderer renderer = this.getRenderer(index);
    if (renderer == null) {
      renderer = this.getRenderer();
    }
View Full Code Here

   * @param notify
   *            notify listeners?
   */
  public void setDomainAxis(final int index, final ValueAxis axis,
      final boolean notify) {
    final ValueAxis existing = this.getDomainAxis(index);
    if (existing != null) {
      existing.removeChangeListener(this);
    }
    if (axis != null) {
      axis.setPlot(this);
    }
    this.domainAxes.set(index, axis);
View Full Code Here

   * @param notify
   *            notify listeners?
   */
  public void setRangeAxis(final int index, final ValueAxis axis,
      final boolean notify) {
    final ValueAxis existing = this.getRangeAxis(index);
    if (existing != null) {
      existing.removeChangeListener(this);
    }
    if (axis != null) {
      axis.setPlot(this);
    }
    // XXX Grow the list larger if needed
View Full Code Here

    if (axis != null) {
      axis.setPlot(this);
    }

    // plot is likely registered as a listener with the existing axis...
    final ValueAxis existing = this.getRangeAxis();
    if (existing != null) {
      existing.removeChangeListener(this);
    }

    this.rangeAxes.set(0, axis);
    if (axis != null) {
      axis.configure();
View Full Code Here

TOP

Related Classes of com.positive.charts.axis.ValueAxis

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.