public final class EdgeDecorator extends Object
decorating
the ILookup.lookup(Class)
method of IEdge
instances that are contained in an IGraph
which are managed by an
ILookupDecorator
.
This decorator can be used to conveniently decorate the lookup
of IEdge
s in an
IGraph
. It serves as a factory for predefined LookupDecorator
instances that are specifically useful
for the IEdge
type. Note that the list of possible decorations that are available using this class is not
exhaustive in any way. This is merely a way to provide access to those interfaces that are more commonly being decorated
by the developer.
GraphDecorator
,
LookupDecorator
Constructor and Description |
---|
EdgeDecorator(ILookupDecorator decorator)
Initializes a new instance of the
EdgeDecorator class. |
public EdgeDecorator(ILookupDecorator decorator)
EdgeDecorator
class.decorator
- The decorator to use, which can be null
.public final LookupDecorator<IEdge,IBendCreator> getBendCreatorDecorator()
LookupDecorator
that decorates the IBendCreator
type for the
IEdge
s of the graph this instance has been created for.
Custom IBendCreator
implementations can be used to influence the interactive creation of new
IBend
s. This interface is mainly used by the CreateBendInputMode
in GraphEditorInputMode
. This is a convenient alternative to the direct usage of
the ILookupDecorator
that is provided by the IGraph
's
ILookup.lookup(Class)
.
IBendCreator
instances on IEdge
s.public final LookupDecorator<IEdge,IBendSelectionTester> getBendSelectionTesterDecorator()
LookupDecorator
that decorates the IBendSelectionTester
type for the
IEdge
s of the graph this instance has been created for.
Custom IBendSelectionTester
implementations can be used to influence hit test behavior for bends on edges. This
interface is mainly used by the GraphEditorInputMode
and CreateBendInputMode
to determine whether an existing bend has been hit. This is a convenient alternative to the direct usage of the ILookupDecorator
that is provided by the IGraph
's ILookup.lookup(Class)
.
IBendSelectionTester
instances on IEdge
s.public final LookupDecorator<IEdge,IClipboardHelper> getClipboardHelperDecorator()
LookupDecorator
that decorates the IClipboardHelper
type for the type of items this instance has
been created for.
Custom IClipboardHelper
implementations can be used to customize the way the clipboard operations are performed
by GraphClipboard
. This is a convenient alternative to the direct usage of the ILookupDecorator
that is provided by the IGraph
's ILookup.lookup(Class)
.
IClipboardHelper
instances on items that implement the TModelItem
interface this instance uses as the generic type parameter.public final <TInterface> LookupDecorator<IEdge,TInterface> getDecoratorFor(Class<TInterface> interfaceType)
TInterface
- The type of the interface that should be decorated of the instances'
ILookup.lookup(Class)
.LookupDecorator
for the specified interface.public final <TInterface> LookupDecorator<IEdge,TInterface> getDecoratorFor(Class<TInterface> interfaceType, boolean decorateNulls)
TInterface
- The type of the interface that should be decorated of the instances'
ILookup.lookup(Class)
.decorateNulls
- if set to true
null
values will be decorated, otherwise not.LookupDecorator
for the specified interface.public final <TInterface> LookupDecorator<IEdge,TInterface> getDecoratorFor(Class<TInterface> interfaceType, boolean decorateNulls, boolean nullIsFallback)
TInterface
- The type of the interface that should be decorated of the instances'
ILookup.lookup(Class)
.interfaceType
- The type of the interface that should be decorated of the instances'
ILookup.lookup(Class)
.decorateNulls
- if set to true
null
values will be decorated, otherwise not.nullIsFallback
- if set to true
null
values will be treated as fallback values, otherwise they will be used as the final
result.LookupDecorator
for the specified interface.public final LookupDecorator<IEdge,IEdgePortHandleProvider> getEdgePortHandleProviderDecorator()
LookupDecorator
that decorates the IEdgePortHandleProvider
type for the type of items this
instance has been created for.
Custom IEdgePortHandleProvider
implementations can be used provide interactive draggable handles for the source
and target end points of an edge. This interface is mainly used by the HandleInputMode
in the GraphEditorInputMode
and by the implementations that work with
OrthogonalEdgeEditingContext
. Implementations may decide, e.g. whether to yield
IHandle
implementations that either move the edge to another
port(-candidate
) using IGraph.setEdgePorts(IEdge, com.yworks.yfiles.graph.IPort, com.yworks.yfiles.graph.IPort)
or whether to move the port the edge is currently connected to itself, instead. This is a convenient alternative to the
direct usage of the ILookupDecorator
that is provided by the IGraph
's
ILookup.lookup(Class)
.
IEdgePortHandleProvider
instances on edges.PortRelocationHandle
,
IHandle
,
IHandleProvider
,
OrthogonalEdgeEditingContext
public final LookupDecorator<IEdge,IEdgeReconnectionPortCandidateProvider> getEdgeReconnectionPortCandidateProviderDecorator()
LookupDecorator
that decorates the IEdgeReconnectionPortCandidateProvider
type for the
IEdge
s of the graph this instance has been created for.
Custom IEdgeReconnectionPortCandidateProvider
implementations can be used to change the set of possible
IPortCandidate
s that are available for an existing edge in the IGraph
if the user interactively tries to change the ports
of an IEdge
in a GraphControl
. This interface is mainly used by the
PortRelocationHandle
. This is a convenient alternative to the direct usage of
the ILookupDecorator
that is provided by the IGraph
's
ILookup.lookup(Class)
.
IEdgeReconnectionPortCandidateProvider
instances on
IEdge
s.public final LookupDecorator<IEdge,IEdgeSnapResultProvider> getEdgeSnapResultProviderDecorator()
LookupDecorator
that decorates the IEdgeSnapResultProvider
type for the
IEdge
s of the graph this instance has been created for.
Custom IEdgeSnapResultProvider
implementations can be used to change the snapping behavior of edges while they
are being moved in the context of a GraphSnapContext
. This is a convenient
alternative to the direct usage of the ILookupDecorator
that is provided by the
IGraph
's ILookup.lookup(Class)
.
IEdgeSnapResultProvider
instances on IEdge
s.public final LookupDecorator<IEdge,IEditLabelHelper> getEditLabelHelperDecorator()
LookupDecorator
that decorates the IEditLabelHelper
type for the
IEdge
s this instance has been created for.
Custom IEditLabelHelper
implementations can be used to change or customize interactive label editing and label
creation. This interface is mainly used by the GraphEditorInputMode
which uses the
callbacks from the implementation to determine the label to add or edit, as well as to customize the TextEditorInputMode
appearance for the upcoming edit. This is a convenient alternative to the direct usage of the ILookupDecorator
that is provided by the IGraph
's ILookup.lookup(Class)
.
IEditLabelHelper
instances on IEdge
s.public final LookupDecorator<IEdge,IFocusIndicatorInstaller> getFocusIndicatorDecorator()
LookupDecorator
that decorates the IFocusIndicatorInstaller
type for the type of items this
instance has been created for.
Custom IFocusIndicatorInstaller
implementations can be used change the way the focus of an item is represented
in a GraphControl
. This interface is mainly used by the FocusIndicatorManager
in the GraphControl
. This is a convenient alternative to the direct usage of the ILookupDecorator
that is provided by the IGraph
's ILookup.lookup(Class)
.
IFocusIndicatorInstaller
instances on items that
implement the TModelItem
interface this instance uses as the generic type parameter.public final LookupDecorator<IEdge,IHandleProvider> getHandleProviderDecorator()
LookupDecorator
that decorates the IHandleProvider
type for the type of items this instance has
been created for.
Custom IHandleProvider
implementations provide interactive draggable handles for the user to change the geometry
or other aspects of items in the GraphControl
. This interface is mainly used by the HandleInputMode
in the GraphEditorInputMode
. This is a convenient alternative to the direct usage
of the ILookupDecorator
that is provided by the IGraph
's
ILookup.lookup(Class)
.
IHandleProvider
instances on items that implement the TModelItem
interface this instance uses as the generic type parameter.public final LookupDecorator<IEdge,IHighlightIndicatorInstaller> getHighlightDecorator()
LookupDecorator
that decorates the IHighlightIndicatorInstaller
type for the type of items this
instance has been created for.
Custom IHighlightIndicatorInstaller
implementations can be used change the way the highlighting of an item is
represented in a CanvasControl
. This interface is mainly used by the HighlightIndicatorManager
in the GraphControl
. This is a convenient alternative to the direct usage of the ILookupDecorator
that is provided by the IGraph
's ILookup.lookup(Class)
.
IHighlightIndicatorInstaller
instances on items that
implement the TModelItem
interface this instance uses as the generic type parameter.public final LookupDecorator<IEdge,IMarqueeTestable> getMarqueeTestableDecorator()
LookupDecorator
that decorates the IMarqueeTestable
type for the type of items this instance has
been created for.
Custom IMarqueeTestable
implementations can be used to change the way tests for marquee inclusions are performed
on the items in the editor. This interface is mainly used by the
GraphEditorInputMode
. This is a convenient alternative to the direct usage of
the ILookupDecorator
that is provided by the IGraph
's
ILookup.lookup(Class)
.
IMarqueeTestable
instances on items that implement the TModelItem
interface this instance uses as the generic type parameter.public final LookupDecorator<IEdge,IMementoSupport> getMementoSupportDecorator()
LookupDecorator
that decorates the IMementoSupport
type for the type of items this instance has
been created for.
Custom IMementoSupport
implementations can be used to make the UndoEngine
aware
of changes to data that is associated with the model items. This is a convenient alternative to the direct usage of the
ILookupDecorator
that is provided by the IGraph
's
ILookup.lookup(Class)
.
IMementoSupport
instances on items that implement the TModelItem
interface this instance uses as the generic type parameter.public final LookupDecorator<IEdge,IObstacleProvider> getObstacleProviderDecorator()
LookupDecorator
that decorates the IObstacleProvider
type for the type of items this instance has
been created for.
Custom IObstacleProvider
implementations provide information about obstacles that will be considered by GraphObstacleProvider
which itself serves as a provider for geometric obstacles to BridgeManager
that manages
the rendering of bridges in edge paths. This is a convenient alternative to the direct usage of the ILookupDecorator
that is provided by the IGraph
's ILookup.lookup(Class)
.
IObstacleProvider
instances on items that implement the TModelItem
interface this instance uses as the generic type parameter.GraphObstacleProvider
,
BridgeManager
public final LookupDecorator<IEdge,IOrthogonalEdgeHelper> getOrthogonalEdgeHelperDecorator()
LookupDecorator
that decorates the IOrthogonalEdgeHelper
type for the
IEdge
s of the graph this instance has been created for.
Custom IOrthogonalEdgeHelper
implementations can be used to change the orthogonal edge editing behavior in the
context of OrthogonalEdgeEditingContext
. This is a convenient alternative to the
direct usage of the ILookupDecorator
that is provided by the IGraph
's
ILookup.lookup(Class)
.
IOrthogonalEdgeHelper
instances on IEdge
s.public final LookupDecorator<IEdge,IPortCandidateProvider> getPortCandidateProviderDecorator()
LookupDecorator
that decorates the IPortCandidateProvider
for the
IEdge
s this instance has been created for.
Custom IPortCandidateProvider
implementations can be used to present the user with a set of
IPortCandidate
s that newly created edges can use as their source
and target
IPort
s. This interface is mainly used by the CreateEdgeInputMode
mode of GraphEditorInputMode
if EdgeToEdgeConnectionsAllowed
is enabled. This is a convenient alternative to the direct usage of the ILookupDecorator
that is provided by the
IGraph
's ILookup.lookup(Class)
.
IPortCandidateProvider
instances on IEdge
s.public final LookupDecorator<IEdge,IPositionHandler> getPositionHandlerDecorator()
LookupDecorator
that decorates the IPositionHandler
type for the type of items this instance has
been created for.
Custom IPositionHandler
implementations can be used to restrict or enhance the way the user moves elements
interactively in the editor. This interface is mainly used by the MoveInputMode
.
This is a convenient alternative to the direct usage of the ILookupDecorator
that is provided by the
IGraph
's ILookup.lookup(Class)
.
IPositionHandler
instances on items that implement the TModelItem
interface this instance uses as the generic type parameter.public final LookupDecorator<IEdge,ISelectionIndicatorInstaller> getSelectionDecorator()
LookupDecorator
that decorates the ISelectionIndicatorInstaller
type for the type of items this
instance has been created for.
Custom ISelectionIndicatorInstaller
implementations can be used change the way the selection of an item is
represented in a CanvasControl
. This interface is mainly used by the SelectionIndicatorManager
in the GraphControl
. This is a convenient alternative to the direct usage of the ILookupDecorator
that is provided by the IGraph
's ILookup.lookup(Class)
.
ISelectionIndicatorInstaller
instances on items that
implement the TModelItem
interface this instance uses as the generic type parameter.public final LookupDecorator<IEdge,ISnapLineProvider> getSnapLineProviderDecorator()
LookupDecorator
that decorates the ISnapLineProvider
for the
IEdge
s this instance has been created for.
Custom ISnapLineProvider
implementations can be used to provide custom
OrthogonalSnapLine
s based on the IEdge
s this instance has been created
for. This could e.g. be a horizontal OrthogonalSnapLine
vertically centered between
two horizontal segments of one of these edges. This interface is mainly used by the GraphSnapContext
to collect all available OrthogonalSnapLine
s of orthogonal edge segments. This is a
convenient alternative to the direct usage of the ILookupDecorator
that is provided by the
IGraph
's ILookup.lookup(Class)
.
ISnapLineProvider
instances on IEdge
s.