📄 combinedrangecategoryplot.html
字号:
<FONT color="green">475</FONT> }<a name="line.475"></a><FONT color="green">476</FONT> <a name="line.476"></a><FONT color="green">477</FONT> /**<a name="line.477"></a><FONT color="green">478</FONT> * Receives a {@link PlotChangeEvent} and responds by notifying all <a name="line.478"></a><FONT color="green">479</FONT> * listeners.<a name="line.479"></a><FONT color="green">480</FONT> * <a name="line.480"></a><FONT color="green">481</FONT> * @param event the event.<a name="line.481"></a><FONT color="green">482</FONT> */<a name="line.482"></a><FONT color="green">483</FONT> public void plotChanged(PlotChangeEvent event) {<a name="line.483"></a><FONT color="green">484</FONT> notifyListeners(event);<a name="line.484"></a><FONT color="green">485</FONT> }<a name="line.485"></a><FONT color="green">486</FONT> <a name="line.486"></a><FONT color="green">487</FONT> /** <a name="line.487"></a><FONT color="green">488</FONT> * Tests the plot for equality with an arbitrary object.<a name="line.488"></a><FONT color="green">489</FONT> * <a name="line.489"></a><FONT color="green">490</FONT> * @param obj the object (<code>null</code> permitted).<a name="line.490"></a><FONT color="green">491</FONT> * <a name="line.491"></a><FONT color="green">492</FONT> * @return <code>true</code> or <code>false</code>.<a name="line.492"></a><FONT color="green">493</FONT> */<a name="line.493"></a><FONT color="green">494</FONT> public boolean equals(Object obj) {<a name="line.494"></a><FONT color="green">495</FONT> if (obj == this) {<a name="line.495"></a><FONT color="green">496</FONT> return true;<a name="line.496"></a><FONT color="green">497</FONT> }<a name="line.497"></a><FONT color="green">498</FONT> if (!(obj instanceof CombinedRangeCategoryPlot)) {<a name="line.498"></a><FONT color="green">499</FONT> return false;<a name="line.499"></a><FONT color="green">500</FONT> }<a name="line.500"></a><FONT color="green">501</FONT> if (!super.equals(obj)) {<a name="line.501"></a><FONT color="green">502</FONT> return false;<a name="line.502"></a><FONT color="green">503</FONT> }<a name="line.503"></a><FONT color="green">504</FONT> CombinedRangeCategoryPlot that = (CombinedRangeCategoryPlot) obj;<a name="line.504"></a><FONT color="green">505</FONT> if (!ObjectUtilities.equal(this.subplots, that.subplots)) {<a name="line.505"></a><FONT color="green">506</FONT> return false;<a name="line.506"></a><FONT color="green">507</FONT> }<a name="line.507"></a><FONT color="green">508</FONT> if (this.totalWeight != that.totalWeight) {<a name="line.508"></a><FONT color="green">509</FONT> return false;<a name="line.509"></a><FONT color="green">510</FONT> }<a name="line.510"></a><FONT color="green">511</FONT> if (this.gap != that.gap) {<a name="line.511"></a><FONT color="green">512</FONT> return false;<a name="line.512"></a><FONT color="green">513</FONT> }<a name="line.513"></a><FONT color="green">514</FONT> return true; <a name="line.514"></a><FONT color="green">515</FONT> }<a name="line.515"></a><FONT color="green">516</FONT> <a name="line.516"></a><FONT color="green">517</FONT> /**<a name="line.517"></a><FONT color="green">518</FONT> * Returns a clone of the plot.<a name="line.518"></a><FONT color="green">519</FONT> * <a name="line.519"></a><FONT color="green">520</FONT> * @return A clone.<a name="line.520"></a><FONT color="green">521</FONT> * <a name="line.521"></a><FONT color="green">522</FONT> * @throws CloneNotSupportedException this class will not throw this <a name="line.522"></a><FONT color="green">523</FONT> * exception, but subclasses (if any) might.<a name="line.523"></a><FONT color="green">524</FONT> */<a name="line.524"></a><FONT color="green">525</FONT> public Object clone() throws CloneNotSupportedException {<a name="line.525"></a><FONT color="green">526</FONT> CombinedRangeCategoryPlot result <a name="line.526"></a><FONT color="green">527</FONT> = (CombinedRangeCategoryPlot) super.clone(); <a name="line.527"></a><FONT color="green">528</FONT> result.subplots = (List) ObjectUtilities.deepClone(this.subplots);<a name="line.528"></a><FONT color="green">529</FONT> for (Iterator it = result.subplots.iterator(); it.hasNext();) {<a name="line.529"></a><FONT color="green">530</FONT> Plot child = (Plot) it.next();<a name="line.530"></a><FONT color="green">531</FONT> child.setParent(result);<a name="line.531"></a><FONT color="green">532</FONT> }<a name="line.532"></a><FONT color="green">533</FONT> <a name="line.533"></a><FONT color="green">534</FONT> // after setting up all the subplots, the shared range axis may need <a name="line.534"></a><FONT color="green">535</FONT> // reconfiguring<a name="line.535"></a><FONT color="green">536</FONT> ValueAxis rangeAxis = result.getRangeAxis();<a name="line.536"></a><FONT color="green">537</FONT> if (rangeAxis != null) {<a name="line.537"></a><FONT color="green">538</FONT> rangeAxis.configure();<a name="line.538"></a><FONT color="green">539</FONT> }<a name="line.539"></a><FONT color="green">540</FONT> <a name="line.540"></a><FONT color="green">541</FONT> return result;<a name="line.541"></a><FONT color="green">542</FONT> }<a name="line.542"></a><FONT color="green">543</FONT> <a name="line.543"></a><FONT color="green">544</FONT> /**<a name="line.544"></a><FONT color="green">545</FONT> * Provides serialization support.<a name="line.545"></a><FONT color="green">546</FONT> *<a name="line.546"></a><FONT color="green">547</FONT> * @param stream the input stream.<a name="line.547"></a><FONT color="green">548</FONT> *<a name="line.548"></a><FONT color="green">549</FONT> * @throws IOException if there is an I/O error.<a name="line.549"></a><FONT color="green">550</FONT> * @throws ClassNotFoundException if there is a classpath problem.<a name="line.550"></a><FONT color="green">551</FONT> */<a name="line.551"></a><FONT color="green">552</FONT> private void readObject(ObjectInputStream stream) <a name="line.552"></a><FONT color="green">553</FONT> throws IOException, ClassNotFoundException {<a name="line.553"></a><FONT color="green">554</FONT> <a name="line.554"></a><FONT color="green">555</FONT> stream.defaultReadObject();<a name="line.555"></a><FONT color="green">556</FONT> <a name="line.556"></a><FONT color="green">557</FONT> // the range axis is deserialized before the subplots, so its value <a name="line.557"></a><FONT color="green">558</FONT> // range is likely to be incorrect...<a name="line.558"></a><FONT color="green">559</FONT> ValueAxis rangeAxis = getRangeAxis();<a name="line.559"></a><FONT color="green">560</FONT> if (rangeAxis != null) {<a name="line.560"></a><FONT color="green">561</FONT> rangeAxis.configure();<a name="line.561"></a><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> }<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></PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -