Examples of AxisCollection


Examples of com.positive.charts.axis.AxisCollection

   * @return A map containing the axis states.
   */
  protected Map drawAxes(final GC g2, final Rectangle plotArea,
      final Rectangle dataArea, final PlotRenderingInfo plotState) {

    final AxisCollection axisCollection = new AxisCollection();

    // add domain axes to lists...
    for (int index = 0; index < this.domainAxes.size(); index++) {
      final CategoryAxis xAxis = (CategoryAxis) this.domainAxes
          .get(index);
      if (xAxis != null) {
        axisCollection.add(xAxis, this.getDomainAxisEdge(index));
      }
    }

    // add range axes to lists...
    for (int index = 0; index < this.rangeAxes.size(); index++) {
      final ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(index);
      if (yAxis != null) {
        axisCollection.add(yAxis, this.getRangeAxisEdge(index));
      }
    }

    final Map axisStateMap = new HashMap();

    // draw the top axes
    double cursor = RectangleUtil.getMinY(dataArea)
        - this.axisOffset.calculateTopOutset(dataArea.height);
    Iterator iterator = axisCollection.getAxesAtTop().iterator();
    while (iterator.hasNext()) {
      final Axis axis = (Axis) iterator.next();
      if (axis != null) {
        final AxisState axisState = axis.draw(g2, cursor, plotArea,
            dataArea, RectangleEdge.TOP, plotState);
        cursor = axisState.getCursor();
        axisStateMap.put(axis, axisState);
      }
    }

    // draw the bottom axes
    cursor = RectangleUtil.getMaxY(dataArea)
        + this.axisOffset.calculateBottomOutset(dataArea.height);
    iterator = axisCollection.getAxesAtBottom().iterator();
    while (iterator.hasNext()) {
      final Axis axis = (Axis) iterator.next();
      if (axis != null) {
        final AxisState axisState = axis.draw(g2, cursor, plotArea,
            dataArea, RectangleEdge.BOTTOM, plotState);
        cursor = axisState.getCursor();
        axisStateMap.put(axis, axisState);
      }
    }

    // draw the left axes
    cursor = RectangleUtil.getMinX(dataArea)
        - this.axisOffset.calculateLeftOutset(dataArea.width);
    iterator = axisCollection.getAxesAtLeft().iterator();
    while (iterator.hasNext()) {
      final Axis axis = (Axis) iterator.next();
      if (axis != null) {
        final AxisState axisState = axis.draw(g2, cursor, plotArea,
            dataArea, RectangleEdge.LEFT, plotState);
        cursor = axisState.getCursor();
        axisStateMap.put(axis, axisState);
      }
    }

    // draw the right axes
    cursor = RectangleUtil.getMaxX(dataArea)
        + this.axisOffset.calculateRightOutset(dataArea.width);
    iterator = axisCollection.getAxesAtRight().iterator();
    while (iterator.hasNext()) {
      final Axis axis = (Axis) iterator.next();
      if (axis != null) {
        final AxisState axisState = axis.draw(g2, cursor, plotArea,
            dataArea, RectangleEdge.RIGHT, plotState);
View Full Code Here

Examples of com.positive.charts.axis.AxisCollection

   * @return A map containing the state for each axis drawn.
   */
  protected Map drawAxes(final GC gc, final Rectangle plotArea,
      final Rectangle dataArea, final PlotRenderingInfo plotState) {

    final AxisCollection axisCollection = new AxisCollection();

    // add domain axes to lists...
    for (int index = 0; index < this.domainAxes.size(); index++) {
      final ValueAxis axis = (ValueAxis) this.domainAxes.get(index);
      if (axis != null) {
        axisCollection.add(axis, this.getDomainAxisEdge(index));
      }
    }

    // add range axes to lists...
    for (int index = 0; index < this.rangeAxes.size(); index++) {
      final ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(index);
      if (yAxis != null) {
        axisCollection.add(yAxis, this.getRangeAxisEdge(index));
      }
    }

    final Map axisStateMap = new HashMap();

    // draw the top axes
    double cursor = RectangleUtil.getMinY(dataArea)
        - this.axisOffset.calculateTopOutset(dataArea.height);
    Iterator iterator = axisCollection.getAxesAtTop().iterator();
    while (iterator.hasNext()) {
      final ValueAxis axis = (ValueAxis) iterator.next();
      final AxisState info = axis.draw(gc, cursor, plotArea, dataArea,
          RectangleEdge.TOP, plotState);
      cursor = info.getCursor();
      axisStateMap.put(axis, info);
    }

    // draw the bottom axes
    cursor = RectangleUtil.getMaxY(dataArea)
        + this.axisOffset.calculateBottomOutset(dataArea.height);
    iterator = axisCollection.getAxesAtBottom().iterator();
    while (iterator.hasNext()) {
      final ValueAxis axis = (ValueAxis) iterator.next();
      final AxisState info = axis.draw(gc, cursor, plotArea, dataArea,
          RectangleEdge.BOTTOM, plotState);
      cursor = info.getCursor();
      axisStateMap.put(axis, info);
    }

    // draw the left axes
    cursor = RectangleUtil.getMinX(dataArea)
        - this.axisOffset.calculateLeftOutset(dataArea.width);
    iterator = axisCollection.getAxesAtLeft().iterator();
    while (iterator.hasNext()) {
      final ValueAxis axis = (ValueAxis) iterator.next();
      final AxisState info = axis.draw(gc, cursor, plotArea, dataArea,
          RectangleEdge.LEFT, plotState);
      cursor = info.getCursor();
      axisStateMap.put(axis, info);
    }

    // draw the right axes
    cursor = RectangleUtil.getMaxX(dataArea)
        + this.axisOffset.calculateRightOutset(dataArea.width);
    iterator = axisCollection.getAxesAtRight().iterator();
    while (iterator.hasNext()) {
      final ValueAxis axis = (ValueAxis) iterator.next();
      final AxisState info = axis.draw(gc, cursor, plotArea, dataArea,
          RectangleEdge.RIGHT, plotState);
      cursor = info.getCursor();
View Full Code Here

Examples of org.jfree.chart.axis.AxisCollection

    protected Map drawAxes(Graphics2D g2,
                           Rectangle2D plotArea,
                           Rectangle2D dataArea,
                           PlotRenderingInfo plotState) {

        AxisCollection axisCollection = new AxisCollection();

        // add domain axes to lists...
        for (int index = 0; index < this.domainAxes.size(); index++) {
            CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(index);
            if (xAxis != null) {
                axisCollection.add(xAxis, getDomainAxisEdge(index));
            }
        }

        // add range axes to lists...
        for (int index = 0; index < this.rangeAxes.size(); index++) {
            ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(index);
            if (yAxis != null) {
                axisCollection.add(yAxis, getRangeAxisEdge(index));
            }
        }

        Map axisStateMap = new HashMap();

        // draw the top axes
        double cursor = dataArea.getMinY() - this.axisOffset.calculateTopOutset(
                dataArea.getHeight());
        Iterator iterator = axisCollection.getAxesAtTop().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.TOP, plotState);
                cursor = axisState.getCursor();
                axisStateMap.put(axis, axisState);
            }
        }

        // draw the bottom axes
        cursor = dataArea.getMaxY()
                 + this.axisOffset.calculateBottomOutset(dataArea.getHeight());
        iterator = axisCollection.getAxesAtBottom().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.BOTTOM, plotState);
                cursor = axisState.getCursor();
                axisStateMap.put(axis, axisState);
            }
        }

        // draw the left axes
        cursor = dataArea.getMinX()
                 - this.axisOffset.calculateLeftOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtLeft().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.LEFT, plotState);
                cursor = axisState.getCursor();
                axisStateMap.put(axis, axisState);
            }
        }

        // draw the right axes
        cursor = dataArea.getMaxX()
                 + this.axisOffset.calculateRightOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtRight().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.RIGHT, plotState);
