/** * Returns the stroke used to draw the items in a series. * * @param series the series (zero-based index). * * @return The stroke (possibly <code>null</code>). * * @see #setSeriesStroke(int, Stroke) */ public Stroke getSeriesStroke(int series) { return this.strokeList.getStroke(series); }
/** * Returns a {@link Stroke} object from the list. * * @param index the index (zero-based). * * @return The object. */ public Stroke getStroke(final int index) { return (Stroke) get(index); }
/** * Sets the {@link Stroke} for an item in the list. The list is expanded if necessary. * * @param index the index (zero-based). * @param stroke the {@link Stroke}. */ public void setStroke(final int index, final Stroke stroke) { set(index, stroke); }
/** * Provides serialization support. * * @param stream the output stream. * * @throws IOException if there is an I/O error. */ private void writeObject(final ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); final int count = size(); stream.writeInt(count); for (int i = 0; i < count; i++) { final Stroke stroke = getStroke(i); if (stroke != null) { stream.writeInt(i); SerialUtilities.writeStroke(stroke, stream); } else { stream.writeInt(-1); } } }
/** * Sets the stroke used to fill a series of the radar and sends a * {@link PlotChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * @param stroke the stroke (<code>null</code> permitted). */ public void setSeriesOutlineStroke(int series, Stroke stroke) { this.seriesOutlineStrokeList.setStroke(series, stroke); fireChangeEvent(); }
this.seriesOutlineStrokeList = new StrokeList(); this.baseSeriesOutlineStroke = DEFAULT_OUTLINE_STROKE;
/** * Clears the series stroke settings for this renderer and, if requested, * sends a {@link RendererChangeEvent} to all registered listeners. * * @param notify notify listeners? * * @since 1.0.11 */ public void clearSeriesStrokes(boolean notify) { this.strokeList.clear(); if (notify) { fireChangeEvent(); } }
/** * Provides serialization support. * * @param stream the output stream. * * @throws IOException if there is an I/O error. */ private void writeObject(final ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); final int count = size(); stream.writeInt(count); for (int i = 0; i < count; i++) { final Stroke stroke = getStroke(i); if (stroke != null) { stream.writeInt(i); SerialUtilities.writeStroke(stroke, stream); } else { stream.writeInt(-1); } } }
/** * Sets the stroke for a series and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * @param stroke the stroke (<code>null</code> permitted). * @param notify notify listeners? * * @see #getSeriesStroke(int) */ public void setSeriesStroke(int series, Stroke stroke, boolean notify) { this.strokeList.setStroke(series, stroke); if (notify) { fireChangeEvent(); } }
this.strokeList = new StrokeList(); this.baseStroke = DEFAULT_STROKE; this.autoPopulateSeriesStroke = true; this.outlineStrokeList = new StrokeList(); this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE; this.autoPopulateSeriesOutlineStroke = false;
/** * Provides serialization support. * * @param stream the output stream. * * @throws IOException if there is an I/O error. */ private void writeObject(final ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); final int count = size(); stream.writeInt(count); for (int i = 0; i < count; i++) { final Stroke stroke = getStroke(i); if (stroke != null) { stream.writeInt(i); SerialUtilities.writeStroke(stroke, stream); } else { stream.writeInt(-1); } } }
/** * Sets the outline stroke for a series and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index. * @param stroke the stroke (<code>null</code> permitted). * @param notify notify listeners? * * @see #getSeriesOutlineStroke(int) */ public void setSeriesOutlineStroke(int series, Stroke stroke, boolean notify) { this.outlineStrokeList.setStroke(series, stroke); if (notify) { fireChangeEvent(); } }
/** * Returns the stroke used to outline the items in a series. * * @param series the series (zero-based index). * * @return The stroke (possibly <code>null</code>). * * @see #setSeriesOutlineStroke(int, Stroke) */ public Stroke getSeriesOutlineStroke(int series) { return this.outlineStrokeList.getStroke(series); }
/** * Returns a {@link Stroke} object from the list. * * @param index the index (zero-based). * * @return The object. */ public Stroke getStroke(final int index) { return (Stroke) get(index); }
/** * Sets the {@link Stroke} for an item in the list. The list is expanded if necessary. * * @param index the index (zero-based). * @param stroke the {@link Stroke}. */ public void setStroke(final int index, final Stroke stroke) { set(index, stroke); }
/** * Provides serialization support. * * @param stream the input stream. * * @throws IOException if there is an I/O error. * @throws ClassNotFoundException if there is a classpath problem. */ private void readObject(final ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); final int count = stream.readInt(); for (int i = 0; i < count; i++) { final int index = stream.readInt(); if (index != -1) { setStroke(index, SerialUtilities.readStroke(stream)); } } }
/** * Returns the stroke for the specified series. * * @param series the series index (zero-based). * * @return The stroke (never <code>null</code>). */ public Stroke getSeriesOutlineStroke(int series) { // return the override, if there is one... if (this.seriesOutlineStroke != null) { return this.seriesOutlineStroke; } // otherwise look up the paint list Stroke result = this.seriesOutlineStrokeList.getStroke(series); if (result == null) { result = this.baseSeriesOutlineStroke; } return result; }
/** * Returns a {@link Stroke} object from the list. * * @param index the index (zero-based). * * @return The object. */ public Stroke getStroke(final int index) { return (Stroke) get(index); }
/** * Sets the {@link Stroke} for an item in the list. The list is expanded if necessary. * * @param index the index (zero-based). * @param stroke the {@link Stroke}. */ public void setStroke(final int index, final Stroke stroke) { set(index, stroke); }