/** * Sets the axis range and sends an {@link AxisChangeEvent} to all * registered listeners. * * @param lower the lower bound for the axis. * @param upper the upper bound for the axis. */ public void setRange(Date lower, Date upper) { if (lower.getTime() >= upper.getTime()) { throw new IllegalArgumentException("Requires 'lower' < 'upper'."); } setRange(new DateRange(lower, upper)); }
/** * Returns a string representing the date range (useful for debugging). * * @return A string representing the date range. */ @Override public String toString() { DateFormat df = DateFormat.getDateTimeInstance(); return "[" + df.format(getLowerDate()) + " --> " + df.format(getUpperDate()) + "]"; }
double axisMin = this.timeline.toTimelineValue(range.getLowerMillis()); double axisMax = this.timeline.toTimelineValue(range.getUpperMillis());
/** * Returns the latest date visible on the axis. * * @return The date. * * @see #setMaximumDate(Date) * @see #getMinimumDate() */ public Date getMaximumDate() { Date result; Range range = getRange(); if (range instanceof DateRange) { DateRange r = (DateRange) range; result = r.getUpperDate(); } else { result = new Date((long) range.getUpperBound()); } return result; }
/** * Returns the earliest date visible on the axis. * * @return The date. * * @see #setMinimumDate(Date) * @see #getMaximumDate() */ public Date getMinimumDate() { Date result; Range range = getRange(); if (range instanceof DateRange) { DateRange r = (DateRange) range; result = r.getLowerDate(); } else { result = new Date((long) range.getLowerBound()); } return result; }
double axisMin = this.timeline.toTimelineValue(range.getLowerMillis()); double axisMax = this.timeline.toTimelineValue(range.getUpperMillis());
/** * Returns the latest date visible on the axis. * * @return The date. * * @see #setMaximumDate(Date) * @see #getMinimumDate() */ public Date getMaximumDate() { Date result = null; Range range = getRange(); if (range instanceof DateRange) { DateRange r = (DateRange) range; result = r.getUpperDate(); } else { result = new Date((long) range.getUpperBound()); } return result; }
/** * Returns the earliest date visible on the axis. * * @return The date. * * @see #setMinimumDate(Date) * @see #getMaximumDate() */ public Date getMinimumDate() { Date result = null; Range range = getRange(); if (range instanceof DateRange) { DateRange r = (DateRange) range; result = r.getLowerDate(); } else { result = new Date((long) range.getLowerBound()); } return result; }
/** * Returns a string representing the date range (useful for debugging). * * @return A string representing the date range. */ public String toString() { DateFormat df = DateFormat.getDateTimeInstance(); return "[" + df.format(getLowerDate()) + " --> " + df.format(getUpperDate()) + "]"; }
/** * Sets the axis range and sends an {@link AxisChangeEvent} to all * registered listeners. * * @param lower the lower bound for the axis. * @param upper the upper bound for the axis. */ public void setRange(double lower, double upper) { if (lower >= upper) { throw new IllegalArgumentException("Requires 'lower' < 'upper'."); } setRange(new DateRange(lower, upper)); }
double axisMin = this.timeline.toTimelineValue(range.getLowerMillis()); double axisMax = this.timeline.toTimelineValue(range.getUpperMillis()); double result = 0.0; if (RectangleEdge.isTopOrBottom(edge)) {
Date lower = range.getLowerDate(); Date upper = range.getUpperDate(); String lowerStr, upperStr; DateFormat formatter = getDateFormatOverride();
public XYChartBuilder setDateXAxisRange(final Date lower, final Date upper) { if (xAxis == null) { throw new IllegalArgumentException("Call set*XAxis first. No xAxis given yet."); } xAxis.setRange(new DateRange(lower, upper)); return this; }
double axisMin = this.timeline.toTimelineValue(range.getLowerMillis()); double axisMax = this.timeline.toTimelineValue(range.getUpperMillis()); double result = 0.0; if (RectangleEdge.isTopOrBottom(edge)) {
Date lower = range.getLowerDate(); Date upper = range.getUpperDate(); String lowerStr = null; String upperStr = null;
/** * Sets the axis range and sends an {@link AxisChangeEvent} to all * registered listeners. * * @param lower the lower bound for the axis. * @param upper the upper bound for the axis. */ public void setRange(Date lower, Date upper) { if (lower.getTime() >= upper.getTime()) { throw new IllegalArgumentException("Requires 'lower' < 'upper'."); } setRange(new DateRange(lower, upper)); }
Date lower = range.getLowerDate(); Date upper = range.getUpperDate(); String lowerStr = null; String upperStr = null;
/** * Sets the axis range and sends an {@link AxisChangeEvent} to all * registered listeners. * * @param lower the lower bound for the axis. * @param upper the upper bound for the axis. */ @Override public void setRange(double lower, double upper) { if (lower >= upper) { throw new IllegalArgumentException("Requires 'lower' < 'upper'."); } setRange(new DateRange(lower, upper)); }
Date lower = range.getLowerDate(); Date upper = range.getUpperDate(); String lowerStr, upperStr; DateFormat formatter = getDateFormatOverride();
/** * Sets the range for the axis, if requested, sends an * {@link AxisChangeEvent} to all registered listeners. As a side-effect, * the auto-range flag is set to <code>false</code> (optional). * * @param range the range (<code>null</code> not permitted). * @param turnOffAutoRange a flag that controls whether or not the auto * range is turned off. * @param notify a flag that controls whether or not listeners are * notified. */ public void setRange(Range range, boolean turnOffAutoRange, boolean notify) { if (range == null) { throw new IllegalArgumentException("Null 'range' argument."); } // usually the range will be a DateRange, but if it isn't do a // conversion... if (!(range instanceof DateRange)) { range = new DateRange(range); } super.setRange(range, turnOffAutoRange, notify); }