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

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

?? meterplot.java

?? jfreechart1.0.1 jsp繪制圖表的開發包
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
                    Ellipse2D circle = new Ellipse2D.Double(
                        meterMiddleX - DEFAULT_CIRCLE_SIZE / 2,
                        meterMiddleY - DEFAULT_CIRCLE_SIZE / 2,
                        DEFAULT_CIRCLE_SIZE, DEFAULT_CIRCLE_SIZE
                    );
                    g2.fill(circle);
                }
            }
                

            g2.clip(savedClip);
            g2.setComposite(originalComposite);

        }
        if (this.drawBorder) {
            drawOutline(g2, area);
        }

    }

    /**
     * Draws the arc to represent an interval.
     *
     * @param g2  the graphics device.
     * @param meterArea  the drawing area.
     * @param interval  the interval.
     */
    protected void drawArcForInterval(Graphics2D g2, Rectangle2D meterArea, 
                                      MeterInterval interval) {

        double minValue = interval.getRange().getLowerBound();
        double maxValue = interval.getRange().getUpperBound();
        Paint outlinePaint = interval.getOutlinePaint();
        Stroke outlineStroke = interval.getOutlineStroke();
        Paint backgroundPaint = interval.getBackgroundPaint();
 
        if (backgroundPaint != null) {
            fillArc(g2, meterArea, minValue, maxValue, backgroundPaint, false);
        }
        if (outlinePaint != null) {
            if (outlineStroke != null) {
                drawArc(
                    g2, meterArea, minValue, maxValue, 
                    outlinePaint, outlineStroke
                );
            }
            drawTick(g2, meterArea, minValue, true);
            drawTick(g2, meterArea, maxValue, true);
        }
    }

    /**
     * Draws an arc.
     *
     * @param g2  the graphics device.
     * @param area  the plot area.
     * @param minValue  the minimum value.
     * @param maxValue  the maximum value.
     * @param paint  the paint.
     * @param stroke  the stroke.
     */
    protected void drawArc(Graphics2D g2, Rectangle2D area, double minValue, 
                           double maxValue, Paint paint, Stroke stroke) {

        double startAngle = valueToAngle(maxValue);
        double endAngle = valueToAngle(minValue);
        double extent = endAngle - startAngle;

        double x = area.getX();
        double y = area.getY();
        double w = area.getWidth();
        double h = area.getHeight();
        g2.setPaint(paint);
        g2.setStroke(stroke);

        if (paint != null && stroke != null) {
            Arc2D.Double arc = new Arc2D.Double(
                x, y, w, h, startAngle, extent, Arc2D.OPEN
            );
            g2.setPaint(paint); 
            g2.setStroke(stroke);
            g2.draw(arc);
        }

    }

    /**
     * Fills an arc on the dial between the given values.
     *
     * @param g2  the graphics device.
     * @param area  the plot area.
     * @param minValue  the minimum data value.
     * @param maxValue  the maximum data value.
     * @param paint  the background paint (<code>null</code> not permitted).
     * @param dial  a flag that indicates whether the arc represents the whole 
     *              dial.
     */
    protected void fillArc(Graphics2D g2, Rectangle2D area, 
                           double minValue, double maxValue, Paint paint,
                           boolean dial) {
        if (paint == null) {
            throw new IllegalArgumentException("Null 'paint' argument");
        }
        double startAngle = valueToAngle(maxValue);
        double endAngle = valueToAngle(minValue);
        double extent = endAngle - startAngle;

        double x = area.getX();
        double y = area.getY();
        double w = area.getWidth();
        double h = area.getHeight();
        int joinType = Arc2D.OPEN;
        if (this.shape == DialShape.PIE) {
            joinType = Arc2D.PIE;
        }
        else if (this.shape == DialShape.CHORD) {
            if (dial && this.meterAngle > 180) {
                joinType = Arc2D.CHORD;
            }
            else {
                joinType = Arc2D.PIE;
            }
        }
        else if (this.shape == DialShape.CIRCLE) {
            joinType = Arc2D.PIE;
            if (dial) {
                extent = 360;
            }
        }
        else {
            throw new IllegalStateException("DialShape not recognised.");
        }

        g2.setPaint(paint);
        Arc2D.Double arc = new Arc2D.Double(
            x, y, w, h, startAngle, extent, joinType
        );
        g2.fill(arc);
    }
    
    /**
     * Translates a data value to an angle on the dial.
     *
     * @param value  the value.
     *
     * @return The angle on the dial.
     */
    public double valueToAngle(double value) {
        value = value - this.range.getLowerBound();
        double baseAngle = 180 + ((this.meterAngle - 180) / 2);
        return baseAngle - ((value / this.range.getLength()) * this.meterAngle);
    }

    /**
     * Draws the ticks that subdivide the overall range.
     *
     * @param g2  the graphics device.
     * @param meterArea  the meter area.
     * @param minValue  the minimum value.
     * @param maxValue  the maximum value.
     */
    protected void drawTicks(Graphics2D g2, Rectangle2D meterArea, 
                             double minValue, double maxValue) {
        for (double v = minValue; v <= maxValue; v += tickSize) {
            drawTick(g2, meterArea, v);
        }
    }

    /**
     * Draws a tick.
     *
     * @param g2  the graphics device.
     * @param meterArea  the meter area.
     * @param value  the value.
     */
    protected void drawTick(Graphics2D g2, Rectangle2D meterArea, 
            double value) {
        drawTick(g2, meterArea, value, false);
    }

    /**
     * Draws a tick on the dial.
     *
     * @param g2  the graphics device.
     * @param meterArea  the meter area.
     * @param value  the tick value.
     * @param label  a flag that controls whether or not a value label is drawn.
     */
    protected void drawTick(Graphics2D g2, Rectangle2D meterArea,
                            double value, boolean label) {

        double valueAngle = valueToAngle(value);

        double meterMiddleX = meterArea.getCenterX();
        double meterMiddleY = meterArea.getCenterY();

        g2.setPaint(this.tickPaint);
        g2.setStroke(new BasicStroke(2.0f));

        double valueP2X = 0;
        double valueP2Y = 0;

        double radius = (meterArea.getWidth() / 2) + DEFAULT_BORDER_SIZE;
        double radius1 = radius - 15;

        double valueP1X = meterMiddleX 
                + (radius * Math.cos(Math.PI * (valueAngle / 180)));
        double valueP1Y = meterMiddleY 
                - (radius * Math.sin(Math.PI * (valueAngle / 180)));

        valueP2X = meterMiddleX 
                + (radius1 * Math.cos(Math.PI * (valueAngle / 180)));
        valueP2Y = meterMiddleY 
                - (radius1 * Math.sin(Math.PI * (valueAngle / 180)));

        Line2D.Double line = new Line2D.Double(valueP1X, valueP1Y, valueP2X, 
                valueP2Y);
        g2.draw(line);

        if (this.tickLabelsVisible && label) {

            String tickLabel =  this.tickLabelFormat.format(value);
            g2.setFont(this.tickLabelFont);
            g2.setPaint(this.tickLabelPaint);

            FontMetrics fm = g2.getFontMetrics();
            Rectangle2D tickLabelBounds 
                = TextUtilities.getTextBounds(tickLabel, g2, fm);

            double x = valueP2X;
            double y = valueP2Y;
            if (valueAngle == 90 || valueAngle == 270) {
                x = x - tickLabelBounds.getWidth() / 2;
            }
            else if (valueAngle < 90 || valueAngle > 270) {
                x = x - tickLabelBounds.getWidth();
            }
            if ((valueAngle > 135 && valueAngle < 225) 
                    || valueAngle > 315 || valueAngle < 45) {
                y = y - tickLabelBounds.getHeight() / 2;
            }
            else {
                y = y + tickLabelBounds.getHeight() / 2;
            }
            g2.drawString(tickLabel, (float) x, (float) y);
        }
    }
    
    /**
     * Draws the value label just below the center of the dial.
     * 
     * @param g2  the graphics device.
     * @param area  the plot area.
     */
    protected void drawValueLabel(Graphics2D g2, Rectangle2D area) {
        g2.setFont(this.valueFont);
        g2.setPaint(this.valuePaint);
        String valueStr = "No value";
        if (dataset != null) {
            Number n = dataset.getValue();
            if (n != null) {
                valueStr = this.tickLabelFormat.format(n.doubleValue()) + " " 
                         + this.units;
            }
        }
        float x = (float) area.getCenterX();
        float y = (float) area.getCenterY() + DEFAULT_CIRCLE_SIZE;
        TextUtilities.drawAlignedString(valueStr, g2, x, y, 
                TextAnchor.TOP_CENTER);
    }

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

    /**
     * A zoom method that does nothing.  Plots are required to support the 
     * zoom operation.  In the case of a meter plot, 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
    }
    
    /**
     * Tests the plot for equality with an arbitrary object.  Note that the 
     * dataset is ignored for the purposes of testing equality.
     * 
     * @param obj  the object (<code>null</code> permitted).
     * 
     * @return A boolean.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }   
        if (!(obj instanceof MeterPlot)) {
            return false;   
        }
        if (!super.equals(obj)) {
            return false;
        }
        MeterPlot that = (MeterPlot) obj;
        if (!ObjectUtilities.equal(this.units, that.units)) {
            return false;   
        }
        if (!ObjectUtilities.equal(this.range, that.range)) {
            return false;
        }
        if (!ObjectUtilities.equal(this.intervals, that.intervals)) {
            return false;   
        }
        if (!PaintUtilities.equal(this.dialOutlinePaint, 
                that.dialOutlinePaint)) {
            return false;   
        }
        if (this.shape != that.shape) {
            return false;   
        }
        if (!PaintUtilities.equal(this.dialBackgroundPaint, 
                that.dialBackgroundPaint)) {
            return false;   
        }
        if (!PaintUtilities.equal(this.needlePaint, that.needlePaint)) {
            return false;   
        }
        if (!ObjectUtilities.equal(this.valueFont, that.valueFont)) {
            return false;   
        }
        if (!PaintUtilities.equal(this.valuePaint, that.valuePaint)) {
            return false;   
        }
        if (!PaintUtilities.equal(this.tickPaint, that.tickPaint)) {
            return false;
        }
        if (this.tickSize != that.tickSize) {
            return false;
        }
        if (this.tickLabelsVisible != that.tickLabelsVisible) {
            return false;   
        }
        if (!ObjectUtilities.equal(this.tickLabelFont, that.tickLabelFont)) {
            return false;   
        }
        if (!PaintUtilities.equal(this.tickLabelPaint, that.tickLabelPaint)) {
            return false;
        }
        if (!ObjectUtilities.equal(this.tickLabelFormat, 
                that.tickLabelFormat)) {
            return false;   
        }
        if (this.drawBorder != that.drawBorder) {
            return false;   
        }
        if (this.meterAngle != that.meterAngle) {
            return false;   
        }
        return true;      
    }
    
    /**
     * Provides serialization support.
     *
     * @param stream  the output stream.
     *
     * @throws IOException  if there is an I/O error.
     */
    private void writeObject(ObjectOutputStream stream) throws IOException {
        stream.defaultWriteObject();
        SerialUtilities.writePaint(this.dialBackgroundPaint, stream);
        SerialUtilities.writePaint(this.needlePaint, stream);
        SerialUtilities.writePaint(this.valuePaint, stream);
    }
    
    /**
     * Provides serialization support.
     *
     * @param stream  the input stream.
     *
     * @throws IOException  if there is an I/O error.
     * @throws ClassNotFoundException  if there is a classpath problem.
     */
    private void readObject(ObjectInputStream stream) 
        throws IOException, ClassNotFoundException {
        stream.defaultReadObject();
        this.dialBackgroundPaint = SerialUtilities.readPaint(stream);
        this.needlePaint = SerialUtilities.readPaint(stream);
        this.valuePaint = SerialUtilities.readPaint(stream);
        if (this.dataset != null) {
            this.dataset.addChangeListener(this);
        }
    }

    /** 
     * Returns an independent copy (clone) of the plot.  The dataset is NOT 
     * cloned - both the original and the clone will have a reference to the
     * same dataset.
     * 
     * @return A clone.
     * 
     * @throws CloneNotSupportedException if some component of the plot cannot
     *         be cloned.
     */
    public Object clone() throws CloneNotSupportedException {
        MeterPlot clone = (MeterPlot) super.clone();
        clone.tickLabelFormat = (NumberFormat) this.tickLabelFormat.clone();
        // the following relies on the fact that the intervals are immutable
        clone.intervals = new java.util.ArrayList(this.intervals);
        if (clone.dataset != null) {
            clone.dataset.addChangeListener(clone); 
        }
        return clone;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美国欧美日韩国产在线播放| 国产在线麻豆精品观看| 亚洲午夜电影网| 精品在线免费观看| 在线观看亚洲专区| 久久美女艺术照精彩视频福利播放| 国产精品人人做人人爽人人添| 综合久久综合久久| 国产主播一区二区三区| 欧美日韩国产美| 亚洲女与黑人做爰| 国产成人精品影视| 精品国产乱码久久久久久牛牛| 亚洲欧美激情在线| 成人av在线观| 久久久噜噜噜久噜久久综合| 日韩电影免费在线观看网站| 色婷婷精品大视频在线蜜桃视频| 久久久久九九视频| 久久精品99国产精品| 欧美日韩国产大片| 亚洲欧美日韩久久| 日韩精品三区四区| 成人丝袜视频网| 久久在线观看免费| 免费在线观看精品| 男女视频一区二区| 懂色av噜噜一区二区三区av| 色偷偷成人一区二区三区91 | 九一久久久久久| 国产精品综合二区| 欧美亚洲综合色| 久久久久久久久免费| 一区二区三区加勒比av| 久久国产精品免费| 一本大道久久a久久精二百| eeuss影院一区二区三区| 91在线视频18| 久久综合国产精品| 亚洲午夜电影在线| 国产福利一区二区| 欧美一二三四区在线| 亚洲色图色小说| 日本中文字幕一区| 精品捆绑美女sm三区| 天天综合网 天天综合色| 国产99精品视频| 亚洲私人影院在线观看| 在线免费视频一区二区| 亚洲成人动漫在线免费观看| 国产91在线观看| 精品91自产拍在线观看一区| 午夜久久久久久| 欧美视频日韩视频| 2020国产精品自拍| 成人动漫一区二区在线| 久久视频一区二区| 麻豆91免费看| 亚洲免费观看高清| 成人黄色777网| 成人激情文学综合网| 亚洲欧美激情小说另类| 国产99久久久国产精品潘金网站| 日韩一区二区三区免费看| 亚洲成人免费av| 在线观看视频91| 亚洲最色的网站| 久久激五月天综合精品| 国产精品午夜在线| 欧美日本在线播放| 国产精品视频在线看| 欧美综合亚洲图片综合区| 亚洲电影一级片| 欧美日韩一级片网站| 日本欧美在线观看| 欧美一区二区三区男人的天堂 | 国产精品综合网| 国产欧美日韩亚州综合| 国产精品12区| 精品国产伦一区二区三区观看方式 | 亚洲国产成人91porn| 日韩成人一区二区三区在线观看| 在线精品视频一区二区三四| 亚洲婷婷在线视频| 91电影在线观看| 日韩精品成人一区二区三区| 欧美一区二区久久| 日本aⅴ亚洲精品中文乱码| 亚洲成a人片在线不卡一二三区| 成人综合在线观看| 中文av字幕一区| 91福利区一区二区三区| 肉色丝袜一区二区| 亚洲免费在线视频| 欧美亚洲日本一区| 日韩专区一卡二卡| 国产亚洲视频系列| 懂色av中文字幕一区二区三区| 日本在线不卡视频| 久久久精品一品道一区| 成人av资源下载| 人妖欧美一区二区| 国产日韩欧美综合一区| 蜜桃视频一区二区| 天堂va蜜桃一区二区三区漫画版| 精品国产乱码久久久久久影片| 99国产精品99久久久久久| 亚洲一二三级电影| 国产资源精品在线观看| 最新热久久免费视频| 日本道免费精品一区二区三区| 青草国产精品久久久久久| 337p亚洲精品色噜噜噜| 精品国产伦理网| www.日韩大片| 国产成人在线色| 中文天堂在线一区| 91精品国产一区二区三区蜜臀| 99精品在线免费| av中文字幕亚洲| 麻豆91小视频| 亚洲mv大片欧洲mv大片精品| 国产欧美va欧美不卡在线| 69精品人人人人| 99re这里只有精品6| 丁香天五香天堂综合| 日韩1区2区3区| 亚洲欧洲日韩在线| 欧美国产日韩a欧美在线观看| 91丨九色丨黑人外教| 裸体在线国模精品偷拍| 精品国产三级电影在线观看| 国产精品一区专区| 视频在线观看国产精品| 国产精品国产三级国产专播品爱网| 日韩精品一区二区三区四区| 欧美三级欧美一级| 色综合久久久久综合| 日本不卡1234视频| 国产一区999| 蜜臀av国产精品久久久久| 一区二区三区四区乱视频| 欧美精品一区二区三区四区| 欧美日韩国产精选| 欧美日韩在线观看一区二区| 91丝袜国产在线播放| 99精品视频在线观看免费| 精品一区二区日韩| 一区二区三区四区在线免费观看| 天堂一区二区在线| 天天av天天翘天天综合网| 婷婷激情综合网| 久久天堂av综合合色蜜桃网| 久久午夜免费电影| 日韩成人精品视频| 奇米四色…亚洲| 久久久欧美精品sm网站| 99久久夜色精品国产网站| 国产在线精品不卡| 国产露脸91国语对白| 欧美亚日韩国产aⅴ精品中极品| av成人动漫在线观看| 不卡视频一二三四| 91老师国产黑色丝袜在线| 99久久国产免费看| 成人免费毛片片v| 日韩一区二区三区av| 精品日韩av一区二区| 亚洲精品在线免费播放| 久久精品亚洲麻豆av一区二区 | 亚洲成av人片一区二区梦乃 | 国产精品久久久久aaaa| 亚洲麻豆国产自偷在线| 一区二区激情小说| 免费看欧美女人艹b| 色婷婷久久久久swag精品| 在线亚洲欧美专区二区| 欧美理论片在线| 久久综合给合久久狠狠狠97色69| 国产亲近乱来精品视频| 欧美日韩国产大片| 自拍偷拍欧美精品| 丝袜美腿亚洲综合| 成人综合婷婷国产精品久久免费| 91免费在线视频观看| 日本高清不卡视频| 亚洲色图欧美在线| 三级久久三级久久| 国产99久久久国产精品| 欧美日韩免费不卡视频一区二区三区| 国产精一品亚洲二区在线视频| 91精品久久久久久久久99蜜臂| 精品剧情在线观看| 亚洲综合一二三区| 国产99久久久国产精品免费看| 91麻豆自制传媒国产之光| 久久精品亚洲精品国产欧美| 亚洲永久精品国产| 国产一区二区三区av电影| 在线亚洲+欧美+日本专区|