public final class BendDecorator extends Object
decorating the ILookup.lookup(Class)
method of IBend instances that are contained in an IGraph which are managed by an
ILookupDecorator.
This decorator can be used to conveniently decorate the lookup of IBends in an
IGraph. It serves as a factory for predefined LookupDecorator instances that are specifically useful
for the IBend 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 |
|---|
BendDecorator(ILookupDecorator decorator)
Initializes a new instance of the
BendDecorator class. |
| Modifier and Type | Method and Description |
|---|---|
LookupDecorator<IBend,IBendSnapResultProvider> |
getBendSnapResultProviderDecorator()
Gets a
LookupDecorator that decorates the IBendSnapResultProvider for the
IBends this instance has been created for. |
LookupDecorator<IBend,IClipboardHelper> |
getClipboardHelperDecorator()
Gets a
LookupDecorator that decorates the IClipboardHelper type for the type of items this instance has
been created for. |
<TInterface> |
getDecoratorFor(Class<TInterface> interfaceType)
|
<TInterface> |
getDecoratorFor(Class<TInterface> interfaceType,
boolean decorateNulls)
|
<TInterface> |
getDecoratorFor(Class<TInterface> interfaceType,
boolean decorateNulls,
boolean nullIsFallback)
|
LookupDecorator<IBend,IFocusIndicatorInstaller> |
getFocusIndicatorDecorator()
Gets a
LookupDecorator that decorates the IFocusIndicatorInstaller type for the type of items this
instance has been created for. |
LookupDecorator<IBend,IHandle> |
getHandleDecorator()
Gets a
LookupDecorator that decorates the IHandle type for the
IBends of the graph this instance has been created for. |
LookupDecorator<IBend,IHandleProvider> |
getHandleProviderDecorator()
Gets a
LookupDecorator that decorates the IHandleProvider type for the type of items this instance has
been created for. |
LookupDecorator<IBend,IHighlightIndicatorInstaller> |
getHighlightDecorator()
Gets a
LookupDecorator that decorates the IHighlightIndicatorInstaller type for the type of items this
instance has been created for. |
LookupDecorator<IBend,IMarqueeTestable> |
getMarqueeTestableDecorator()
Gets a
LookupDecorator that decorates the IMarqueeTestable type for the type of items this instance has
been created for. |
LookupDecorator<IBend,IMementoSupport> |
getMementoSupportDecorator()
Gets a
LookupDecorator that decorates the IMementoSupport type for the type of items this instance has
been created for. |
LookupDecorator<IBend,IObstacleProvider> |
getObstacleProviderDecorator()
Gets a
LookupDecorator that decorates the IObstacleProvider type for the type of items this instance has
been created for. |
LookupDecorator<IBend,IPositionHandler> |
getPositionHandlerDecorator()
Gets a
LookupDecorator that decorates the IPositionHandler type for the type of items this instance has
been created for. |
LookupDecorator<IBend,ISelectionIndicatorInstaller> |
getSelectionDecorator()
Gets a
LookupDecorator that decorates the ISelectionIndicatorInstaller type for the type of items this
instance has been created for. |
public BendDecorator(ILookupDecorator decorator)
BendDecorator class.decorator - The decorator to use, which can be null.public final LookupDecorator<IBend,IBendSnapResultProvider> getBendSnapResultProviderDecorator()
LookupDecorator that decorates the IBendSnapResultProvider for the
IBends this instance has been created for.
Custom IBendSnapResultProvider implementations can be used to provide custom
SnapResults based on the IBends this instance has been created for.
This could e.g. be a SnapResult describing that the bend wants to snap vertically
to the top border of a node. This interface is mainly used by the bend IHandles to collect
SnapResults during a drag gesture for the bend. This is a convenient
alternative to the direct usage of the ILookupDecorator that is provided by the
IGraph's ILookup.lookup(Class).
IBendSnapResultProvider instances on IBends.public final LookupDecorator<IBend,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<IBend,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<IBend,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<IBend,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<IBend,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<IBend,IHandle> getHandleDecorator()
LookupDecorator that decorates the IHandle type for the
IBends of the graph this instance has been created for.
Custom IHandle implementations can be used to change the way the user can drag a bend interactively to change
its position in a GraphControl. This interface is mainly used by the HandleInputMode
in GraphEditorInputMode. This is a convenient alternative to the direct usage of
the ILookupDecorator that is provided by the IGraph's
ILookup.lookup(Class).
public final LookupDecorator<IBend,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<IBend,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<IBend,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<IBend,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<IBend,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,
BridgeManagerpublic final LookupDecorator<IBend,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<IBend,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.