X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fgui%2Fprofile%2FProfileData.java;h=0716b9332282164f28a8eb99ae43170dd8ec1a65;hp=b72c43a03b7afd3b5cbb42e4519fd9239471a111;hb=4d5796d02a15808311c09448d79e6e7d1de9d636;hpb=f1b92378a792131ac8fb33a869405851d5b2d1f7 diff --git a/tim/prune/gui/profile/ProfileData.java b/tim/prune/gui/profile/ProfileData.java index b72c43a..0716b93 100644 --- a/tim/prune/gui/profile/ProfileData.java +++ b/tim/prune/gui/profile/ProfileData.java @@ -1,6 +1,7 @@ package tim.prune.gui.profile; import tim.prune.data.Track; +import tim.prune.data.UnitSet; /** * Abstract class for all sources of profile data, @@ -10,6 +11,8 @@ public abstract class ProfileData { /** Track object */ protected final Track _track; + /** Unit set to use */ + protected UnitSet _unitSet = null; /** Flag for availability of any data */ protected boolean _hasData = false; /** Array of booleans for data per point */ @@ -74,7 +77,15 @@ public abstract class ProfileData /** * Get the data from the track and populate the value arrays */ - public abstract void init(); + public abstract void init(UnitSet inUnitSet); + + /** + * Set the UnitSet to use for the calculations + * @param inUnitSet unit set + */ + protected void setUnitSet(UnitSet inUnitSet) { + _unitSet = inUnitSet; + } /** * @return text for label including units