public final class LabelDecorator extends Object
decorating the ILookup.lookup(Class)
method of ILabel instances that are contained in an IGraph which are managed by an
ILookupDecorator.
This decorator can be used to conveniently decorate the lookup of ILabels in an
IGraph. It serves as a factory for predefined LookupDecorator instances that are specifically useful
for the ILabel 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 |
|---|
LabelDecorator(ILookupDecorator decorator)
Initializes a new instance of the
LabelDecorator class. |
public LabelDecorator(ILookupDecorator decorator)
LabelDecorator class.decorator - The decorator to use, which can be null.public final LookupDecorator<ILabel,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<ILabel,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<ILabel,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<ILabel,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<ILabel,IEditLabelHelper> getEditLabelHelperDecorator()
LookupDecorator that decorates the IEditLabelHelper type for the
ILabels this instance has been created for.
Custom IEditLabelHelper implementations can be used to change or customize interactive label editing. This
interface is mainly used by the GraphEditorInputMode which uses the callbacks from
the implementation to determine whether the label can be edited, 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 ILabels.public final LookupDecorator<ILabel,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<ILabel,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<ILabel,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<ILabel,ILabelModelParameterFinder> getLabelModelParameterFinderDecorator()
LookupDecorator that decorates the ILabelModelParameterFinder type for the
ILabels of the graph this instance has been created for.
Custom ILabelModelParameterFinder implementations can be used change the way ILabels can be dragged
interactively by the user. It helps in determining the right ILabelModelParameter
for a given location that has been chosen by the user. This interface is mainly used by the LabelPositionHandler
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).
ILabelModelParameterFinder instances on ILabels.public final LookupDecorator<ILabel,ILabelModelParameterProvider> getLabelModelParameterProviderDecorator()
LookupDecorator that decorates the ILabelModelParameterProvider type for the
ILabels of the graph this instance has been created for.
Custom ILabelModelParameterProvider implementations can be used to change the set of possible
ILabelModelParameters that the user can assign to a label interactively
by dragging it in a GraphControl. This interface is mainly used by the LabelPositionHandler
and MoveLabelInputMode 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).
ILabelModelParameterProvider instances on
ILabels.public final LookupDecorator<ILabel,ILabelSnapContextHelper> getLabelSnapContextHelperDecorator()
LookupDecorator that decorates the ILabelSnapContextHelper for the
ILabels this instance has been created for.
Custom ILabelSnapContextHelper implementations can be used to provide custom snap lines
and snap results based on the ILabels this instance has been
created for. This interface is mainly used by the label's IPositionHandler to collect snap results during a drag
gesture for the label. This is a convenient alternative to the direct usage of the ILookupDecorator that is
provided by the IGraph's ILookup.lookup(Class).
ILabelSnapContextHelper instances on an ILabel.public final LookupDecorator<ILabel,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<ILabel,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<ILabel,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<ILabel,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<ILabel,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.