BaseTransformableNode

public abstract class BaseTransformableNode
Known Direct Subclasses

Base class for nodes that can be transformed using gestures from TransformationSystem.

Public Constructors

Public Methods

TransformationSystem
boolean
isSelected()
Returns true if this node is currently selected by the TransformationSystem.
boolean
isTransforming()
Returns true if any of the transformation controllers are actively transforming this node.
void
onTap(HitTestResult hitTestResult, MotionEvent motionEvent)
Handles when a node has been tapped.
boolean
select()
Sets this as the selected node in the TransformationSystem if there is no currently selected node or if the currently selected node is not actively being transformed.

Protected Methods

void
void

Inherited Methods

Public Constructors

public BaseTransformableNode (TransformationSystem transformationSystem)

Parameters
transformationSystem

Public Methods

public TransformationSystem getTransformationSystem ()

public boolean isSelected ()

Returns true if this node is currently selected by the TransformationSystem.

public boolean isTransforming ()

Returns true if any of the transformation controllers are actively transforming this node.

public void onTap (HitTestResult hitTestResult, MotionEvent motionEvent)

Handles when a node has been tapped.

getNode() will always be this node or one of its children.

Parameters
hitTestResult represents the node that was tapped and information about where it was touched
motionEvent the ACTION_UP MotionEvent that caused the tap

public boolean select ()

Sets this as the selected node in the TransformationSystem if there is no currently selected node or if the currently selected node is not actively being transformed.

Returns
  • true if the node was successfully selected
See Also

Protected Methods

protected void addTransformationController (BaseTransformationController<?> transformationController)

Parameters
transformationController

protected void removeTransformationController (BaseTransformationController<?> transformationController)

Parameters
transformationController