org.kite9.diagram.primitives
Class AbstractConnection

java.lang.Object
  extended by org.kite9.diagram.primitives.AbstractBiDirectional<Connected>
      extended by org.kite9.diagram.primitives.AbstractConnection
All Implemented Interfaces:
Comparable<DiagramElement>, BiDirectional<Connected>, Connection, DiagramElement
Direct Known Subclasses:
Link

public abstract class AbstractConnection
extends AbstractBiDirectional<Connected>
implements Connection

This is the base class for connections within the diagram. i.e. Links.

Author:
robmoffat

Field Summary
protected  Object fromDecoration
           
protected  Label fromLabel
           
protected  RenderingInformation renderingInformation
          This is used by layout engines to set the position of the elements in the diagram
protected  Object toDecoration
           
protected  Label toLabel
           
 
Fields inherited from class org.kite9.diagram.primitives.AbstractBiDirectional
drawDirection, from, to
 
Constructor Summary
AbstractConnection()
          For serialization
AbstractConnection(Connected from, Connected to, Direction drawDirection, Object fromDecoration, Label fromLabel, Object toDecoration, Label tolabel)
          Call this with modify verteConnected false to avoid adding the edge connection to the vertex
 
Method Summary
 int compareTo(DiagramElement o)
           
 Object getFromDecoration()
          The shape of the end of the edge at the from end
 Label getFromLabel()
          The text written on the from end
 RouteRenderingInformation getRenderingInformation()
           
 Object getToDecoration()
          The shape of the end of the edge at the to end
 Label getToLabel()
          Text on the to end
 void setFromDecoration(Object fromDecoration)
           
 void setFromLabel(Label fromLabel)
           
 void setToDecoration(Object toDecoration)
           
 void setToLabel(Label toLabel)
           
 
Methods inherited from class org.kite9.diagram.primitives.AbstractBiDirectional
getDrawDirection, getDrawDirectionFrom, getFrom, getTo, meets, meets, otherEnd, setDrawDirection, setDrawDirectionFrom, setFrom, setTo, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kite9.diagram.primitives.BiDirectional
getDrawDirection, getDrawDirectionFrom, getFrom, getTo, meets, meets, otherEnd, setDrawDirection, setDrawDirectionFrom, setFrom, setTo
 

Field Detail

fromDecoration

protected Object fromDecoration

toDecoration

protected Object toDecoration

fromLabel

protected Label fromLabel

toLabel

protected Label toLabel

renderingInformation

protected RenderingInformation renderingInformation
This is used by layout engines to set the position of the elements in the diagram

Constructor Detail

AbstractConnection

public AbstractConnection()
For serialization


AbstractConnection

public AbstractConnection(Connected from,
                          Connected to,
                          Direction drawDirection,
                          Object fromDecoration,
                          Label fromLabel,
                          Object toDecoration,
                          Label tolabel)
Call this with modify verteConnected false to avoid adding the edge connection to the vertex

Method Detail

getFromDecoration

public Object getFromDecoration()
Description copied from interface: Connection
The shape of the end of the edge at the from end

Specified by:
getFromDecoration in interface Connection

getToDecoration

public Object getToDecoration()
Description copied from interface: Connection
The shape of the end of the edge at the to end

Specified by:
getToDecoration in interface Connection

getFromLabel

public Label getFromLabel()
Description copied from interface: Connection
The text written on the from end

Specified by:
getFromLabel in interface Connection

getToLabel

public Label getToLabel()
Description copied from interface: Connection
Text on the to end

Specified by:
getToLabel in interface Connection

compareTo

public int compareTo(DiagramElement o)
Specified by:
compareTo in interface Comparable<DiagramElement>

getRenderingInformation

public RouteRenderingInformation getRenderingInformation()
Specified by:
getRenderingInformation in interface DiagramElement

setFromDecoration

public void setFromDecoration(Object fromDecoration)

setToDecoration

public void setToDecoration(Object toDecoration)

setFromLabel

public void setFromLabel(Label fromLabel)

setToLabel

public void setToLabel(Label toLabel)


Copyright © 2011. All Rights Reserved.