@Test public void testSerialization() throws IOException, ClassNotFoundException { DateAxis a1 = new DateAxis("Test Axis"); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(a1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray())); DateAxis a2 = (DateAxis) in.readObject(); in.close(); boolean b = a1.equals(a2); assertTrue(b); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DateAxis)) { return false; } DateAxis that = (DateAxis) obj; if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) { return false; } if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride)) { return false; } if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition)) { return false; } if (!ObjectUtilities.equal(this.timeline, that.timeline)) { return false; } return super.equals(obj); }
DateAxis extends ValueAxis implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DateAxis)) { return false; } DateAxis that = (DateAxis) obj; if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) { return false; } if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride)) { return false; } if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition)) { return false; } if (!ObjectUtilities.equal(this.timeline, that.timeline)) { return false; } return super.equals(obj); } }
DateAxis extends ValueAxis implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DateAxis)) { return false; } DateAxis that = (DateAxis) obj; if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) { return false; } if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride)) { return false; } if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition)) { return false; } if (!ObjectUtilities.equal(this.timeline, that.timeline)) { return false; } return super.equals(obj); } DateAxis();  DateAxis(String label);  DateAxis(String label, TimeZone zone, Locale locale); }
DateAxis extends ValueAxis implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DateAxis)) { return false; } DateAxis that = (DateAxis) obj; if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) { return false; } if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride)) { return false; } if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition)) { return false; } if (!ObjectUtilities.equal(this.timeline, that.timeline)) { return false; } return super.equals(obj); } DateAxis();  DateAxis(String label);  DateAxis(String label, TimeZone zone, Locale locale); TimeZone getTimeZone(); void setTimeZone(TimeZone zone); Timeline getTimeline(); void setTimeline(Timeline timeline); DateTickUnit getTickUnit(); void setTickUnit(DateTickUnit unit); void setTickUnit(DateTickUnit unit, boolean notify,
                            boolean turnOffAutoSelection); DateFormat getDateFormatOverride(); void setDateFormatOverride(DateFormat formatter); @Override void setRange(Range range); @Override void setRange(Range range, boolean turnOffAutoRange,
                         boolean notify); void setRange(Date lower, Date upper); @Override void setRange(double lower, double upper); Date getMinimumDate(); void setMinimumDate(Date date); Date getMaximumDate(); void setMaximumDate(Date maximumDate); DateTickMarkPosition getTickMarkPosition(); void setTickMarkPosition(DateTickMarkPosition position); @Override void configure(); boolean isHiddenValue(long millis); @Override double valueToJava2D(double value, Rectangle2D area,
                                RectangleEdge edge); double dateToJava2D(Date date, Rectangle2D area,
                               RectangleEdge edge); @Override double java2DToValue(double java2DValue, Rectangle2D area,
                                RectangleEdge edge); Date calculateLowestVisibleTickValue(DateTickUnit unit); Date calculateHighestVisibleTickValue(DateTickUnit unit); static TickUnitSource createStandardDateTickUnits(); static TickUnitSource createStandardDateTickUnits(TimeZone zone,
            Locale locale); @Override List<ValueTick> refreshTicks(Graphics2D g2, AxisState state,
            Rectangle2D dataArea, RectangleEdge edge); @Override AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea,
            Rectangle2D dataArea, RectangleEdge edge,
            PlotRenderingInfo plotState); @Override void zoomRange(double lowerPercent, double upperPercent); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
DateAxis extends ValueAxis implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DateAxis)) { return false; } DateAxis that = (DateAxis) obj; if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) { return false; } if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride)) { return false; } if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition)) { return false; } if (!ObjectUtilities.equal(this.timeline, that.timeline)) { return false; } return super.equals(obj); } DateAxis();  DateAxis(String label);  DateAxis(String label, TimeZone zone, Locale locale); TimeZone getTimeZone(); void setTimeZone(TimeZone zone); Timeline getTimeline(); void setTimeline(Timeline timeline); DateTickUnit getTickUnit(); void setTickUnit(DateTickUnit unit); void setTickUnit(DateTickUnit unit, boolean notify,
                            boolean turnOffAutoSelection); DateFormat getDateFormatOverride(); void setDateFormatOverride(DateFormat formatter); @Override void setRange(Range range); @Override void setRange(Range range, boolean turnOffAutoRange,
                         boolean notify); void setRange(Date lower, Date upper); @Override void setRange(double lower, double upper); Date getMinimumDate(); void setMinimumDate(Date date); Date getMaximumDate(); void setMaximumDate(Date maximumDate); DateTickMarkPosition getTickMarkPosition(); void setTickMarkPosition(DateTickMarkPosition position); @Override void configure(); boolean isHiddenValue(long millis); @Override double valueToJava2D(double value, Rectangle2D area,
                                RectangleEdge edge); double dateToJava2D(Date date, Rectangle2D area,
                               RectangleEdge edge); @Override double java2DToValue(double java2DValue, Rectangle2D area,
                                RectangleEdge edge); Date calculateLowestVisibleTickValue(DateTickUnit unit); Date calculateHighestVisibleTickValue(DateTickUnit unit); static TickUnitSource createStandardDateTickUnits(); static TickUnitSource createStandardDateTickUnits(TimeZone zone,
            Locale locale); @Override List<ValueTick> refreshTicks(Graphics2D g2, AxisState state,
            Rectangle2D dataArea, RectangleEdge edge); @Override AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea,
            Rectangle2D dataArea, RectangleEdge edge,
            PlotRenderingInfo plotState); @Override void zoomRange(double lowerPercent, double upperPercent); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); static final DateRange DEFAULT_DATE_RANGE; static final double DEFAULT_AUTO_RANGE_MINIMUM_SIZE_IN_MILLISECONDS; static final Date DEFAULT_ANCHOR_DATE; }