y25.view.realizer
Class DummyNodeRealizer25D

java.lang.Object
  extended byy.view.NodeRealizer
      extended byy25.view.realizer.DummyNodeRealizer25D
All Implemented Interfaces:
NodeLayout, NodeLayout25D, NodeRealizer25D

public class DummyNodeRealizer25D
extends NodeRealizer
implements NodeRealizer25D

Implementation of a NodeRealizer/25D with no function. This is useful for debugging.


Field Summary
 
Fields inherited from class y.view.NodeRealizer
height, HOTSPOT_E, HOTSPOT_N, HOTSPOT_NE, HOTSPOT_NONE, HOTSPOT_NW, HOTSPOT_S, HOTSPOT_SE, HOTSPOT_SW, HOTSPOT_W, width, x, y
 
Constructor Summary
DummyNodeRealizer25D()
           
 
Method Summary
 NodeRealizer createCopy(NodeRealizer arg0)
           
 double getDepth()
          Returns the depth of the node, which is its extent in the z-dimension.
 double getHeight()
           
 BoundingBox getRelativeBoundingBox()
          Returns the relative bounding box that encompasses the node.
 double getWidth()
           
 double getX()
           
 double getY()
           
 Point3D intersect(Point3D source, Point3D target, float nodeZ)
          Intersects a line segment with this node and returns the intersection point.
 void paintGL(GLAutoDrawable drawable, Camera camera)
          Renders the node this realizer belongs to into the given drawable.
protected  void paintNode(Graphics2D arg0)
           
 void setDepth(double depth)
          Sets the depth of the node, which is its extent in the z-dimension.
 void setLocation(double arg0, double arg1)
           
 void setSize(double arg0, double arg1)
           
 void setSize(double width, double height, double depth)
          Sets the size of the node in all three dimensions.
 
Methods inherited from class y.view.NodeRealizer
addLabel, calcUnionRect, calcUnionRect, contains, createCopy, createNodeLabel, findBBIntersection, findIntersection, getBoundingBox, getCenterX, getCenterY, getFillColor, getFillColor2, getHotSpotColor, getLabel, getLabel, getLabelText, getLayer, getLineColor, getLineType, getNode, getPortCandidates, getSloppySelectionColor, hotSpotHit, intersects, isInBox, isSelected, isTransparent, isVisible, labelCount, moveBy, paint, paintHotSpots, paintLayer, paintLayerSloppy, paintSloppy, paintText, read, removeLabel, setCenter, setCenterX, setCenterY, setEdgesDirty, setFillColor, setFillColor2, setFrame, setFrame, setHeight, setHotSpotColor, setLabel, setLabelText, setLayer, setLayer, setLineColor, setLineType, setSelected, setSloppySelectionColor, setTransparent, setVisible, setWidth, setX, setY, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyNodeRealizer25D

public DummyNodeRealizer25D()
Method Detail

createCopy

public NodeRealizer createCopy(NodeRealizer arg0)

paintNode

protected void paintNode(Graphics2D arg0)

getX

public double getX()
Specified by:
getX in interface NodeLayout

getY

public double getY()
Specified by:
getY in interface NodeLayout

getWidth

public double getWidth()
Specified by:
getWidth in interface NodeLayout

getHeight

public double getHeight()
Specified by:
getHeight in interface NodeLayout

setLocation

public void setLocation(double arg0,
                        double arg1)
Specified by:
setLocation in interface NodeLayout

setSize

public void setSize(double arg0,
                    double arg1)
Specified by:
setSize in interface NodeLayout

paintGL

public void paintGL(GLAutoDrawable drawable,
                    Camera camera)
Description copied from interface: NodeRealizer25D
Renders the node this realizer belongs to into the given drawable.

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

Specified by:
paintGL in interface NodeRealizer25D

getDepth

public double getDepth()
Description copied from interface: NodeLayout25D
Returns the depth of the node, which is its extent in the z-dimension.

Specified by:
getDepth in interface NodeLayout25D

setDepth

public void setDepth(double depth)
Description copied from interface: NodeLayout25D
Sets the depth of the node, which is its extent in the z-dimension.

Specified by:
setDepth in interface NodeLayout25D

setSize

public void setSize(double width,
                    double height,
                    double depth)
Description copied from interface: NodeLayout25D
Sets the size of the node in all three dimensions.

Specified by:
setSize in interface NodeLayout25D

getRelativeBoundingBox

public BoundingBox getRelativeBoundingBox()
Description copied from interface: NodeLayout25D
Returns the relative bounding box that encompasses the node.

"Relative" means, that the z-position of the node is treated as the origin. For example, if a node is located at position (x,y,z) = (4,5,80) and has a width, height and depth of 4 then the relative bounding box is defined by the two points bb_min = (2, 3, -2) and bb_max = (6, 7, 2). Simply put, the z-position of the node is just irrelevant.

Specified by:
getRelativeBoundingBox in interface NodeLayout25D

intersect

public Point3D intersect(Point3D source,
                         Point3D target,
                         float nodeZ)
Description copied from interface: NodeRealizer25D
Intersects a line segment with this node and returns the intersection point.

The line segment in three dimensional space is defined by the two points: source and target. Since a node's z-position is determined only by the layer it resides in, this information is not available inside the realizer and therefore has to be passed in nodeZ.

This method should return an intersection point only if the passed line segment actually intersects the node. It should return null, if the line segment is completely outside or completely inside the node. If the line segment intersects the node at more than one position, the first of these intersections has to be returned, i.e. the one that is closest to source.

Specified by:
intersect in interface NodeRealizer25D