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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? combineddomaincategoryplot.java

?? Web圖形化的Java庫(kù)
?? JAVA
字號(hào):
/* ======================================
 * JFreeChart : a free Java chart library
 * ======================================
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 * Project Lead:  David Gilbert (david.gilbert@object-refinery.com);
 *
 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
 *
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation;
 * either version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with this
 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * -------------------------------
 * CombinedDomainCategoryPlot.java
 * -------------------------------
 * (C) Copyright 2003, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: CombinedDomainCategoryPlot.java,v 1.12 2003/08/28 16:35:31 mungady Exp $
 *
 * Changes:
 * --------
 * 16-May-2003 : Version 1 (DG);
 * 08-Aug-2003 : Adjusted totalWeight in remove(...) method (DG);
 * 19-Aug-2003 : Added equals(...) method, implemented Cloneable and Serializable (DG);
 *
 */
package org.jfree.chart.plot;

import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

import org.jfree.chart.ChartRenderingInfo;
import org.jfree.chart.LegendItemCollection;
import org.jfree.chart.axis.AxisSpace;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.event.PlotChangeEvent;
import org.jfree.ui.RectangleEdge;
import org.jfree.util.ObjectUtils;

/**
 * A combined category plot where the domain axis is shared.
 *
 * @author David Gilbert
 */
