com.powerml.structures.shapes.connectors
Class ConnectorBendPoint

java.lang.Object
  extended bycom.powerml.structures.shapes.connectors.ConnectorBendPoint

public class ConnectorBendPoint
extends java.lang.Object

Defines a position a connector is bent at, relative to the last connector point (i.e. the last bend point, or in case of the first bend point, the start point of the connector).


Method Summary
 void addXml(org.dom4j.Element parent, int roundPrecision)
          Transforms current instance to XML and adds it to a parent element.
 double getPosition()
          Returns the position of the bend point relative to the vertical/horizontal component of the distance vector between start and end point of the connector (depending on the result of isVertical()). (0 means start point, 1 means end point of the connector)
 boolean isVertical()
          Checks if the connection segment entering the bend point is vertical or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addXml

public void addXml(org.dom4j.Element parent,
                   int roundPrecision)
Transforms current instance to XML and adds it to a parent element.

Parameters:
parent - parent element
roundPrecision - rounding precision

getPosition

public double getPosition()
Returns the position of the bend point relative to the vertical/horizontal component of the distance vector between start and end point of the connector (depending on the result of isVertical()). (0 means start point, 1 means end point of the connector)

Returns:
bend point position

isVertical

public boolean isVertical()
Checks if the connection segment entering the bend point is vertical or not.

Returns:
true if vertical, otherwise false


© 2004-2005 Ralf Terdic. All rights reserved.
www.powerml.com