Search this API

y.view
Class GenericEdgeRealizer.Factory

java.lang.Object
  extended by y.view.GenericEdgeRealizer.Factory
Enclosing class:
GenericEdgeRealizer

public static final class GenericEdgeRealizer.Factory
extends java.lang.Object

This class is used for managing the different configurations for GenericEdgeRealizer instances. An instance of this class can be obtained using the static method GenericEdgeRealizer.getFactory().

 

Method Summary
 void addConfiguration(java.lang.String description, java.util.Map implementationMap)
          Uses the key/value pairs from the given Map to store a configuration under the given descriptive String name.
 void configure(GenericEdgeRealizer gr, java.lang.String description)
          Configures the given GenericEdgeRealizer instance using a configuration that has been previously added to this factory using the descriptive String name.
 java.util.Map createDefaultConfigurationMap()
          Returns a Map holding the default configuration for GenericEdgeRealizer.
 java.util.Set getAvailableConfigurations()
          Returns a read-only view of the configuration names added to this factory instance.
 java.lang.Object getImplementation(java.lang.String configuration, java.lang.Class interfaze)
           
 void removeConfiguration(java.lang.String description)
          Removes a configuration from this factory by name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createDefaultConfigurationMap

public java.util.Map createDefaultConfigurationMap()
Returns a Map holding the default configuration for GenericEdgeRealizer. This configuration uses classes SimpleBendHandler and PolyLinePathCalculator as implementations for required interfaces GenericEdgeRealizer.BendHandler and GenericEdgeRealizer.PathCalculator.

Returns:
A new Map instance containing implementations for required interfaces GenericEdgeRealizer.BendHandler and GenericEdgeRealizer.PathCalculator.
See Also:
SimpleBendHandler, PolyLinePathCalculator

addConfiguration

public void addConfiguration(java.lang.String description,
                             java.util.Map implementationMap)
Uses the key/value pairs from the given Map to store a configuration under the given descriptive String name. The map will be queried using the class objects of the various interfaces that are supported by the GenericEdgeRealizer class for appropriate interface implementations. Values will be copied by reference from the map. The map must at least provide instances for the GenericEdgeRealizer.PathCalculator interface and the GenericEdgeRealizer.BendHandler interface.

Throws:
java.lang.IllegalArgumentException - if any of the required interface implementations is not provided by the map.

getImplementation

public java.lang.Object getImplementation(java.lang.String configuration,
                                          java.lang.Class interfaze)

configure

public void configure(GenericEdgeRealizer gr,
                      java.lang.String description)
Configures the given GenericEdgeRealizer instance using a configuration that has been previously added to this factory using the descriptive String name.

Throws:
java.lang.IllegalArgumentException - if no such configuration has been stored in this factory instance.

getAvailableConfigurations

public java.util.Set getAvailableConfigurations()
Returns a read-only view of the configuration names added to this factory instance.


removeConfiguration

public void removeConfiguration(java.lang.String description)
Removes a configuration from this factory by name.


© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.