public class CombinedDomainCategoryPlot extends CategoryPlot
                                        implements Cloneable, Serializable {

    /** Storage for the subplot references. */
    private List subplots;

    /** Total weight of all charts. */
    private int totalWeight;

    /** The gap between subplots. */
    private double gap;

    /** Temporary storage for the subplot areas. */
    private transient Rectangle2D[] subplotAreas;
    
    /**
     * Default constructor.
     */
    public CombinedDomainCategoryPlot() {
        this(null);
    }
    
    /**
     * Creates a new plot.
     *
     * @param domainAxis  the shared domain axis.
     */
    public CombinedDomainCategoryPlot(CategoryAxis domainAxis) {

        super(null, domainAxis, null, null);
        this.subplots = new java.util.ArrayList();
        this.totalWeight = 0;
        this.gap = 5.0;

    }

    /**
     * Adds a subplot to the combined chart.
     *
     * @param subplot  the subplot.
     * @param weight  the weight.
     */
    public void add(CategoryPlot subplot, int weight) {
        subplot.setParent(this);
        subplot.setWeight(weight);
        subplot.setInsets(new Insets(0, 0, 0, 0));
        subplot.setDomainAxis(null);
        subplot.setOrientation(getOrientation());
        this.subplots.add(subplot);
        this.totalWeight += weight;
        getDomainAxis().configure();
        notifyListeners(new PlotChangeEvent(this));
    }

    /**
     * Removes a subplot from the combined chart.  Potentially, this removes some unique categories
     * from the overall union of the datasets...so the domain axis is reconfigured, then a 
     * {@link PlotChangeEvent} is sent to all registered listeners.
     *
     * @param subplot  the subplot.
     */
    public void remove(CategoryPlot subplot) {

        subplots.remove(subplot);
        subplot.setParent(null);
        this.totalWeight -= subplot.getWeight();

        CategoryAxis domain = getDomainAxis();
        if (domain != null) {
            domain.configure();
        }

        notifyListeners(new PlotChangeEvent(this));

    }

    /**
     * Returns the list of subplots.
     *
     * @return An unmodifiable list of subplots .
     */
    public List getSubplots() {
        return Collections.unmodifiableList(this.subplots);
    }

    /**
     * Calculates the space required for the axes.
     * 
     * @param g2  the graphics device.
     * @param plotArea  the plot area.
     * 
     * @return The space required for the axes.
     */
    protected AxisSpace calculateAxisSpace(Graphics2D g2, Rectangle2D plotArea) {
        
        AxisSpace space = new AxisSpace();
        PlotOrientation orientation = getOrientation();
        
        // work out the space required by the domain axis...
        AxisSpace fixed = getFixedDomainAxisSpace();
        if (fixed != null) {
            if (orientation == PlotOrientation.HORIZONTAL) {
                space.setLeft(fixed.getLeft());
                space.setRight(fixed.getRight());
            }
            else if (orientation == PlotOrientation.VERTICAL) {
                space.setTop(fixed.getTop());
                space.setBottom(fixed.getBottom());                
            }
        }
        else {
            CategoryAxis categoryAxis = getDomainAxis();
            RectangleEdge categoryEdge = Plot.resolveDomainAxisLocation(
                getDomainAxisLocation(), orientation
            );
            if (categoryAxis != null) {
                space = categoryAxis.reserveSpace(g2, this, plotArea, categoryEdge, space);
            }
            else {
                if (getDrawSharedDomainAxis()) {
                    space = getDomainAxis().reserveSpace(g2, this, plotArea,
                                                         categoryEdge, space);
                }
            }
        }
        
        Rectangle2D adjustedPlotArea = space.shrink(plotArea, null);
        
        // work out the maximum height or width of the non-shared axes...
        int n = subplots.size();
        this.subplotAreas = new Rectangle2D[n];
        double x = adjustedPlotArea.getX();
        double y = adjustedPlotArea.getY();
        double usableSize = 0.0;
        if (orientation == PlotOrientation.HORIZONTAL) {
            usableSize = adjustedPlotArea.getWidth() - gap * (n - 1);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            usableSize = adjustedPlotArea.getHeight() - gap * (n - 1);
        }

        for (int i = 0; i < n; i++) {
            CategoryPlot plot = (CategoryPlot) subplots.get(i);

            // calculate sub-plot area
            if (orientation == PlotOrientation.HORIZONTAL) {
                double w = usableSize * plot.getWeight() / totalWeight;
                this.subplotAreas[i] = new Rectangle2D.Double(x, y, w, 
                                                              adjustedPlotArea.getHeight());
                x = x + w + gap;
            }
            else if (orientation == PlotOrientation.VERTICAL) {
                double h = usableSize * plot.getWeight() / totalWeight;
                this.subplotAreas[i] = new Rectangle2D.Double(x, y, adjustedPlotArea.getWidth(), h);
                y = y + h + gap;
            }

            AxisSpace subSpace = plot.calculateRangeAxisSpace(g2, this.subplotAreas[i], null);
            space.ensureAtLeast(subSpace);

        }

        return space;
    }

    /**
     * Draws the plot on a Java 2D graphics device (such as the screen or a printer).
     * Will perform all the placement calculations for each sub-plots and then tell these to draw
     * themselves.
     *
     * @param g2  the graphics device.
     * @param plotArea  the area within which the plot (including axis labels) should be drawn.
     * @param info  collects information about the drawing (null permitted).
     */
    public void draw(Graphics2D g2, Rectangle2D plotArea, ChartRenderingInfo info) {
        
        // set up info collection...
        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);
        }

        PlotOrientation orientation = getOrientation();

        // calculate the data area...
        AxisSpace space = calculateAxisSpace(g2, plotArea);
        Rectangle2D dataArea = space.shrink(plotArea, null);

        // set the width and height of non-shared axis of all sub-plots
        setFixedRangeAxisSpaceForSubplots(space);

        // draw all the charts
        for (int i = 0; i < this.subplots.size(); i++) {
            CategoryPlot plot = (CategoryPlot) subplots.get(i);
            plot.draw(g2, subplotAreas[i], info);
        }

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

        // draw the shared axis
        RectangleEdge domainEdge = getDomainAxisEdge();
        double cursor = RectangleEdge.coordinate(dataArea, domainEdge);
        cursor = getDomainAxis().draw(g2, cursor, plotArea, dataArea, domainEdge);

    }

    /**
     * Sets the size (width or height, depending on the orientation of the plot) for the range
     * axis of each subplot.
     *
     * @param space  the space.
     */
    protected void setFixedRangeAxisSpaceForSubplots(AxisSpace space) {

        Iterator iterator = subplots.iterator();
        while (iterator.hasNext()) {
            CategoryPlot plot = (CategoryPlot) iterator.next();
            plot.setFixedRangeAxisSpace(space);
        }

    }

    /**
     * Sets the orientation of the plot (and all subplots).
     * 
     * @param orientation  the orientation.
     */
    public void setOrientation(PlotOrientation orientation) {

        super.setOrientation(orientation);

        Iterator iterator = subplots.iterator();
        while (iterator.hasNext()) {
            CategoryPlot plot = (CategoryPlot) iterator.next();
            plot.setOrientation(orientation);
        }

    }
    /**
     * Returns a collection of legend items for the plot.
     *
     * @return the legend items.
     */
    public LegendItemCollection getLegendItems() {

        LegendItemCollection result = new LegendItemCollection();

        if (this.subplots != null) {
            Iterator iterator = subplots.iterator();
            while (iterator.hasNext()) {
                CategoryPlot plot = (CategoryPlot) iterator.next();
                LegendItemCollection more = plot.getLegendItems();
                result.addAll(more);
            }
        }

        return result;

    }
    
    /**
     * Returns an unmodifiable list of the categories contained in all the subplots.
     * 
     * @return The list.
     */
    public List getCategories() {
        
        List result = new java.util.ArrayList();

        if (this.subplots != null) {
            Iterator iterator = subplots.iterator();
            while (iterator.hasNext()) {
                CategoryPlot plot = (CategoryPlot) iterator.next();
                List more = plot.getCategories();
                Iterator moreIterator = more.iterator();
                while (moreIterator.hasNext()) {
                    Comparable category = (Comparable) moreIterator.next();
                    if (!result.contains(category)) {
                        result.add(category);
                    }
                }
            }
        }

        return Collections.unmodifiableList(result);
    }
    
    /** 
     * Tests the plot for equality with an arbitrary object.
     * 
     * @param object  the object to test against.
     * 
     * @return <code>true</code> or <code>false</code>.
     */
    public boolean equals(Object object) {
    
        if (object == null) {
            return false;
        }
        
        if (object == this) {
            return true;
        }
        
        if (object instanceof CombinedDomainCategoryPlot) {
            CombinedDomainCategoryPlot plot = (CombinedDomainCategoryPlot) object;
            if (super.equals(object)) {
                boolean b0 = ObjectUtils.equal(this.subplots, plot.subplots);
                boolean b1 = (this.totalWeight == plot.totalWeight);
                boolean b2 = (this.gap == plot.gap);

                return b0 && b1 && b2;
                          
            } 
        }
        
        return false;
        
    }

    /**
     * Returns a clone of the annotation.
     * 
     * @return A clone.
     * 
     * @throws CloneNotSupportedException  this class will not throw this exception, but subclasses
     *         (if any) might.
     */
    public Object clone() throws CloneNotSupportedException {
        return super.clone();    
    }
    
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美不卡一区二区三区| 中文字幕在线不卡一区二区三区| 极品美女销魂一区二区三区免费| 亚洲欧洲日韩综合一区二区| 欧美一区二区三区婷婷月色| 91亚洲精品一区二区乱码| 激情图区综合网| 日日摸夜夜添夜夜添亚洲女人| 中文字幕不卡在线播放| 欧美xxxx老人做受| 欧美特级限制片免费在线观看| fc2成人免费人成在线观看播放| 日韩av电影天堂| 亚洲国产精品久久不卡毛片| 国产精品女同一区二区三区| 2024国产精品视频| 日韩视频在线一区二区| 欧美三级电影网| 色哟哟国产精品免费观看| 成人激情动漫在线观看| 久久精品99国产精品| 亚洲成av人片在线| 亚洲综合色噜噜狠狠| 亚洲欧洲成人av每日更新| 国产欧美日韩三级| 久久人人97超碰com| 日韩精品在线看片z| 在线播放国产精品二区一二区四区| 91麻豆免费视频| 91一区一区三区| 99视频超级精品| 99riav久久精品riav| 成人精品国产一区二区4080| 国产激情一区二区三区四区| 九九在线精品视频| 国产精品亚洲午夜一区二区三区 | 亚洲国产你懂的| 亚洲精品日韩专区silk| 亚洲视频在线一区二区| 亚洲欧美一区二区三区极速播放| 国产精品美女久久福利网站| 国产精品天美传媒沈樵| 亚洲图片欧美激情| 一区二区三区在线播| 亚洲综合男人的天堂| 亚洲18色成人| 奇米影视7777精品一区二区| 美女尤物国产一区| 黄色日韩网站视频| 国产成人亚洲综合色影视| 成人黄色在线视频| 91在线观看视频| 欧美性三三影院| 7777精品伊人久久久大香线蕉经典版下载 | 久久久影视传媒| 日本一区二区免费在线| 国产精品成人免费在线| 亚洲亚洲人成综合网络| 日韩中文字幕亚洲一区二区va在线| 日本欧美肥老太交大片| 寂寞少妇一区二区三区| 成人美女视频在线观看18| 色婷婷久久久久swag精品| 6080国产精品一区二区| 久久女同互慰一区二区三区| 国产精品免费网站在线观看| 一级中文字幕一区二区| 久久精品国产精品亚洲精品| 国产成人综合视频| 欧洲国产伦久久久久久久| 日韩精品在线一区二区| 国产精品国产自产拍高清av | www国产精品av| 亚洲天堂久久久久久久| 午夜精品福利一区二区三区av| 麻豆成人综合网| 成人18视频在线播放| 在线欧美日韩精品| 精品国产精品网麻豆系列| 成人欧美一区二区三区小说 | 日韩免费一区二区| 国产精品久久久久久久岛一牛影视| 亚洲精品欧美在线| 国产在线麻豆精品观看| 色婷婷亚洲精品| 2017欧美狠狠色| 亚洲午夜免费视频| 国产成人综合在线| 91精品久久久久久久91蜜桃| 国产精品美女久久久久久久久久久| 性欧美疯狂xxxxbbbb| 国产精品123| 3751色影院一区二区三区| 国产精品色一区二区三区| 午夜视频在线观看一区二区| 国产suv精品一区二区883| 欧美卡1卡2卡| 一区二区三区不卡视频在线观看| 国产精品456| 欧美一级日韩不卡播放免费| 18成人在线观看| 国产精品1024| 欧美精品一区二区精品网| 一区二区三区中文字幕精品精品| 国产毛片一区二区| 日韩亚洲欧美高清| 亚洲18色成人| 91福利精品视频| **性色生活片久久毛片| 国产精品1024久久| 亚洲精品一区在线观看| 午夜欧美视频在线观看| 色哟哟国产精品| 亚洲欧洲成人自拍| 不卡一二三区首页| 欧美国产激情二区三区| 国产一区在线观看麻豆| 日韩视频国产视频| 午夜a成v人精品| 精品视频一区三区九区| 亚洲美女电影在线| 91免费观看视频在线| 国产精品电影一区二区三区| 成人app在线| 中文字幕在线视频一区| 国产成人综合亚洲91猫咪| 久久久不卡网国产精品一区| 久88久久88久久久| 精品免费国产一区二区三区四区| 免费不卡在线视频| 日韩视频在线你懂得| 日本最新不卡在线| 欧美xxxxxxxxx| 国内精品免费**视频| 日韩精品中文字幕一区二区三区| 久久99精品久久久久久动态图| 日韩一区二区视频| 久久成人av少妇免费| 26uuuu精品一区二区| 国产精品456露脸| 中文字幕一区二区三区在线播放| 成人国产精品免费观看| 亚洲男同性视频| 在线观看av一区二区| 天天综合色天天综合色h| 91麻豆精品国产综合久久久久久 | 国产精品夫妻自拍| 色综合久久99| 亚洲综合激情网| 日韩欧美亚洲一区二区| 蜜臀a∨国产成人精品| 久久久精品天堂| fc2成人免费人成在线观看播放| 一区二区在线观看免费视频播放| 欧美日精品一区视频| 美脚の诱脚舐め脚责91| 国产日韩一级二级三级| 91蜜桃婷婷狠狠久久综合9色| 伊人色综合久久天天人手人婷| 欧美猛男gaygay网站| 精品午夜久久福利影院| 国产精品不卡一区二区三区| 欧美色电影在线| 韩国精品一区二区| 亚洲人成影院在线观看| 91精品国产综合久久久久久 | 色婷婷av久久久久久久| 性欧美大战久久久久久久久| 欧美成人精品3d动漫h| 成人高清视频在线观看| 午夜激情一区二区| 国产日产欧美一区二区三区| 欧美伊人久久大香线蕉综合69| 日本成人中文字幕| 国产精品激情偷乱一区二区∴| 在线电影一区二区三区| 国产精品一区在线观看乱码 | 亚洲精品国产无天堂网2021| 欧美一级国产精品| jiyouzz国产精品久久| 全部av―极品视觉盛宴亚洲| 国产精品久久网站| 91精品国产91热久久久做人人| 成人精品国产一区二区4080| 三级久久三级久久久| 国产精品美女一区二区在线观看| 欧美乱妇15p| 97精品久久久午夜一区二区三区 | 久久久久亚洲蜜桃| 欧美美女视频在线观看| youjizz国产精品| 裸体一区二区三区| 一区二区欧美视频| 国产精品国产三级国产普通话蜜臀| 91精品国产91热久久久做人人| 色综合一个色综合| 国产二区国产一区在线观看| 午夜精品福利视频网站| 亚洲同性gay激情无套| 国产偷v国产偷v亚洲高清|