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

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

?? thermometerplot.java

?? 制作圖表的好工具
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
    }

    /**
     * Sets the range.
     *
     * @param range  the range type.
     * @param low  the low value.
     * @param high  the high value.
     */
    public void setSubrange(int range, double low, double high) {
        if ((range >= 0) && (range < 3)) {
            this.subrangeInfo[range][RANGE_HIGH] = high;
            this.subrangeInfo[range][RANGE_LOW] = low;
        }
    }

    /**
     * Sets the display range.
     *
     * @param range  the range type.
     * @param low  the low value.
     * @param high  the high value.
     */
    public void setDisplayRange(int range, double low, double high) {

        if ((range >= 0) && (range < this.subrangeInfo.length)
            && isValidNumber(high) && isValidNumber(low)) {
 
            if (high > low) {
                this.subrangeInfo[range][DISPLAY_HIGH] = high;
                this.subrangeInfo[range][DISPLAY_LOW] = low;
            }
            else {
                this.subrangeInfo[range][DISPLAY_HIGH] = low;
                this.subrangeInfo[range][DISPLAY_LOW] = high;
            }

        }

    }

    /**
     * Gets the paint used for a particular subrange.
     *
     * @param range  the range.
     *
     * @return The paint.
     */
    public Paint getSubrangePaint(int range) {
        if ((range >= 0) && (range < this.subrangePaint.length)) {
            return this.subrangePaint[range];
        }
        else {
            return this.mercuryPaint;
        }
    }

    /**
     * Sets the paint to be used for a range.
     *
     * @param range  the range.
     * @param paint  the paint to be applied.
     */
    public void setSubrangePaint(int range, Paint paint) {
        if ((range >= 0) 
                && (range < this.subrangePaint.length) && (paint != null)) {
            this.subrangePaint[range] = paint;
            notifyListeners(new PlotChangeEvent(this));
        }
    }

    /**
     * Returns a flag that controls whether or not the thermometer axis zooms 
     * to display the subrange within which the data value falls.
     *
     * @return The flag.
     */
    public boolean getFollowDataInSubranges() {
        return this.followDataInSubranges;
    }

    /**
     * Sets the flag that controls whether or not the thermometer axis zooms 
     * to display the subrange within which the data value falls.
     *
     * @param flag  the flag.
     */
    public void setFollowDataInSubranges(boolean flag) {
        this.followDataInSubranges = flag;
        notifyListeners(new PlotChangeEvent(this));
    }

    /**
     * Returns a flag that controls whether or not the mercury color changes 
     * for each subrange.
     *
     * @return The flag.
     */
    public boolean getUseSubrangePaint() {
        return this.useSubrangePaint;
    }

    /**
     * Sets the range colour change option.
     *
     * @param flag The new range colour change option
     */
    public void setUseSubrangePaint(boolean flag) {
        this.useSubrangePaint = flag;
        notifyListeners(new PlotChangeEvent(this));
    }

    /**
     * Draws the plot on a Java 2D graphics device (such as the screen or a 
     * printer).
     *
     * @param g2  the graphics device.
     * @param area  the area within which the plot should be drawn.
     * @param anchor  the anchor point (<code>null</code> permitted).
     * @param parentState  the state from the parent plot, if there is one.
     * @param info  collects info about the drawing.
     */
    public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
                     PlotState parentState,
                     PlotRenderingInfo info) {

        RoundRectangle2D outerStem = new RoundRectangle2D.Double();
        RoundRectangle2D innerStem = new RoundRectangle2D.Double();
        RoundRectangle2D mercuryStem = new RoundRectangle2D.Double();
        Ellipse2D outerBulb = new Ellipse2D.Double();
        Ellipse2D innerBulb = new Ellipse2D.Double();
        String temp = null;
        FontMetrics metrics = null;
        if (info != null) {
            info.setPlotArea(area);
        }

        // adjust for insets...
        RectangleInsets insets = getInsets();
        insets.trim(area);
        drawBackground(g2, area);

        // adjust for padding...
        //this.padding.trim(plotArea);
        int midX = (int) (area.getX() + (area.getWidth() / 2));
        int midY = (int) (area.getY() + (area.getHeight() / 2));
        int stemTop = (int) (area.getMinY() + BULB_RADIUS);
        int stemBottom = (int) (area.getMaxY() - BULB_DIAMETER);
        Rectangle2D dataArea = new Rectangle2D.Double(
            midX - COLUMN_RADIUS, stemTop, COLUMN_RADIUS, stemBottom - stemTop
        );

        outerBulb.setFrame(
            midX - BULB_RADIUS, stemBottom, BULB_DIAMETER, BULB_DIAMETER
        );

        outerStem.setRoundRect(
            midX - COLUMN_RADIUS, area.getMinY(), COLUMN_DIAMETER,
            stemBottom + BULB_DIAMETER - stemTop, 
            COLUMN_DIAMETER, COLUMN_DIAMETER
        );

        Area outerThermometer = new Area(outerBulb);
        Area tempArea = new Area(outerStem);
        outerThermometer.add(tempArea);

        innerBulb.setFrame(
            midX - BULB_RADIUS + GAP_RADIUS, stemBottom + GAP_RADIUS,
            BULB_DIAMETER - GAP_DIAMETER, BULB_DIAMETER - GAP_DIAMETER
        );

        innerStem.setRoundRect(
            midX - COLUMN_RADIUS + GAP_RADIUS, area.getMinY() + GAP_RADIUS,
            COLUMN_DIAMETER - GAP_DIAMETER, 
            stemBottom + BULB_DIAMETER - GAP_DIAMETER - stemTop,
            COLUMN_DIAMETER - GAP_DIAMETER, COLUMN_DIAMETER - GAP_DIAMETER
        );

        Area innerThermometer = new Area(innerBulb);
        tempArea = new Area(innerStem);
        innerThermometer.add(tempArea);
   
        if ((this.dataset != null) && (this.dataset.getValue() != null)) {
            double current = this.dataset.getValue().doubleValue();
            double ds = this.rangeAxis.valueToJava2D(
                current, dataArea, RectangleEdge.LEFT
            );

            int i = COLUMN_DIAMETER - GAP_DIAMETER; // already calculated
            int j = COLUMN_RADIUS - GAP_RADIUS; // already calculated
            int l = (i / 2);
            int k = (int) Math.round(ds);
            if (k < (GAP_RADIUS + area.getMinY())) {
                k = (int) (GAP_RADIUS + area.getMinY());
                l = BULB_RADIUS;
            }

            Area mercury = new Area(innerBulb);

            if (k < (stemBottom + BULB_RADIUS)) {
                mercuryStem.setRoundRect(
                    midX - j, k, i, (stemBottom + BULB_RADIUS) - k, l, l
                );
                tempArea = new Area(mercuryStem);
                mercury.add(tempArea);
            }

            g2.setPaint(getCurrentPaint());
            g2.fill(mercury);

            // draw range indicators...
            if (this.subrangeIndicatorsVisible) {
                g2.setStroke(this.subrangeIndicatorStroke);
                Range range = this.rangeAxis.getRange();

                // draw start of normal range
                double value = this.subrangeInfo[NORMAL][RANGE_LOW];
                if (range.contains(value)) {
                    double x = midX + COLUMN_RADIUS + 2;
                    double y = this.rangeAxis.valueToJava2D(
                        value, dataArea, RectangleEdge.LEFT
                    );
                    Line2D line = new Line2D.Double(x, y, x + 10, y);
                    g2.setPaint(this.subrangePaint[NORMAL]);
                    g2.draw(line);
                }

                // draw start of warning range
                value = this.subrangeInfo[WARNING][RANGE_LOW];
                if (range.contains(value)) {
                    double x = midX + COLUMN_RADIUS + 2;
                    double y = this.rangeAxis.valueToJava2D(
                        value, dataArea, RectangleEdge.LEFT
                    );
                    Line2D line = new Line2D.Double(x, y, x + 10, y);
                    g2.setPaint(this.subrangePaint[WARNING]);
                    g2.draw(line);
                }

                // draw start of critical range
                value = this.subrangeInfo[CRITICAL][RANGE_LOW];
                if (range.contains(value)) {
                    double x = midX + COLUMN_RADIUS + 2;
                    double y = this.rangeAxis.valueToJava2D(
                        value, dataArea, RectangleEdge.LEFT
                    );
                    Line2D line = new Line2D.Double(x, y, x + 10, y);
                    g2.setPaint(this.subrangePaint[CRITICAL]);
                    g2.draw(line);
                }
            }

            // draw the axis...
            if ((this.rangeAxis != null) && (this.axisLocation != NONE)) {
                int drawWidth = AXIS_GAP;
                if (this.showValueLines) {
                    drawWidth += COLUMN_DIAMETER;
                }
                Rectangle2D drawArea;
                double cursor = 0;

                switch (this.axisLocation) {
                    case RIGHT:
                        cursor = midX + COLUMN_RADIUS;
                        drawArea = new Rectangle2D.Double(
                            cursor,
                            stemTop,
                            drawWidth,
                            (stemBottom - stemTop + 1)
                        );
                        this.rangeAxis.draw(
                            g2, cursor, area, drawArea, 
                            RectangleEdge.RIGHT, null
                        );
                        break;

                    case LEFT:
                    default:
                        //cursor = midX - COLUMN_RADIUS - AXIS_GAP;
                        cursor = midX - COLUMN_RADIUS;
                        drawArea = new Rectangle2D.Double(
                            cursor,
                            stemTop,
                            drawWidth,
                            (stemBottom - stemTop + 1)
                        );
                        this.rangeAxis.draw(
                            g2, cursor, area, drawArea, 
                            RectangleEdge.LEFT, null
                        );
                        break;
                }
                   
            }

            // draw text value on screen
            g2.setFont(this.valueFont);
            g2.setPaint(this.valuePaint);
            metrics = g2.getFontMetrics();
            switch (this.valueLocation) {
                case RIGHT:
                    g2.drawString(
                        this.valueFormat.format(current), 
                        midX + COLUMN_RADIUS + GAP_RADIUS, midY
                    );
                    break;
                case LEFT:
                    String valueString = this.valueFormat.format(current);
                    int stringWidth = metrics.stringWidth(valueString);
                    g2.drawString(
                        valueString, 
                        midX - COLUMN_RADIUS - GAP_RADIUS - stringWidth, midY
                    );
                    break;
                case BULB:
                    temp = this.valueFormat.format(current);
                    i = metrics.stringWidth(temp) / 2;
                    g2.drawString(
                        temp, midX - i, 
                        stemBottom + BULB_RADIUS + GAP_RADIUS
                    );
                    break;
                default:
            }
            /***/
        }

        g2.setPaint(this.thermometerPaint);
        g2.setFont(this.valueFont);

        //  draw units indicator
        metrics = g2.getFontMetrics();
        int tickX1 = midX - COLUMN_RADIUS - GAP_DIAMETER 
                     - metrics.stringWidth(UNITS[this.units]);
        if (tickX1 > area.getMinX()) {
            g2.drawString(
                UNITS[this.units], tickX1, (int) (area.getMinY() + 20)
            );
        }

        // draw thermometer outline
        g2.setStroke(this.thermometerStroke);
        g2.draw(outerThermometer);
        g2.draw(innerThermometer);

        drawOutline(g2, area);
    }

    /**
     * A zoom method that does nothing.  Plots are required to support the 
     * zoom operation.  In the case of a thermometer chart, it doesn't make 
     * sense to zoom in or out, so the method is empty.
     *
     * @param percent  the zoom percentage.
     */
    public void zoom(double percent) {
        // intentionally blank
   }

    /**
     * Returns a short string describing the type of plot.
     *
     * @return A short string describing the type of plot.
     */
    public String getPlotType() {
        return localizationResources.getString("Thermometer_Plot");
    }

    /**
     * Checks to see if a new value means the axis range needs adjusting.
     *
     * @param event  the dataset change event.
     */
    public void datasetChanged(DatasetChangeEvent event) {
        Number vn = this.dataset.getValue();
        if (vn != null) {
            double value = vn.doubleValue();
            if (inSubrange(NORMAL, value)) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91网站在线观看视频| 日本一区二区三级电影在线观看| 欧美亚洲国产一区二区三区| 91精品国产综合久久久久久久久久 | 国产亚洲精品超碰| 欧美日韩成人综合| 欧美一区二区日韩| 久久综合色之久久综合| 国产欧美综合在线观看第十页| 国产精品久久久久久久久久免费看 | 亚洲观看高清完整版在线观看| 亚洲国产美女搞黄色| 韩国成人福利片在线播放| 国产精品白丝jk黑袜喷水| 成人激情校园春色| 91精品国产色综合久久ai换脸 | 日韩中文字幕亚洲一区二区va在线| 亚洲高清免费观看| 国产乱码一区二区三区| 99视频精品在线| 欧美一区二区国产| 国产精品福利av| 久久av资源网| 日韩欧美专区在线| 中文一区二区完整视频在线观看| 亚洲一区在线观看视频| 国产成人免费在线视频| 91精品国产aⅴ一区二区| 国产精品传媒入口麻豆| 久久99国产精品免费| 在线免费观看日本欧美| 亚洲日本一区二区| 中文字幕乱码久久午夜不卡| 亚洲韩国一区二区三区| 不卡免费追剧大全电视剧网站| 欧美成人a在线| 天堂在线一区二区| 精品视频在线看| 一区二区三区四区不卡在线| 成人免费观看视频| 中文在线资源观看网站视频免费不卡| 青青草精品视频| 91精品国产综合久久久久久久久久 | 麻豆精品一区二区av白丝在线| 欧洲人成人精品| 国产精品视频九色porn| 国产在线麻豆精品观看| 日韩女优av电影在线观看| 午夜精彩视频在线观看不卡| 91国偷自产一区二区三区成为亚洲经典 | 欧美一区二区视频在线观看2020| 亚洲综合视频在线观看| 欧美日韩国产片| 亚洲电影第三页| 日韩欧美一二区| 国产99精品国产| 亚洲欧美日韩精品久久久久| 欧美亚洲日本一区| 久久99精品视频| 亚洲欧美综合色| 在线播放国产精品二区一二区四区| 亚洲3atv精品一区二区三区| 欧美一区二区三区色| 国产成人亚洲精品狼色在线| 亚洲色图视频免费播放| 欧美人与z0zoxxxx视频| 国产成人a级片| 美腿丝袜亚洲一区| 国产精品系列在线| 欧美日韩一区二区三区视频| 久久精品999| 亚洲自拍欧美精品| 久久久久9999亚洲精品| 欧美中文字幕一二三区视频| 蜜臀av性久久久久蜜臀aⅴ流畅| 久久久精品日韩欧美| 欧美亚洲图片小说| 大桥未久av一区二区三区中文| 亚洲va欧美va人人爽| 欧美国产国产综合| 亚洲精品一区二区三区精华液 | 成人开心网精品视频| 日韩国产精品91| 亚洲黄色在线视频| 中文字幕在线一区二区三区| 日韩欧美一区电影| 欧美色老头old∨ideo| 91在线观看污| 国产高清在线精品| 国模套图日韩精品一区二区| 日日摸夜夜添夜夜添精品视频 | 国产69精品久久777的优势| 天堂一区二区在线| 亚洲精品成a人| 日韩高清一级片| 亚洲精品自拍动漫在线| 国产精品久久久久桃色tv| 国产三级一区二区| 国产亲近乱来精品视频| 久久欧美中文字幕| 国产免费成人在线视频| 国产视频一区二区在线| 国产欧美一区二区三区鸳鸯浴| 久久一二三国产| 欧美精品一区二区三区一线天视频| 日韩一级二级三级| 精品国产网站在线观看| 精品国产sm最大网站| 国产网站一区二区三区| 国产精品久久久久一区二区三区共 | 亚洲一区二区三区三| 天堂影院一区二区| 九色|91porny| 成人午夜激情片| 欧美日免费三级在线| 91麻豆精品国产91久久久资源速度| 777色狠狠一区二区三区| 久久―日本道色综合久久| 国产人成亚洲第一网站在线播放| 亚洲欧美在线视频观看| 亚洲狠狠爱一区二区三区| 国产真实精品久久二三区| www.日韩大片| 精品国产一区二区三区四区四 | 日韩欧美视频一区| 国产精品伦理一区二区| 婷婷中文字幕一区三区| 波多野结衣中文一区| 欧美一级免费大片| 最新热久久免费视频| 日韩一区精品视频| 婷婷开心久久网| 亚洲一区二区三区在线看| 国产在线精品一区二区| 色8久久人人97超碰香蕉987| 久久综合久久99| 丝袜美腿亚洲一区| 91精品福利在线| 日本一区二区三区国色天香| 青青草国产成人av片免费| 91久久国产最好的精华液| 亚洲国产岛国毛片在线| 久久国产精品72免费观看| 欧美日韩你懂的| 亚洲一区在线观看免费观看电影高清 | 国产成人精品影视| 一本一道综合狠狠老| 欧美不卡一二三| 老司机一区二区| 日本丰满少妇一区二区三区| 日韩一卡二卡三卡| 日本伊人午夜精品| 日韩精品中文字幕一区| 欧美一区二区啪啪| 中文字幕精品综合| 国产精品夜夜爽| 国产日韩欧美综合在线| 国产成人精品免费| 国产精品污污网站在线观看| 国产成人欧美日韩在线电影| 久久亚洲精品国产精品紫薇| 韩国一区二区三区| 久久久久久久久久美女| 不卡视频在线看| 一区二区三区欧美久久| 欧美日韩不卡一区| 理论电影国产精品| 国产精品免费视频网站| 日本高清视频一区二区| 日韩国产一区二| 久久久噜噜噜久久中文字幕色伊伊 | 欧美性xxxxxxxx| 激情欧美一区二区| 亚洲欧美成aⅴ人在线观看| 91日韩一区二区三区| 亚洲免费色视频| 日韩午夜小视频| 成人午夜私人影院| 午夜久久久影院| 国产午夜精品一区二区| 欧美亚洲国产一区二区三区va| 亚洲国产成人av| 中文字幕欧美区| 日韩一级片网址| 日本精品一区二区三区四区的功能| 婷婷国产在线综合| 中文字幕一区在线观看| 日韩一区二区高清| 欧美亚洲一区二区在线| 国产一区视频网站| 日韩av一级电影| 亚洲精品伦理在线| 国产日本一区二区| 日韩一级大片在线| 欧美日本一区二区在线观看| 成人动漫在线一区| 成人做爰69片免费看网站| 国产精一品亚洲二区在线视频| 日日夜夜精品视频免费| 欧美成人艳星乳罩|