Package | Description |
---|---|
com.yworks.yfiles.view.input |
Contains definitions, default implementations, and support classes that deal with the user interaction in a
CanvasControl in general, as well as specialized utility classes and IInputMode implementations that can be used to work with and edit IGraph instances in a GraphControl . |
Modifier and Type | Class and Description |
---|---|
class |
DefaultPortCandidate
A simple default implementation of an
IPortCandidate . |
Modifier and Type | Method and Description |
---|---|
protected IPortCandidate |
PortRelocationHandle.createExistingPortCandidate(IPort port)
Factory method that creates the candidate for the existing port.
|
protected IPortCandidate |
PortRelocationHandle.getClosestCandidate(IInputModeContext context,
PointD location,
Iterable<IPortCandidate> candidates)
Finds the closest candidate from the given set of candidates.
|
protected IPortCandidate |
CreateEdgeInputMode.getClosestCandidate(Iterable<IPortCandidate> candidates,
PointD location)
Finds the closest
PortCandidateValidity.VALID candidate given a number of
IPortCandidate s and a location in world coordinates. |
protected IPortCandidate |
CreateEdgeInputMode.getClosestSourceCandidate(Iterable<IPortCandidate> candidates,
PointD location)
Finds the closest candidate given a number of
IPortCandidate s and a location in world coordinates. |
protected IPortCandidate |
CreateEdgeInputMode.getClosestTargetCandidate(Iterable<IPortCandidate> candidates,
PointD location)
Finds the closest target candidate given a number of
IPortCandidate s and a location in world coordinates. |
protected IPortCandidate |
AbstractPortCandidateProvider.getPortCandidateAt(IInputModeContext context,
DefaultPortCandidate candidate,
PointD suggestedLocation)
Callback method used by the ports created using the factory methods
AbstractPortCandidateProvider.createCandidate(IPortOwner, IPortLocationModelParameter, boolean) . |
IPortCandidate |
IPortCandidate.getPortCandidateAt(IInputModeContext context,
PointD location)
Returns a candidate that is derived from this instance that best fits the provided
location . |
IPortCandidate |
DefaultPortCandidate.getPortCandidateAt(IInputModeContext context,
PointD location)
Returns a candidate that is derived from this instance that best fits the provided
location . |
IPortCandidate |
CreateEdgeInputMode.getSourcePortCandidate()
Gets the candidate for the
SourcePort of the edge to be created. |
protected IPortCandidate |
CreateEdgeInputMode.getSourcePortCandidate(IPortCandidateProvider provider,
PointD location,
boolean resolveCandidates)
Finds the best matching source port
IPortCandidate given a provider and the current location. |
protected IPortCandidate |
CreateEdgeInputMode.getSourcePortCandidate(PointD location)
Finds the best matching source
port candidate based on the given location. |
IPortCandidate |
CreateEdgeInputMode.getTargetPortCandidate()
Gets the current candidate for the
TargetPort of the edge to be created. |
protected IPortCandidate |
PortRelocationHandle.resolveCandidate(IInputModeContext context,
IPortCandidate portCandidate,
PointD location)
Tries to
resolve a dynamic port candidate for the
given location. |
Modifier and Type | Method and Description |
---|---|
protected abstract Iterable<IPortCandidate> |
AbstractPortCandidateProvider.getPortCandidates(IInputModeContext context)
Creates an enumeration of possibly port candidates.
|
protected Iterable<IPortCandidate> |
PortRelocationHandle.getPortCandidates(IInputModeContext context,
IEdge edge,
boolean sourcePort)
Gets the possible candidates for the given edge.
|
Iterable<IPortCandidate> |
IPortCandidateProvider.getSourcePortCandidates(IInputModeContext context)
Returns all source port candidates that belong to the context of this provider.
|
Iterable<IPortCandidate> |
IEdgeReconnectionPortCandidateProvider.getSourcePortCandidates(IInputModeContext context)
Returns all source port candidates that may be used for the edge.
|
Iterable<IPortCandidate> |
AbstractPortCandidateProvider.getSourcePortCandidates(IInputModeContext context)
Convenience implementation that simply delegates to
AbstractPortCandidateProvider.getPortCandidates(IInputModeContext) . |
Iterable<IPortCandidate> |
IPortCandidateProvider.getSourcePortCandidates(IInputModeContext context,
IPortCandidate target)
Returns all port candidates that apply for the provided opposite port candidate.
|
Iterable<IPortCandidate> |
AbstractPortCandidateProvider.getSourcePortCandidates(IInputModeContext context,
IPortCandidate target)
Convenience implementation that simply delegates to
AbstractPortCandidateProvider.getPortCandidates(IInputModeContext) . |
Iterable<IPortCandidate> |
IPortCandidateProvider.getTargetPortCandidates(IInputModeContext context)
Returns all target port candidates that belong to the context of this provider.
|
Iterable<IPortCandidate> |
IEdgeReconnectionPortCandidateProvider.getTargetPortCandidates(IInputModeContext context)
Returns all source port candidates that may be used for the edge.
|
Iterable<IPortCandidate> |
AbstractPortCandidateProvider.getTargetPortCandidates(IInputModeContext context)
Convenience implementation that simply delegates to
AbstractPortCandidateProvider.getPortCandidates(IInputModeContext) . |
Iterable<IPortCandidate> |
IPortCandidateProvider.getTargetPortCandidates(IInputModeContext context,
IPortCandidate source)
Returns all port candidates that apply for the provided opposite port candidate.
|
Iterable<IPortCandidate> |
AbstractPortCandidateProvider.getTargetPortCandidates(IInputModeContext context,
IPortCandidate source)
Convenience implementation that simply delegates to
AbstractPortCandidateProvider.getPortCandidates(IInputModeContext) . |
protected Iterable<IPortCandidate> |
CreateEdgeInputMode.getTargetPortCandidates(PointD location,
boolean resolveCandidates)
Retrieves the target port candidates for a given location in world coordinates.
|
protected Iterable<IPortCandidate> |
CreateEdgeInputMode.resolveCandidates(Iterable<IPortCandidate> candidates,
PointD location)
Returns an enumerable over the given candidates where no instance has
PortCandidateValidity.DYNAMIC
Validity . |
Modifier and Type | Method and Description |
---|---|
protected IEdge |
CreateEdgeInputMode.createEdge(IGraph graph,
IPortCandidate sourcePortCandidate,
IPortCandidate targetPortCandidate)
Callback used by
CreateEdgeInputMode.createEdge() if both SourcePortCandidate and TargetPortCandidate
have been set. |
IEdge |
IEdgeCreationCallback.createEdge(IInputModeContext context,
IGraph graph,
IPortCandidate sourcePortCandidate,
IPortCandidate targetPortCandidate,
IEdge templateEdge)
The delegate method that is used by
CreateEdgeInputMode to create edges between
instances of IPort . |
void |
CreateEdgeInputMode.doStartEdgeCreation(IPortCandidate sourcePortCandidate)
Synthetically starts the interactive edge creation process using the provided
IPortCandidate as the source
port. |
static AbstractPortCandidateProvider |
IPortCandidateProvider.fromCandidates(IPortCandidate... candidates)
Creates an implementation of an
IPortCandidateProvider that provides only the given port candidates. |
protected IPort |
PortRelocationHandle.getPort(IInputModeContext context,
IPortCandidate portCandidate,
PointD suggestedLocation)
Callback used during
PortRelocationHandle.dragFinished(IInputModeContext, PointD, PointD) to actually get the new port from the
chosen candidate. |
Iterable<IPortCandidate> |
IPortCandidateProvider.getSourcePortCandidates(IInputModeContext context,
IPortCandidate target)
Returns all port candidates that apply for the provided opposite port candidate.
|
Iterable<IPortCandidate> |
AbstractPortCandidateProvider.getSourcePortCandidates(IInputModeContext context,
IPortCandidate target)
Convenience implementation that simply delegates to
AbstractPortCandidateProvider.getPortCandidates(IInputModeContext) . |
protected IPortCandidateProvider |
CreateEdgeInputMode.getTargetPortCandidateProvider(IPortCandidate sourcePortCandidate,
IPortOwner targetOwner,
PointD location)
Retrieves the port candidate provider instance given a source port candidate and a possible target item.
|
protected IPortCandidateProvider |
CreateEdgeInputMode.getTargetPortCandidateProvider(IPortCandidate sourcePortCandidate,
PointD location)
Retrieves the
IPortCandidateProvider instance that provides the possible candidates for the target of the edge
given the current source candidate. |
Iterable<IPortCandidate> |
IPortCandidateProvider.getTargetPortCandidates(IInputModeContext context,
IPortCandidate source)
Returns all port candidates that apply for the provided opposite port candidate.
|
Iterable<IPortCandidate> |
AbstractPortCandidateProvider.getTargetPortCandidates(IInputModeContext context,
IPortCandidate source)
Convenience implementation that simply delegates to
AbstractPortCandidateProvider.getPortCandidates(IInputModeContext) . |
protected IPortCandidate |
PortRelocationHandle.resolveCandidate(IInputModeContext context,
IPortCandidate portCandidate,
PointD location)
Tries to
resolve a dynamic port candidate for the
given location. |
protected void |
PortRelocationHandle.setClosestCandidate(IPortCandidate portCandidate)
Updates the closest candidate for visual feedback.
|
protected void |
PortRelocationHandle.setPort(IInputModeContext context,
IEdge edge,
boolean setSourcePort,
IPortCandidate portCandidate,
PointD suggestedLocation)
Callback that is triggered by
PortRelocationHandle.dragFinished(IInputModeContext, PointD, PointD) to actually change the port. |
void |
CreateEdgeInputMode.setSourcePortCandidate(IPortCandidate value)
Sets the candidate for the
SourcePort of the edge to be created. |
void |
CreateEdgeInputMode.setTargetPortCandidate(IPortCandidate value)
Sets the current candidate for the
TargetPort of the edge to be created. |
protected void |
PortRelocationHandle.setToPortCandidate(SimpleEdge dummy,
boolean source,
IPortCandidate portCandidate)
Updates the dummy edge's visual appearance to reflect the new port candidate.
|
protected void |
CreateEdgeInputMode.updateDummyEdgeSourcePort(IPortCandidate sourcePortCandidate)
Updates the
DummyEdge to reflect the current source port candidate. |
protected void |
CreateEdgeInputMode.updateDummyEdgeTargetPort(IPortCandidate targetPortCandidate)
Updates the
DummyEdge to reflect the current target port candidate. |
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractPortCandidateProvider.addExistingPorts(IPortOwner owner,
List<IPortCandidate> list)
Convenience method for subclasses that adds all existing
Ports of the owner to the
provided list. |
void |
CreateEdgeInputMode.addSourcePortCandidateChangedListener(IEventHandler<ItemEventArgs<IPortCandidate>> sourcePortCandidateChangedEvent)
Adds the given listener for the
SourcePortCandidateChanged event that occurs when the value of the SourcePortCandidate
property changes. |
void |
CreateEdgeInputMode.addTargetPortCandidateChangedListener(IEventHandler<ItemEventArgs<IPortCandidate>> targetPortCandidateChangedEvent)
Adds the given listener for the
TargetPortCandidateChanged event that occurs when the value of the TargetPortCandidate
property changes. |
static AbstractPortCandidateProvider |
IPortCandidateProvider.fromCandidates(Iterable<IPortCandidate> candidates)
Creates an implementation of an
IPortCandidateProvider that provides only the given port candidates. |
protected IPortCandidate |
PortRelocationHandle.getClosestCandidate(IInputModeContext context,
PointD location,
Iterable<IPortCandidate> candidates)
Finds the closest candidate from the given set of candidates.
|
protected IPortCandidate |
CreateEdgeInputMode.getClosestCandidate(Iterable<IPortCandidate> candidates,
PointD location)
Finds the closest
PortCandidateValidity.VALID candidate given a number of
IPortCandidate s and a location in world coordinates. |
protected IPortCandidate |
CreateEdgeInputMode.getClosestSourceCandidate(Iterable<IPortCandidate> candidates,
PointD location)
Finds the closest candidate given a number of
IPortCandidate s and a location in world coordinates. |
protected IPortCandidate |
CreateEdgeInputMode.getClosestTargetCandidate(Iterable<IPortCandidate> candidates,
PointD location)
Finds the closest target candidate given a number of
IPortCandidate s and a location in world coordinates. |
protected void |
CreateEdgeInputMode.onSourcePortCandidateChanged(ItemEventArgs<IPortCandidate> args)
Triggers the
SourcePortCandidateChanged event. |
protected void |
CreateEdgeInputMode.onTargetPortCandidateChanged(ItemEventArgs<IPortCandidate> args)
Triggers the
TargetPortCandidateChanged event. |
void |
CreateEdgeInputMode.removeSourcePortCandidateChangedListener(IEventHandler<ItemEventArgs<IPortCandidate>> sourcePortCandidateChangedEvent)
Removes the given listener for the
SourcePortCandidateChanged event that occurs when the value of the SourcePortCandidate
property changes. |
void |
CreateEdgeInputMode.removeTargetPortCandidateChangedListener(IEventHandler<ItemEventArgs<IPortCandidate>> targetPortCandidateChangedEvent)
Removes the given listener for the
TargetPortCandidateChanged event that occurs when the value of the TargetPortCandidate
property changes. |
protected Iterable<IPortCandidate> |
CreateEdgeInputMode.resolveCandidates(Iterable<IPortCandidate> candidates,
PointD location)
Returns an enumerable over the given candidates where no instance has
PortCandidateValidity.DYNAMIC
Validity . |