/** * Returns a chart subtitle. * * @param index the index of the chart subtitle (zero based). * * @return A chart subtitle. * * @see #addSubtitle(Title) */ public Title getSubtitle(int index) { if ((index < 0) || (index >= getSubtitleCount())) { throw new IllegalArgumentException("Index out of range."); } return this.subtitles.get(index); }
/** * Returns a chart subtitle. * * @param index the index of the chart subtitle (zero based). * * @return A chart subtitle. * * @see #addSubtitle(Title) */ public Title getSubtitle(int index) { if ((index < 0) || (index >= getSubtitleCount())) { throw new IllegalArgumentException("Index out of range."); } return (Title) this.subtitles.get(index); }
/** * Adds a subtitle at a particular position in the subtitle list, and sends * a {@link ChartChangeEvent} to all registered listeners. * * @param index the index (in the range 0 to {@link #getSubtitleCount()}). * @param subtitle the subtitle to add (<code>null</code> not permitted). * * @since 1.0.6 */ public void addSubtitle(int index, Title subtitle) { if (index < 0 || index > getSubtitleCount()) { throw new IllegalArgumentException( "The 'index' argument is out of range."); } if (subtitle == null) { throw new IllegalArgumentException("Null 'subtitle' argument."); } this.subtitles.add(index, subtitle); subtitle.addChangeListener(this); fireChartChanged(); }
/** * Adds a subtitle at a particular position in the subtitle list, and sends * a {@link ChartChangeEvent} to all registered listeners. * * @param index the index (in the range 0 to {@link #getSubtitleCount()}). * @param subtitle the subtitle to add ({@code null} not permitted). * * @since 1.0.6 */ public void addSubtitle(int index, Title subtitle) { if (index < 0 || index > getSubtitleCount()) { throw new IllegalArgumentException( "The 'index' argument is out of range."); } Args.nullNotPermitted(subtitle, "subtitle"); this.subtitles.add(index, subtitle); subtitle.addChangeListener(this); fireChartChanged(); }
for (int i = 0; i < getSubtitleCount(); i++) { Title subtitle = (Title) getSubtitle(i).clone(); chart.subtitles.add(subtitle);
for (int i = 0; i < getSubtitleCount(); i++) { Title subtitle = (Title) getSubtitle(i).clone(); chart.subtitles.add(subtitle);
/** * 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(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.borderStroke = SerialUtilities.readStroke(stream); this.borderPaint = SerialUtilities.readPaint(stream); this.backgroundPaint = SerialUtilities.readPaint(stream); this.progressListeners = new EventListenerList(); this.changeListeners = new EventListenerList(); this.renderingHints = new RenderingHints( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // register as a listener with sub-components... if (this.title != null) { this.title.addChangeListener(this); } for (int i = 0; i < getSubtitleCount(); i++) { getSubtitle(i).addChangeListener(this); } this.plot.addChangeListener(this); }
for (int i = 0; i < getSubtitleCount(); i++) { getSubtitle(i).addChangeListener(this);
/** * Applies this theme to the supplied chart. * * @param chart the chart (<code>null</code> not permitted). */ public void apply(JFreeChart chart) { if (chart == null) { throw new IllegalArgumentException("Null 'chart' argument."); } TextTitle title = chart.getTitle(); if (title != null) { title.setFont(this.extraLargeFont); title.setPaint(this.titlePaint); } int subtitleCount = chart.getSubtitleCount(); for (int i = 0; i < subtitleCount; i++) { applyToTitle(chart.getSubtitle(i)); } chart.setBackgroundPaint(this.chartBackgroundPaint); // now process the plot if there is one Plot plot = chart.getPlot(); if (plot != null) { applyToPlot(plot); } }
size = Integer.parseInt(fontSizeStr); for (int i = 0; i < chart.getSubtitleCount(); i++) { Title t = chart.getSubtitle(i); if (t instanceof TextTitle) {
/** * Applies this theme to the supplied chart. * * @param chart the chart ({@code null} not permitted). */ @Override public void apply(JFreeChart chart) { Args.nullNotPermitted(chart, "chart"); TextTitle title = chart.getTitle(); if (title != null) { title.setFont(this.extraLargeFont); title.setPaint(this.titlePaint); } int subtitleCount = chart.getSubtitleCount(); for (int i = 0; i < subtitleCount; i++) { applyToTitle(chart.getSubtitle(i)); } chart.setBackgroundPaint(this.chartBackgroundPaint); // now process the plot if there is one Plot plot = chart.getPlot(); if (plot != null) { applyToPlot(plot); } }
for (int i = 0; i < chart.getSubtitleCount(); i++) { final Title subtitle = chart.getSubtitle(i); if (subtitle instanceof TextTitle) {