Source Code Cross Referenced for PieChart2DProperties.java in  » Chart » jCharts » org » krysalis » jcharts » properties » 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 » jCharts » org.krysalis.jcharts.properties 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /***********************************************************************************************
002:         * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved.
003:         *
004:         * Redistribution and use of this software and associated documentation ("Software"), with or
005:         * without modification, are permitted provided that the following conditions are met:
006:         *
007:         * 1. Redistributions of source code must retain copyright statements and notices.
008:         * 	Redistributions must also contain a copy of this document.
009:         *
010:         * 2. Redistributions in binary form must reproduce the above copyright notice, this list of
011:         * 	conditions and the following disclaimer in the documentation and/or other materials
012:         * 	provided with the distribution.
013:         *
014:         * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endorse or promote
015:         * 	products derived from this Software without prior written permission of Nathaniel G.
016:         * 	Auvil.  For written permission, please contact nathaniel_auvil@users.sourceforge.net
017:         *
018:         * 4. Products derived from this Software may not be called "jCharts" nor may "jCharts" appear
019:         * 	in their names without prior written permission of Nathaniel G. Auvil. jCharts is a
020:         * 	registered trademark of Nathaniel G. Auvil.
021:         *
022:         * 5. Due credit should be given to the jCharts Project (http://jcharts.sourceforge.net/).
023:         *
024:         * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY
025:         * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
026:         * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
027:         * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
028:         * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
029:         * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
030:         * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT
031:         * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
032:         * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
033:         ************************************************************************************************/package org.krysalis.jcharts.properties;
034:
035:        import org.krysalis.jcharts.Chart;
036:        import org.krysalis.jcharts.properties.util.ChartFont;
037:        import org.krysalis.jcharts.properties.util.ChartStroke;
038:        import org.krysalis.jcharts.test.HTMLGenerator;
039:        import org.krysalis.jcharts.test.HTMLTestable;
040:        import org.krysalis.jcharts.types.PieLabelType;
041:
042:        /*************************************************************************************
043:         *
044:         * @author Nathaniel Auvil
045:         * @version $Id: PieChart2DProperties.java,v 1.4 2004/05/31 16:31:07 nathaniel_auvil Exp $
046:         ************************************************************************************/
047:        public class PieChart2DProperties extends ChartTypeProperties implements 
048:                HTMLTestable {
049:            /*
050:             public static final Paint DEFAULT_BORDER_PAINT = Color.black;
051:             public static final Stroke DEFAULT_BORDER_STROKE = new BasicStroke( 1.5f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND );
052:
053:             private Paint borderPaint = DEFAULT_BORDER_PAINT;
054:             private Stroke borderStroke = DEFAULT_BORDER_STROKE;
055:             */
056:
057:            private ChartStroke borderChartStroke = ChartStroke.DEFAULT_PIE_OUTLINE;
058:
059:            //---draw a twenty degrees by default.
060:            private float zeroDegreeOffset = 20.0f;
061:
062:            private PieLabelType pieLabelType = PieLabelType.NO_LABELS;
063:            private boolean isCurrency = false;
064:            private boolean showGrouping = false;
065:            private int roundingPowerOfTen = 0;
066:            private ChartFont valueLabelFont = ChartFont.DEFAULT_PIE_VALUE;
067:            private float tickLength = 5;
068:
069:            /*********************************************************************************************
070:             *
071:             **********************************************************************************************/
072:            public PieChart2DProperties() {
073:                super ();
074:            }
075:
076:            /*********************************************************************************************
077:             * The offset from zero degrees which the first slice of pie is drawn.  Charts look better to
078:             *  my eye when they do not start at zero degrees, but beauty is in the eye of the beholder.
079:             *
080:             * @param zeroDegreeOffset
081:             **********************************************************************************************/
082:            public void setZeroDegreeOffset(float zeroDegreeOffset) {
083:                this .zeroDegreeOffset = zeroDegreeOffset;
084:            }
085:
086:            /*********************************************************************************************
087:             *
088:             * @return double
089:             **********************************************************************************************/
090:            public float getZeroDegreeOffset() {
091:                return this .zeroDegreeOffset;
092:            }
093:
094:            public ChartStroke getBorderChartStroke() {
095:                return borderChartStroke;
096:            }
097:
098:            public void setBorderChartStroke(ChartStroke borderChartStroke) {
099:                this .borderChartStroke = borderChartStroke;
100:            }
101:
102:            /*****************************************************************************
103:             *
104:             *****************************************************************************/
105:            public PieLabelType getPieLabelType() {
106:                return pieLabelType;
107:            }
108:
109:            /****************************************************************************
110:             * Sets the type of label to draw on the PieChart. The default value is:
111:             * 	PieLabelType.NO_LABELS so no labels will be drawn on chart.
112:             *
113:             * @param pieLabelType
114:             ***************************************************************************/
115:            public void setPieLabelType(PieLabelType pieLabelType) {
116:                this .pieLabelType = pieLabelType;
117:            }
118:
119:            public ChartFont getValueLabelFont() {
120:                return valueLabelFont;
121:            }
122:
123:            /*****************************************************************************
124:             * Sets the ChartFont used to draw the chart value labels.
125:             *
126:             * @param valueLabelFont
127:             *****************************************************************************/
128:            public void setValueLabelFont(ChartFont valueLabelFont) {
129:                this .valueLabelFont = valueLabelFont;
130:            }
131:
132:            public void setCurrency(boolean currency) {
133:                isCurrency = currency;
134:            }
135:
136:            public void setShowGrouping(boolean showGrouping) {
137:                this .showGrouping = showGrouping;
138:            }
139:
140:            public void setRoundingPowerOfTen(int roundingPowerOfTen) {
141:                this .roundingPowerOfTen = roundingPowerOfTen;
142:            }
143:
144:            public void setTickLength(float tickLength) {
145:                this .tickLength = tickLength;
146:            }
147:
148:            public float getTickLength() {
149:                return tickLength;
150:            }
151:
152:            public boolean showValueLabelCurrency() {
153:                return isCurrency;
154:            }
155:
156:            public boolean showValueLabelGrouping() {
157:                return showGrouping;
158:            }
159:
160:            public int getValueLabelRoundingPowerOfTen() {
161:                return roundingPowerOfTen;
162:            }
163:
164:            /*********************************************************************************************
165:             * Enables the testing routines to display the contents of this Object.
166:             *
167:             * @param htmlGenerator
168:             **********************************************************************************************/
169:            public void toHTML(HTMLGenerator htmlGenerator) {
170:                htmlGenerator.propertiesTableStart("PieChart2DProperties");
171:                htmlGenerator.addTableRow("Zero Degree Offset", Double
172:                        .toString(this .getZeroDegreeOffset()));
173:                htmlGenerator.addTableRow("Border Chart Stroke", this 
174:                        .getBorderChartStroke());
175:                htmlGenerator.addTableRow("Label Type", this .pieLabelType);
176:                htmlGenerator.propertiesTableEnd();
177:            }
178:
179:            /******************************************************************************************
180:             * Validates the properties.
181:             *
182:             * @param chart
183:             * @throws PropertyException
184:             *****************************************************************************************/
185:            public void validate(Chart chart) throws PropertyException {
186:                //TODO
187:            }
188:
189:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.