]> gitweb.fperrin.net Git - GpsPrune.git/blob - src/tim/prune/gui/colour/VertSpeedColourer.java
a6f2923336c280482d0e774e540d0e170d844a6f
[GpsPrune.git] / src / tim / prune / gui / colour / VertSpeedColourer.java
1 package tim.prune.gui.colour;
2
3 import java.awt.Color;
4
5 import tim.prune.data.Track;
6 import tim.prune.data.TrackInfo;
7 import tim.prune.gui.profile.VerticalSpeedData;
8
9 /**
10  * Colourer based on vertical speed values
11  */
12 public class VertSpeedColourer extends ProfileDataColourer
13 {
14         /**
15          * Constructor
16          * @param inStartColour start colour
17          * @param inEndColour end colour
18          */
19         public VertSpeedColourer(Color inStartColour, Color inEndColour)
20         {
21                 super(inStartColour, inEndColour);
22         }
23
24         @Override
25         public void calculateColours(TrackInfo inTrackInfo)
26         {
27                 Track track = inTrackInfo == null ? null : inTrackInfo.getTrack();
28                 // Calculate speed value for each point
29                 VerticalSpeedData data = new VerticalSpeedData(track);
30                 calculateColours(track, data);
31         }
32 }