View Full Code Here

Examples of org.jfree.chart.axis.AxisCollection

           PlotRenderingInfo plotState)
   {
      Map axisStateMap = new HashMap();
     
     
      AxisCollection axisCollection = new AxisCollection();

      // add domain axes to lists...
      for (int index = 0; index < super.getDomainAxes().size(); index++)
      {
         ValueAxis axis = (ValueAxis) super.getDomainAxes().get(index);
        
         if (axis != null)
         {
            axisCollection.add(axis, getDomainAxisEdge(index));
         }
      }
     
     
      // draw the top axes
      double cursor = dataArea.getMinY() - this.axisOffset.calculateTopOutset(
              dataArea.getHeight());
     
      Iterator iterator = axisCollection.getAxesAtTop().iterator();
     
      while (iterator.hasNext())
      {
         ValueAxis axis = (ValueAxis) iterator.next();
        
         AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                 RectangleEdge.TOP, plotState);
        
         cursor = info.getCursor();
         axisStateMap.put(axis, info);
      }

      // draw the bottom axes
      cursor = dataArea.getMaxY()
              + this.axisOffset.calculateBottomOutset(dataArea.getHeight());
     
      iterator = axisCollection.getAxesAtBottom().iterator();
     
      while (iterator.hasNext())
      {
         ValueAxis axis = (ValueAxis) iterator.next();
        
         AxisState info = axis.draw(
                 g2,
                 cursor,
                 plotArea,
                 dataArea,
                 RectangleEdge.BOTTOM,
                 plotState);
        
         cursor = info.getCursor();
         axisStateMap.put(axis, info);
      }

      // draw the left axes
      cursor = dataArea.getMinX()
              - this.axisOffset.calculateLeftOutset(dataArea.getWidth());
     
      iterator = axisCollection.getAxesAtLeft().iterator();
     
     
      while (iterator.hasNext())
      {
         ValueAxis axis = (ValueAxis) iterator.next();
        
         AxisState info = axis.draw(g2,
                 cursor,
                 plotArea,
                 dataArea,
                 RectangleEdge.LEFT,
                 plotState);
        
         cursor = info.getCursor();
         axisStateMap.put(axis, info);
      }

      // draw the right axes
      cursor = dataArea.getMaxX()
              + this.axisOffset.calculateRightOutset(dataArea.getWidth());
     
      iterator = axisCollection.getAxesAtRight().iterator();
     
      while (iterator.hasNext())
      {
         ValueAxis axis = (ValueAxis) iterator.next();
         AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
View Full Code Here

Examples of org.jfree.chart.axis.AxisCollection

    protected Map drawAxes(Graphics2D g2,
                           Rectangle2D plotArea,
                           Rectangle2D dataArea,
                           PlotRenderingInfo plotState) {

        AxisCollection axisCollection = new AxisCollection();

        // add domain axes to lists...
        for (int index = 0; index < this.domainAxes.size(); index++) {
            ValueAxis axis = (ValueAxis) this.domainAxes.get(index);
            if (axis != null) {
                axisCollection.add(axis, getDomainAxisEdge(index));
            }
        }

        // add range axes to lists...
        for (int index = 0; index < this.rangeAxes.size(); index++) {
            ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(index);
            if (yAxis != null) {
                axisCollection.add(yAxis, getRangeAxisEdge(index));
            }
        }

        Map axisStateMap = new HashMap();

        // draw the top axes
        double cursor = dataArea.getMinY() - this.axisOffset.calculateTopOutset(
                dataArea.getHeight());
        Iterator iterator = axisCollection.getAxesAtTop().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.TOP, plotState);
            cursor = info.getCursor();
            axisStateMap.put(axis, info);
        }

        // draw the bottom axes
        cursor = dataArea.getMaxY()
                 + this.axisOffset.calculateBottomOutset(dataArea.getHeight());
        iterator = axisCollection.getAxesAtBottom().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.BOTTOM, plotState);
            cursor = info.getCursor();
            axisStateMap.put(axis, info);
        }

        // draw the left axes
        cursor = dataArea.getMinX()
                 - this.axisOffset.calculateLeftOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtLeft().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.LEFT, plotState);
            cursor = info.getCursor();
            axisStateMap.put(axis, info);
        }

        // draw the right axes
        cursor = dataArea.getMaxX()
                 + this.axisOffset.calculateRightOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtRight().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.RIGHT, plotState);
            cursor = info.getCursor();
