JGraphAddons
v1.0


org.jgraph.cellview
Class JGraphDiamondView

java.lang.Object
  |
  +--VertexView
        |
        +--org.jgraph.cellview.JGraphDiamondView

public class JGraphDiamondView
extends VertexView

Creates a diamond shaped graph cell. Correctly calculates perimeter, and maintains shape when size is changed. Does NOT handle borders, or resize correctly (loses square shape) when a group is resized

See Also:
Serialized Form

Nested Class Summary
static class JGraphDiamondView.JGraphDiamondRenderer
           
 class JGraphDiamondView.JGraphDiamondSizeHandle
           
 
Constructor Summary
JGraphDiamondView(Object cell, JGraph graph, CellMapper mapper)
           
 
Method Summary
 CellHandle getHandle(GraphContext context)
          Returns a cell handle for the view, if the graph and the view are sizeable.
 Point2D getPerimeterPoint(Point2D source, Point2D p)
           
 CellViewRenderer getRenderer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGraphDiamondView

public JGraphDiamondView(Object cell,
                         JGraph graph,
                         CellMapper mapper)
Method Detail

getPerimeterPoint

public Point2D getPerimeterPoint(Point2D source,
                                 Point2D p)

getRenderer

public CellViewRenderer getRenderer()

getHandle

public CellHandle getHandle(GraphContext context)
Returns a cell handle for the view, if the graph and the view are sizeable.


JGraphAddons
v1.0


Copyright (C) 2003-2004 Gaudenz Alder. All rights reserved.