Source Code Cross Referenced for PieSectionEntity.java in  » Chart » jfreechart » org » jfree » chart » entity » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Chart » jfreechart » org.jfree.chart.entity 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* ===========================================================
002:         * JFreeChart : a free chart library for the Java(tm) platform
003:         * ===========================================================
004:         *
005:         * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors.
006:         *
007:         * Project Info:  http://www.jfree.org/jfreechart/index.html
008:         *
009:         * This library is free software; you can redistribute it and/or modify it 
010:         * under the terms of the GNU Lesser General Public License as published by 
011:         * the Free Software Foundation; either version 2.1 of the License, or 
012:         * (at your option) any later version.
013:         *
014:         * This library is distributed in the hope that it will be useful, but 
015:         * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
016:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
017:         * License for more details.
018:         *
019:         * You should have received a copy of the GNU Lesser General Public
020:         * License along with this library; if not, write to the Free Software
021:         * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
022:         * USA.  
023:         *
024:         * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
025:         * in the United States and other countries.]
026:         *
027:         * ---------------------
028:         * PieSectionEntity.java
029:         * ---------------------
030:         * (C) Copyright 2002-2007, by Object Refinery Limited.
031:         *
032:         * Original Author:  David Gilbert (for Object Refinery Limited);
033:         * Contributor(s):   Richard Atkinson;
034:         *                   Christian W. Zuckschwerdt;
035:         *                   
036:         * $Id: PieSectionEntity.java,v 1.5.2.2 2007/05/17 09:26:24 mungady Exp $
037:         *
038:         * Changes:
039:         * --------
040:         * 23-May-2002 : Version 1 (DG);
041:         * 12-Jun-2002 : Added Javadoc comments (DG);
042:         * 26-Jun-2002 : Added method to generate AREA tag for image map 
043:         *               generation (DG);
044:         * 05-Aug-2002 : Added new constructor to populate URLText
045:         *               Moved getImageMapAreaTag() to ChartEntity (superclass) (RA);
046:         * 03-Oct-2002 : Fixed errors reported by Checkstyle (DG);
047:         * 07-Mar-2003 : Added pie index attribute, since the PiePlot class can create
048:         *               multiple pie plots within one chart.  Also renamed 'category' 
049:         *               --> 'sectionKey' and changed the class from Object --> 
050:         *               Comparable (DG);
051:         * 30-Jul-2003 : Added PieDataset reference (CZ);
052:         * 11-Jan-2005 : Removed deprecated code in preparation for 1.0.0 release (DG);
053:         *
054:         */
055:
056:        package org.jfree.chart.entity;
057:
058:        import java.awt.Shape;
059:        import java.io.Serializable;
060:
061:        import org.jfree.data.general.PieDataset;
062:
063:        /**
064:         * A chart entity that represents one section within a pie plot.
065:         */
066:        public class PieSectionEntity extends ChartEntity implements 
067:                Serializable {
068:
069:            /** For serialization. */
070:            private static final long serialVersionUID = 9199892576531984162L;
071:
072:            /** The dataset. */
073:            private PieDataset dataset;
074:
075:            /** The pie index. */
076:            private int pieIndex;
077:
078:            /** The section index. */
079:            private int sectionIndex;
080:
081:            /** The section key. */
082:            private Comparable sectionKey;
083:
084:            /**
085:             * Creates a new pie section entity.
086:             *
087:             * @param area  the area.
088:             * @param dataset  the pie dataset.
089:             * @param pieIndex  the pie index (zero-based).
090:             * @param sectionIndex  the section index (zero-based).
091:             * @param sectionKey  the section key.
092:             * @param toolTipText  the tool tip text.
093:             * @param urlText  the URL text for HTML image maps.
094:             */
095:            public PieSectionEntity(Shape area, PieDataset dataset,
096:                    int pieIndex, int sectionIndex, Comparable sectionKey,
097:                    String toolTipText, String urlText) {
098:
099:                super (area, toolTipText, urlText);
100:                this .dataset = dataset;
101:                this .pieIndex = pieIndex;
102:                this .sectionIndex = sectionIndex;
103:                this .sectionKey = sectionKey;
104:
105:            }
106:
107:            /**
108:             * Returns the dataset this entity refers to.
109:             *
110:             * @return The dataset.
111:             */
112:            public PieDataset getDataset() {
113:                return this .dataset;
114:            }
115:
116:            /**
117:             * Sets the dataset this entity refers to.
118:             *
119:             * @param dataset  the dataset.
120:             */
121:            public void setDataset(PieDataset dataset) {
122:                this .dataset = dataset;
123:            }
124:
125:            /**
126:             * Returns the pie index.  For a regular pie chart, the section index is 0. 
127:             * For a pie chart containing multiple pie plots, the pie index is the row 
128:             * or column index from which the pie data is extracted.
129:             *
130:             * @return The pie index.
131:             */
132:            public int getPieIndex() {
133:                return this .pieIndex;
134:            }
135:
136:            /**
137:             * Sets the pie index.
138:             *
139:             * @param index  the new index value.
140:             */
141:            public void setPieIndex(int index) {
142:                this .pieIndex = index;
143:            }
144:
145:            /**
146:             * Returns the section index.
147:             *
148:             * @return The section index.
149:             */
150:            public int getSectionIndex() {
151:                return this .sectionIndex;
152:            }
153:
154:            /**
155:             * Sets the section index.
156:             *
157:             * @param index  the section index.
158:             */
159:            public void setSectionIndex(int index) {
160:                this .sectionIndex = index;
161:            }
162:
163:            /**
164:             * Returns the section key.
165:             *
166:             * @return The section key.
167:             */
168:            public Comparable getSectionKey() {
169:                return this .sectionKey;
170:            }
171:
172:            /**
173:             * Sets the section key.
174:             *
175:             * @param key  the section key.
176:             */
177:            public void setSectionKey(Comparable key) {
178:                this .sectionKey = key;
179:            }
180:
181:            /**
182:             * Returns a string representing the entity.
183:             *
184:             * @return A string representing the entity.
185:             */
186:            public String toString() {
187:                return "PieSection: " + this .pieIndex + ", "
188:                        + this .sectionIndex + "(" + this .sectionKey.toString()
189:                        + ")";
190:            }
191:
192:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.