View Full Code Here

Examples of org.jfree.chart.axis.AxisCollection

    protected Map drawAxes(Graphics2D g2,
                           Rectangle2D plotArea,
                           Rectangle2D dataArea,
                           PlotRenderingInfo plotState) {

        AxisCollection axisCollection = new AxisCollection();

        // add domain axes to lists...
        for (int index = 0; index < this.domainAxes.size(); index++) {
            ValueAxis axis = (ValueAxis) this.domainAxes.get(index);
            if (axis != null) {
                axisCollection.add(axis, getDomainAxisEdge(index));
            }
        }

        // add range axes to lists...
        for (int index = 0; index < this.rangeAxes.size(); index++) {
            ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(index);
            if (yAxis != null) {
                axisCollection.add(yAxis, getRangeAxisEdge(index));
            }
        }

        Map axisStateMap = new HashMap();

        // draw the top axes
        double cursor = dataArea.getMinY() - this.axisOffset.calculateTopOutset(
                dataArea.getHeight());
        Iterator iterator = axisCollection.getAxesAtTop().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.TOP, plotState);
            cursor = info.getCursor();
            axisStateMap.put(axis, info);
        }

        // draw the bottom axes
        cursor = dataArea.getMaxY()
                 + this.axisOffset.calculateBottomOutset(dataArea.getHeight());
        iterator = axisCollection.getAxesAtBottom().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.BOTTOM, plotState);
            cursor = info.getCursor();
            axisStateMap.put(axis, info);
        }

        // draw the left axes
        cursor = dataArea.getMinX()
                 - this.axisOffset.calculateLeftOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtLeft().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.LEFT, plotState);
            cursor = info.getCursor();
            axisStateMap.put(axis, info);
        }

        // draw the right axes
        cursor = dataArea.getMaxX()
                 + this.axisOffset.calculateRightOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtRight().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.RIGHT, plotState);
            cursor = info.getCursor();
