|
||||||||||
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.NodeScaledPortLocationModel
Data object that models a yFiles FLEX IPortLocationModel
that dynamically determines the port location based on the node's layout.
Field Summary | |
static IPortLocationModelParameter |
NODE_BOTTOM_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the bottom border of the node layout. |
static IPortLocationModelParameter |
NODE_BOTTOM_LEFT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the bottom left corner of the node layout. |
static IPortLocationModelParameter |
NODE_BOTTOM_RIGHT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the bottom right corner of the node layout. |
static IPortLocationModelParameter |
NODE_CENTER_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the node layout. |
static IPortLocationModelParameter |
NODE_LEFT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the left border of the node layout. |
static IPortLocationModelParameter |
NODE_RIGHT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the right border of the node layout. |
static IPortLocationModelParameter |
NODE_TOP_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the top border of the node layout. |
static IPortLocationModelParameter |
NODE_TOP_LEFT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the top left corner of the node layout. |
static IPortLocationModelParameter |
NODE_TOP_RIGHT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the top right corner of the node layout. |
Constructor Summary | |
NodeScaledPortLocationModel()
|
Method Summary | |
IPortLocationModelParameter |
createAbsoluteParameter(java.lang.Object owner,
YPoint location)
Creates a parameter for the given port owner that will
exactly match the given absolute world coordinates. |
IPortLocationModelParameter |
createOffsetParameter(java.lang.Object owner,
YPoint relativeLocation)
Creates the a parameter for the given port owner that will exactly match the given relative location. |
IPortLocationModelParameter |
createParameter(java.lang.Object portOwner,
YPoint location)
Factory method that creates a parameter for the given port that tries to match the provided location in absolute world coordinates. |
IPortLocationModelParameter |
createScaledParameter(YPoint relativeOffsets)
Creates a parameter that uses the given relative offsets. |
Lookup |
getContext(Port port,
IPortLocationModelParameter parameter)
Provides a lookup context for the given combination of port and parameter. |
static NodeScaledPortLocationModel |
getInstance()
A shared instance of the NodeScaledPortLocationModel . |
YPoint |
getLocation(Port port,
IPortLocationModelParameter modelParameter)
Calculates the location in world coordinates for a given port using the given model parameter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final IPortLocationModelParameter NODE_CENTER_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the node layout.
This is the same as creating a parameter using an IPoint
with location (0, 0)
as
parameter.
public static final IPortLocationModelParameter NODE_LEFT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the left border of the node layout.
This is the same as creating a parameter using an IPoint
with location (-0.5, 0)
as
parameter.
public static final IPortLocationModelParameter NODE_RIGHT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the right border of the node layout.
This is the same as creating a parameter using an IPoint
with location (0.5, 0)
as
parameter.
public static final IPortLocationModelParameter NODE_TOP_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the top border of the node layout.
This is the same as creating a parameter using an IPoint
with location (0, -0.5)
as
parameter.
public static final IPortLocationModelParameter NODE_BOTTOM_ANCHORED
A constant static instance of a scaled parameter that locates the port at the center of the bottom border of the node layout.
This is the same as creating a parameter using an IPoint
with location (0, 0.5)
as
parameter.
public static final IPortLocationModelParameter NODE_TOP_LEFT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the top left corner of the node layout.
This is the same as creating a parameter using an IPoint
with location (-0.5, -0.5)
as
parameter.
public static final IPortLocationModelParameter NODE_TOP_RIGHT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the top right corner of the node layout.
This is the same as creating a parameter using an IPoint
with location (0.5, -0.5)
as
parameter.
public static final IPortLocationModelParameter NODE_BOTTOM_LEFT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the bottom left corner of the node layout.
This is the same as creating a parameter using an IPoint
with location (-0.5, 0.5)
as
parameter.
public static final IPortLocationModelParameter NODE_BOTTOM_RIGHT_ANCHORED
A constant static instance of a scaled parameter that locates the port at the bottom right corner of the node layout.
This is the same as creating a parameter using an IPoint
with location (0.5, 0.5)
as
parameter.
Constructor Detail |
public NodeScaledPortLocationModel()
Method Detail |
public static NodeScaledPortLocationModel getInstance()
NodeScaledPortLocationModel
.
public YPoint getLocation(Port port, IPortLocationModelParameter modelParameter)
IPortLocationModel
getLocation
in interface IPortLocationModel
port
- The port to calculate the location formodelParameter
- A parameter that has been created by this model.
This is typically the parameter that yielded this instance through its
IPortModelParameter.getModel()
property.
public IPortLocationModelParameter createParameter(java.lang.Object portOwner, YPoint location)
IPortLocationModel
Factory method that creates a parameter for the given port that tries to match the provided location in absolute world coordinates.
createParameter
in interface IPortLocationModel
portOwner
- 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
IPortOwner
.public IPortLocationModelParameter createScaledParameter(YPoint relativeOffsets)
relativeOffsets
- The relative offsets.
public IPortLocationModelParameter createAbsoluteParameter(java.lang.Object owner, YPoint location)
Creates a parameter for the given port owner
that will
exactly match the given absolute world coordinates.
owner
- The owner to use for determining the offsets.location
- The absolute world coordinates location of the port.
public IPortLocationModelParameter createOffsetParameter(java.lang.Object owner, YPoint relativeLocation)
owner
that will exactly match the given relative location.
owner
- The owner to use for determining the offsets.relativeLocation
- The location of the port relative to the center of the node.
public Lookup getContext(Port port, IPortLocationModelParameter parameter)
IPortLocationModel
Provides a lookup context for the given combination of port and parameter.
getContext
in interface IPortLocationModel
port
- The port to use in the context.parameter
- The parameter to use for the port in the context.
Lookup
interface that can be used to query additional aspects
of the port/parameter combination.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |