public interface IPortLocationModel extends ILookup
IPort
instances with respect to specific IPortLocationModelParameter
s.
In addition to defining the location of a port with respect to a specific
IPortLocationModelParameter
, a port location model is typically the factory of the model parameters that are
compatible with it, too.
Typically, the port location model defines a compilation of valid locations for ports, and a specific model parameter specifies an exact geometry for a port.
By design, the same instance of a port location model can be shared by multiple port location model parameters. Similarly, the same instance of a port location model parameter can be shared by multiple ports.
This interface supports the ILookup.lookup(java.lang.Class)
method that can be used to query additional aspects
of the implementation.
IPortLocationModelParameter
,
IPort
,
IGraph
Modifier and Type | Method and Description |
---|---|
IPortLocationModelParameter |
createParameter(IPortOwner owner,
PointD location)
Factory method that creates a parameter for the given port that tries to match the provided location in absolute world
coordinates.
|
ILookup |
getContext(IPort port,
IPortLocationModelParameter locationParameter)
Provides a
lookup context for the given combination of port and parameter. |
PointD |
getLocation(IPort port,
IPortLocationModelParameter locationParameter)
Determines the location of the port for the given parameter.
|
createDictionaryLookup, createDynamic, createSingle, createSingle, createWrapped, lookup, lookup, lookup, safeLookup
IPortLocationModelParameter createParameter(IPortOwner owner, PointD location)
owner
- The port owner that will own the port for which the parameter shall be created.location
- The location in the world coordinate system that should be matched as best as possible.IPort
at the given owner
.ILookup getContext(IPort port, IPortLocationModelParameter locationParameter)
lookup context
for the given combination of port and parameter.port
- The port to use in the context.locationParameter
- The parameter to use for the port in the context.ILookup
interface that can be used to query additional aspects of the port/parameter
combination.PointD getLocation(IPort port, IPortLocationModelParameter locationParameter)
port
- The port to determine the location for.locationParameter
- The parameter to use. The parameter can be expected to be created by this instance having the Model
property set to this instance..