View Full Code Here

Examples of org.jfree.chart.axis.AxisCollection

    protected Map drawAxes(Graphics2D g2,
                           Rectangle2D plotArea,
                           Rectangle2D dataArea,
                           PlotRenderingInfo plotState) {

        AxisCollection axisCollection = new AxisCollection();

        // add domain axes to lists...
        for (int index = 0; index < this.domainAxes.size(); index++) {
            CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(index);
            if (xAxis != null) {
                axisCollection.add(xAxis, getDomainAxisEdge(index));
            }
        }

        // add range axes to lists...
        for (int index = 0; index < this.rangeAxes.size(); index++) {
            ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(index);
            if (yAxis != null) {
                axisCollection.add(yAxis, getRangeAxisEdge(index));
            }
        }

        Map axisStateMap = new HashMap();

        // draw the top axes
        double cursor = dataArea.getMinY() - this.axisOffset.calculateTopOutset(
                dataArea.getHeight());
        Iterator iterator = axisCollection.getAxesAtTop().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.TOP, plotState);
                cursor = axisState.getCursor();
                axisStateMap.put(axis, axisState);
            }
        }

        // draw the bottom axes
        cursor = dataArea.getMaxY()
                 + this.axisOffset.calculateBottomOutset(dataArea.getHeight());
        iterator = axisCollection.getAxesAtBottom().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.BOTTOM, plotState);
                cursor = axisState.getCursor();
                axisStateMap.put(axis, axisState);
            }
        }

        // draw the left axes
        cursor = dataArea.getMinX()
                 - this.axisOffset.calculateLeftOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtLeft().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.LEFT, plotState);
                cursor = axisState.getCursor();
                axisStateMap.put(axis, axisState);
            }
        }

        // draw the right axes
        cursor = dataArea.getMaxX()
                 + this.axisOffset.calculateRightOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtRight().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.RIGHT, plotState);
View Full Code Here

