📄 xybubblerenderer.html
字号:
<FONT color="green">260</FONT> entities.add(entity);<a name="line.260"></a><FONT color="green">261</FONT> }<a name="line.261"></a><FONT color="green">262</FONT> <a name="line.262"></a><FONT color="green">263</FONT> updateCrosshairValues(crosshairState, x, y, transX, transY, <a name="line.263"></a><FONT color="green">264</FONT> orientation);<a name="line.264"></a><FONT color="green">265</FONT> }<a name="line.265"></a><FONT color="green">266</FONT> <a name="line.266"></a><FONT color="green">267</FONT> }<a name="line.267"></a><FONT color="green">268</FONT> <a name="line.268"></a><FONT color="green">269</FONT> /**<a name="line.269"></a><FONT color="green">270</FONT> * Returns a legend item for the specified series. The default method<a name="line.270"></a><FONT color="green">271</FONT> * is overridden so that the legend displays circles for all series.<a name="line.271"></a><FONT color="green">272</FONT> *<a name="line.272"></a><FONT color="green">273</FONT> * @param datasetIndex the dataset index (zero-based).<a name="line.273"></a><FONT color="green">274</FONT> * @param series the series index (zero-based).<a name="line.274"></a><FONT color="green">275</FONT> *<a name="line.275"></a><FONT color="green">276</FONT> * @return A legend item for the series.<a name="line.276"></a><FONT color="green">277</FONT> */<a name="line.277"></a><FONT color="green">278</FONT> public LegendItem getLegendItem(int datasetIndex, int series) {<a name="line.278"></a><FONT color="green">279</FONT> LegendItem result = null;<a name="line.279"></a><FONT color="green">280</FONT> XYPlot xyplot = getPlot();<a name="line.280"></a><FONT color="green">281</FONT> if (xyplot != null) {<a name="line.281"></a><FONT color="green">282</FONT> XYDataset dataset = xyplot.getDataset(datasetIndex);<a name="line.282"></a><FONT color="green">283</FONT> if (dataset != null) {<a name="line.283"></a><FONT color="green">284</FONT> if (getItemVisible(series, 0)) {<a name="line.284"></a><FONT color="green">285</FONT> String label = getLegendItemLabelGenerator().generateLabel(<a name="line.285"></a><FONT color="green">286</FONT> dataset, series);<a name="line.286"></a><FONT color="green">287</FONT> String description = label;<a name="line.287"></a><FONT color="green">288</FONT> String toolTipText = null;<a name="line.288"></a><FONT color="green">289</FONT> if (getLegendItemToolTipGenerator() != null) {<a name="line.289"></a><FONT color="green">290</FONT> toolTipText <a name="line.290"></a><FONT color="green">291</FONT> = getLegendItemToolTipGenerator().generateLabel(<a name="line.291"></a><FONT color="green">292</FONT> dataset, series);<a name="line.292"></a><FONT color="green">293</FONT> }<a name="line.293"></a><FONT color="green">294</FONT> String urlText = null;<a name="line.294"></a><FONT color="green">295</FONT> if (getLegendItemURLGenerator() != null) {<a name="line.295"></a><FONT color="green">296</FONT> urlText = getLegendItemURLGenerator().generateLabel(<a name="line.296"></a><FONT color="green">297</FONT> dataset, series);<a name="line.297"></a><FONT color="green">298</FONT> }<a name="line.298"></a><FONT color="green">299</FONT> Shape shape = new Ellipse2D.Double(-4.0, -4.0, 8.0, 8.0);<a name="line.299"></a><FONT color="green">300</FONT> Paint paint = getSeriesPaint(series);<a name="line.300"></a><FONT color="green">301</FONT> Paint outlinePaint = getSeriesOutlinePaint(series);<a name="line.301"></a><FONT color="green">302</FONT> Stroke outlineStroke = getSeriesOutlineStroke(series);<a name="line.302"></a><FONT color="green">303</FONT> result = new LegendItem(label, description, <a name="line.303"></a><FONT color="green">304</FONT> toolTipText, urlText, shape, paint, <a name="line.304"></a><FONT color="green">305</FONT> outlineStroke, outlinePaint);<a name="line.305"></a><FONT color="green">306</FONT> }<a name="line.306"></a><FONT color="green">307</FONT> }<a name="line.307"></a><FONT color="green">308</FONT> <a name="line.308"></a><FONT color="green">309</FONT> }<a name="line.309"></a><FONT color="green">310</FONT> return result;<a name="line.310"></a><FONT color="green">311</FONT> }<a name="line.311"></a><FONT color="green">312</FONT> <a name="line.312"></a><FONT color="green">313</FONT> /**<a name="line.313"></a><FONT color="green">314</FONT> * Returns a clone of the renderer.<a name="line.314"></a><FONT color="green">315</FONT> * <a name="line.315"></a><FONT color="green">316</FONT> * @return A clone.<a name="line.316"></a><FONT color="green">317</FONT> * <a name="line.317"></a><FONT color="green">318</FONT> * @throws CloneNotSupportedException if the renderer cannot be cloned.<a name="line.318"></a><FONT color="green">319</FONT> */<a name="line.319"></a><FONT color="green">320</FONT> public Object clone() throws CloneNotSupportedException {<a name="line.320"></a><FONT color="green">321</FONT> return super.clone();<a name="line.321"></a><FONT color="green">322</FONT> }<a name="line.322"></a><FONT color="green">323</FONT> <a name="line.323"></a><FONT color="green">324</FONT> }<a name="line.324"></a></PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -