|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yworks.yfiles.server.graphml.flexio.data.GenericLabelModel
Data object for an ILabelModel that can be used to create custom label models out of existing
ILabelModelParameter instances.
This class holds a number of parameters and serves as a container for these parameters. Custom models can easily be created that way:
GenericLabelModel glm = new GenericLabelModel(InteriorLabelModel.Center); glm.addParameter(ExteriorLabelModel.north); glm.addParameter(ExteriorLabelModel.south); glm.addParameter(InteriorStretchLabelModel.east); glm.addParameter(InteriorStretchLabelModel.west);
ILabelModel,
ILabelModelParameter| Nested Class Summary | |
static class |
GenericLabelModel.GenericLabelModelParameterPair
This class is used to serialize a GenericLabelModel's parameter together with an ILabelCandidateDescriptor. |
static class |
GenericLabelModel.ModelParameter
|
| Constructor Summary | |
GenericLabelModel(ILabelModelParameter defaultParameter)
Create a new generic label model using the provided parameter as the default parameter. |
|
GenericLabelModel(ILabelModelParameter defaultParameter,
ILabelCandidateDescriptor descriptor)
Create a new generic label model using the provided parameter as the default parameter. |
|
| Method Summary | |
ILabelModelParameter |
addParameter(ILabelModelParameter parameter)
Adds another parameter to this models collection of parameters. |
ILabelModelParameter |
addParameter(ILabelModelParameter parameter,
ILabelCandidateDescriptor descriptor)
Adds another parameter to this models collection of parameters. |
ILabelModelParameter |
createDefaultParameter()
Creates a default parameter that can be used for this model. |
ILabelCandidateDescriptor |
getDescriptor(Label label,
ILabelModelParameter parameter)
Yields the ILabelCandidateDescriptor that has been associated with the instance
during addParameter. |
java.util.List |
getParameters()
Gets the parameter list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GenericLabelModel(ILabelModelParameter defaultParameter)
defaultParameter - The parameter to use as the default.
public GenericLabelModel(ILabelModelParameter defaultParameter,
ILabelCandidateDescriptor descriptor)
defaultParameter - The parameter to use as the default.descriptor - The descriptor to associate with the default parameter.| Method Detail |
public ILabelModelParameter addParameter(ILabelModelParameter parameter)
ILabelModelParameter.model will be returned. The parameter is stored by reference and subsequent
modification of the parameter or its associated model will be reflected by this instance.
parameter - The parameter to add to this instance.
public ILabelModelParameter addParameter(ILabelModelParameter parameter,
ILabelCandidateDescriptor descriptor)
ILabelModelParameter.model will be returned. The parameter is stored by reference and subsequent
modification of the parameter or its associated model will be reflected by this instance.
Also the methods allows for associating a ILabelCandidateDescriptor with each
parameter that can later be retrieved via the getDescriptor method.
parameter - The parameter to add to this instance.descriptor - The descriptor to associate with the parameter.
public ILabelModelParameter createDefaultParameter()
ILabelModel
createDefaultParameter in interface ILabelModelpublic java.util.List getParameters()
public ILabelCandidateDescriptor getDescriptor(Label label,
ILabelModelParameter parameter)
ILabelCandidateDescriptor that has been associated with the instance
during addParameter.
getDescriptor in interface ILabelCandidateDescriptorProviderlabel - The label to possibly assign the parameter.parameter - The parameter to provide a descriptor for if applied to the given label
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||