Examples of org.jfree.chart.axis.AxisCollection

           Rectangle2D plotArea,
           Rectangle2D dataArea,
           PlotRenderingInfo plotState)
   {

      AxisCollection axisCollection = new AxisCollection();

      // add domain axes to lists...
      for (int index = 0; index < this.domainAxes.size(); index++)
      {
         ValueAxis axis = (ValueAxis) this.domainAxes.get(index);

         if (axis != null)
         {
            axisCollection.add(
                    axis,
                    getDomainAxisEdge(index));
         }
      }

      // add range axes to lists...
      for (int index = 0; index < this.rangeAxes.size(); index++)
      {
         ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(index);

         if (yAxis != null)
         {
            axisCollection.add(
                    yAxis,
                    getRangeAxisEdge(index));
         }
      }

      Map axisStateMap = new HashMap();

      // draw the top axes
      double cursor = dataArea.getMinY() - this.axisOffset.calculateTopOutset(
              dataArea.getHeight());

      Iterator iterator = axisCollection.getAxesAtTop().iterator();

      while (iterator.hasNext())
      {
         ValueAxis axis = (ValueAxis) iterator.next();

         AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                 RectangleEdge.TOP, plotState);

         cursor = info.getCursor();
         axisStateMap.put(axis, info);
      }

      // draw the bottom axes
      cursor = dataArea.getMaxY()
              + this.axisOffset.calculateBottomOutset(dataArea.getHeight());

      iterator = axisCollection.getAxesAtBottom().iterator();

      while (iterator.hasNext())
      {
         ValueAxis axis = (ValueAxis) iterator.next();

         AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                 RectangleEdge.BOTTOM, plotState);

         cursor = info.getCursor();
         axisStateMap.put(axis, info);
      }

      // draw the left axes
      cursor = dataArea.getMinX()
              - this.axisOffset.calculateLeftOutset(dataArea.getWidth());

      iterator = axisCollection.getAxesAtLeft().iterator();


      while (iterator.hasNext())
      {
         ValueAxis axis = (ValueAxis) iterator.next();

         AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                 RectangleEdge.LEFT, plotState);

         cursor = info.getCursor();
         axisStateMap.put(axis, info);
      }

      // draw the right axes
      cursor = dataArea.getMaxX()
              + this.axisOffset.calculateRightOutset(dataArea.getWidth());

      iterator = axisCollection.getAxesAtRight().iterator();

      while (iterator.hasNext())
      {
         ValueAxis axis = (ValueAxis) iterator.next();
         AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
View Full Code Here

Examples of org.jfree.chart.axis.AxisCollection

    protected Map drawAxes(Graphics2D g2,
                           Rectangle2D plotArea,
                           Rectangle2D dataArea,
                           PlotRenderingInfo plotState) {

        AxisCollection axisCollection = new AxisCollection();

        // add domain axes to lists...
        for (int index = 0; index < this.domainAxes.size(); index++) {
            CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(index);
            if (xAxis != null) {
                axisCollection.add(xAxis, getDomainAxisEdge(index));
            }
        }

        // add range axes to lists...
        for (int index = 0; index < this.rangeAxes.size(); index++) {
            ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(index);
            if (yAxis != null) {
                axisCollection.add(yAxis, getRangeAxisEdge(index));
            }
        }

        Map axisStateMap = new HashMap();

        // draw the top axes
        double cursor = dataArea.getMinY() - this.axisOffset.calculateTopOutset(
                dataArea.getHeight());
        Iterator iterator = axisCollection.getAxesAtTop().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.TOP, plotState);
                cursor = axisState.getCursor();
                axisStateMap.put(axis, axisState);
            }
        }

        // draw the bottom axes
        cursor = dataArea.getMaxY()
                 + this.axisOffset.calculateBottomOutset(dataArea.getHeight());
        iterator = axisCollection.getAxesAtBottom().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.BOTTOM, plotState);
                cursor = axisState.getCursor();
                axisStateMap.put(axis, axisState);
            }
        }

        // draw the left axes
        cursor = dataArea.getMinX()
                 - this.axisOffset.calculateLeftOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtLeft().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.LEFT, plotState);
                cursor = axisState.getCursor();
                axisStateMap.put(axis, axisState);
            }
        }

        // draw the right axes
        cursor = dataArea.getMaxX()
                 + this.axisOffset.calculateRightOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtRight().iterator();
        while (iterator.hasNext()) {
            Axis axis = (Axis) iterator.next();
            if (axis != null) {
                AxisState axisState = axis.draw(g2, cursor, plotArea, dataArea,
                        RectangleEdge.RIGHT, plotState);
View Full Code Here

Examples of org.jfree.chart.axis.AxisCollection

    protected Map drawAxes(Graphics2D g2,
                           Rectangle2D plotArea,
                           Rectangle2D dataArea,
                           PlotRenderingInfo plotState) {

        AxisCollection axisCollection = new AxisCollection();

        // add domain axes to lists...
        for (int index = 0; index < this.domainAxes.size(); index++) {
            ValueAxis axis = (ValueAxis) this.domainAxes.get(index);
            if (axis != null) {
                axisCollection.add(axis, getDomainAxisEdge(index));
            }
        }

        // add range axes to lists...
        for (int index = 0; index < this.rangeAxes.size(); index++) {
            ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(index);
            if (yAxis != null) {
                axisCollection.add(yAxis, getRangeAxisEdge(index));
            }
        }

        Map axisStateMap = new HashMap();

        // draw the top axes
        double cursor = dataArea.getMinY() - this.axisOffset.calculateTopOutset(
                dataArea.getHeight());
        Iterator iterator = axisCollection.getAxesAtTop().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.TOP, plotState);
            cursor = info.getCursor();
            axisStateMap.put(axis, info);
        }

        // draw the bottom axes
        cursor = dataArea.getMaxY()
                 + this.axisOffset.calculateBottomOutset(dataArea.getHeight());
        iterator = axisCollection.getAxesAtBottom().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.BOTTOM, plotState);
            cursor = info.getCursor();
            axisStateMap.put(axis, info);
        }

        // draw the left axes
        cursor = dataArea.getMinX()
                 - this.axisOffset.calculateLeftOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtLeft().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.LEFT, plotState);
            cursor = info.getCursor();
            axisStateMap.put(axis, info);
        }

        // draw the right axes
        cursor = dataArea.getMaxX()
                 + this.axisOffset.calculateRightOutset(dataArea.getWidth());
        iterator = axisCollection.getAxesAtRight().iterator();
        while (iterator.hasNext()) {
            ValueAxis axis = (ValueAxis) iterator.next();
            AxisState info = axis.draw(g2, cursor, plotArea, dataArea,
                    RectangleEdge.RIGHT, plotState);
            cursor = info.getCursor();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.