com.gomjabbar.graph.swing
Class ConvexElementRenderer

java.lang.Object
  |
  +--com.gomjabbar.graph.swing.ConvexElementRenderer
All Implemented Interfaces:
GraphElementRenderer

public class ConvexElementRenderer
extends java.lang.Object
implements GraphElementRenderer


Field Summary
static java.lang.Double BIG_RADIUS
           
static java.lang.Integer DEFAULT_NUMBER
           
static java.lang.Double DEFAULT_RADIUS
           
static java.lang.Double DEFAULT_START_ANGLE
           
static java.lang.Integer HEXAGON
           
static java.lang.Double INVERTED_START_ANGLE
           
static java.lang.Integer SQUARE
           
static java.lang.Integer TRIANGLE
           
 
Constructor Summary
ConvexElementRenderer()
           
ConvexElementRenderer(double radius, int number, double start_angle)
           
 
Method Summary
 java.awt.geom.Point2D.Double closestPoint(GraphElement e, java.awt.geom.Point2D.Double e_loc, double x, double y)
           
 boolean containsPoint(GraphElement e, java.awt.geom.Point2D.Double element_location, double x, double y)
           
 void invalidate()
           
 void paint(java.awt.Graphics g, GraphElement e, java.awt.geom.Point2D.Double element_location, java.awt.Color fillings, java.awt.Color borders, java.awt.Color texts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RADIUS

public static final java.lang.Double DEFAULT_RADIUS

BIG_RADIUS

public static final java.lang.Double BIG_RADIUS

DEFAULT_NUMBER

public static final java.lang.Integer DEFAULT_NUMBER

TRIANGLE

public static final java.lang.Integer TRIANGLE

SQUARE

public static final java.lang.Integer SQUARE

HEXAGON

public static final java.lang.Integer HEXAGON

DEFAULT_START_ANGLE

public static final java.lang.Double DEFAULT_START_ANGLE

INVERTED_START_ANGLE

public static final java.lang.Double INVERTED_START_ANGLE
Constructor Detail

ConvexElementRenderer

public ConvexElementRenderer(double radius,
                             int number,
                             double start_angle)

ConvexElementRenderer

public ConvexElementRenderer()
Method Detail

containsPoint

public boolean containsPoint(GraphElement e,
                             java.awt.geom.Point2D.Double element_location,
                             double x,
                             double y)
Specified by:
containsPoint in interface GraphElementRenderer

paint

public void paint(java.awt.Graphics g,
                  GraphElement e,
                  java.awt.geom.Point2D.Double element_location,
                  java.awt.Color fillings,
                  java.awt.Color borders,
                  java.awt.Color texts)
Specified by:
paint in interface GraphElementRenderer

closestPoint

public java.awt.geom.Point2D.Double closestPoint(GraphElement e,
                                                 java.awt.geom.Point2D.Double e_loc,
                                                 double x,
                                                 double y)
Specified by:
closestPoint in interface GraphElementRenderer

invalidate

public void invalidate()
Specified by:
invalidate in interface GraphElementRenderer