Customized IPositionHandler implementation that moves a stripe in the table hierarchy when the stripe is dragged.
Implements
- I
- I
Remarks
This class is used by default by both ReparentStripeInputMode and StripeDropInputMode to perform the actual reparenting and insertion.
Members
Show:
Constructors
Properties
Gets the current IInputModeContext
Gets the current IInputModeContext
protectedreadonlyfinal
Gets a view of the location of the item.
Gets a view of the location of the item.
The point describes the current world coordinate of the element that can be modified by this handler.
readonlyfinal
Implements
IDragHandler.locationGets the moved stripe.
Gets the moved stripe.
readonlyfinal
Methods
Called by clients to indicate that the dragging has been canceled by the user.
Called by clients to indicate that the dragging has been canceled by the user.
This method may be called after the initial initializeDrag and zero or more invocations of handleMove. Implementations should reset the position of the items they modify to their initial state. Alternatively to this method the dragFinished method might be called.
final
Parameters
- context: IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation: Point
- The value of the coordinate of the location property at the time of initializeDrag.
Implements
IDragHandler.cancelDragCreate a ghost object for the source region of the reparent gesture.
Create a ghost object for the source region of the reparent gesture.
The default implementation uses the return value of getVisualCreator with type DRAG_SOURCE.
protected
Parameters
- context: IInputModeContext
- The current input mode context
Return Value
- IRenderTreeElement
- A render tree element that is used to visualize the target region.
See Also
Create a ghost visualization for the target region of the reparent gesture.
Create a ghost visualization for the target region of the reparent gesture.
The default implementation uses the return value of getVisualCreator with type DROP_TARGET.
protected
Parameters
- context: IInputModeContext
- The current input mode context
- stripe: IStripe
- The stripe for which the visualization should be created.
Return Value
- IRenderTreeElement
- A render tree element that is used to visualize the target region.
See Also
Determine the reparent gesture that would result from the given parameters.
Determine the reparent gesture that would result from the given parameters.
The target region has already been determined by getTargetSubregion
protected
Parameters
- context: IInputModeContext
- The current input mode context
- location: IPoint
- The current drag location
- sourceStripe: IStripe
- The stripe that is moved
- targetSubregion: StripeSubregion
- The stripe subregion for the target.
- targetBounds: Rect
- The target bounds
Return Value
- StripeReparentPolicy
- A StripeReparentPolicy that specifies the operation to perform.
Called by clients to indicate that the repositioning has just been finished.
Called by clients to indicate that the repositioning has just been finished.
This method may be called after the initial initializeDrag and zero or more invocations of handleMove. Alternatively to this method the cancelDrag method might be called.
final
Parameters
- context: IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation: Point
- The value of the location property at the time of initializeDrag.
- newLocation: Point
- The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location may or may not be modified to reflect the new value. This is the same value as delivered in the last invocation of handleMove.
Implements
IDragHandler.dragFinishedFinds the target stripe subregion at location and its associated owner node.
Finds the target stripe subregion at
location and its associated owner node.protected
Parameters
- location: Point
- The hit location.
Return Value
- StripeSubregion
- A StripeSubregion that lies at
location, or null if no such region could be found.
Called by clients to indicate that the element has been dragged and its position should be updated.
Called by clients to indicate that the element has been dragged and its position should be updated.
This method may be called more than once after an initial initializeDrag and the final call will be followed by either one dragFinished or one cancelDrag call.
final
Parameters
- context: IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation: Point
- The value of the location property at the time of initializeDrag.
- newLocation: Point
- The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation, the location may or may not be modified to reflect the new value.
Implements
IDragHandler.handleMoveCalled by clients to indicate that the element is going to be dragged.
Called by clients to indicate that the element is going to be dragged.
This call will be followed by one or more calls to handleMove, and a final dragFinished or cancelDrag.
final
Parameters
- context: IInputModeContext
- The context to retrieve information about the drag from.
Implements
IDragHandler.initializeDragCalled whenever a change in the oldTable hierarchy occurs through this position handler.
Called whenever a change in the oldTable hierarchy occurs through this position handler.
Called by clients to set the position to the given coordinates.
Called by clients to set the position to the given coordinates.
Updates the source ghost visualization after a drag.
Updates the source ghost visualization after a drag.
The default does not change
sourceGhost.protected
Parameters
- context: IInputModeContext
- The current input mode context.
- sourceGhost: IRenderTreeElement
- The render tree element that represents the source ghost.
- movedStripe: IStripe
- The IStripe which is moved by this reparent gesture.
- reparentPosition: StripeReparentPolicy
- Where to place the stripe after reparenting.
Return Value
- IRenderTreeElement
- An updated render tree element for the source ghost.
Modifies the target ghost visualization after a drag.
Modifies the target ghost visualization after a drag.
protected
Parameters
- context: IInputModeContext
- The current input mode context.
- targetGhost: IRenderTreeElement
- The render tree element for the target visualization.
- targetStripe: IStripe
- The target for the reparent gesture.
- reparentPosition: StripeReparentPolicy
- The mode that describes the results of the reparent gesture.
- targetBounds: Rect
- The current visualization bounds that have been computed with updateTargetGhostBounds.
Return Value
- IRenderTreeElement
- An updated render tree element for the target ghost.
Updates the visualization bounds for the target visualization depending on the provided values.
Updates the visualization bounds for the target visualization depending on the provided values.
protected
Parameters
- originalTargetBounds: Rect
- The target bounds prior to this method call.
- reparentPosition: StripeReparentPolicy
- Where to place the stripe after the reparenting operations according to the reparent gesture.
- targetStripe: IStripe
- The target stripe which has been determined by the input mode.
Return Value
- Rect
- Updated bounds for the target visualization.
Events
Occurs when a stripe state is changed by this input mode.
Occurs when a stripe state is changed by this input mode.