C

PortLocationModelParameterHandle

An implementation of the IHandle that can be used to move an IPort interactively by assigning new IPortLocationModelParameters to the locationParameter
ImplementsInheritance Hierarchy

Remarks

This class also provides snapping facilities and can be used in conjunction with both OrthogonalEdgeEditingContext, as well as GraphSnapContext.

Members

Show:

Constructors

Initializes a new instance of the PortLocationModelParameterHandle class to change the IPortLocationModelParameter of the given port.

Parameters

port: IPort
The port to adjust the location parameter of.

Properties

Gets or sets the cursor to display when the mouse hovers over or drags this handle.
conversionfinal

Property Value

The cursor to display.

Implements

IHandle.cursor
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
Gets the port this instance acts on.
protectedreadonlyfinal

Property Value

The port.
Gets or sets the optional tag object associated with the handle.
final

Implements

IHandle.tag
Gets or sets the type of the handle that can be used by the rendering engine to render types differently.
conversionfinal

Property Value

The type for rendering.

Implements

IHandle.type

Methods

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.

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.
Called during the drag to collect snap results.
This implementation will delegate to the IPortSnapResultProvider that has been received from the port this instance is bound to.
protected

Parameters

evt: CollectSnapResultsEventArgs
The CollectSnapResultsEventArgs instance containing the event data.
source: any
The source of the event.
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.

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.
Gets the graph to use for setting the parameter from the context.
protected

Parameters

context: IInputModeContext
The input mode context to use.

Return Value

IGraph
The graph or null if the graph could not be obtained.

See Also

API
graph
Determines the type of movement for the given port.
This is used for the MovementInfo that is passed to the addMovedPort method.
protected

Parameters

port: IPort
The port to determine the move type for.

Return Value

MoveTypes
This implementation returns LINEAR_MOVE for models of type FreeNodePortLocationModel and ARBITRARY_MOVE for all others.
Obtains the new parameter for the given location and port.
protected

Parameters

port: IPort
The port to obtain a parameter for.
model: IPortLocationModel
The model to use.
location: Point
The new location.

Return Value

IPortLocationModelParameter
The new parameter to use.
Ignore clicking the handle.

Parameters

evt: ClickEventArgs
Arguments describing the click.
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.

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.
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.

Parameters

context: IInputModeContext
The context to retrieve information about the drag from.
Applies the parameter.
protected

Parameters

graph: IGraph
The graph to use for applying.
port: IPort
The port to apply the parameter to.
locationParameter: IPortLocationModelParameter
The new parameter to apply.