Package org.jfree.ui

Examples of org.jfree.ui.RectangleEdge


        if (dataset instanceof XYZDataset) {
            XYZDataset xyzData = (XYZDataset) dataset;
            z = xyzData.getZValue(series, item);
        }
        if (!Double.isNaN(z)) {
            RectangleEdge domainAxisLocation = plot.getDomainAxisEdge();
            RectangleEdge rangeAxisLocation = plot.getRangeAxisEdge();
            double transX = domainAxis.valueToJava2D(x, dataArea,
                    domainAxisLocation);
            double transY = rangeAxis.valueToJava2D(y, dataArea,
                    rangeAxisLocation);
View Full Code Here


            if (this.drawXError) {
                // draw the error bar for the x-interval
                double x0 = ixyd.getStartXValue(series, item);
                double x1 = ixyd.getEndXValue(series, item);
                double y = ixyd.getYValue(series, item);
                RectangleEdge edge = plot.getDomainAxisEdge();
                double xx0 = domainAxis.valueToJava2D(x0, dataArea, edge);
                double xx1 = domainAxis.valueToJava2D(x1, dataArea, edge);
                double yy = rangeAxis.valueToJava2D(y, dataArea,
                        plot.getRangeAxisEdge());
                Line2D line;
                Line2D cap1 = null;
                Line2D cap2 = null;
                double adj = this.capLength / 2.0;
                if (orientation == PlotOrientation.VERTICAL) {
                    line = new Line2D.Double(xx0, yy, xx1, yy);
                    cap1 = new Line2D.Double(xx0, yy - adj, xx0, yy + adj);
                    cap2 = new Line2D.Double(xx1, yy - adj, xx1, yy + adj);
                }
                else // PlotOrientation.HORIZONTAL
                    line = new Line2D.Double(yy, xx0, yy, xx1);
                    cap1 = new Line2D.Double(yy - adj, xx0, yy + adj, xx0);
                    cap2 = new Line2D.Double(yy - adj, xx1, yy + adj, xx1);
                }
                if (this.errorPaint != null) {
                    g2.setPaint(this.errorPaint);
                }
                else {
                    g2.setPaint(getItemPaint(series, item));
                }
                if (this.errorStroke != null) {
                    g2.setStroke(this.errorStroke);
                }
                else {
                    g2.setStroke(getItemStroke(series, item));
                }
                g2.draw(line);
                g2.draw(cap1);
                g2.draw(cap2);
            }
            if (this.drawYError) {
                // draw the error bar for the y-interval
                double y0 = ixyd.getStartYValue(series, item);
                double y1 = ixyd.getEndYValue(series, item);
                double x = ixyd.getXValue(series, item);
                RectangleEdge edge = plot.getRangeAxisEdge();
                double yy0 = rangeAxis.valueToJava2D(y0, dataArea, edge);
                double yy1 = rangeAxis.valueToJava2D(y1, dataArea, edge);
                double xx = domainAxis.valueToJava2D(x, dataArea,
                        plot.getDomainAxisEdge());
                Line2D line;
View Full Code Here

      if (orientation == null)
      {
         throw new IllegalArgumentException("Null 'orientation' argument.");
      }

      RectangleEdge result = null;

      if (location == AxisLocation.TOP_OR_RIGHT)
      {
         if (orientation == PlotOrientation.HORIZONTAL)
         {
View Full Code Here

      if (orientation == null)
      {
         throw new IllegalArgumentException("Null 'orientation' argument.");
      }

      RectangleEdge result = null;

      if (location == AxisLocation.TOP_OR_RIGHT)
      {
         if (orientation == PlotOrientation.HORIZONTAL)
         {
View Full Code Here

            return;
        }

        double x1 = x1n.doubleValue();
        double y1 = y1n.doubleValue();
        final RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
        final RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
        double transX1 = domainAxis.translateValueToJava2D
            (x1, dataArea, xAxisLocation);
        double transY1 = rangeAxis.translateValueToJava2D
            (y1, dataArea, yAxisLocation);
View Full Code Here

            return;
        }

        double x1 = x1n.doubleValue();
        double y1 = y1n.doubleValue();
        final RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
        final RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
        double transX1 = domainAxis.valueToJava2D
            (x1, dataArea, xAxisLocation);
        double transY1 = rangeAxis.valueToJava2D
            (y1, dataArea, yAxisLocation);
        PlotOrientation orientation = plot.getOrientation();
View Full Code Here

     */
    protected void drawPrimaryLineAsPath(XYItemRendererState state,
            Graphics2D g2, XYPlot plot, XYDataset dataset, int pass,
            int series, int item, ValueAxis domainAxis, ValueAxis rangeAxis, Rectangle2D dataArea) {

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

        // get the data points
        double x1 = dataset.getXValue(series, item);
        double y1 = dataset.getYValue(series, item);
        double transX1 = domainAxis.valueToJava2D(x1, dataArea, xAxisLocation);
View Full Code Here

            }

            ChartRenderingInfo info = this.chartPanel.getChartRenderingInfo();
            Rectangle2D dataArea = info.getPlotInfo().getDataArea();
            ValueAxis domainAxis = this.renderer.getPlot().getDomainAxis();
            RectangleEdge edge = this.renderer.getPlot().getDomainAxisEdge();

            // define the limits for the region to be shaded

            if ((startpoint != null) && (endpoint != null)) {
                double x = domainAxis.java2DToValue(startpoint.getX(), dataArea, edge);
View Full Code Here

            this.renderer.getPlot().clearDomainMarkers();
            Point2D point = this.chartPanel.translateScreenToJava2D(e.getPoint());
            ChartRenderingInfo info = this.chartPanel.getChartRenderingInfo();
            Rectangle2D dataArea = info.getPlotInfo().getDataArea();
            ValueAxis domainAxis = this.renderer.getPlot().getDomainAxis();
            RectangleEdge edge = this.renderer.getPlot().getDomainAxisEdge();

            // define the point for the peaks
            double peakPoint = domainAxis.java2DToValue(point.getX(), dataArea, edge);

            this.intmark = new ValueMarker(peakPoint);
View Full Code Here

    protected double mouseXAxisPosition(Point p) {
        ChartRenderingInfo info = this.chartPanel.getChartRenderingInfo();
        Rectangle2D dataArea = info.getPlotInfo().getDataArea();
        ValueAxis axis = getDomainAxis();
        RectangleEdge edge = getXYPlot().getDomainAxisEdge();
        return axis.java2DToValue(p.getX(), dataArea, edge);
    }
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.