Package org.jfree.ui

Examples of org.jfree.ui.RectangleEdge


      if (value == null)
      {
         return;
      }
      PlotOrientation orientation = plot.getOrientation();
      RectangleEdge axisEdge = plot.getDomainAxisEdge();
      int count = dataset.getColumnCount();
      float x0 = (float) domainAxis.getCategoryStart(column, count, dataArea,
              axisEdge);
      float x1 = (float) domainAxis.getCategoryMiddle(column, count,
              dataArea, axisEdge);
      float x2 = (float) domainAxis.getCategoryEnd(column, count, dataArea,
              axisEdge);

      x0 = Math.round(x0);
      x1 = Math.round(x1);
      x2 = Math.round(x2);

      if (this.endType == AreaRendererEndType.TRUNCATE)
      {
         if (column == 0)
         {
            x0 = x1;
         }
         else if (column == getColumnCount() - 1)
         {
            x2 = x1;
         }
      }

      double yy1 = value.doubleValue();

      double yy0 = 0.0;
      if (this.endType == AreaRendererEndType.LEVEL)
      {
         yy0 = yy1;
      }
      if (column > 0)
      {
         Number n0 = dataset.getValue(row, column - 1);
         if (n0 != null)
         {
            yy0 = (n0.doubleValue() + yy1) / 2.0;
         }
      }

      double yy2 = 0.0;
      if (column < dataset.getColumnCount() - 1)
      {
         Number n2 = dataset.getValue(row, column + 1);
         if (n2 != null)
         {
            yy2 = (n2.doubleValue() + yy1) / 2.0;
         }
      }
      else if (this.endType == AreaRendererEndType.LEVEL)
      {
         yy2 = yy1;
      }

      RectangleEdge edge = plot.getRangeAxisEdge();
      float y0 = (float) rangeAxis.valueToJava2D(yy0, dataArea, edge);
      float y1 = (float) rangeAxis.valueToJava2D(yy1, dataArea, edge);
      float y2 = (float) rangeAxis.valueToJava2D(yy2, dataArea, edge);
      float yz = (float) rangeAxis.valueToJava2D(0.0, dataArea, edge);
      double labelXX = x1;
View Full Code Here


        double y1 = dataset.getYValue(series, item);
        if (Double.isNaN(x1) || Double.isNaN(y1)) {
            itemVisible = false;
        }

        RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
        RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
        double transX1 = domainAxis.valueToJava2D(x1, dataArea, xAxisLocation);
        double transY1 = rangeAxis.valueToJava2D(y1, dataArea, yAxisLocation);

        if (getPlotLines()) {
            if (this.drawSeriesLineAsPath) {
View Full Code Here

        double x = intervalDataset.getXValue(series, item);
        double yLow   = intervalDataset.getStartYValue(series, item);
        double yHigh  = intervalDataset.getEndYValue(series, item);

        RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
        RectangleEdge yAxisLocation = plot.getRangeAxisEdge();

        double xx = domainAxis.valueToJava2D(x, dataArea, xAxisLocation);
        double yyLow = rangeAxis.valueToJava2D(yLow, dataArea, yAxisLocation);
        double yyHigh = rangeAxis.valueToJava2D(yHigh, dataArea, yAxisLocation);
View Full Code Here

            if (value >= uclip) {
               value = uclip;
            }
        }

        RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
        double transY1 = rangeAxis.valueToJava2D(base, dataArea, yAxisLocation);
        double transY2 = rangeAxis.valueToJava2D(value, dataArea,
                yAxisLocation);
        double rectX = Math.min(transY2, transY1);
View Full Code Here

            if (value >= uclip) {
               value = uclip;
            }
        }

        RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
        double transY1 = rangeAxis.valueToJava2D(base, dataArea, yAxisLocation);
        double transY2 = rangeAxis.valueToJava2D(value, dataArea,
                yAxisLocation);
        double rectY = Math.min(transY2, transY1);
View Full Code Here

        double[] adjStackLeft = adjustedStackValues(stack0, stack1);
        double[] adjStackRight = adjustedStackValues(stack1, stack2);

        float transY1;

        RectangleEdge edge1 = plot.getRangeAxisEdge();

        GeneralPath left = new GeneralPath();
        GeneralPath right = new GeneralPath();
        if (y1 >= 0.0) {  // handle positive value
            transY1 = (float) rangeAxis.valueToJava2D(y1 + stack1[1], dataArea,
View Full Code Here

        double translatedBase;
        double translatedValue;
        boolean positive = (value > 0.0);
        boolean inverted = rangeAxis.isInverted();
        RectangleEdge barBase;
        if (orientation == PlotOrientation.HORIZONTAL) {
            if (positive && inverted || !positive && !inverted) {
                barBase = RectangleEdge.RIGHT;
            }
            else {
                barBase = RectangleEdge.LEFT;
            }
        }
        else {
            if (positive && !inverted || !positive && inverted) {
                barBase = RectangleEdge.BOTTOM;
            }
            else {
                barBase = RectangleEdge.TOP;
            }
        }
        RectangleEdge location = plot.getRangeAxisEdge();
        if (value > 0.0) {
            translatedBase = rangeAxis.valueToJava2D(positiveBase, dataArea,
                    location);
            translatedValue = rangeAxis.valueToJava2D(positiveBase + value,
                    dataArea, location);
View Full Code Here

        // calculate the maximum allowed candle width from the axis...
        ValueAxis axis = plot.getDomainAxis();
        double x1 = axis.getLowerBound();
        double x2 = x1 + this.maxCandleWidthInMilliseconds;
        RectangleEdge edge = plot.getDomainAxisEdge();
        double xx1 = axis.valueToJava2D(x1, dataArea, edge);
        double xx2 = axis.valueToJava2D(x2, dataArea, edge);
        this.maxCandleWidth = Math.abs(xx2 - xx1);
            // Absolute value, since the relative x
            // positions are reversed for horizontal orientation
View Full Code Here

        double yHigh = highLowData.getHighValue(series, item);
        double yLow = highLowData.getLowValue(series, item);
        double yOpen = highLowData.getOpenValue(series, item);
        double yClose = highLowData.getCloseValue(series, item);

        RectangleEdge domainEdge = plot.getDomainAxisEdge();
        double xx = domainAxis.valueToJava2D(x, dataArea, domainEdge);

        RectangleEdge edge = plot.getRangeAxisEdge();
        double yyHigh = rangeAxis.valueToJava2D(yHigh, dataArea, edge);
        double yyLow = rangeAxis.valueToJava2D(yLow, dataArea, edge);
        double yyOpen = rangeAxis.valueToJava2D(yOpen, dataArea, edge);
        double yyClose = rangeAxis.valueToJava2D(yClose, dataArea, edge);
View Full Code Here

        double[] barL0L1 = calculateBarL0L1(value);
        if (barL0L1 == null) {
            return// the bar is not visible
        }

        RectangleEdge edge = plot.getRangeAxisEdge();
        double transL0 = rangeAxis.valueToJava2D(barL0L1[0], adjusted, edge);
        double transL1 = rangeAxis.valueToJava2D(barL0L1[1], adjusted, edge);
        double barL0 = Math.min(transL0, transL1);
        double barLength = Math.abs(transL1 - transL0);
View Full Code Here

TOP

Related Classes of org.jfree.ui.RectangleEdge

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.