亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? contourplot.java

?? Web圖形化的Java庫
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
            notifyListeners(new PlotChangeEvent(this));
        }
    }

    /**
     * Adds an annotation to the plot.
     *
     * @param annotation  the annotation.
     */
    public void addAnnotation(XYAnnotation annotation) {

        if (this.annotations == null) {
            this.annotations = new java.util.ArrayList();
        }
        this.annotations.add(annotation);
        notifyListeners(new PlotChangeEvent(this));

    }

    /**
     * Clears all the annotations.
     */
    public void clearAnnotations() {
        if (this.annotations != null) {
            this.annotations.clear();
            notifyListeners(new PlotChangeEvent(this));
        }
    }

    /**
     * Checks the compatibility of a domain axis, returning true if the axis is
     * compatible with the plot, and false otherwise.
     *
     * @param axis The proposed axis.
     *
     * @return <code>true</code> if the axis is compatible with the plot.
     */
    public boolean isCompatibleDomainAxis(ValueAxis axis) {

        return true;

    }

    /**
     * Draws the plot on a Java 2D graphics device (such as the screen or a printer).
     * <P>
     * The optional <code>info</code> argument collects information about the rendering of
     * the plot (dimensions, tooltip information etc).  Just pass in <code>null</code> if
     * you do not need this information.
     *
     * @param g2  the graphics device.
     * @param plotArea  the area within which the plot (including axis labels) should be drawn.
     * @param info  collects chart drawing information (<code>null</code> permitted).
     */
    public void draw(Graphics2D g2, Rectangle2D plotArea, ChartRenderingInfo info) {

        // if the plot area is too small, just return...
        boolean b1 = (plotArea.getWidth() <= MINIMUM_WIDTH_TO_DRAW);
        boolean b2 = (plotArea.getHeight() <= MINIMUM_HEIGHT_TO_DRAW);
        if (b1 || b2) {
            return;
        }

        // record the plot area...
        if (info != null) {
            info.setPlotArea(plotArea);
        }

        // adjust the drawing area for plot insets (if any)...
        Insets insets = getInsets();
        if (insets != null) {
            plotArea.setRect(plotArea.getX() + insets.left,
                             plotArea.getY() + insets.top,
                             plotArea.getWidth() - insets.left - insets.right,
                             plotArea.getHeight() - insets.top - insets.bottom);
        }

        AxisSpace space = new AxisSpace();
        
        space = this.domainAxis.reserveSpace(g2, this, plotArea, RectangleEdge.BOTTOM, space);
        space = this.rangeAxis.reserveSpace(g2, this, plotArea, RectangleEdge.LEFT, space);

        Rectangle2D estimatedDataArea = space.shrink(plotArea, null);
        
        AxisSpace space2 = new AxisSpace();
        space2 = this.colorBar.reserveSpace(g2, this, plotArea, estimatedDataArea,
                                            this.colorBarLocation, space2);
        Rectangle2D adjustedPlotArea = space2.shrink(plotArea, null);
        
        Rectangle2D dataArea = space.shrink(adjustedPlotArea, null);

        Rectangle2D colorBarArea = space2.reserved(plotArea, this.colorBarLocation);

        // additional dataArea modifications
        if (getDataAreaRatio() != 0.0) { //check whether modification is
            double ratio = getDataAreaRatio();
            Rectangle2D tmpDataArea = (Rectangle2D) dataArea.clone();
            double h = tmpDataArea.getHeight();
            double w = tmpDataArea.getWidth();

            if (ratio > 0) { // ratio represents pixels
                if (w * ratio <= h) {
                    h = ratio * w;
                }
                else {
                    w = h / ratio;
                }
            }
            else {  // ratio represents axis units
                ratio *= -1.0;
                double xLength = getDomainAxis().getRange().getLength();
                double yLength = getRangeAxis().getRange().getLength();
                double unitRatio = yLength / xLength;

                ratio = unitRatio * ratio;

                if (w * ratio <= h) {
                    h = ratio * w;
                }
                else {
                    w = h / ratio;
                }
            }

            dataArea.setRect(tmpDataArea.getX() + tmpDataArea.getWidth() / 2 - w / 2,
                             tmpDataArea.getY(), w, h);
        }

        if (info != null) {
            info.setDataArea(dataArea);
        }

        CrosshairInfo crosshairInfo = new CrosshairInfo();

        crosshairInfo.setCrosshairDistance(Double.POSITIVE_INFINITY);
       // crosshairInfo.setAnchorX(getDomainAxis().getAnchorValue());
       // crosshairInfo.setAnchorY(getRangeAxis().getAnchorValue());

        // draw the plot background...
        drawBackground(g2, dataArea);

        double cursor = dataArea.getMaxY();
        if (this.domainAxis != null) {
            cursor = this.domainAxis.draw(g2, cursor, 
                                          adjustedPlotArea, dataArea, RectangleEdge.BOTTOM);
        }

        if (this.rangeAxis != null) {
            cursor = dataArea.getMinX();
            cursor = this.rangeAxis.draw(g2, cursor, 
                                         adjustedPlotArea, dataArea, RectangleEdge.LEFT);
        }

        if (colorBar != null) {
            cursor = 0.0;
            cursor = this.colorBar.draw(g2, cursor, 
                                        adjustedPlotArea, dataArea, colorBarArea, 
                                        this.colorBarLocation);
        }
        Shape originalClip = g2.getClip();
        Composite originalComposite = g2.getComposite();

        g2.clip(dataArea);
        g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
                                                   getForegroundAlpha()));
        render(g2, dataArea, info, crosshairInfo);

        if (this.domainMarkers != null) {
            Iterator iterator = this.domainMarkers.iterator();
            while (iterator.hasNext()) {
                Marker marker = (Marker) iterator.next();
                drawDomainMarker(g2, this, getDomainAxis(), marker, dataArea);
            }
        }

        if (this.rangeMarkers != null) {
            Iterator iterator = this.rangeMarkers.iterator();
            while (iterator.hasNext()) {
                Marker marker = (Marker) iterator.next();
                drawRangeMarker(g2, this, getRangeAxis(), marker, dataArea);
            }
        }

