y25.view
Interface LayerEdgeRealizer25D

All Superinterfaces:
LayerEdgeLayout25D
All Known Implementing Classes:
DummyLayerEdgeRealizer25D, PolyLineLayerEdgeRealizer25D

public interface LayerEdgeRealizer25D
extends LayerEdgeLayout25D

Provides a mechanism for rendering layer edges into an OpenGL context.

Before this realizer can be used to render a layer edge, the layer edge has to be bound to this realizer by calling bindLayerEdge. Note that this is done automatically when calling Graph25D.setRealizer(LayerEdge, LayerEdgeRealizer25D).


Field Summary
static int MODE_2D
          2D drawing mode for lines.
static int MODE_3D
          3D drawing mode for lines.
 
Method Summary
 void bindLayerEdge(LayerEdge le)
          Binds this realizer to the passed layer edge.
 LayerEdgeRealizer25D createCopy()
          Creates a copy of this realizer and returns it.
 Arrow getArrow()
          Returns the arrow at the target of the layer edge.
 LayerEdge getLayerEdge()
          Returns the layer edge that has been bound to this realizer, or null if no layer edge has been bound yet.
 Color getLineColor()
          Returns the color of this layer edge realizer.
 int getLineDisplayMode()
          Returns the current display mode for drawing lines.
 double getLineRadius()
          Returns the radius of this layer edge realizer.
 Arrow getSourceArrow()
          Returns the arrow at the source of the layer edge;
 NodeRealizer getSourceRealizer()
          Returns the realizer of the source node or null, if not bound to a layer edge yet.
 Arrow getTargetArrow()
          Returns the arrow at the target of the layer edge;
 NodeRealizer getTargetRealizer()
          Returns the realizer of the target node or null, if not bound to a layer edge yet.
 boolean isSelected()
          Returns true if this realizer is currently selected, false otherwise.
 void paintGL(GLAutoDrawable drawable, Camera camera)
          Renders the layer edge this realizer is bound to into the given drawable.
 void setArrow(Arrow arrow)
          Sets the arrow at the target of the layer edge.
 void setLineColor(Color color)
          Sets the color of this layer edge realizer.
 void setLineDisplayMode(int mode)
          Sets the current display mode for drawing lines.
 void setLineRadius(double d)
          Sets the radius of this layer edge realizer.
 void setSelected(boolean selected)
          Sets the selection state of this realizer.
 void setSourceArrow(Arrow arrow)
          Sets the arrow at the source of the layer edge.
 void setTargetArrow(Arrow arrow)
          Sets the arrow at the target of the layer edge.
 
Methods inherited from interface y25.layout.LayerEdgeLayout25D
getBoundingBox
 

Field Detail

MODE_2D

public static final int MODE_2D
2D drawing mode for lines.

See Also:
Constant Field Values

MODE_3D

public static final int MODE_3D
3D drawing mode for lines.

See Also:
Constant Field Values
Method Detail

getLineDisplayMode

public int getLineDisplayMode()
Returns the current display mode for drawing lines. Can be either LayerEdgeRealizer25D.MODE_2D or LayerEdgeRealizer25D.MODE_3D.


setLineDisplayMode

public void setLineDisplayMode(int mode)
Sets the current display mode for drawing lines. Can be either LayerEdgeRealizer25D.MODE_2D or LayerEdgeRealizer25D.MODE_3D.


createCopy

public LayerEdgeRealizer25D createCopy()
Creates a copy of this realizer and returns it.


paintGL

public void paintGL(GLAutoDrawable drawable,
                    Camera camera)
Renders the layer edge this realizer is bound to into the given drawable. If no layer edge is bound to this realizer, nothing happens.

The passed camera is the one that is used to display this layer edge. It can be used, for example, to render a layer edge differently depending on the viewing position, or to display labels that always face the viewer.


bindLayerEdge

public void bindLayerEdge(LayerEdge le)
Binds this realizer to the passed layer edge.


getLayerEdge

public LayerEdge getLayerEdge()
Returns the layer edge that has been bound to this realizer, or null if no layer edge has been bound yet.


setLineColor

public void setLineColor(Color color)
Sets the color of this layer edge realizer.


getLineColor

public Color getLineColor()
Returns the color of this layer edge realizer.


setLineRadius

public void setLineRadius(double d)
Sets the radius of this layer edge realizer.


getLineRadius

public double getLineRadius()
Returns the radius of this layer edge realizer.


isSelected

public boolean isSelected()
Returns true if this realizer is currently selected, false otherwise.


setSelected

public void setSelected(boolean selected)
Sets the selection state of this realizer.


getArrow

public Arrow getArrow()
Returns the arrow at the target of the layer edge. Same as getTargetArrow.


getSourceArrow

public Arrow getSourceArrow()
Returns the arrow at the source of the layer edge;


getTargetArrow

public Arrow getTargetArrow()
Returns the arrow at the target of the layer edge;


setArrow

public void setArrow(Arrow arrow)
Sets the arrow at the target of the layer edge. Same as setTargetArrow.


setSourceArrow

public void setSourceArrow(Arrow arrow)
Sets the arrow at the source of the layer edge.


setTargetArrow

public void setTargetArrow(Arrow arrow)
Sets the arrow at the target of the layer edge.


getSourceRealizer

public NodeRealizer getSourceRealizer()
Returns the realizer of the source node or null, if not bound to a layer edge yet.


getTargetRealizer

public NodeRealizer getTargetRealizer()
Returns the realizer of the target node or null, if not bound to a layer edge yet.