|
package com.hfk.android.gestures.dsl;
import android.view.View;
import com.hfk.android.gestures.CheckRelationDistanceOfRegisteredPointCondition;
import com.hfk.android.gestures.IGestureCondition;
import com.hfk.android.gestures.RelationType;
import com.hfk.android.gestures.TouchHandler;
public class DistanceRangeStartSelector {
public DistanceRangeStartSelector(RelationType relationType, int distanceRange/*, View parentView*/)
{
this.relationType = relationType;
this.range = distanceRange;
//view = parentView;
}
public IGestureCondition fromLastEvent()
{
return new CheckRelationDistanceOfRegisteredPointCondition(/*view,*/ relationType, range, TouchHandler.LastActionPos);
}
public IGestureCondition fromTouchDown(int index)
{
return new CheckRelationDistanceOfRegisteredPointCondition(/*view,*/ relationType, range, TouchHandler.getEventId(TouchHandler.ActionDownPos, index));
}
public IGestureCondition fromMove()
{
return new CheckRelationDistanceOfRegisteredPointCondition(/*view,*/ relationType, range, TouchHandler.ActionMovePos);
}
public IGestureCondition fromTouchUp(int index)
{
return new CheckRelationDistanceOfRegisteredPointCondition(/*view,*/ relationType, range, TouchHandler.getEventId(TouchHandler.ActionUpPos, index));
}
private RelationType relationType;
private int range;
//private View view;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.