/** @since 3.0 */ public void setTimeArray(GeoDateArray tarray) { tloc_ = tarray; if (xTime_) { xRange_ = computeSoTRange(tarray); } else if (yTime_) { yRange_ = computeSoTRange(tarray); } changes_.firePropertyChange("dataModified", new Integer(0), new Integer(tarray.getLength())); }
private SoTRange computeSoTRange(GeoDateArray tarray) { long start = Long.MAX_VALUE; long end = Long.MIN_VALUE; long[] tar = tarray.getTime(); int count = 0; for (int i = 0; i < tar.length; i++) { if (!(tar[i] == Long.MAX_VALUE)) { start = Math.min(start, tar[i]); end = Math.max(end, tar[i]); count++; } } if (count == 0) { return new SoTRange.Time(Long.MAX_VALUE, Long.MAX_VALUE); } else { return new SoTRange.Time(start, end); } }
/** * Get the length of the Time axis * * @since 2.0 */ public int getTSize() { return tloc_.getLength(); }
public GeoDate[] getTimeEdges() { return tEdges_.getGeoDate(); }
public GeoDate[] getTimeArray() { return tloc_.getGeoDate(); }