1 48 49 package org.jfree.chart; 50 51 import java.awt.Shape ; 52 import java.awt.geom.Line2D ; 53 import java.awt.geom.Point2D ; 54 55 59 public class DrawableLegendItem { 60 61 65 private LegendItem item; 66 67 68 private double x; 69 70 71 private double y; 72 73 74 private double width; 75 76 77 private double height; 78 79 80 private Shape marker; 81 82 83 private Line2D line; 84 85 86 private Point2D labelPosition; 87 88 93 public DrawableLegendItem(LegendItem item) { 94 this.item = item; 95 } 96 97 102 public LegendItem getItem() { 103 return this.item; 104 } 105 106 111 public double getX() { 112 return this.x; 113 } 114 115 120 public void setX(double x) { 121 this.x = x; 122 } 123 124 129 public double getY() { 130 return this.y; 131 } 132 133 138 public void setY(double y) { 139 this.y = y; 140 } 141 142 147 public double getWidth() { 148 return this.width; 149 } 150 151 156 public double getHeight() { 157 return this.height; 158 } 159 160 167 public double getMaxX() { 168 return getX() + getWidth(); 169 } 170 171 178 public double getMaxY() { 179 return getY() + getHeight(); 180 } 181 182 187 public Shape getMarker() { 188 return this.marker; 189 } 190 191 197 public void setMarker(Shape marker) { 198 this.marker = marker; 199 } 200 201 206 public void setLine(Line2D l) { 207 this.line = l; 208 } 209 210 215 public Line2D getLine() { 216 return this.line; 217 } 218 219 224 public Point2D getLabelPosition() { 225 return this.labelPosition; 226 } 227 228 233 public void setLabelPosition(Point2D position) { 234 this.labelPosition = position; 235 } 236 237 245 public void setBounds(double x, double y, double width, double height) { 246 this.x = x; 247 this.y = y; 248 this.width = width; 249 this.height = height; 250 } 251 252 } 253 | Popular Tags |