⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 categoryplot.html

📁 jfreechart最新源代码
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<FONT color="green">562</FONT>                }<a name="line.562"></a><FONT color="green">563</FONT>            }<a name="line.563"></a><FONT color="green">564</FONT>            return result;<a name="line.564"></a><FONT color="green">565</FONT>        }<a name="line.565"></a><FONT color="green">566</FONT>    <a name="line.566"></a><FONT color="green">567</FONT>        /**<a name="line.567"></a><FONT color="green">568</FONT>         * Sets the domain axis for the plot and sends a {@link PlotChangeEvent} to<a name="line.568"></a><FONT color="green">569</FONT>         * all registered listeners.<a name="line.569"></a><FONT color="green">570</FONT>         *<a name="line.570"></a><FONT color="green">571</FONT>         * @param axis  the axis (&lt;code&gt;null&lt;/code&gt; permitted).<a name="line.571"></a><FONT color="green">572</FONT>         */<a name="line.572"></a><FONT color="green">573</FONT>        public void setDomainAxis(CategoryAxis axis) {<a name="line.573"></a><FONT color="green">574</FONT>            setDomainAxis(0, axis);<a name="line.574"></a><FONT color="green">575</FONT>        }<a name="line.575"></a><FONT color="green">576</FONT>    <a name="line.576"></a><FONT color="green">577</FONT>        /**<a name="line.577"></a><FONT color="green">578</FONT>         * Sets a domain axis and sends a {@link PlotChangeEvent} to all <a name="line.578"></a><FONT color="green">579</FONT>         * registered listeners.<a name="line.579"></a><FONT color="green">580</FONT>         *<a name="line.580"></a><FONT color="green">581</FONT>         * @param index  the axis index.<a name="line.581"></a><FONT color="green">582</FONT>         * @param axis  the axis.<a name="line.582"></a><FONT color="green">583</FONT>         */<a name="line.583"></a><FONT color="green">584</FONT>        public void setDomainAxis(int index, CategoryAxis axis) {<a name="line.584"></a><FONT color="green">585</FONT>            setDomainAxis(index, axis, true);<a name="line.585"></a><FONT color="green">586</FONT>        }<a name="line.586"></a><FONT color="green">587</FONT>     <a name="line.587"></a><FONT color="green">588</FONT>        /**<a name="line.588"></a><FONT color="green">589</FONT>         * Sets a domain axis and, if requested, sends a {@link PlotChangeEvent} to <a name="line.589"></a><FONT color="green">590</FONT>         * all registered listeners.<a name="line.590"></a><FONT color="green">591</FONT>         *<a name="line.591"></a><FONT color="green">592</FONT>         * @param index  the axis index.<a name="line.592"></a><FONT color="green">593</FONT>         * @param axis  the axis.<a name="line.593"></a><FONT color="green">594</FONT>         * @param notify  notify listeners?<a name="line.594"></a><FONT color="green">595</FONT>         */<a name="line.595"></a><FONT color="green">596</FONT>        public void setDomainAxis(int index, CategoryAxis axis, boolean notify) {<a name="line.596"></a><FONT color="green">597</FONT>            CategoryAxis existing = (CategoryAxis) this.domainAxes.get(index);<a name="line.597"></a><FONT color="green">598</FONT>            if (existing != null) {<a name="line.598"></a><FONT color="green">599</FONT>                existing.removeChangeListener(this);<a name="line.599"></a><FONT color="green">600</FONT>            }<a name="line.600"></a><FONT color="green">601</FONT>            if (axis != null) {<a name="line.601"></a><FONT color="green">602</FONT>                axis.setPlot(this);<a name="line.602"></a><FONT color="green">603</FONT>            }<a name="line.603"></a><FONT color="green">604</FONT>            this.domainAxes.set(index, axis);<a name="line.604"></a><FONT color="green">605</FONT>            if (axis != null) {<a name="line.605"></a><FONT color="green">606</FONT>                axis.configure();<a name="line.606"></a><FONT color="green">607</FONT>                axis.addChangeListener(this);<a name="line.607"></a><FONT color="green">608</FONT>            }<a name="line.608"></a><FONT color="green">609</FONT>            if (notify) {<a name="line.609"></a><FONT color="green">610</FONT>                notifyListeners(new PlotChangeEvent(this));<a name="line.610"></a><FONT color="green">611</FONT>            }<a name="line.611"></a><FONT color="green">612</FONT>        }<a name="line.612"></a><FONT color="green">613</FONT>    <a name="line.613"></a><FONT color="green">614</FONT>        /**<a name="line.614"></a><FONT color="green">615</FONT>         * Sets the domain axes for this plot and sends a {@link PlotChangeEvent}<a name="line.615"></a><FONT color="green">616</FONT>         * to all registered listeners.<a name="line.616"></a><FONT color="green">617</FONT>         * <a name="line.617"></a><FONT color="green">618</FONT>         * @param axes  the axes.<a name="line.618"></a><FONT color="green">619</FONT>         */<a name="line.619"></a><FONT color="green">620</FONT>        public void setDomainAxes(CategoryAxis[] axes) {<a name="line.620"></a><FONT color="green">621</FONT>            for (int i = 0; i &lt; axes.length; i++) {<a name="line.621"></a><FONT color="green">622</FONT>                setDomainAxis(i, axes[i], false);   <a name="line.622"></a><FONT color="green">623</FONT>            }<a name="line.623"></a><FONT color="green">624</FONT>            notifyListeners(new PlotChangeEvent(this));<a name="line.624"></a><FONT color="green">625</FONT>        }<a name="line.625"></a><FONT color="green">626</FONT>        <a name="line.626"></a><FONT color="green">627</FONT>        /**<a name="line.627"></a><FONT color="green">628</FONT>         * Returns the domain axis location.<a name="line.628"></a><FONT color="green">629</FONT>         *<a name="line.629"></a><FONT color="green">630</FONT>         * @return The location (never &lt;code&gt;null&lt;/code&gt;).<a name="line.630"></a><FONT color="green">631</FONT>         */<a name="line.631"></a><FONT color="green">632</FONT>        public AxisLocation getDomainAxisLocation() {<a name="line.632"></a><FONT color="green">633</FONT>            return getDomainAxisLocation(0);<a name="line.633"></a><FONT color="green">634</FONT>        }<a name="line.634"></a><FONT color="green">635</FONT>    <a name="line.635"></a><FONT color="green">636</FONT>        /**<a name="line.636"></a><FONT color="green">637</FONT>         * Returns the location for a domain axis.<a name="line.637"></a><FONT color="green">638</FONT>         *<a name="line.638"></a><FONT color="green">639</FONT>         * @param index  the axis index.<a name="line.639"></a><FONT color="green">640</FONT>         *<a name="line.640"></a><FONT color="green">641</FONT>         * @return The location.<a name="line.641"></a><FONT color="green">642</FONT>         */<a name="line.642"></a><FONT color="green">643</FONT>        public AxisLocation getDomainAxisLocation(int index) {<a name="line.643"></a><FONT color="green">644</FONT>            AxisLocation result = null;<a name="line.644"></a><FONT color="green">645</FONT>            if (index &lt; this.domainAxisLocations.size()) {<a name="line.645"></a><FONT color="green">646</FONT>                result = (AxisLocation) this.domainAxisLocations.get(index);<a name="line.646"></a><FONT color="green">647</FONT>            }<a name="line.647"></a><FONT color="green">648</FONT>            if (result == null) {<a name="line.648"></a><FONT color="green">649</FONT>                result = AxisLocation.getOpposite(getDomainAxisLocation(0));<a name="line.649"></a><FONT color="green">650</FONT>            }<a name="line.650"></a><FONT color="green">651</FONT>            return result;<a name="line.651"></a><FONT color="green">652</FONT>    <a name="line.652"></a><FONT color="green">653</FONT>        }<a name="line.653"></a><FONT color="green">654</FONT>    <a name="line.654"></a><FONT color="green">655</FONT>        /**<a name="line.655"></a><FONT color="green">656</FONT>         * Sets the location of the domain axis and sends a {@link PlotChangeEvent}<a name="line.656"></a><FONT color="green">657</FONT>         * to all registered listeners.<a name="line.657"></a><FONT color="green">658</FONT>         *<a name="line.658"></a><FONT color="green">659</FONT>         * @param location  the axis location (&lt;code&gt;null&lt;/code&gt; not permitted).<a name="line.659"></a><FONT color="green">660</FONT>         */<a name="line.660"></a><FONT color="green">661</FONT>        public void setDomainAxisLocation(AxisLocation location) {<a name="line.661"></a><FONT color="green">662</FONT>            // defer argument checking...<a name="line.662"></a><FONT color="green">663</FONT>            setDomainAxisLocation(location, true);<a name="line.663"></a><FONT color="green">664</FONT>        }<a name="line.664"></a><FONT color="green">665</FONT>    <a name="line.665"></a><FONT color="green">666</FONT>        /**<a name="line.666"></a><FONT color="green">667</FONT>         * Sets the location of the domain axis.<a name="line.667"></a><FONT color="green">668</FONT>         *<a name="line.668"></a><FONT color="green">669</FONT>         * @param location  the axis location (&lt;code&gt;null&lt;/code&gt; not permitted).<a name="line.669"></a><FONT color="green">670</FONT>         * @param notify  a flag that controls whether listeners are notified.<a name="line.670"></a><FONT color="green">671</FONT>         */<a name="line.671"></a><FONT color="green">672</FONT>        public void setDomainAxisLocation(AxisLocation location, boolean notify) {<a name="line.672"></a><FONT color="green">673</FONT>            if (location == null) {<a name="line.673"></a><FONT color="green">674</FONT>                throw new IllegalArgumentException("Null 'location' argument.");<a name="line.674"></a><FONT color="green">675</FONT>            }<a name="line.675"></a><FONT color="green">676</FONT>            setDomainAxisLocation(0, location);<a name="line.676"></a><FONT color="green">677</FONT>        }<a name="line.677"></a><FONT color="green">678</FONT>    <a name="line.678"></a><FONT color="green">679</FONT>        /**<a name="line.679"></a><FONT color="green">680</FONT>         * Sets the location for a domain axis and sends a {@link PlotChangeEvent}<a name="line.680"></a><FONT color="green">681</FONT>         * to all registered listeners.<a name="line.681"></a><FONT color="green">682</FONT>         *<a name="line.682"></a><FONT color="green">683</FONT>         * @param index  the axis index.<a name="line.683"></a><FONT color="green">684</FONT>         * @param location  the location.<a name="line.684"></a><FONT color="green">685</FONT>         */<a name="line.685"></a><FONT color="green">686</FONT>        public void setDomainAxisLocation(int index, AxisLocation location) {<a name="line.686"></a><FONT color="green">687</FONT>            // TODO: handle argument checking for primary axis location which <a name="line.687"></a><FONT color="green">688</FONT>            // should not be null<a name="line.688"></a><FONT color="green">689</FONT>            this.domainAxisLocations.set(index, location);<a name="line.689"></a><FONT color="green">690</FONT>            notifyListeners(new PlotChangeEvent(this));<a name="line.690"></a><FONT color="green">691</FONT>        }<a name="line.691"></a><FONT color="green">692</FONT>    <a name="line.692"></a><FONT color="green">693</FONT>        /**<a name="line.693"></a><FONT color="green">694</FONT>         * Returns the domain axis edge.  This is derived from the axis location<a name="line.694"></a><FONT color="green">695</FONT>         * and the plot orientation.<a name="line.695"></a><FONT color="green">696</FONT>         *<a name="line.696"></a><FONT color="green">697</FONT>         * @return The edge (never &lt;code&gt;null&lt;/code&gt;).<a name="line.697"></a><FONT color="green">698</FONT>         */<a name="line.698"></a><FONT color

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -