📄 xyitemrenderer.java
字号:
* * @param row the row index (zero-based). * @param column the column index (zero-based). * * @return the item label position (never <code>null</code>). */ public ItemLabelPosition getPositiveItemLabelPosition(int row, int column); /** * Returns the item label position for positive values in ALL series. * * @return the item label position (possibly <code>null</code>). */ public ItemLabelPosition getPositiveItemLabelPosition(); /** * Sets the item label position for positive values in ALL series, and sends a * {@link RendererChangeEvent} to all registered listeners. You need to set this to * <code>null</code> to expose the settings for individual series. * * @param position the position (<code>null</code> permitted). */ public void setPositiveItemLabelPosition(ItemLabelPosition position); /** * Sets the positive item label position for ALL series and (if requested) sends a * {@link RendererChangeEvent} to all registered listeners. * * @param position the position (<code>null</code> permitted). * @param notify notify registered listeners? */ public void setPositiveItemLabelPosition(ItemLabelPosition position, boolean notify); /** * Returns the item label position for all positive values in a series. * * @param series the series index (zero-based). * * @return the item label position (never <code>null</code>). */ public ItemLabelPosition getSeriesPositiveItemLabelPosition(int series); /** * Sets the item label position for all positive values in a series and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * @param position the position (<code>null</code> permitted). */ public void setSeriesPositiveItemLabelPosition(int series, ItemLabelPosition position); /** * Sets the item label position for all positive values in a series and (if requested) sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * @param position the position (<code>null</code> permitted). * @param notify notify registered listeners? */ public void setSeriesPositiveItemLabelPosition(int series, ItemLabelPosition position, boolean notify); /** * Returns the base positive item label position. * * @return the position (never <code>null</code>). */ public ItemLabelPosition getBasePositiveItemLabelPosition(); /** * Sets the base positive item label position. * * @param position the position (<code>null</code> not permitted). */ public void setBasePositiveItemLabelPosition(ItemLabelPosition position); /** * Sets the base positive item label position and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param position the position (<code>null</code> not permitted). * @param notify notify registered listeners? */ public void setBasePositiveItemLabelPosition(ItemLabelPosition position, boolean notify); // NEGATIVE ITEM LABEL POSITION... /** * Returns the item label position for negative values. This method can be overridden to * provide customisation of the item label position for individual data items. * * @param row the row index (zero-based). * @param column the column (zero-based). * * @return the item label position (never <code>null</code>). */ public ItemLabelPosition getNegativeItemLabelPosition(int row, int column); /** * Returns the item label position for negative values in ALL series. * * @return the item label position (possibly <code>null</code>). */ public ItemLabelPosition getNegativeItemLabelPosition(); /** * Sets the item label position for negative values in ALL series, and sends a * {@link RendererChangeEvent} to all registered listeners. You need to set this to * <code>null</code> to expose the settings for individual series. * * @param position the position (<code>null</code> permitted). */ public void setNegativeItemLabelPosition(ItemLabelPosition position); /** * Sets the item label position for negative values in ALL series and (if requested) sends * a {@link RendererChangeEvent} to all registered listeners. * * @param position the position (<code>null</code> permitted). * @param notify notify registered listeners? */ public void setNegativeItemLabelPosition(ItemLabelPosition position, boolean notify); /** * Returns the item label position for all negative values in a series. * * @param series the series index (zero-based). * * @return the item label position (never <code>null</code>). */ public ItemLabelPosition getSeriesNegativeItemLabelPosition(int series); /** * Sets the item label position for negative values in a series and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * @param position the position (<code>null</code> permitted). */ public void setSeriesNegativeItemLabelPosition(int series, ItemLabelPosition position); /** * Sets the item label position for negative values in a series and (if requested) sends a. * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * @param position the position (<code>null</code> permitted). * @param notify notify registered listeners? */ public void setSeriesNegativeItemLabelPosition(int series, ItemLabelPosition position, boolean notify); /** * Returns the base item label position for negative values. * * @return the position (never <code>null</code>). */ public ItemLabelPosition getBaseNegativeItemLabelPosition(); /** * Sets the base item label position for negative values and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param position the position (<code>null</code> not permitted). */ public void setBaseNegativeItemLabelPosition(ItemLabelPosition position); /** * Sets the base negative item label position and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param position the position (<code>null</code> not permitted). * @param notify notify registered listeners? */ public void setBaseNegativeItemLabelPosition(ItemLabelPosition position, boolean notify); /** * Called for each item to be plotted. * <p> * The {@link XYPlot} can make multiple passes through the dataset, depending on the value * returned by the renderer's initialise() method. * * @param g2 the graphics device. * @param state the renderer state. * @param dataArea the area within which the data is being rendered. * @param info collects drawing info. * @param plot the plot (can be used to obtain standard color information etc). * @param domainAxis the domain axis. * @param rangeAxis the range axis. * @param dataset the dataset. * @param series the series index (zero-based). * @param item the item index (zero-based). * @param crosshairState crosshair information for the plot (<code>null</code> permitted). * @param pass the pass index. */ public void drawItem(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass); /** * Returns a legend item for a series from a dataset. * * @param datasetIndex the dataset index. * @param series the series (zero-based index). * * @return The legend item (possibly <code>null</code>). */ public LegendItem getLegendItem(int datasetIndex, int series); /** * Fills a band between two values on the axis. This can be used to color bands between the * grid lines. * * @param g2 the graphics device. * @param plot the plot. * @param axis the domain axis. * @param dataArea the data area. * @param start the start value. * @param end the end value. */ public void fillDomainGridBand(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double start, double end); /** * Fills a band between two values on the range axis. This can be used to color bands between * the grid lines. * * @param g2 the graphics device. * @param plot the plot. * @param axis the range axis. * @param dataArea the data area. * @param start the start value. * @param end the end value. */ public void fillRangeGridBand(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double start, double end); /** * Draws a grid line against the domain axis. * * @param g2 the graphics device. * @param plot the plot. * @param axis the value axis. * @param dataArea the area for plotting data (not yet adjusted for any 3D effect). * @param value the value. */ public void drawDomainGridLine(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value); /** * Draws a grid line against the range axis. * * @param g2 the graphics device. * @param plot the plot. * @param axis the value axis. * @param dataArea the area for plotting data (not yet adjusted for any 3D effect). * @param value the value. */ public void drawRangeGridLine(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value); /** * Draws a vertical line on the chart to represent a 'range marker'. * * @param g2 the graphics device. * @param plot the plot. * @param axis the value axis. * @param marker the marker line. * @param dataArea the axis data area. */ public void drawDomainMarker(Graphics2D g2, XYPlot plot, ValueAxis axis, Marker marker, Rectangle2D dataArea); /** * Draws a horizontal line across the chart to represent a 'range marker'. * * @param g2 the graphics device. * @param plot the plot. * @param axis the value axis. * @param marker the marker line. * @param dataArea the axis data area. */ public void drawRangeMarker(Graphics2D g2, XYPlot plot, ValueAxis axis, Marker marker, Rectangle2D dataArea); /** * Returns the plot that this renderer has been assigned to. * * @return the plot. */ public XYPlot getPlot(); /** * Sets the plot that this renderer is assigned to. * <P> * This method will be called by the plot class...you do not need to call it yourself. * * @param plot the plot. */ public void setPlot(XYPlot plot); /** * Returns the range type for the renderer. The plot needs to know this information in order * to determine an appropriate axis range (when the axis auto-range calculation is on). * <P> * Two types are recognised: * <ul> * <li><code>STANDARD</code> - data items are plotted individually, so the axis range should * extend from the smallest value to the largest value;</li> * <li><code>STACKED</code> - data items are stacked on top of one another, so to determine * the axis range, all the items in a series need to be summed together.</li> * </ul> * * If the data values are stacked, this affects the axis range required to * display all the data items. * * @return a flag indicating whether or not the data values are stacked. */ public RangeType getRangeType(); /** * Returns the range of values the renderer requires to display all the items from the * specified dataset. * * @param dataset the dataset (<code>null</code> permitted). * * @return The range (or <code>null</code> if the dataset is <code>null</code> or empty). */ public Range getRangeExtent(XYDataset dataset); /** * Add a renderer change listener. * * @param listener the listener. */ public void addChangeListener(RendererChangeListener listener); /** * Removes a change listener. * * @param listener the listener. */ public void removeChangeListener(RendererChangeListener listener);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -