Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
HeatMapBlockEntity |
|
| 1.0;1 |
1 | /* ======================================================================= | |
2 | * A visualisation library extension for JFreeChart. Please see JFreeChart | |
3 | * for further information. | |
4 | * ======================================================================= | |
5 | * Copyright (C) 2006 University of Helsinki, Department of Computer Science | |
6 | * | |
7 | * This library is free software; you can redistribute it and/or | |
8 | * modify it under the terms of the GNU Lesser General Public | |
9 | * License as published by the Free Software Foundation; either | |
10 | * version 2.1 of the License, or (at your option) any later version. | |
11 | * | |
12 | * This library is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * Lesser General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU Lesser General Public | |
18 | * License along with this library; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
20 | * ----------------------------- | |
21 | * Contact: ohtu@cs.helsinki.fi | |
22 | * ----------------------------- | |
23 | * | |
24 | */ | |
25 | ||
26 | package org.jfree.chart.entity; | |
27 | ||
28 | import org.jfree.chart.entity.ChartEntity; | |
29 | import java.awt.Shape; | |
30 | ||
31 | /** | |
32 | * A chart entity for heatmapblocks used in {@link HCPlot}. | |
33 | * @author viski project | |
34 | */ | |
35 | public class HeatMapBlockEntity extends ChartEntity { | |
36 | ||
37 | /** The row this entity is at in the data matrix. */ | |
38 | private int row; | |
39 | /** The column this entity is at in the data matrix. */ | |
40 | private int column; | |
41 | ||
42 | ||
43 | /** | |
44 | * Creates a new entity. | |
45 | * | |
46 | * @param area the area. | |
47 | * @param toolTipText the tool tip text. | |
48 | * @param urlText the URL text for HTML imagemaps. | |
49 | * @param row the row. | |
50 | * @param column the column. | |
51 | */ | |
52 | public HeatMapBlockEntity(Shape area, | |
53 | String toolTipText, | |
54 | String urlText, | |
55 | int row, | |
56 | int column) { | |
57 | ||
58 | 78 | super(area, toolTipText, urlText); |
59 | 77 | this.row = row; |
60 | 77 | this.column = column; |
61 | ||
62 | 77 | } |
63 | ||
64 | /** | |
65 | * Returns the row of an entity. | |
66 | * | |
67 | * @return The row. | |
68 | */ | |
69 | public int getRow() { | |
70 | ||
71 | 6 | return this.row; |
72 | ||
73 | } | |
74 | ||
75 | /** | |
76 | * Returns the column of an entity. | |
77 | * | |
78 | * @return The column. | |
79 | */ | |
80 | public int getColumn() { | |
81 | ||
82 | 5 | return this.column; |
83 | ||
84 | } | |
85 | ||
86 | } |