|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yworks.yfiles.server.graphml.folding.markup.Port
A data object that represents a yFiles FLEX port.
Constructor Summary | |
Port()
Creates a new Port object using NodeScaledPortLocationModel.NODE_CENTER_ANCHORED as location model
parameter. |
|
Port(IPortLocationModelParameter locationModelParameter,
java.lang.Object owner)
Creates a new Port object using the given location model parameter and owner. |
|
Port(YPoint offset,
java.lang.Object owner)
Creates a new Port object. |
Method Summary | |
YPoint |
getAbsoluteLocation()
Calculates the absolute location of the port in world coordinates described by the port's location model parameter. |
IPortLocationModelParameter |
getLocationModelParameter()
Gets the port model's parameter that determines the location of this port. |
YPoint |
getOffset()
Returns the offset of the port location relative to the port owner's center. |
java.lang.Object |
getOwner()
Returns the owner of the port. |
YRectangle |
getOwnerLayout()
|
static YRectangle |
getOwnerLayout(java.lang.Object portOwner)
|
IPortStyle |
getStyle()
The port style. |
java.lang.Object |
getTag()
The user tag assigned to this port |
int |
getZOrder()
Returns the z-order of the port used on client side. |
void |
setAbsoluteLocation(YPoint absoluteLocation)
If a valid owner and port location model parameter is set, the absolute location is converted into an port location model parameter using the IPortLocationModel#createParameter method of the old
parameter's model.
|
void |
setLocationModelParameter(IPortLocationModelParameter locationModelParameter)
Sets the port model's parameter that determines the location of this port. |
void |
setOffset(YPoint offset)
Sets the the port's location relative to the center of its owner. |
void |
setOwner(java.lang.Object owner)
Sets the owner of the port. |
void |
setStyle(IPortStyle style)
Sets a new port style for the port. |
void |
setTag(java.lang.Object tag)
The user tag assigned to this port |
void |
setZOrder(int zOrder)
Sets the z-order of the port used on client side. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Port()
NodeScaledPortLocationModel.NODE_CENTER_ANCHORED
as location model
parameter. Note that an owner has to be set before a correct location of the port can be calculated.
public Port(YPoint offset, java.lang.Object owner)
offset
is converted into an IPortLocationModelParameter
using the createOffsetParameter
method of NodeScaledPortLocationModel
offset
- The offset of the port location relative to the port owner's center.owner
- The owner of the port.NodeScaledPortLocationModel.createOffsetParameter(Object, y.geom.YPoint)
public Port(IPortLocationModelParameter locationModelParameter, java.lang.Object owner)
locationModelParameter
- The model parameter describing the port location.owner
- The owner of the port.Method Detail |
public IPortStyle getStyle()
public void setStyle(IPortStyle style)
style
- The new style.public void setOffset(YPoint offset)
The offset is converted to absolute world coordinates by adding them to the port owner's layout.
After that setting the port location is delegated to setAbsoluteLocation
.
offset
- The port's location relative to the center of its owner.public YPoint getOffset()
The offset is calculated by subtracting the port owner's center coordinates from the absolute port location
returned by getAbsoluteLocation
.
public IPortLocationModelParameter getLocationModelParameter()
public void setLocationModelParameter(IPortLocationModelParameter locationModelParameter)
public YPoint getAbsoluteLocation()
If no port owner and/or no valid port location model but an absolute location has been set before, this absolute location is returned.
setAbsoluteLocation(y.geom.YPoint)
public void setAbsoluteLocation(YPoint absoluteLocation)
IPortLocationModel#createParameter
method of the old
parameter's model.
Otherwise the absolute location is stored as is.
absoluteLocation
- The absolute location of the port.public YRectangle getOwnerLayout()
public static YRectangle getOwnerLayout(java.lang.Object portOwner)
public java.lang.Object getOwner()
public void setOwner(java.lang.Object owner)
owner
- The new owner of the port.public int getZOrder()
public void setZOrder(int zOrder)
zOrder
- The new z-order of the port.public java.lang.Object getTag()
public void setTag(java.lang.Object tag)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |