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

java.lang.Object
  extended bycom.yworks.yfiles.server.graphml.flexio.data.DescriptorWrapperLabelModel
All Implemented Interfaces:
ILabelCandidateDescriptorProvider, ILabelModel, IMarkupExtensionFactory, ISharedInstanceProvider

public class DescriptorWrapperLabelModel
extends java.lang.Object
implements ILabelModel, ILabelCandidateDescriptorProvider, IMarkupExtensionFactory, ISharedInstanceProvider

A label model that wraps an existing label model and decorates it with an ILabelCandidateDescriptor.


Nested Class Summary
static class DescriptorWrapperLabelModel.DescriptorWrapperLabelModelParameter
          The label model parameter used by DescriptorWrapperLabelModel.
 
Constructor Summary
DescriptorWrapperLabelModel(ILabelModel innerModel, ILabelCandidateDescriptor descriptor)
          Initializes a new instance of the DescriptorWrapperLabelModel class.
 
Method Summary
 ILabelModelParameter createDefaultParameter()
          Creates a default parameter that can be used for this model.
 MarkupExtension createMarkupExtension(Lookup lookup)
          Creates a markup extension that can be used instead of the original class.
 ILabelCandidateDescriptor getDescriptor()
          Gets the descriptor.
 ILabelCandidateDescriptor getDescriptor(Label label, ILabelModelParameter parameter)
          Gets the descriptor for a given combination of label and ILabelModelParameter.
 ILabelModel getInnerModel()
          Gets the wrapped label model.
 java.util.Collection getSharedInstances()
          Returns an Collection for objects that shall be shared.
 void setDescriptor(ILabelCandidateDescriptor descriptor)
          Sets the descriptor.
 void setInnerModel(ILabelModel innerModel)
          Sets the wrapped label model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorWrapperLabelModel

public DescriptorWrapperLabelModel(ILabelModel innerModel,
                                   ILabelCandidateDescriptor descriptor)
Initializes a new instance of the DescriptorWrapperLabelModel class.

Parameters:
innerModel - The wrapped label model.
descriptor - The descriptor to decorate the label model with.
Method Detail

getDescriptor

public ILabelCandidateDescriptor getDescriptor()
Gets the descriptor.


setDescriptor

public void setDescriptor(ILabelCandidateDescriptor descriptor)
Sets the descriptor.


getInnerModel

public ILabelModel getInnerModel()
Gets the wrapped label model.


setInnerModel

public void setInnerModel(ILabelModel innerModel)
Sets the wrapped label model.


createDefaultParameter

public ILabelModelParameter createDefaultParameter()
Creates a default parameter that can be used for this model.

Specified by:
createDefaultParameter in interface ILabelModel
Returns:
A parameter for this model instance.

getDescriptor

public ILabelCandidateDescriptor getDescriptor(Label label,
                                               ILabelModelParameter parameter)
Gets the descriptor for a given combination of label and ILabelModelParameter.

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.

createMarkupExtension

public MarkupExtension createMarkupExtension(Lookup lookup)
Creates a markup extension that can be used instead of the original class.

Specified by:
createMarkupExtension in interface IMarkupExtensionFactory
Parameters:
lookup - The lookup that shall be considered when creating the markup extension.

getSharedInstances

public java.util.Collection getSharedInstances()
Description copied from interface: ISharedInstanceProvider
Returns an Collection for objects that shall be shared.

Specified by:
getSharedInstances in interface ISharedInstanceProvider
Returns:


Copyright © 2000-2013 yWorks GmbH. All rights reserved