com.yworks.yfiles.server.graphml.flexio.data
Class ConstantLabelCandidateDescriptorProvider

java.lang.Object
  extended bycom.yworks.yfiles.server.graphml.flexio.data.ConstantLabelCandidateDescriptorProvider
All Implemented Interfaces:
ILabelCandidateDescriptorProvider

public class ConstantLabelCandidateDescriptorProvider
extends java.lang.Object
implements ILabelCandidateDescriptorProvider

An implementation of the ILabelCandidateDescriptorProvider interface that always yields a constant ILabelCandidateDescriptor.


Field Summary
static ILabelCandidateDescriptorProvider externalDescriptorProvider
          A sharable implementation of the ILabelCandidateDescriptorProvider interface that always yields LabelCandidateDescriptor.externalDescriptor.
static ILabelCandidateDescriptorProvider internalDescriptorProvider
          A sharable implementation of the ILabelCandidateDescriptorProvider interface that always yields LabelCandidateDescriptor.internalDescriptor.
 
Constructor Summary
ConstantLabelCandidateDescriptorProvider(ILabelCandidateDescriptor descriptor)
          Initializes a new instance of the ConstantLabelCandidateDescriptorProvider class.
 
Method Summary
 ILabelCandidateDescriptor getDescriptor(Label label, ILabelModelParameter parameter)
          Always yields the parameter that has been passed to the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

externalDescriptorProvider

public static final ILabelCandidateDescriptorProvider externalDescriptorProvider
A sharable implementation of the ILabelCandidateDescriptorProvider interface that always yields LabelCandidateDescriptor.externalDescriptor.


internalDescriptorProvider

public static final ILabelCandidateDescriptorProvider internalDescriptorProvider
A sharable implementation of the ILabelCandidateDescriptorProvider interface that always yields LabelCandidateDescriptor.internalDescriptor.

Constructor Detail

ConstantLabelCandidateDescriptorProvider

public ConstantLabelCandidateDescriptorProvider(ILabelCandidateDescriptor descriptor)
Initializes a new instance of the ConstantLabelCandidateDescriptorProvider class. that always yields descriptor in getDescriptor.

Parameters:
descriptor - The descriptor to yield in getDescriptor.
Method Detail

getDescriptor

public ILabelCandidateDescriptor getDescriptor(Label label,
                                               ILabelModelParameter parameter)
Always yields the parameter that has been passed to the constructor.

Specified by:
getDescriptor in interface ILabelCandidateDescriptorProvider
Parameters:
label - The label to possibly assign the parameter.
parameter - The parameter to provide a descriptor for if applied to the given label
Returns:
A descriptor or null.


Copyright © 2000-2013 yWorks GmbH. All rights reserved