org.jgraph.cellview
Class JGraphIconView

java.lang.Object
  extended byVertexView
      extended byorg.jgraph.cellview.JGraphIconView

public class JGraphIconView
extends VertexView

The cell view modifies the center point of the vertex such that it is relative to the icon rather than the entire vertex. The perimeter

See Also:
Serialized Form

Nested Class Summary
static class JGraphIconView.DescriptionTextArea
          This JComponent only displays html renderered text as the lower part of the icon/description duo.
static class JGraphIconView.IconDisplay
          This JComponent only displays an icon as the upper part of the icon/description duo.
static class JGraphIconView.IconRenderer
          This is a combination renderer that displays both an icon and a description under the icon.
 
Field Summary
protected static JGraphIconView.IconRenderer viewRenderer
           
 
Constructor Summary
JGraphIconView()
           
JGraphIconView(java.lang.Object cell)
           
 
Method Summary
 java.awt.geom.Point2D getCenterPoint()
          The center point of the vertex should be in the middle of the icon instead of the middle of the icon/description duo.
 GraphCellEditor getEditor()
           
 java.awt.geom.Point2D getPerimeterPoint(java.awt.geom.Point2D source, java.awt.geom.Point2D p)
          We don't want to calculate a perimeter point around the entire vertex.
 CellViewRenderer getRenderer()
           
 boolean isMouseOver()
          The mouse over boolean is here so that we could potentially render the icon differently when the mouse is hovering above the vertex.
 void setMouseOver(boolean isMouseOver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewRenderer

protected static transient JGraphIconView.IconRenderer viewRenderer
Constructor Detail

JGraphIconView

public JGraphIconView()

JGraphIconView

public JGraphIconView(java.lang.Object cell)
Method Detail

getEditor

public GraphCellEditor getEditor()

isMouseOver

public boolean isMouseOver()
The mouse over boolean is here so that we could potentially render the icon differently when the mouse is hovering above the vertex.

Returns:

setMouseOver

public void setMouseOver(boolean isMouseOver)

getCenterPoint

public java.awt.geom.Point2D getCenterPoint()
The center point of the vertex should be in the middle of the icon instead of the middle of the icon/description duo. The reason we must calculate this is so that edges know where to point. We want to make the edges look like they are pointing to an icon from an icon.


getPerimeterPoint

public java.awt.geom.Point2D getPerimeterPoint(java.awt.geom.Point2D source,
                                               java.awt.geom.Point2D p)
We don't want to calculate a perimeter point around the entire vertex. Only the perimeter around the icon will be calculated. This calculation is generic for elliptical perimeters.


getRenderer

public CellViewRenderer getRenderer()