/**
- * Constructor giving arrays of Fields and Objects
- * @param inFieldArray field array
- * @param inPointArray 2d array of field values
+ * Constructor for empty track
+ * @param inBroker message broker object
*/
public Track(UpdateMessageBroker inBroker)
{
System.arraycopy(newPointArray, 0, _dataPoints, 0, numCopied);
_numPoints = _dataPoints.length;
_scaled = false;
- _broker.informSubscribers();
}
return numDeleted;
}
/**
* Delete the specified point
+ * @param inIndex point index
* @return true if successful
*/
public boolean deletePoint(int inIndex)
_dataPoints = newPointArray;
_numPoints = _dataPoints.length;
_scaled = false;
- _broker.informSubscribers();
}
return numDupes;
}
/**
* Reverse the specified range of points
+ * @param inStart start index
+ * @param inEnd end index
* @return true if successful, false otherwise
*/
public boolean reverseRange(int inStart, int inEnd)
return _yRange;
}
+ /**
+ * @return The range of lat values as a DoubleRange object
+ */
+ public DoubleRange getLatRange()
+ {
+ if (!_scaled) scalePoints();
+ return _latRange;
+ }
+ /**
+ * @return The range of lon values as a DoubleRange object
+ */
+ public DoubleRange getLonRange()
+ {
+ if (!_scaled) scalePoints();
+ return _longRange;
+ }
+
/**
* @param inPointNum point index, starting at 0
* @return scaled x value of specified point
/**
* Replace the track contents with the given point array
* @param inContents array of DataPoint objects
+ * @return true on success
*/
public boolean replaceContents(DataPoint[] inContents)
{