pedviz.view
Class EdgeView

java.lang.Object
  extended by pedviz.view.DefaultEdgeView
      extended by pedviz.view.EdgeView
Direct Known Subclasses:
SugiyamaEdgeView

public class EdgeView
extends DefaultEdgeView

This class contains all informations that are needed for drawing a Edge object in a GraphView.

Author:
lukas forer

Constructor Summary
EdgeView(Edge edge, DefaultEdgeView defaultEdgeView)
          Creates a EdgeView for the given Edge object with the given DefaultEdgeView as template.
 
Method Summary
 float getAlpha()
          Returns the alpha value.
 java.awt.Color getColor()
          Returns the color of the line.
 java.lang.Object getData()
          Returns the stored Object.
 Edge getEdge()
          Returns the Edge object.
 NodeView getEnd()
          Returns the first end node.
 java.util.List<NodeView> getEnds()
          Returns a collection of all end nodes.
 NodeView getStart()
          Returns the start node.
 boolean isHidden()
          Returns true, if the edge is hidden.
 boolean isHighlighted()
          Returns true, if the edge is highlighted.
 void setData(java.lang.Object data)
          Sets the Object that will be stored.
 void setEnds(java.util.List<NodeView> end)
          Sets all end node.
 void setStart(NodeView start)
          Sets the start node.
 
Methods inherited from class pedviz.view.DefaultEdgeView
getAlphaForLongLines, getColorForLongLines, getDeltaX, getDeltaY, getDeltaZ, getGapBottom, getGapTop, getHighlightedColor, getHighlightedWidth, getWidth, isConnectChildren, setAlpha, setAlphaForLongLines, setColor, setColorForLongLines, setConnectChildren, setDeltaForLongLines, setGapBottom, setGapTop, setHighlightedColor, setHighlightedWidth, setWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeView

public EdgeView(Edge edge,
                DefaultEdgeView defaultEdgeView)
Creates a EdgeView for the given Edge object with the given DefaultEdgeView as template.

Parameters:
edge - Edge
start - NodeView of the start node.
end[] - Arry of NodeViews of the end nodes.
Method Detail

isHighlighted

public boolean isHighlighted()
Returns true, if the edge is highlighted.

Returns:
true, if the edge is highlighted

isHidden

public boolean isHidden()
Returns true, if the edge is hidden.

Returns:
true, if the edge is hidden

getEdge

public Edge getEdge()
Returns the Edge object.

Returns:
the Edge object

getEnd

public NodeView getEnd()
Returns the first end node.

Returns:
the first end node.

getStart

public NodeView getStart()
Returns the start node.

Returns:
the start node.

getEnds

public java.util.List<NodeView> getEnds()
Returns a collection of all end nodes.

Returns:
a collection of all end nodes.

setStart

public void setStart(NodeView start)
Sets the start node.

Parameters:
start - start node.

setEnds

public void setEnds(java.util.List<NodeView> end)
Sets all end node.

Parameters:
end -

getData

public java.lang.Object getData()
Returns the stored Object.

Returns:
stored Object

setData

public void setData(java.lang.Object data)
Sets the Object that will be stored.

Parameters:
data -

getColor

public java.awt.Color getColor()
Description copied from class: DefaultEdgeView
Returns the color of the line.

Overrides:
getColor in class DefaultEdgeView
Returns:
eges color of the line

getAlpha

public float getAlpha()
Description copied from class: DefaultEdgeView
Returns the alpha value.

Overrides:
getAlpha in class DefaultEdgeView
Returns:
the alpha value.