info.aduna.linkmap.graph.impl
Class EdgeImpl

java.lang.Object
  extended by info.aduna.linkmap.graph.impl.EdgeImpl
All Implemented Interfaces:
Edge, Highlightable

public class EdgeImpl
extends Object
implements Edge


Constructor Summary
EdgeImpl()
           
 
Method Summary
 Vertex getFirstVertex()
          Returns one of the Vertices connected by this Edge, referred to as the "first vertex".
 float getHighlightLevel()
           
 String getLabel()
          Returns the text to display along the Edge.
 Object getLayoutAttribute()
          Sets the layout attribute of this Vertex.
 Vertex getOtherVertex(Vertex thisVertex)
          Given one of the Vertices connected by this Edge, this method returns the other one.
 Object getRenderingAttribute()
          Returns the rendering attribute of this Vertex.
 Vertex getSecondVertex()
          Returns one of the Vertices connected by this Edge, referred to as the "second vertex".
 float getWeight()
          Returns the weight of the Edge.
 boolean isConnected()
          Returns whether both Vertices are set.
 boolean isConnectedTo(Vertex vertex)
          Determines whether the specified Vertex is registered as the first or second Vertex of this Edge.
 boolean isDirected()
          Indicates whether this is a directed or undirected Edge.
 void setDirected(boolean directed)
           
 void setFirstVertex(Vertex firstVertex)
           
 void setHighlightLevel(float highlightLevel)
           
 void setLabel(String label)
           
 void setLayoutAttribute(Object layoutAttribute)
          Returns the layout attribute of this Vertex.
 void setRenderingAttribute(Object renderingAttribute)
          Sets the rendering attribute of this Vertex.
 void setSecondVertex(Vertex secondVertex)
           
 void setWeight(float weight)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeImpl

public EdgeImpl()
Method Detail

getFirstVertex

public Vertex getFirstVertex()
Description copied from interface: Edge
Returns one of the Vertices connected by this Edge, referred to as the "first vertex".

Specified by:
getFirstVertex in interface Edge

setFirstVertex

public void setFirstVertex(Vertex firstVertex)

getSecondVertex

public Vertex getSecondVertex()
Description copied from interface: Edge
Returns one of the Vertices connected by this Edge, referred to as the "second vertex".

Specified by:
getSecondVertex in interface Edge

setSecondVertex

public void setSecondVertex(Vertex secondVertex)

setLabel

public void setLabel(String label)

getLabel

public String getLabel()
Description copied from interface: Edge
Returns the text to display along the Edge.

Specified by:
getLabel in interface Edge

setDirected

public void setDirected(boolean directed)

isDirected

public boolean isDirected()
Description copied from interface: Edge
Indicates whether this is a directed or undirected Edge. When it is directed, the first Vertex is considered to be the source Vertex and the second Vertex is the destination Vertex.

Specified by:
isDirected in interface Edge

setWeight

public void setWeight(float weight)

getWeight

public float getWeight()
Description copied from interface: Edge
Returns the weight of the Edge. This may influence both graph layout and rendering. Defaults to 1.0.

Specified by:
getWeight in interface Edge

getLayoutAttribute

public Object getLayoutAttribute()
Description copied from interface: Edge
Sets the layout attribute of this Vertex.

Specified by:
getLayoutAttribute in interface Edge

setLayoutAttribute

public void setLayoutAttribute(Object layoutAttribute)
Description copied from interface: Edge
Returns the layout attribute of this Vertex.

Specified by:
setLayoutAttribute in interface Edge

getRenderingAttribute

public Object getRenderingAttribute()
Description copied from interface: Edge
Returns the rendering attribute of this Vertex.

Specified by:
getRenderingAttribute in interface Edge

setRenderingAttribute

public void setRenderingAttribute(Object renderingAttribute)
Description copied from interface: Edge
Sets the rendering attribute of this Vertex.

Specified by:
setRenderingAttribute in interface Edge

setHighlightLevel

public void setHighlightLevel(float highlightLevel)
Specified by:
setHighlightLevel in interface Highlightable

getHighlightLevel

public float getHighlightLevel()
Specified by:
getHighlightLevel in interface Highlightable

isConnected

public boolean isConnected()
Description copied from interface: Edge
Returns whether both Vertices are set.

Specified by:
isConnected in interface Edge

isConnectedTo

public boolean isConnectedTo(Vertex vertex)
Description copied from interface: Edge
Determines whether the specified Vertex is registered as the first or second Vertex of this Edge.

Specified by:
isConnectedTo in interface Edge

getOtherVertex

public Vertex getOtherVertex(Vertex thisVertex)
Description copied from interface: Edge
Given one of the Vertices connected by this Edge, this method returns the other one. When the specified Vertex is not connected to this Edge (according to the registration of the Edge itself), 'null' is returned.

Specified by:
getOtherVertex in interface Edge


Copyright © 1997-2008 Aduna. All Rights Reserved.