/** * Returns the time period at the specified index. * * @param index the item index (in the range <code>0</code> to * <code>getItemCount() - 1</code>). * * @return The time period at the specified index. * * @see #getDataItem(int) */ public TimePeriod getTimePeriod(int index) { return getDataItem(index).getPeriod(); }
/** * Returns the value at the specified index. * * @param index the item index (in the range <code>0</code> to * <code>getItemCount() - 1</code>). * * @return The value at the specified index (possibly <code>null</code>). * * @see #getDataItem(int) */ public Number getValue(int index) { return getDataItem(index).getValue(); }
/** * Returns the time period at the specified index. * * @param index the item index (in the range {@code 0} to * {@code getItemCount() -1}). * * @return The time period at the specified index. * * @see #getDataItem(int) */ public TimePeriod getTimePeriod(int index) { return getDataItem(index).getPeriod(); }
/** * Returns the y-value for the specified series and item. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The y-value for the specified series and item. */ @Override public Number getY(int series, int item) { TimePeriodValues ts = (TimePeriodValues) this.data.get(series); TimePeriodValue dp = ts.getDataItem(item); return dp.getValue(); }
/** * Returns the value at the specified index. * * @param index the item index (in the range {@code 0} to * {@code getItemCount() -1}). * * @return The value at the specified index (possibly {@code null}). * * @see #getDataItem(int) */ public Number getValue(int index) { return getDataItem(index).getValue(); }
/** * Returns the y-value for the specified series and item. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The y-value for the specified series and item. */ public Number getY(int series, int item) { TimePeriodValues ts = (TimePeriodValues) this.data.get(series); TimePeriodValue dp = ts.getDataItem(item); return dp.getValue(); }
/** * Returns the starting X value for the specified series and item. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The starting X value for the specified series and item. */ public Number getStartX(int series, int item) { TimePeriodValues ts = (TimePeriodValues) this.data.get(series); TimePeriodValue dp = ts.getDataItem(item); return new Long(dp.getPeriod().getStart().getTime()); }
/** * Returns the ending X value for the specified series and item. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The ending X value for the specified series and item. */ @Override public Number getEndX(int series, int item) { TimePeriodValues ts = (TimePeriodValues) this.data.get(series); TimePeriodValue dp = ts.getDataItem(item); return new Long(dp.getPeriod().getEnd().getTime()); }
/** * Returns the ending X value for the specified series and item. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The ending X value for the specified series and item. */ public Number getEndX(int series, int item) { TimePeriodValues ts = (TimePeriodValues) this.data.get(series); TimePeriodValue dp = ts.getDataItem(item); return new Long(dp.getPeriod().getEnd().getTime()); }
/** * Returns the starting X value for the specified series and item. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The starting X value for the specified series and item. */ @Override public Number getStartX(int series, int item) { TimePeriodValues ts = (TimePeriodValues) this.data.get(series); TimePeriodValue dp = ts.getDataItem(item); return new Long(dp.getPeriod().getStart().getTime()); }
/** * Returns the x-value for the specified series and item. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The x-value for the specified series and item. */ public Number getX(int series, int item) { TimePeriodValues ts = (TimePeriodValues) this.data.get(series); TimePeriodValue dp = ts.getDataItem(item); TimePeriod period = dp.getPeriod(); return new Long(getX(period)); }
/** * Returns the x-value for the specified series and item. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The x-value for the specified series and item. */ @Override public Number getX(int series, int item) { TimePeriodValues ts = (TimePeriodValues) this.data.get(series); TimePeriodValue dp = ts.getDataItem(item); TimePeriod period = dp.getPeriod(); return new Long(getX(period)); }
/** * Updates (changes) the value of a data item and sends a * {@link SeriesChangeEvent} to all registered listeners. * * @param index the index of the data item to update. * @param value the new value ({@code null} not permitted). */ public void update(int index, Number value) { TimePeriodValue item = getDataItem(index); item.setValue(value); fireSeriesChanged(); }
/** * Updates (changes) the value of a data item and sends a * {@link SeriesChangeEvent} to all registered listeners. * * @param index the index of the data item to update. * @param value the new value (<code>null</code> not permitted). */ public void update(int index, Number value) { TimePeriodValue item = getDataItem(index); item.setValue(value); fireSeriesChanged(); }
long minStart = getDataItem(this.minStartIndex).getPeriod() .getStart().getTime(); if (start < minStart) { long maxStart = getDataItem(this.maxStartIndex).getPeriod() .getStart().getTime(); if (start > maxStart) { long s = getDataItem(this.minMiddleIndex).getPeriod().getStart() .getTime(); long e = getDataItem(this.minMiddleIndex).getPeriod().getEnd() .getTime(); long minMiddle = s + (e - s) / 2; long s = getDataItem(this.maxMiddleIndex).getPeriod().getStart() .getTime(); long e = getDataItem(this.maxMiddleIndex).getPeriod().getEnd() .getTime(); long maxMiddle = s + (e - s) / 2; long minEnd = getDataItem(this.minEndIndex).getPeriod().getEnd() .getTime(); if (end < minEnd) { long maxEnd = getDataItem(this.maxEndIndex).getPeriod().getEnd() .getTime(); if (end > maxEnd) {
long minStart = getDataItem(this.minStartIndex).getPeriod() .getStart().getTime(); if (start < minStart) { long maxStart = getDataItem(this.maxStartIndex).getPeriod() .getStart().getTime(); if (start > maxStart) { long s = getDataItem(this.minMiddleIndex).getPeriod().getStart() .getTime(); long e = getDataItem(this.minMiddleIndex).getPeriod().getEnd() .getTime(); long minMiddle = s + (e - s) / 2; long s = getDataItem(this.maxMiddleIndex).getPeriod().getStart() .getTime(); long e = getDataItem(this.maxMiddleIndex).getPeriod().getEnd() .getTime(); long maxMiddle = s + (e - s) / 2; long minEnd = getDataItem(this.minEndIndex).getPeriod().getEnd() .getTime(); if (end < minEnd) { long maxEnd = getDataItem(this.maxEndIndex).getPeriod().getEnd() .getTime(); if (end > maxEnd) {
if (!getDataItem(i).equals(that.getDataItem(i))) { return false;
if (!getDataItem(i).equals(that.getDataItem(i))) { return false;