public final class ConstantLabelCandidateDescriptorProvider extends Object implements ILabelCandidateDescriptorProvider
ILabelCandidateDescriptorProvider
interface that always yields a constant
ILabelCandidateDescriptor
.Modifier and Type | Field and Description |
---|---|
static ILabelCandidateDescriptorProvider |
EXTERNAL_DESCRIPTOR_PROVIDER
A sharable implementation of the
ILabelCandidateDescriptorProvider interface that always yields
LabelCandidateDescriptor.EXTERNAL_DESCRIPTOR . |
static ILabelCandidateDescriptorProvider |
INTERNAL_DESCRIPTOR_PROVIDER
A sharable implementation of the
ILabelCandidateDescriptorProvider interface that always yields
LabelCandidateDescriptor.INTERNAL_DESCRIPTOR . |
Constructor and Description |
---|
ConstantLabelCandidateDescriptorProvider(ILabelCandidateDescriptor descriptor)
Initializes a new instance of the
ConstantLabelCandidateDescriptorProvider class that always yields descriptor
in getDescriptor(ILabel, ILabelModelParameter) . |
Modifier and Type | Method and Description |
---|---|
ILabelCandidateDescriptor |
getDescriptor(ILabel label,
ILabelModelParameter layoutParameter)
Always yields the parameter that has been passed to the constructor.
|
public static final ILabelCandidateDescriptorProvider EXTERNAL_DESCRIPTOR_PROVIDER
ILabelCandidateDescriptorProvider
interface that always yields
LabelCandidateDescriptor.EXTERNAL_DESCRIPTOR
.public static final ILabelCandidateDescriptorProvider INTERNAL_DESCRIPTOR_PROVIDER
ILabelCandidateDescriptorProvider
interface that always yields
LabelCandidateDescriptor.INTERNAL_DESCRIPTOR
.public ConstantLabelCandidateDescriptorProvider(ILabelCandidateDescriptor descriptor)
ConstantLabelCandidateDescriptorProvider
class that always yields descriptor
in getDescriptor(ILabel, ILabelModelParameter)
.descriptor
- The descriptor to yield in getDescriptor(ILabel, ILabelModelParameter)
.public final ILabelCandidateDescriptor getDescriptor(ILabel label, ILabelModelParameter layoutParameter)
getDescriptor
in interface ILabelCandidateDescriptorProvider
label
- The label to possibly assign the layoutParameter
.layoutParameter
- The parameter to provide a descriptor for if applied to the given label
.null
.