📄 multiplepieplot.html
字号:
<FONT color="green">493</FONT> else if (this.dataExtractOrder == TableOrder.BY_COLUMN) {<a name="line.493"></a><FONT color="green">494</FONT> keys = this.dataset.getRowKeys();<a name="line.494"></a><FONT color="green">495</FONT> }<a name="line.495"></a><FONT color="green">496</FONT> <a name="line.496"></a><FONT color="green">497</FONT> if (keys != null) {<a name="line.497"></a><FONT color="green">498</FONT> int section = 0;<a name="line.498"></a><FONT color="green">499</FONT> Iterator iterator = keys.iterator();<a name="line.499"></a><FONT color="green">500</FONT> while (iterator.hasNext()) {<a name="line.500"></a><FONT color="green">501</FONT> Comparable key = (Comparable) iterator.next();<a name="line.501"></a><FONT color="green">502</FONT> String label = key.toString();<a name="line.502"></a><FONT color="green">503</FONT> String description = label;<a name="line.503"></a><FONT color="green">504</FONT> Paint paint = (Paint) this.sectionPaints.get(key);<a name="line.504"></a><FONT color="green">505</FONT> LegendItem item = new LegendItem(label, description, <a name="line.505"></a><FONT color="green">506</FONT> null, null, Plot.DEFAULT_LEGEND_ITEM_CIRCLE, <a name="line.506"></a><FONT color="green">507</FONT> paint, Plot.DEFAULT_OUTLINE_STROKE, paint);<a name="line.507"></a><FONT color="green">508</FONT> <a name="line.508"></a><FONT color="green">509</FONT> result.add(item);<a name="line.509"></a><FONT color="green">510</FONT> section++;<a name="line.510"></a><FONT color="green">511</FONT> }<a name="line.511"></a><FONT color="green">512</FONT> }<a name="line.512"></a><FONT color="green">513</FONT> if (this.limit > 0.0) {<a name="line.513"></a><FONT color="green">514</FONT> result.add(new LegendItem(this.aggregatedItemsKey.toString(), <a name="line.514"></a><FONT color="green">515</FONT> this.aggregatedItemsKey.toString(), null, null, <a name="line.515"></a><FONT color="green">516</FONT> Plot.DEFAULT_LEGEND_ITEM_CIRCLE, <a name="line.516"></a><FONT color="green">517</FONT> this.aggregatedItemsPaint,<a name="line.517"></a><FONT color="green">518</FONT> Plot.DEFAULT_OUTLINE_STROKE, <a name="line.518"></a><FONT color="green">519</FONT> this.aggregatedItemsPaint));<a name="line.519"></a><FONT color="green">520</FONT> }<a name="line.520"></a><FONT color="green">521</FONT> }<a name="line.521"></a><FONT color="green">522</FONT> return result;<a name="line.522"></a><FONT color="green">523</FONT> }<a name="line.523"></a><FONT color="green">524</FONT> <a name="line.524"></a><FONT color="green">525</FONT> /**<a name="line.525"></a><FONT color="green">526</FONT> * Tests this plot for equality with an arbitrary object. Note that the <a name="line.526"></a><FONT color="green">527</FONT> * plot's dataset is not considered in the equality test.<a name="line.527"></a><FONT color="green">528</FONT> * <a name="line.528"></a><FONT color="green">529</FONT> * @param obj the object (<code>null</code> permitted).<a name="line.529"></a><FONT color="green">530</FONT> * <a name="line.530"></a><FONT color="green">531</FONT> * @return <code>true</code> if this plot is equal to <code>obj</code>, and<a name="line.531"></a><FONT color="green">532</FONT> * <code>false</code> otherwise.<a name="line.532"></a><FONT color="green">533</FONT> */<a name="line.533"></a><FONT color="green">534</FONT> public boolean equals(Object obj) {<a name="line.534"></a><FONT color="green">535</FONT> if (obj == this) {<a name="line.535"></a><FONT color="green">536</FONT> return true; <a name="line.536"></a><FONT color="green">537</FONT> }<a name="line.537"></a><FONT color="green">538</FONT> if (!(obj instanceof MultiplePiePlot)) {<a name="line.538"></a><FONT color="green">539</FONT> return false; <a name="line.539"></a><FONT color="green">540</FONT> }<a name="line.540"></a><FONT color="green">541</FONT> MultiplePiePlot that = (MultiplePiePlot) obj;<a name="line.541"></a><FONT color="green">542</FONT> if (this.dataExtractOrder != that.dataExtractOrder) {<a name="line.542"></a><FONT color="green">543</FONT> return false; <a name="line.543"></a><FONT color="green">544</FONT> }<a name="line.544"></a><FONT color="green">545</FONT> if (this.limit != that.limit) {<a name="line.545"></a><FONT color="green">546</FONT> return false; <a name="line.546"></a><FONT color="green">547</FONT> }<a name="line.547"></a><FONT color="green">548</FONT> if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {<a name="line.548"></a><FONT color="green">549</FONT> return false;<a name="line.549"></a><FONT color="green">550</FONT> }<a name="line.550"></a><FONT color="green">551</FONT> if (!PaintUtilities.equal(this.aggregatedItemsPaint, <a name="line.551"></a><FONT color="green">552</FONT> that.aggregatedItemsPaint)) {<a name="line.552"></a><FONT color="green">553</FONT> return false;<a name="line.553"></a><FONT color="green">554</FONT> }<a name="line.554"></a><FONT color="green">555</FONT> if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {<a name="line.555"></a><FONT color="green">556</FONT> return false; <a name="line.556"></a><FONT color="green">557</FONT> }<a name="line.557"></a><FONT color="green">558</FONT> if (!super.equals(obj)) {<a name="line.558"></a><FONT color="green">559</FONT> return false; <a name="line.559"></a><FONT color="green">560</FONT> }<a name="line.560"></a><FONT color="green">561</FONT> return true;<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> * Provides serialization support.<a name="line.565"></a><FONT color="green">566</FONT> *<a name="line.566"></a><FONT color="green">567</FONT> * @param stream the output stream.<a name="line.567"></a><FONT color="green">568</FONT> *<a name="line.568"></a><FONT color="green">569</FONT> * @throws IOException if there is an I/O error.<a name="line.569"></a><FONT color="green">570</FONT> */<a name="line.570"></a><FONT color="green">571</FONT> private void writeObject(ObjectOutputStream stream) throws IOException {<a name="line.571"></a><FONT color="green">572</FONT> stream.defaultWriteObject();<a name="line.572"></a><FONT color="green">573</FONT> SerialUtilities.writePaint(this.aggregatedItemsPaint, stream);<a name="line.573"></a><FONT color="green">574</FONT> }<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> * Provides serialization support.<a name="line.577"></a><FONT color="green">578</FONT> *<a name="line.578"></a><FONT color="green">579</FONT> * @param stream the input stream.<a name="line.579"></a><FONT color="green">580</FONT> *<a name="line.580"></a><FONT color="green">581</FONT> * @throws IOException if there is an I/O error.<a name="line.581"></a><FONT color="green">582</FONT> * @throws ClassNotFoundException if there is a classpath problem.<a name="line.582"></a><FONT color="green">583</FONT> */<a name="line.583"></a><FONT color="green">584</FONT> private void readObject(ObjectInputStream stream) <a name="line.584"></a><FONT color="green">585</FONT> throws IOException, ClassNotFoundException {<a name="line.585"></a><FONT color="green">586</FONT> stream.defaultReadObject();<a name="line.586"></a><FONT color="green">587</FONT> this.aggregatedItemsPaint = SerialUtilities.readPaint(stream);<a name="line.587"></a><FONT color="green">588</FONT> this.sectionPaints = new HashMap();<a name="line.588"></a><FONT color="green">589</FONT> }<a name="line.589"></a><FONT color="green">590</FONT> <a name="line.590"></a><FONT color="green">591</FONT> <a name="line.591"></a><FONT color="green">592</FONT> }<a name="line.592"></a></PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -