In terms of the Model-View-Controller (MVC) paradigm, the controller part is the tie between the model and the view. It handles the user interaction and accordingly changes state of both model and view. In yFiles.NET, controllers are so-called "input modes."
There is a variety of specialized input modes available that handle specific user interaction aspects ranging from general keyboard input to mouse gestures within well-defined contexts. The functionality provided by these specialized input modes is combined by general-purpose input modes that serve as composites which enable full-featured handling of user interaction. The most comprehensive input modes are:
Class GraphViewerInputMode
is a controller that provides convenient navigation-only support in a graph.
It makes available the functionality of a set of specialized input modes.
Registering a GraphViewerInputMode instance with a GraphControl is done through
the control's
InputModes
property,
for example.
// 'gc' is of type yWorks.yFiles.UI.GraphControl. // Add GraphViewerInputMode to the graph control. gc.InputModes.Add(new GraphViewerInputMode());
Upon initialization, GraphViewerInputMode creates and installs the input modes listed in Table 2.19, “Input modes used by GraphViewerInputMode (sorted by input mode priority)” as concurrent input modes. Note that the input modes are sorted according to their priority (see also the section called “Input Mode Priorities”).
Table 2.19. Input modes used by GraphViewerInputMode (sorted by input mode priority)
| Type Name | Description |
|---|---|
| ClickInputMode |
Recognizes mouse clicks, including double clicks. |
| MarqueeSelectionInputMode |
Provides the visual feedback for a rectangular selection box in the canvas. |
| NavigationInputMode |
Enables navigation in the graph structure. |
| ContextMenuInputMode |
Displays a context menu. |
| MouseHoverInputMode |
Displays a tooltip when the mouse rests in the canvas. |
| MoveViewportInputMode |
Enables dragging the viewport. |
Each of the input modes can be obtained or replaced using a like named property
defined by GraphViewerInputMode.
Also, a sorted list of input modes can be obtained via the
GetSortedModes
method.
Class GraphViewerInputMode provides various properties and callbacks that allow for fine-grained control over the support for navigation interaction. For example, for certain kinds of navigation gestures the set of graph element types that the input mode may act upon can be restricted to a specific subset of the available types.
Table 2.20, “GraphViewerInputMode customization” lists the
customization properties of class GraphViewerInputMode.
Most of the properties support that combinations of graph element types can be
specified using the constants defined in the
GraphItemTypes
enumeration
type.
Table 2.20. GraphViewerInputMode customization
| Name | Purpose |
|---|---|
| SelectableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can be selected by the user. |
| MarqueeSelectableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can be selected using the marquee selection tool. |
| ClickableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can be clicked. |
| FocusableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can have focus. |
| ContextMenuItems |
A combination of GraphItemTypes that specifies the set of graph element types that provide context menus. |
| ToolTipItems |
A combination of GraphItemTypes that specifies the set of graph element types that provide tooltips. |
Example 2.27, “Using the GraphItemTypes constants” shows how to use the GraphItemTypes constants to customize a GraphViewerInputMode instance.
Example 2.27. Using the GraphItemTypes constants
// 'gvim' is of type yWorks.yFiles.UI.Input.GraphViewerInputMode. // Do not allow selection of any graph elements. gvim.SelectableItems = GraphItemTypes.None; // Tooltips are queried only for nodes and edges. gvim.ToolTipItems = GraphItemTypes.Node | GraphItemTypes.Edge;
The
PopulateItemContextMenu
and
QueryItemToolTip
events can be used to attach appropriate event handler logic that provides
either the contents of an item's context menu or tooltip.
Class GraphEditorInputMode
is a full-featured controller that makes available the functionality of a set
of specialized input modes.
It covers all aspects of user interaction with an IGraph instance displayed in
a GraphControl.
Registering a GraphEditorInputMode instance with a GraphControl is done through
the control's
InputModes
property,
for example.
The graph that is displayed in the control is given to the input mode at
creation time.
// 'gc' is of type yWorks.yFiles.UI.GraphControl. // Add GraphEditorInputMode to the graph control. gc.InputModes.Add(new GraphEditorInputMode());
GraphEditorInputMode provides convenient support for creating, modifying, and interacting with graph elements in an IGraph instance.
GraphEditorInputMode also provides convenient support for grouped graphs, which includes, for example, grouping and ungrouping of nodes as well as re-parenting. Additional support for folding operations, like collapsing and expanding group nodes is available, too.
Tutorial demo applications SimpleEditorForm and GraphEditorForm show how GraphEditorInputMode is used with a GraphControl instance.
Upon initialization, GraphEditorInputMode creates and installs the input modes listed in Table 2.21, “Input modes used by GraphEditorInputMode (sorted by input mode priority)” as concurrent input modes. Note that the input modes are sorted according to their priority (see also the section called “Input Mode Priorities”).
Table 2.21. Input modes used by GraphEditorInputMode (sorted by input mode priority)
| Type Name | Description |
|---|---|
| WaitInputMode |
Blocks user interaction and tries to cancel ongoing edits. |
| HandleInputMode |
Manages the dragging of "handles," including the detection of beginning and ending of a drag, and canceling a drag. Also provides the visual feedback for handles when dragged. |
| KeyboardInputMode |
Recognizes key events. |
| ClickInputMode |
Recognizes mouse clicks, including double clicks. |
| MoveLabelInputMode |
Specialized instance that handles moving of labels to label candidate positions. |
| MoveInputMode |
Handles moving of canvas objects. |
| CreateBendInputMode |
Governs the creation of additional bends in edge paths. |
| CreateEdgeInputMode |
Governs the creation of edges in an IGraph. |
| MarqueeSelectionInputMode |
Provides the visual feedback for a rectangular selection box in the canvas. |
| NavigationInputMode |
Enables navigation in the graph structure. |
| ContextMenuInputMode |
Displays a context menu. |
| MouseHoverInputMode |
Displays a tooltip when the mouse rests in the canvas. |
| TextEditorInputMode |
Handles label editing. |
Each of the input modes can be obtained or replaced using a like named property
defined by GraphEditorInputMode.
Also, a sorted list of input modes can be obtained via the
GetSortedModes
method.
Graph element creation functionality is provided directly by
GraphEditorInputMode as well as the input modes CreateBendInputMode and
CreateEdgeInputMode.
The former uses the method shown in
API Excerpt 2.34, “Mouse gesture node creation method” whenever a node is created in
the canvas by means of a mouse click gesture.
Using the
NodeCreationAllowed
and
NodeCreator
properties, the actual node creation behavior can be easily customized.
Bend and edge creation is governed by their respective input modes.
However, CreateEdgeInputMode exposes convenient bend-related customization
capabilities.
For example, the
BendCreationAllowed
property can be used to disallow bend creation in the canvas.
Class GraphEditorInputMode provides various properties and callbacks that allow for fine-grained control over the editing functionality. For example, for certain kinds of editing gestures the set of graph element types that the input mode may act upon can be restricted to a specific subset of the available types.
Table 2.22, “GraphEditorInputMode customization” lists the customization properties of
class GraphEditorInputMode.
Most of the properties support that combinations of graph element types can be
specified using the constants defined in the
GraphItemTypes
enumeration
type.
Table 2.22. GraphEditorInputMode customization
| Name | Purpose |
|---|---|
| LabelEditingAllowed |
Whether interactive label editing is allowed. If set to true, label editing is triggered by the F2 key by default. |
| NodeCreationAllowed |
Whether the user is allowed to create nodes. |
| SelectableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can be selected by the user. |
| MarqueeSelectableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can be selected using the marquee selection tool. |
| ClickSelectableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can be selected by mouse clicks. |
| ClickableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can be clicked by the user. |
| ShouldBeClicked |
Callback that determines whether the given model item may be clicked. |
| FocusableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can have focus. |
| ShowHandleItems |
A combination of GraphItemTypes that specifies the set of graph element types that should show resize handles when selected. |
| ShouldShowHandles |
Callback that determines whether resize handles should be shown for the given model item. |
| DeletableItems |
A combination of GraphItemTypes that specifies the set of graph element types that will be deleted when the Delete key is pressed. |
| ShouldBeDeleted |
Callback that determines whether the given model item may be deleted. |
| MovableItems |
A combination of GraphItemTypes that specifies the set of graph element types that can be moved by the user. |
| ShouldBeMovable |
Callback that determines whether the given model item may be moved. |
Example 2.28, “Using the GraphItemTypes constants” shows how to use the GraphItemTypes constants to customize a GraphEditorInputMode instance.
Support for orthogonal edge paths is an invaluable aid to a user for manual creation of orthogonal edge paths, but even more for maintaining orthogonal edge paths during manual editing operations. Without this support, moving a node can easily destroy orthogonality of incident edges thereby making a mess out of a once beautiful diagram.
GraphEditorInputMode, together with the specialized input modes it makes available, provides special support for orthogonal edge paths. Specifically, the following edge-related mouse gestures offer specialized behavior for this kind of paths:
Additionally, the following mouse gestures, which have an impact on edge paths, too, also offer specialized behavior:
To enable the support for orthogonal edge paths, an
OrthogonalEdgeEditingContext
can be set with GraphEditorInputMode by means of the following property:
OrthogonalEdgeEditingContext OrthogonalEdgeEditingContext { get; set; } |
|
| Description | Convenience property for setting the orthogonal edge editing context and enabling support for orthogonal edge paths. |
Support for orthogonal edge creation can be enabled independently on CreateEdgeInputMode using the following property:
bool OrthogonalEdgeCreation { get; set; } |
|
| Description | Enables/disables orthogonal edge path support when creating an edge. |
With the exception of CreateEdgeInputMode, class OrthogonalEdgeEditingContext handles orthogonal edge editing of all edges across the involved input modes. The actual edge editing behavior can be controlled using the following properties:
bool OrthogonalEdgeEditing { get; set; } |
|
| Description | Enables/disables orthogonal edge path support. |
bool MovePorts { get; set; } |
|
| Description | Determines whether the source port (target port) should move along with the first (last) bend to retain orthogonality of the first (last) edge segment. |
Individual edge editing behavior can be achieved by decorating the look-up of edges
to return a custom IOrthogonalEdgeHelper
implementation when this type is queried.
Tutorial demo application
OrthogonalEdgesForm
demonstrates this scheme.
Interactive snapping of graph elements supports a user in the manual creation of a diagram or when manually re-arranging a diagram. It greatly reduces the time for properly aligning graph elements and helps getting clear and concise diagrams where nodes are equally distant from each other. Also, it simplifies retouching edges and helps getting orthogonal edge paths almost instantly.
Class GraphEditorInputMode, together with the specialized input modes it makes available, provides special support for interactive snapping of graph elements, which means visual and also "perceptible" feedback during a mouse drag gesture when graph elements
Specifically, the following mouse gestures offer specialized behavior:
Figure 2.31, “Visual feedback during mouse drag gestures with snapping support enabled” illustrates the visual feedback that is given during mouse drag gestures.
Figure 2.31. Visual feedback during mouse drag gestures with snapping support enabled
![]() |
![]() |
![]() |
| Two nodes aligned at their center coordinates (moving a node). | Equidistant between two nodes (moving a node). | Same widths (resizing a node). |
During a mouse drag gesture, the "perceptible" feedback can be experienced as
Such "coordinates of interest," i.e., where a node that is currently being moved and some other node(s) are aligned, for example, are called snap lines.
The support for interactive snapping of graph elements can be conveniently enabled
on class GraphEditorInputMode by setting a GraphSnapContext
using the following property:
SnapContext SnapContext { get; set; } |
|
| Description | Convenience property for setting the snap context and enabling snapping support. |
By default, snapping support then covers alignment, equidistance, and same node widths/heights, for example. Further customization, like setting preferred distances between graph elements, can be done through properties of GraphSnapContext:
double NodeToNodeDistance { get; set; } |
|
| Description | Specifying preferred distances between graph elements. |
Class GraphSnapContext handles interactive snapping of graph elements across the
involved input modes.
Technically, when a drag gesture is recognized, GraphSnapContext determines fixed
and moved graph elements and queries the look-up of the former for implementations
of interface
ISnapLineProvider
to collect possible snap lines.
The look-up of the latter set of graph elements gets queried for implementations
of snap result providers, which enable selection of "matching" snap lines from the
set of collected possible snap lines.
See also Table 2.25, “User gestures and interfaces implementations in the look-up”.
Customizing the interactive snapping behavior beyond the GraphSnapContext properties can be done by decorating the look-up of model items to return custom implementations of snap line providers and/or snap result providers. Tutorial demo application CustomSnappingForm shows how custom variants of both snap line and snap result providers can be added using the decorator scheme.
Customizing interactive snapping behavior during edge creation can be done by overriding the following method in CreatedEdgeInputMode:
protected virtual IEnumerable<SnapLine> GetDummyEdgeSnapLines( GraphSnapContext graphSnapContext, ISnapLineProvider dummyEdgeSegmentSnapLineProvider) |
|
| Description | Enables customization of the snapping behavior of an edge in creation. |
GraphSnapContext also supports snapping of graph elements to a grid.
The following properties can be used to set
IGridConstraintProvider<T>
implementations for model items in order to control their grid snapping behavior:
IGridConstraintProvider<INode> NodeGridConstraintProvider { get; set; } |
|
| Description | Allow to control the grid snapping behavior of nodes, bends, and ports. |
Example 2.29, “Enabling grid snapping” shows the setup for grid snapping support from
tutorial demo application
SnapLinesForm.
The GridInfo
class conveniently holds
the properties of a grid, such as spacing and origin.
Example 2.29. Enabling grid snapping
// 'gc' is of type yWorks.yFiles.UI.GraphControl.
// Grid initialization.
GridInfo gridInfo = new GridInfo() { HorizontalSpacing = 30,
VerticalSpacing = 30 };
// Grid visual representation.
GridPaintable grid = new GridPaintable(gridInfo);
gc.Add(grid, CanvasObjectDescriptor.Instance, gc.BackgroundGroup);
// Enabling grid snapping for nodes and bends.
GraphSnapContext snapContext = new GraphSnapContext();
snapContext.NodeGridConstraintProvider =
new SimpleGridConstraintProvider<INode>(gridInfo);
snapContext.BendGridConstraintProvider =
new SimpleGridConstraintProvider<IBend>(gridInfo);
// Enabling snapping for graph elements.
GraphEditorInputMode graphEditorInputMode =
new GraphEditorInputMode() { SnapContext = snapContext };
gc.InputModes.Add(graphEditorInputMode);
The following tutorial demo applications present both setup as well as customization of interactive snapping support:
The GraphCommands
class makes
available a number of commands that can be used for WPF-like command binding from
sources like, e.g., buttons in the UI, or model items, like, e.g., nodes.
The provided commands cover selection and deselection of model items (particularly
nodes and edges), as well as label editing and regrouping of nodes in graph.
The commands rely on a commanding infrastructure very similar in concept and usage
to that present in Windows Presentation Foundation.
The classes that make up this support are CommandManager
,
CommandBinding
, and RoutedCommand
from the yWorks.Support.Windows
namespace.
Together, they realize the command pattern and the necessary command binding support
for WPF-like commands in yFiles.NET.
Table 2.23, “GraphCommands commands” lists the commands available with class GraphCommands.
Table 2.23. GraphCommands commands
| Command Name | Description |
|---|---|
| SelectItemCommand | Sets the selection state of a model item. The model item is given by means of the command parameter. |
| ToggleItemSelectionCommand | Changes the selection state of a model item. The model item is given by means of the command parameter. |
| DeselectItemCommand | Resets the selection state of a model item. The model item is given by means of the command parameter. |
| DeselectAllCommand | Resets the selection state of all currently selected model items. |
| EditLabelCommand | Begins editing the text of a label. The label is given by means of the command parameter. |
| GroupSelectionCommand | Creates a new group node that contains all currently selected nodes. |
| UngroupSelectionCommand | Regroups all currently selected nodes from their respective group nodes into the root graph. |
| BeginEdgeCreationCommand | Begins creating an edge. The command parameter needs to hold either an INode, an IPort, or an IPortCandidate object that is used as the source for the edge. |
By default, the BeginEdgeCreationCommand command is used for command binding by CreateEdgeInputMode, all other commands are used for command binding by GraphEditorInputMode. The commands are bound upon installation, and are unbound when the respective input mode is uninstalled.
Class MainInputMode defines a powerful basis for controller implementations that need to handle a broad range of user gestures happening in the view. It makes available the functionality of a set of specialized input modes that are installed concurrently with the canvas.
The direct base type of class MainInputMode is
MultiplexingInputMode
, an input
mode that enables input modes to be installed with the canvas and be executed
concurrently.
As part of the concurrency amongst these input modes, MultiplexingInputMode can
grant an input mode exclusive control over all canvas interaction.
Input modes that support concurrency are of type
IConcurrentInputMode
and are
also referred to as "concurrent input modes."
They can be added to the set of input modes that are managed by
MultiplexingInputMode by means of the methods listed in
API Excerpt 2.35, “Methods for adding concurrent input modes”.
API Excerpt 2.35. Methods for adding concurrent input modes
// Adding concurrent input modes to a MultiplexingInputMode's concurrency // controller. void AddConcurrent(IConcurrentInputMode inputMode) void AddConcurrent(IConcurrentInputMode inputMode, int priority)
Note that MultiplexingInputMode itself is also a concurrent input mode. This allows, for example, to have several full-featured, however differently configured, MainInputMode instances installed side by side.
MultiplexingInputMode also introduces the notion of priority with the input modes it installs into the canvas. The priority value of an input mode determines when it is installed, which in turn defines its position in the queue of input modes that are delivered user events. A low priority value means that an input mode comes early in this queue and thus processes an event prior to other input modes with a higher priority value that are also registered with that event.
Upon initialization, MainInputMode creates and installs the input modes listed in Table 2.24, “Input modes used by MainInputMode (sorted by input mode priority)” as concurrent input modes. Note that the input modes are sorted according to their priority.
Table 2.24. Input modes used by MainInputMode (sorted by input mode priority)
| Type Name | Description |
|---|---|
| WaitInputMode |
Blocks user interaction and tries to cancel ongoing edits. |
| HandleInputMode |
Manages the dragging of "handles," including the detection of beginning and ending of a drag, and canceling a drag. Also provides the visual feedback for handles when dragged. |
| KeyboardInputMode |
Recognizes key events. |
| ClickInputMode |
Recognizes mouse clicks, including double clicks. |
| MoveInputMode |
Handles moving of canvas objects. |
| MarqueeSelectionInputMode |
Provides the visual feedback for a rectangular selection box in the canvas. |
| ContextMenuInputMode |
Displays a context menu. |
| MouseHoverInputMode |
Displays a tooltip when the mouse rests in the canvas. |
Each of the input modes can be obtained and changed using a like named property
defined by class MainInputMode.
Also, a sorted list of input modes can be obtained by means of the
GetSortedModes
method.
Class MoveViewportInputMode
enables moving of the viewport by means of a simple mouse move gesture.
GraphEditorInputMode and GraphViewerInputMode by default carry an instance of MoveViewportInputMode that manages moving of the viewport.
The behavior of input modes can be easily customized by means of their properties, using custom callback methods, or by replacing specialized input modes by customized implementations thereof.
For example, to customize the text of the tooltip that is displayed by MouseHoverInputMode
when the mouse hovers over an item, a delegate can be registered with the QueryItemToolTip
event.
Example 2.30. Registering a delegate that provides text for the tooltips displayed by MouseHoverInputMode
// 'geim' is of type yWorks.yFiles.UI.Input.GraphEditorInputMode.
geim.QueryItemToolTip +=
delegate(object src, QueryItemToolTipEventArgs<IModelItem> eventArgs) {
if (eventArgs.Handled) {
// A tooltip has already been assigned -> nothing to do.
return;
}
if (eventArgs.Item is ILabeledItem) {
ILabeledItem item = eventArgs.Item as ILabeledItem;
if (item.Labels.Count > 0) {
// Set the tooltip.
eventArgs.ToolTip =
"Text of first label is: '" + item.Labels[0].Text + "'";
eventArgs.Handled = true;
}
}
else if (eventArgs.Item is ILabel) {
ILabel label = eventArgs.Item as ILabel;
// Set the tooltip.
eventArgs.ToolTip = "Directly over label: '" + label.Text + "'";
eventArgs.Handled = true;
}
};
The context menu that is displayed by ContextMenuInputMode can be specified as
a whole using the
Menu
property, for example.
Alternatively, the actual content of a menu can also be given dynamically by
means of a callback registered with the
PopulateContextMenu
event.
The latter is used in the following tutorial demo applications:
Input modes that handle specific mouse gestures when a user interacts with the graph elements often either directly or indirectly use the look-up mechanism to query additional information in relation to the respective gesture. This information generally also affects the look and feel of the elements. Consequently, the look and feel of an application, i.e., the rendering and the behavior of graph elements whenever a user is interacting with them, can be conveniently customized by decorating their look-up. For instance, the selection decoration of nodes can be customized, or their resizing behavior can be changed to obey only discrete steps, simply by adding appropriate interface implementations to the look-up mechanism.
Example 2.31, “Decorating the look-up for nodes” shows how the look-up for nodes is decorated using the ILookupDecorator returned by the graph. A custom look-up chain link, which replaces the default look-up logic for nodes, is added to the look-up chain that is maintained by the graph. Whenever a node gets selected, the new logic then returns a custom ISelectionInstaller implementation.
More information on the look-up support provided by the graph structure implementation can be found in the section called “Look-up Support”.
Example 2.31. Decorating the look-up for nodes
// 'graph' is of type yWorks.yFiles.UI.Model.IGraph. // Decorate the look-up for nodes to change their default behavior. ILookupDecorator decorator = graph.Get<ILookupDecorator>(); decorator.Add<INode, ISelectionInstaller>( node => new MyCustomSelectionInstaller() );
Table 2.25, “User gestures and interfaces implementations in the look-up” gives an overview on the interface implementations that are queried when certain user gestures are handled.
Table 2.25. User gestures and interfaces implementations in the look-up
| Gesture | Type Name | Description |
|---|---|---|
| Edge creation | IPortCandidateProvider |
Returns collections of ports that an edge can connect to.
When a new edge is created, CreateEdgeInputMode queries the look-up of the
source node and the target node for implementations of this interface.
Implementations of this interface include:
ExistingPortsCandidateProvider
Abstract class
AbstractPortCandidateProvider |
| Resizing | IReshapeHandler |
Enables handling the overall process of resizing a model item (INode). |
| IReshapeHandleProvider |
Offers control over the resize behavior for a model item that is displayed in
the canvas.
When a model item (INode) gets resized, HandleInputMode queries the item's
look-up for implementations of this interface.
Class ReshapeableHandles |
|
| ISizeConstraintProvider<T> |
Enables definition of minimum and maximum size constraints for items of the
given type T.
In a grouped graph, the size of group nodes is affected by implementations of
this interface.
Class
SizeConstraintProvider<T> |
|
| ISnapLineProvider |
Adds possible snap lines for a model item.
When interactive snapping support is enabled (i.e., when GraphSnapContext is available
in the input mode context), GraphSnapContext queries the look-up of all model
items (INode, IEdge, IPort) that do not get resized for an implementation of this
interface.
The gathered information is then filtered to include only those of visible model
items.
Implementations of this interface include:
NodeSnapLineProvider |
|
| INodeReshapeSnapResultProvider |
Enables selection of "matching" snap lines from the set of collected possible snap lines. When interactive snapping support is enabled, GraphSnapContext queries the look-up of all nodes that get resized for implementations of this interface. | |
| IOrthogonalEdgeHelper |
Offers control over orthogonal edge editing behavior.
When orthogonal edge editing is enabled (i.e., when OrthogonalEdgeEditingContext
is available in the input mode context), OrthogonalEdgeEditingContext queries
the look-up of all edges incident to nodes that get resized for an implementation
of this interface.
Class OrthogonalEdgeHelper |
|
| Selecting | ISelectionInstaller |
Allows to install any number of
ICanvasObject
Implementations of this interface include:
OrientedRectangleSelectionPaintable |
| Highlighting, changing focus | IFocusIndicatorInstaller |
Allow to install any number of
ICanvasObject
Implementations of both these interface include:
OrientedRectangleSelectionPaintable |
| Edge reconnecting, port relocating | IEdgePortCandidateProvider |
Returns collections of ports that an edge can connect to.
When either end of an edge gets relocated, the look-up of the edge is queried
for implementations of this interface.
Implementations of this interface include:
DefaultEdgePortsCandidateProvider |
| ISnapLineProvider |
Adds possible snap lines for a model item.
When interactive snapping support is enabled (i.e., when GraphSnapContext is available
in the input mode context), GraphSnapContext queries the look-up of all model
items (INode, IEdge, IPort) that do not get moved for an implementation of this
interface.
The gathered information is then filtered to include only those of visible model
items.
Implementations of this interface include:
NodeSnapLineProvider |
|
| IPortSnapResultProvider |
Enables selection of "matching" snap lines from the set of collected possible snap lines. When interactive snapping support is enabled, GraphSnapContext queries the look-up of the ports for implementations of this interface. | |
| Moving | IPositionHandler |
Inherits from interface
IDragHandler
Class
DefaultPositionHandler |
| ISnapLineProvider |
Adds possible snap lines for a model item.
When interactive snapping support is enabled (i.e., when GraphSnapContext is available
in the input mode context), GraphSnapContext queries the look-up of all model
items (INode, IEdge, IPort) that do not get moved for an implementation of this
interface.
The gathered information is then filtered to include only those of visible model
items.
Implementations of this interface include:
NodeSnapLineProvider |
|
| INodeSnapResultProvider |
Enable selection of "matching" snap lines from the set of collected possible snap lines. When interactive snapping support is enabled, GraphSnapContext queries the look-up of all model items (INode, IEdge, IBend) that get moved for implementations of the corresponding interface. | |
| Moving an edge segment (orthogonal edge editing) | IOrthogonalEdgeHelper |
Offers control over orthogonal edge editing behavior.
When orthogonal edge editing is enabled (i.e., when OrthogonalEdgeEditingContext
is available in the input mode context), OrthogonalEdgeEditingContext queries
the look-up of all edges where segments get moved for an implementation of this
interface.
Class OrthogonalEdgeHelper |
Customization of the re-parenting gesture in a grouped graph, which can be controlled
using interface IReparentNodeHandler
,
is described in the section called “Class GraphEditorInputMode”.
Further examples that show how the look and feel of items in the canvas can be customized are presented in the following tutorial demo applications:
|
Copyright ©2006-2011, yWorks GmbH. All rights reserved. |