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

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

?? pieplot.java

?? jfreechart1.0.1 jsp繪制圖表的開發包
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
     * @param generator  the generator (<code>null</code> not permitted).
     */
    public void setLegendLabelGenerator(PieSectionLabelGenerator generator) {
        if (generator == null) {
            throw new IllegalArgumentException("Null 'generator' argument.");
        }
        this.legendLabelGenerator = generator;
        notifyListeners(new PlotChangeEvent(this));
    }
    
    /**
     * Initialises the drawing procedure.  This method will be called before 
     * the first item is rendered, giving the plot an opportunity to initialise
     * any state information it wants to maintain.
     *
     * @param g2  the graphics device.
     * @param plotArea  the plot area (<code>null</code> not permitted).
     * @param plot  the plot.
     * @param index  the secondary index (<code>null</code> for primary 
     *               renderer).
     * @param info  collects chart rendering information for return to caller.
     * 
     * @return A state object (maintains state information relevant to one 
     *         chart drawing).
     */
    public PiePlotState initialise(Graphics2D g2, Rectangle2D plotArea,
            PiePlot plot, Integer index, PlotRenderingInfo info) {
     
        PiePlotState state = new PiePlotState(info);
        state.setPassesRequired(2);
        state.setTotal(DatasetUtilities.calculatePieDatasetTotal(
                plot.getDataset()));
        state.setLatestAngle(plot.getStartAngle());
        return state;
        
    }
    
    /**
     * 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 
     *              (<code>null</code> permitted).
     */
    public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
                     PlotState parentState, PlotRenderingInfo info) {

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

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

        drawBackground(g2, area);
        drawOutline(g2, area);

        Shape savedClip = g2.getClip();
        g2.clip(area);

        Composite originalComposite = g2.getComposite();
        g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 
                getForegroundAlpha()));

        if (!DatasetUtilities.isEmptyOrNull(this.dataset)) {
            drawPie(g2, area, info);
        }
        else {
            drawNoDataMessage(g2, area);
        }

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

        drawOutline(g2, area);

    }

    /**
     * Draws the pie.
     *
     * @param g2  the graphics device.
     * @param plotArea  the plot area.
     * @param info  chart rendering info.
     */
    protected void drawPie(Graphics2D g2, Rectangle2D plotArea, 
                           PlotRenderingInfo info) {

        PiePlotState state = initialise(g2, plotArea, this, null, info);

        // adjust the plot area for interior spacing and labels...
        double labelWidth = 0.0;
        if (this.labelGenerator != null) {
            labelWidth = this.labelGap + this.maximumLabelWidth 
                         + this.labelLinkMargin;    
        }
        double gapHorizontal 
            = plotArea.getWidth() * (this.interiorGap + labelWidth);
        double gapVertical = plotArea.getHeight() * this.interiorGap;

        double linkX = plotArea.getX() + gapHorizontal / 2;
        double linkY = plotArea.getY() + gapVertical / 2;
        double linkW = plotArea.getWidth() - gapHorizontal;
        double linkH = plotArea.getHeight() - gapVertical;
        
        // make the link area a square if the pie chart is to be circular...
        if (this.circular) {
            double min = Math.min(linkW, linkH) / 2;
            linkX = (linkX + linkX + linkW) / 2 - min;
            linkY = (linkY + linkY + linkH) / 2 - min;
            linkW = 2 * min;
            linkH = 2 * min;
        }

        // the link area defines the dog leg points for the linking lines to 
        // the labels
        Rectangle2D linkArea = new Rectangle2D.Double(linkX, linkY, linkW, 
                linkH);
        state.setLinkArea(linkArea);
        
        // the explode area defines the max circle/ellipse for the exploded 
        // pie sections.  it is defined by shrinking the linkArea by the 
        // linkMargin factor.
        double hh = linkArea.getWidth() * this.labelLinkMargin;
        double vv = linkArea.getHeight() * this.labelLinkMargin;
        Rectangle2D explodeArea = new Rectangle2D.Double(linkX + hh / 2.0, 
                linkY + vv / 2.0, linkW - hh, linkH - vv);
       
        state.setExplodedPieArea(explodeArea);
        
        // the pie area defines the circle/ellipse for regular pie sections.
        // it is defined by shrinking the explodeArea by the explodeMargin 
        // factor. 
        double maximumExplodePercent = getMaximumExplodePercent();
        double percent = maximumExplodePercent / (1.0 + maximumExplodePercent);
        
        double h1 = explodeArea.getWidth() * percent;
        double v1 = explodeArea.getHeight() * percent;
        Rectangle2D pieArea = new Rectangle2D.Double(explodeArea.getX() 
                + h1 / 2.0, explodeArea.getY() + v1 / 2.0, 
                explodeArea.getWidth() - h1, explodeArea.getHeight() - v1);

        state.setPieArea(pieArea);
        state.setPieCenterX(pieArea.getCenterX());
        state.setPieCenterY(pieArea.getCenterY());
        state.setPieWRadius(pieArea.getWidth() / 2.0);
        state.setPieHRadius(pieArea.getHeight() / 2.0);
        // plot the data (unless the dataset is null)...
        if ((this.dataset != null) && (this.dataset.getKeys().size() > 0)) {

            List keys = this.dataset.getKeys();
            double totalValue 
                = DatasetUtilities.calculatePieDatasetTotal(this.dataset);

            int passesRequired = state.getPassesRequired();
            for (int pass = 0; pass < passesRequired; pass++) {
                double runningTotal = 0.0;
                for (int section = 0; section < keys.size(); section++) {
                    Number n = this.dataset.getValue(section);
                    if (n != null) {
                        double value = n.doubleValue();
                        if (value > 0.0) {
                            runningTotal += value;
                            drawItem(g2, section, explodeArea, state, pass);
                        }
                    } 
                }
            }
            
            drawLabels(g2, keys, totalValue, plotArea, linkArea, state);

        }
        else {
            drawNoDataMessage(g2, plotArea);
        }
    }
    
    /**
     * Draws a single data item.
     *
     * @param g2  the graphics device (<code>null</code> not permitted).
     * @param section  the section index.
     * @param dataArea  the data plot area.
     * @param state  state information for one chart.
     * @param currentPass  the current pass index.
     */
    protected void drawItem(Graphics2D g2, int section, Rectangle2D dataArea,
                            PiePlotState state, int currentPass) {
    
        Number n = this.dataset.getValue(section);
        if (n == null) {
            return;   
        }
        double value = n.doubleValue();
        double angle1 = 0.0;
        double angle2 = 0.0;
        
        if (this.direction == Rotation.CLOCKWISE) {
            angle1 = state.getLatestAngle();
            angle2 = angle1 - value / state.getTotal() * 360.0;
        }
        else if (this.direction == Rotation.ANTICLOCKWISE) {
            angle1 = state.getLatestAngle();
            angle2 = angle1 + value / state.getTotal() * 360.0;         
        }
        else {
            throw new IllegalStateException("Rotation type not recognised.");   
        }
        
        double angle = (angle2 - angle1);
        if (Math.abs(angle) > getMinimumArcAngleToDraw()) {
            double ep = 0.0;
            double mep = getMaximumExplodePercent();
            if (mep > 0.0) {
                ep = getExplodePercent(section) / mep;                
            }
            Rectangle2D arcBounds = getArcBounds(state.getPieArea(), 
                    state.getExplodedPieArea(), angle1, angle, ep);
            Arc2D.Double arc = new Arc2D.Double(arcBounds, angle1, angle, 
                    Arc2D.PIE);
            
            if (currentPass == 0) {
                if (this.shadowPaint != null) {
                    Shape shadowArc = ShapeUtilities.createTranslatedShape(
                            arc, (float) this.shadowXOffset, 
                            (float) this.shadowYOffset);
                    g2.setPaint(this.shadowPaint);
                    g2.fill(shadowArc);
                }
            }
            else if (currentPass == 1) {

                Paint paint = getSectionPaint(section);
                g2.setPaint(paint);
                g2.fill(arc);

                Paint outlinePaint = getSectionOutlinePaint(section);
                Stroke outlineStroke = getSectionOutlineStroke(section);
                if (this.sectionOutlinesVisible) {
                    g2.setPaint(outlinePaint);
                    g2.setStroke(outlineStroke);
                    g2.draw(arc);
                }
                
                // update the linking line target for later
                // add an entity for the pie section
                if (state.getInfo() != null) {
                    EntityCollection entities = state.getEntityCollection();
                    if (entities != null) {
                        Comparable key = this.dataset.getKey(section);
                        String tip = null;
                        if (this.toolTipGenerator != null) {
                            tip = this.toolTipGenerator.generateToolTip(
                                    this.dataset, key);
                        }
                        String url = null;
                        if (this.urlGenerator != null) {
                            url = this.urlGenerator.generateURL(this.dataset, 
                                    key, this.pieIndex);
                        }
                        PieSectionEntity entity = new PieSectionEntity(
                                arc, this.dataset, this.pieIndex, section, key,
                                tip, url);
                        entities.add(entity);
                    }
                }
            }
        }    
        state.setLatestAngle(angle2);
    }
    
    /**
     * Draws the labels for the pie sections.
     * 
     * @param g2  the graphics device.
     * @param keys  the keys.
     * @param totalValue  the total value.
     * @param plotArea  the plot area.
     * @param linkArea  the link area.
     * @param state  the state.
     */
    protected void drawLabels(Graphics2D g2, List keys, double totalValue, 
                              Rectangle2D plotArea, Rectangle2D linkArea, 
                              PiePlotState state) {   

        Composite originalComposite = g2.getComposite();
        g2.setComposite(
                AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));

        // classify the keys according to which side the label will appear...
        DefaultKeyedValues leftKeys = new DefaultKeyedValues();
        DefaultKeyedValues rightKeys = new DefaultKeyedValues();
       
        double runningTotal1 = 0.0;
        Iterator iterator1 = keys.iterator();
        while (iterator1.hasNext()) {
            Comparable key = (Comparable) iterator1.next();
            boolean include = true;
            double v = 0.0;
            Number n = this.dataset.getValue(key);
            if (n == null) {
                include = !this.ignoreNullValues;
            }
            else {
                v = n.doubleValue();
                include = this.ignoreZeroValues ? v > 0.0 : v >= 0.0;
            }

            if (include) {
                runningTotal1 = runningTotal1 + v;
                // work out the mid angle (0 - 90 and 270 - 360) = right, 
                // otherwise left
                double mid = this.startAngle + (this.direction.getFactor()
                    * ((runningTotal1 - v / 2.0) * 360) / totalValue);
                if (Math.cos(Math.toRadians(mid)) < 0.0) {
                    leftKeys.addValue(key, new Double(mid));
                }
                else {
                    rightKeys.addValue(key, new Double(mid));
                }
            }
        }
       
        g2.setFont(getLabelFont());
        float maxLabelWidth 
            = (float) (getMaximumLabelWidth() * plotArea.getWidth());
        
        // draw the labels...
        if (this.labelGenerator != null) {
            drawLeftLabels(leftKeys, g2, plotArea, linkArea, maxLabelWidth, 
                    state);
            drawRightLabels(rightKeys, g2, plotArea, linkArea, maxLabelWidth, 
                    state);
        }
        g2.setComposite(originalComposite);

    }

    /**
     * Draws the left labels.
     * 
     * @param leftKeys  the keys.
     * @param g2  the graphics device.
     * @param plotArea  the plot area.
     * @param linkArea  the link area.
     * @param maxLabelWidth  the maximum label width.
     * @param state  the state.
     */
    protected void drawLeftLabels(KeyedValues leftKeys, Graphics2D g2, 
                                  Rectangle2D plotArea, Rectangle2D linkArea, 
                                  float maxLabelWidth, PiePlotState state) {
        
        PieLabelDistributor distributor1 = new PieLabelDistributor(
            leftKeys.getItemCount()
        );
        double lGap = plotArea.getWidth() * this.labelGap;
        double verticalLinkRadius = state.getLinkArea().getHeight() / 2.0;
        for (int i = 0; i < leftKeys.getItemCount(); i++) {   
            String label = this.labelGenerator.generateSectionLabel(
                    this.d

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久婷婷国产综合精品| 久久先锋影音av鲁色资源网| 日韩欧美综合在线| 亚洲欧洲一区二区三区| 首页欧美精品中文字幕| 暴力调教一区二区三区| 日韩一区二区三区高清免费看看| 亚洲国产精品传媒在线观看| 男女男精品视频| 欧美综合天天夜夜久久| 1区2区3区欧美| 国产成人精品免费视频网站| 91麻豆精品国产无毒不卡在线观看| 中文字幕+乱码+中文字幕一区| 蜜臀av在线播放一区二区三区| 欧美亚一区二区| 亚洲免费在线看| 99免费精品在线观看| 欧美精品一区二区三区高清aⅴ | 欧美日韩精品一区视频| 欧美韩国一区二区| 国精产品一区一区三区mba视频 | 欧美丰满美乳xxx高潮www| 亚洲精品中文在线观看| 99re视频精品| 亚洲精品日日夜夜| 色香蕉久久蜜桃| 一区二区三区四区在线免费观看| 99精品欧美一区二区三区小说| 久久精品这里都是精品| 精品一区二区三区av| 精品精品国产高清a毛片牛牛| 免费久久精品视频| www日韩大片| 国产一区二区三区免费在线观看| 久久综合久久综合九色| 国产精品系列在线观看| 日本一区二区三级电影在线观看| 成人性生交大片免费看中文网站| 日本一区二区免费在线观看视频 | 免费成人美女在线观看.| 3d动漫精品啪啪| 久久se这里有精品| 欧美激情中文字幕一区二区| www.激情成人| 日韩精品电影在线| 日韩精品在线看片z| 国产精品白丝jk黑袜喷水| 一区在线观看视频| 欧美日韩视频在线第一区 | 亚洲制服丝袜一区| 欧美一区二区高清| 国产sm精品调教视频网站| 国产精品伦一区| 欧美亚洲国产怡红院影院| 久久精品国产一区二区三| 欧美激情一区三区| 欧美视频一二三区| 国产综合久久久久久久久久久久| 国产精品久久久久一区| 色8久久精品久久久久久蜜| 婷婷开心激情综合| 国产亚洲人成网站| 欧美三日本三级三级在线播放| 久久福利视频一区二区| 国产精品成人午夜| 日韩一本二本av| 91视频在线看| 国产永久精品大片wwwapp| 亚洲人成网站精品片在线观看| 欧美人与禽zozo性伦| 国产在线一区二区| 午夜精品福利久久久| 欧美国产精品一区| 欧美一级高清大全免费观看| 99久久国产综合精品色伊| 美女任你摸久久| 亚洲激情图片一区| 国产亚洲人成网站| 欧美一区二区三区精品| 93久久精品日日躁夜夜躁欧美| 免费av网站大全久久| 国产精品对白交换视频| 精品不卡在线视频| 337p亚洲精品色噜噜噜| 91色.com| 国产99久久久国产精品免费看| 午夜视黄欧洲亚洲| 亚洲欧美成人一区二区三区| 精品国产乱码久久久久久闺蜜| 欧洲一区二区三区在线| 91在线观看污| 成人av高清在线| 国模大尺度一区二区三区| 午夜一区二区三区在线观看| 中文字幕日本不卡| 国产精品国产精品国产专区不蜜| 欧美精品一区二| 日韩免费看网站| 日韩视频在线一区二区| 欧美精品免费视频| 欧美亚洲一区二区三区四区| 成人性视频网站| 成人免费视频一区| 成人综合婷婷国产精品久久| 国产一区二区三区不卡在线观看| 日日夜夜免费精品| 丝袜a∨在线一区二区三区不卡| 亚洲视频你懂的| 一区二区三区视频在线看| 亚洲乱码精品一二三四区日韩在线 | 日本成人在线网站| 午夜精品久久久久久久久久久| 亚洲精品成人a在线观看| 亚洲美女视频在线| 一区二区日韩av| 午夜电影网一区| 蜜臀av性久久久久蜜臀av麻豆 | 成人小视频免费观看| 成人在线综合网站| 9i在线看片成人免费| 97精品视频在线观看自产线路二| 成人免费高清视频| 欧洲av在线精品| 日韩一级完整毛片| 久久久精品免费观看| 欧美国产综合一区二区| 自拍av一区二区三区| 亚洲一区二区免费视频| 亚洲午夜久久久久久久久电影院 | 亚洲一二三专区| 午夜精品福利一区二区蜜股av| 奇米亚洲午夜久久精品| 国产高清成人在线| 色综合夜色一区| 337p亚洲精品色噜噜| 久久色在线观看| 亚洲视频综合在线| 七七婷婷婷婷精品国产| 国产盗摄精品一区二区三区在线 | 亚洲精选免费视频| 日本特黄久久久高潮| 国产精品1区二区.| 91首页免费视频| 制服丝袜激情欧洲亚洲| 久久久久久久久伊人| 国产精品初高中害羞小美女文| 亚洲一区二区影院| 国产精品77777竹菊影视小说| 色综合天天做天天爱| 欧美刺激午夜性久久久久久久| 国产三级精品三级| 视频一区视频二区中文| 国产v日产∨综合v精品视频| 欧美日韩在线播放| 国产精品五月天| 久久99精品久久久久久久久久久久| 99久久精品国产毛片| 精品人在线二区三区| 一区二区三区产品免费精品久久75| 九一久久久久久| 欧美三级视频在线播放| 国产免费久久精品| 精品一区二区在线看| 在线观看成人免费视频| 国产精品久久久爽爽爽麻豆色哟哟 | 国产一本一道久久香蕉| 在线观看日韩电影| 国产亚洲综合性久久久影院| 亚洲成人在线网站| 91丨porny丨最新| 国产偷v国产偷v亚洲高清| 日韩av一区二区三区四区| 色狠狠综合天天综合综合| 日本一区二区三区四区在线视频 | 在线一区二区视频| 国产精品女主播在线观看| 国产在线精品免费av| 欧美一区二区三区四区五区| 亚洲人成在线观看一区二区| 国产成都精品91一区二区三| 精品第一国产综合精品aⅴ| 天堂在线一区二区| 欧美色网站导航| 日韩高清不卡在线| 欧美日韩三级在线| 亚洲综合清纯丝袜自拍| 99久久精品国产毛片| 欧美激情综合五月色丁香| 国产成人在线免费| 国产人成一区二区三区影院| 国产激情一区二区三区四区 | 日韩伦理av电影| 99久久精品免费看国产| 国产精品热久久久久夜色精品三区| 国产剧情在线观看一区二区| 精品国产亚洲一区二区三区在线观看| 日韩不卡在线观看日韩不卡视频| 欧美美女视频在线观看| 日韩电影免费在线看|