// TO DO:  these annotations only work with XYPlot, see if it is possible to make ContourPlot a
// subclass of XYPlot (DG);

//        // draw the annotations...
//        if (this.annotations != null) {
//            Iterator iterator = this.annotations.iterator();
//            while (iterator.hasNext()) {
//                Annotation annotation = (Annotation) iterator.next();
//                if (annotation instanceof XYAnnotation) {
//                    XYAnnotation xya = (XYAnnotation) annotation;
//                    // get the annotation to draw itself...
//                    xya.draw(g2, this, dataArea, getDomainAxis(), getRangeAxis());
//                }
//            }
//        }

        g2.setClip(originalClip);
        g2.setComposite(originalComposite);
        drawOutline(g2, dataArea);

    }

    /**
     * Draws a representation of the data within the dataArea region, using the
     * current renderer.
     * <P>
     * The <code>info</code> and <code>crosshairInfo</code> arguments may be <code>null</code>.
     *
     * @param g2  the graphics device.
     * @param dataArea  the region in which the data is to be drawn.
     * @param info  an optional object for collection dimension information.
     * @param crosshairInfo  an optional object for collecting crosshair info.
     */
    public void render(Graphics2D g2, Rectangle2D dataArea,
                       ChartRenderingInfo info, CrosshairInfo crosshairInfo) {

        // now get the data and plot it (the visual representation will depend
        // on the renderer that has been set)...
        ContourDataset data = this.getContourDataset();
        if (data != null) {

 //           renderer.initialise(g2, dataArea, this, data, info);

//            ValueAxis domainAxis = getDomainAxis();
//            ValueAxis rangeAxis = getRangeAxis();
            ColorBar zAxis = getColorBar();

            if (clipPath != null) {
                GeneralPath clipper = getClipPath().draw(g2, dataArea, domainAxis, rangeAxis);
                if (clipPath.isClip()) {
                    g2.clip(clipper);
                }
            }

            if (renderAsPoints) {
                pointRenderer(g2, dataArea, info, this,
                              domainAxis, rangeAxis, zAxis,
                              data, crosshairInfo);
            }
            else {
                contourRenderer(g2, dataArea, info, this,
                                domainAxis, rangeAxis, zAxis,
                                data, crosshairInfo);
            }

            // draw vertical crosshair if required...
            setDomainCrosshairValue(crosshairInfo.getCrosshairX(), false);
            if (isDomainCrosshairVisible()) {
                drawVerticalLine(g2, dataArea,
                                 getDomainCrosshairValue(),
                                 getDomainCrosshairStroke(),
                                 getDomainCrosshairPaint());
            }

            // draw horizontal crosshair if required...
            setRangeCrosshairValue(crosshairInfo.getCrosshairY(), false);
            if (isRangeCrosshairVisible()) {
                drawHorizontalLine(g2, dataArea,
                                   getRangeCrosshairValue(),
                                   getRangeCrosshairStroke(),
                                   getRangeCrosshairPaint());
            }

        }
        else if (clipPath != null) {
            getClipPath().draw(g2, dataArea, domainAxis, rangeAxis);
        }

    }

    /**
     * Fills the plot.
     *
     * @param g2  the graphics device.
     * @param dataArea  the area within which the data is being drawn.
     * @param info  collects information about the drawing.
     * @param plot  the plot (can be used to obtain standard color information etc).
     * @param horizontalAxis  the domain (horizontal) axis.
     * @param verticalAxis  the range (vertical) axis.
     * @param colorBar  the color bar axis.
     * @param data  the dataset.
     * @param crosshairInfo  information about crosshairs on a plot.
     */
    public void contourRenderer(Graphics2D g2,
                                Rectangle2D dataArea,
                                ChartRenderingInfo info,
                                ContourPlot plot,
                                ValueAxis horizontalAxis,
                                ValueAxis verticalAxis,
                                ColorBar colorBar,
                                ContourDataset data,
                                CrosshairInfo crosshairInfo) {

        // setup for collecting optional entity info...
        Rectangle2D.Double entityArea = null;
        EntityCollection entities = null;
        if (info != null) {
            entities = info.getEntityCollection();
        }

//        Shape clipRegion = g2.getClip();

        Rectangle2D.Double rect = null;
        rect = new Rectangle2D.Double();

        //turn off anti-aliasing when filling rectangles
        Object antiAlias = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);

        // if (tooltips!=null) tooltips.clearToolTips(); // reset collection
        // get the data points
        Number[] xNumber = data.getXValues();
        Number[] yNumber = data.getYValues();
        Number[] zNumber = data.getZValues();

        double[] x = new double[xNumber.length];
        double[] y = new double[yNumber.length];
