org.kite9.diagram.primitives
Interface BiDirectional<X>

Type Parameters:
X -
All Known Subinterfaces:
Connection
All Known Implementing Classes:
AbstractBiDirectional, AbstractConnection, Link

public interface BiDirectional<X>

This generic interface allows you to specify a bi-directional, optionally directed from-to relationships, where from and to are both objects of generic class X.

Author:
robmoffat

Method Summary
 Direction getDrawDirection()
          Indicates the layout of from/to for the bi-directional item.
 Direction getDrawDirectionFrom(X from)
           
 X getFrom()
           
 X getTo()
           
 boolean meets(BiDirectional<X> e)
           
 boolean meets(X v)
           
 X otherEnd(X end)
          Returns from, if to is the argument, or to if from is the argument.
 void setDrawDirection(Direction d)
           
 void setDrawDirectionFrom(Direction d, X from)
           
 void setFrom(X v)
           
 void setTo(X v)
           
 

Method Detail

getFrom

X getFrom()

getTo

X getTo()

setFrom

void setFrom(X v)

setTo

void setTo(X v)

otherEnd

X otherEnd(X end)
Returns from, if to is the argument, or to if from is the argument.

Parameters:
end -
Returns:

meets

boolean meets(BiDirectional<X> e)

meets

boolean meets(X v)

getDrawDirection

Direction getDrawDirection()
Indicates the layout of from/to for the bi-directional item. If this is non-null, then it is describing the single direction it needs to flow in for the diagram.


getDrawDirectionFrom

Direction getDrawDirectionFrom(X from)

setDrawDirection

void setDrawDirection(Direction d)

setDrawDirectionFrom

void setDrawDirectionFrom(Direction d,
                          X from)


Copyright © 2011. All Rights Reserved.