1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
package tim.prune.cmd;
import java.util.List;
/**
* Command to reverse a specific range of the track
*/
public class ReverseRangeCmd extends CompoundCommand
{
public ReverseRangeCmd(List<Integer> inPointIndexes, List<PointFlag> inSegmentPoints)
{
addCommand(new RearrangePointsCmd(inPointIndexes));
if (inSegmentPoints != null)
{
SetSegmentsCmd segmentCommand = new SetSegmentsCmd();
for (PointFlag pf : inSegmentPoints) {
segmentCommand.addSegmentFlag(pf.getPoint(), pf.getFlag());
}
addCommand(segmentCommand);
}
}
}
|