//        double[] z = new double[zNumber.length]; // dmo:remove this line

        for (int i = 0; i < x.length; i++) {
            x[i] = xNumber[i].doubleValue();
            y[i] = yNumber[i].doubleValue();
//            z[i] = zNumber[i].doubleValue();    //dmo:remove this line
        }

        int[] xIndex = ((DefaultContourDataset) data).indexX();
        int[] indexX = ((DefaultContourDataset) data).getXIndices();
        boolean vertInverted = ((NumberAxis) verticalAxis).isInverted();
        boolean horizInverted = false;
        if (horizontalAxis instanceof NumberAxis) {
            horizInverted = ((NumberAxis) horizontalAxis).isInverted();
        }
        double transX = 0.0;
        double transXm1 = 0.0;
        double transXp1 = 0.0;
        double transDXm1 = 0.0;
        double transDXp1 = 0.0;
        double transDX = 0.0;
        double transY = 0.0;
        double transYm1 = 0.0;
        double transYp1 = 0.0;
        double transDYm1 = 0.0;
        double transDYp1 = 0.0;
        double transDY = 0.0;
        int iMax = xIndex[xIndex.length - 1];
        for (int k = 0; k < x.length; k++) {
            int i = xIndex[k];
            if (indexX[i] == k) { // this is a new column
                if (i == 0) {
                    transX = horizontalAxis.translateValueToJava2D(x[k], dataArea, 
                                                                   RectangleEdge.BOTTOM);
                    transXm1 = transX;
                    transXp1 = horizontalAxis.translateValueToJava2D(x[indexX[i + 1]], dataArea, 
                                                                     RectangleEdge.BOTTOM);
                    transDXm1 = Math.abs(0.5 * (transX - transXm1));
                    transDXp1 = Math.abs(0.5 * (transX - transXp1));
                }
                else if (i == iMax) {
                    transX = horizontalAxis.translateValueToJava2D(x[k], dataArea, 
                                                                   RectangleEdge.BOTTOM);
                    transXm1 = horizontalAxis.translateValueToJava2D(x[indexX[i - 1]], dataArea, 
                                                                     RectangleEdge.BOTTOM);
                    transXp1 = transX;
                    transDXm1 = Math.abs(0.5 * (transX - transXm1));
                    transDXp1 = Math.abs(0.5 * (transX - transXp1));
                }
                else {
                    transX = horizontalAxis.translateValueToJava2D(x[k], dataArea, 
                                                                   RectangleEdge.BOTTOM);
                    transXp1 = horizontalAxis.translateValueToJava2D(x[indexX[i + 1]], dataArea, 
                                                                     RectangleEdge.BOTTOM);
                    transDXm1 = transDXp1;
                    transDXp1 = Math.abs(0.5 * (transX - transXp1));
                }

                if (horizInverted) {
                    transX -= transDXp1;
                }
                else {
                    transX -= transDXm1;
                }

                transDX = transDXm1 + transDXp1;

                transY = verticalAxis.translateValueToJava2D(y[k], dataArea, RectangleEdge.LEFT);
                transYm1 = transY;
                if (k + 1 == y.length) {
                    continue;
                }
                transYp1 = verticalAxis.translateValueToJava2D(y[k + 1], dataArea, 
                                                               RectangleEdge.LEFT);
                transDYm1 = Math.abs(0.5 * (transY - transYm1));
                transDYp1 = Math.abs(0.5 * (transY - transYp1));
            }
            else if ((i < indexX.length - 1 && indexX[i + 1] - 1 == k) || k == x.length - 1) {
                // end of column
                transY = verticalAxis.translateValueToJava2D(y[k], dataArea, RectangleEdge.LEFT);
                transYm1 = verticalAxis.translateValueToJava2D(y[k - 1], dataArea, 
                                                               RectangleEdge.LEFT);
                transYp1 = transY;
                transDYm1 = Math.abs(0.5 * (transY - transYm1));
                transDYp1 = Math.abs(0.5 * (transY - transYp1));
            }
            else {
                transY = verticalAxis.translateValueToJava2D(y[k], dataArea, RectangleEdge.LEFT);
                transYp1 = verticalAxis.translateValueToJava2D(y[k + 1], dataArea, 
                                                               RectangleEdge.LEFT);
                transDYm1 = transDYp1;
                transDYp1 = Math.abs(0.5 * (transY - transYp1));
            }
            if (vertInverted) {
                transY -= transDYm1;
            }
            else {
                transY -= transDYp1;
            }

            transDY = transDYm1 + transDYp1;

            rect.setRect(transX, transY, transDX, transDY);
            if (zNumber[k] != null) {
                g2.setPaint(colorBar.getPaint(zNumber[k].doubleValue()));
                g2.fill(rect);
            }
            else if (missingPaint != null) {
                g2.setPaint(missingPaint);
                g2.fill(rect);
            }

            entityArea = rect;

            // add an entity for the item...
            if (entities != null) {
                String tip = "";

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品毛片久久久久久久| 91精品国产综合久久久久久久| 久久久久99精品一区| 国产酒店精品激情| 国产日韩欧美电影| 成人av影院在线| 一区二区在线观看av| 欧美日韩视频不卡| 久久精品久久综合| 国产亚洲一二三区| 91网站在线播放| 热久久国产精品| 中文欧美字幕免费| 欧美日韩在线播放三区| 日韩电影在线免费| 国产婷婷一区二区| 欧美三级日韩在线| 国产一区二区三区在线观看免费视频 | 欧美日韩成人激情| 九色综合狠狠综合久久| 中文字幕高清一区| 欧美色男人天堂| 高清成人在线观看| 午夜精品久久久久久久| 久久午夜色播影院免费高清| 91麻豆国产自产在线观看| 日韩电影在线一区| 亚洲天天做日日做天天谢日日欢| 欧美日韩久久久久久| 国产高清不卡一区二区| 亚洲国产va精品久久久不卡综合| 久久久久青草大香线综合精品| 91福利国产精品| 国产一区亚洲一区| 亚洲成人在线观看视频| 国产情人综合久久777777| 欧美性淫爽ww久久久久无| 国产乱子轮精品视频| 亚洲国产成人91porn| 国产精品亲子伦对白| 日韩欧美一区在线| 欧美日韩专区在线| 91亚洲资源网| 国产老肥熟一区二区三区| 爽爽淫人综合网网站| 成人欧美一区二区三区| 中文字幕乱码久久午夜不卡| 精品视频一区二区不卡| 99久久免费视频.com| 九一九一国产精品| 日韩电影免费在线| 亚洲精品免费视频| 中文字幕不卡在线观看| 精品少妇一区二区三区在线播放| 欧美在线啊v一区| 91丨porny丨国产入口| 国产精品一区二区久激情瑜伽| 日本在线播放一区二区三区| 亚洲一二三区在线观看| 亚洲色图制服丝袜| 国产精品网站在线| 国产婷婷色一区二区三区在线| 精品国产乱子伦一区| 欧美一区二区三区日韩| 欧美久久久久免费| 欧美三日本三级三级在线播放| 色欧美片视频在线观看在线视频| 成人91在线观看| 东方aⅴ免费观看久久av| 国产成人免费视频网站高清观看视频| 奇米精品一区二区三区四区| 三级在线观看一区二区| 亚洲一区二区成人在线观看| 亚洲黄色性网站| 亚洲欧美日韩国产综合| 自拍偷拍亚洲激情| 亚洲三级在线看| 一区二区三区日韩精品视频| 一区二区三区 在线观看视频| 一区二区三国产精华液| 午夜精品一区在线观看| 调教+趴+乳夹+国产+精品| 轻轻草成人在线| 美女视频一区二区三区| 激情成人午夜视频| 欧美亚洲国产bt| 一区二区在线电影| 欧美tk—视频vk| 久久综合色8888| 一区二区三区欧美日| 制服丝袜亚洲色图| 最新不卡av在线| 日本一区二区三区在线不卡 | 一本久道中文字幕精品亚洲嫩| 成人开心网精品视频| 欧美电影一区二区| 日韩一级欧美一级| 久久精品亚洲一区二区三区浴池 | 亚洲午夜久久久| 亚洲一区在线观看视频| 日韩成人dvd| 国产一区91精品张津瑜| 91视频在线观看| 欧美又粗又大又爽| 欧美不卡激情三级在线观看| 中文字幕av一区二区三区| 一区二区三区在线播| 另类中文字幕网| 99re热这里只有精品免费视频| 欧美日韩一卡二卡| 久久久国产精品麻豆| 亚洲少妇中出一区| 蜜桃视频在线一区| 99久精品国产| 欧美大度的电影原声| 日韩伦理av电影| 久久国产尿小便嘘嘘尿| 97久久精品人人爽人人爽蜜臀| 91精品视频网| 亚洲欧美日韩久久| 黄一区二区三区| 91福利在线免费观看| 久久久精品中文字幕麻豆发布| 亚洲自拍偷拍综合| 国产精品一区二区视频| 欧美日韩精品一区视频| 国产精品丝袜91| 精品无码三级在线观看视频| 91国偷自产一区二区使用方法| 久久久国产精品不卡| 琪琪一区二区三区| 一本在线高清不卡dvd| 久久久久久电影| 日本伊人色综合网| 欧美在线小视频| 国产精品国产自产拍高清av王其 | 国产精品538一区二区在线| 欧美视频你懂的| 国产精品福利一区| 国产精品中文字幕日韩精品 | 91麻豆swag| 久久久蜜臀国产一区二区| 日韩福利视频网| 欧美亚洲自拍偷拍| 亚洲欧美激情在线| 成人性色生活片免费看爆迷你毛片| 欧美一区二区三区视频免费| 亚洲国产精品一区二区久久| 北条麻妃国产九九精品视频| 久久精品在线观看| 国产一区二区三区免费在线观看| 欧美久久免费观看| 午夜电影久久久| 欧美日韩免费一区二区三区视频| 国产精品网曝门| 国产不卡在线播放| 国产欧美精品一区| 国产裸体歌舞团一区二区| ww久久中文字幕| 国产一区在线看| 国产色一区二区| 高清不卡在线观看| 国产精品入口麻豆原神| 成人福利电影精品一区二区在线观看| 久久久久久一二三区| 国产精品99久| 国产精品免费网站在线观看| 成人一区在线观看| 亚洲欧洲国产日本综合| 91看片淫黄大片一级在线观看| 亚洲天堂成人网| 欧美最猛黑人xxxxx猛交| 亚洲图片有声小说| 这里只有精品电影| 免费xxxx性欧美18vr| 精品福利二区三区| 成人高清在线视频| 亚洲精品自拍动漫在线| 欧美性感一类影片在线播放| 亚洲成人在线观看视频| 欧美一区二区免费视频| 国产在线视频不卡二| 欧美国产综合色视频| av不卡在线播放| 图片区小说区国产精品视频 | 久久久久久久综合| 成人激情开心网| 一区二区三区蜜桃| 91精品国产高清一区二区三区| 国产一区二区三区久久悠悠色av| 欧美激情艳妇裸体舞| 在线免费精品视频| 美女mm1313爽爽久久久蜜臀| 欧美另类变人与禽xxxxx| 看电影不卡的网站| 中文字幕日韩av资源站| 欧美在线不卡视频| 国产一区三区三区| 亚洲卡通动漫在线| 日韩免费成人网|