1 48 49 package org.krysalis.jcharts.imageMap; 50 51 52 import java.io.Serializable ; 53 import java.awt.geom.Point2D ; 54 55 56 60 public final class CircleMapArea extends ImageMapArea implements Serializable 61 { 62 private int radius=5; 64 65 66 74 public CircleMapArea( float x, float y, double value, String xAxisLabel, String legendLabel ) 75 { 76 super( 1, value, xAxisLabel, legendLabel ); 77 78 super.x[ 0 ]= (int) x; 79 super.y[ 0 ]= (int) y; 80 } 81 82 83 90 public CircleMapArea( float x, float y, Point2D.Double value, String legendLabel ) 91 { 92 super( 1, value, legendLabel ); 93 94 super.x[ 0 ]= (int) x; 95 super.y[ 0 ]= (int) y; 96 } 97 98 99 103 public AreaShape getAreaShape() 104 { 105 return AreaShape.CIRCLE; 106 } 107 108 109 114 public void setRadius( int radius ) 115 { 116 this.radius=radius; 117 } 118 119 120 protected void getCoordinates( StringBuffer html ) 121 { 122 html.append( this.x[ 0 ] + "," + this.y[ 0 ] + "," + this.radius ); 123 } 124 125 126 } 127 | Popular Tags |