Source Code Cross Referenced for GraphChart2DProperties.java in  » Chart » Chart2D_1.9.6k » net » sourceforge » chart2d » 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 » Chart2D_1.9.6k » net.sourceforge.chart2d 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /**
0002:         * Chart2D, a java library for drawing two dimensional charts.
0003:         * Copyright (C) 2001 Jason J. Simas
0004:         *
0005:         * This library is free software; you can redistribute it and/or
0006:         * modify it under the terms of the GNU Lesser General Public
0007:         * License as published by the Free Software Foundation; either
0008:         * version 2.1 of the License, or (at your option) any later version.
0009:         *
0010:         * This library is distributed in the hope that it will be useful,
0011:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013:         * Lesser General Public License for more details.
0014:         * You should have received a copy of the GNU Lesser General Public
0015:         * License along with this library; if not, write to the Free Software
0016:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
0017:         *
0018:         * The author of this library may be contacted at:
0019:         * E-mail:  jjsimas@users.sourceforge.net
0020:         * Street Address:  J J Simas, 887 Tico Road, Ojai, CA 93023-3555 USA
0021:         */package net.sourceforge.chart2d;
0022:
0023:        import java.awt.Color;
0024:        import java.awt.Dimension;
0025:        import java.awt.Font;
0026:        import java.util.Vector;
0027:
0028:        /**
0029:         * A data structure for holding the properties common to all GraphChart2D objects.
0030:         * A GraphChart2D objects has axes and one or more overlaid graphs.
0031:         * Pass this to any number of GraphChart2D objects.
0032:         */
0033:        public final class GraphChart2DProperties extends Properties {
0034:
0035:            /**
0036:             * Indicates the ticks of an axis should be centered on each label
0037:             * of the axis.  Used by setLabelsAxisTicksAlignment (int).
0038:             */
0039:            public static final int CENTERED = 0;
0040:
0041:            /**
0042:             * Indicates the ticks of an axis should be centered between the labels
0043:             * of the axis.  Used by setLabelsAxisTicksAlignment (int).
0044:             */
0045:            public static final int BETWEEN = 1;
0046:
0047:            /**
0048:             * The default is false.
0049:             */
0050:            public static final boolean CHART_DATASET_CUSTOMIZE_GREATEST_VALUE_DEFAULT = false;
0051:
0052:            /**
0053:             * The default is 0.
0054:             */
0055:            public static final float CHART_DATASET_CUSTOM_GREATEST_VALUE_DEFAULT = 0;
0056:
0057:            /**
0058:             * The default is false.
0059:             */
0060:            public static final boolean CHART_DATASET_CUSTOMIZE_LEAST_VALUE_DEFAULT = false;
0061:
0062:            /**
0063:             * The default is 0.
0064:             */
0065:            public static final float CHART_DATASET_CUSTOM_LEAST_VALUE_DEFAULT = 0;
0066:
0067:            /**
0068:             * The default is .95f.
0069:             */
0070:            public static final float CHART_GRAPHABLE_TO_AVAILABLE_RATIO_DEFAULT = 1f;
0071:
0072:            /**
0073:             * The default is 7.
0074:             */
0075:            public static final int NUMBERS_AXIS_NUM_LABELS_DEFAULT = 7;
0076:
0077:            /**
0078:             * The default is true.
0079:             */
0080:            public static final boolean LABELS_AXIS_EXISTENCE_DEFAULT = true;
0081:
0082:            /**
0083:             * The default is BETWEEN.
0084:             */
0085:            public static final int LABELS_AXIS_TICKS_ALIGNMENT_DEFAULT = BETWEEN;
0086:
0087:            /**
0088:             * The default is String[0].
0089:             */
0090:            public static final String[] LABELS_AXIS_LABELS_TEXTS_DEFAULT = new String[0];
0091:
0092:            /**
0093:             * The default is true.
0094:             */
0095:            public static final boolean LABELS_AXIS_TITLE_EXISTENCE_DEFAULT = true;
0096:
0097:            /**
0098:             * The default is "".
0099:             */
0100:            public static final String LABELS_AXIS_TITLE_TEXT_DEFAULT = "";
0101:
0102:            /**
0103:             * The default is 11.
0104:             */
0105:            public static final int LABELS_AXIS_TITLE_FONT_POINT_MODEL_DEFAULT = 11;
0106:
0107:            /**
0108:             * The default is "SansSerif".
0109:             */
0110:            public static final String LABELS_AXIS_TITLE_FONT_NAME_DEFAULT = "SansSerif";
0111:
0112:            /**
0113:             * The default is Color.black.
0114:             */
0115:            public static final Color LABELS_AXIS_TITLE_FONT_COLOR_DEFAULT = Color.black;
0116:
0117:            /**
0118:             * The default is Font.PLAIN.
0119:             */
0120:            public static final int LABELS_AXIS_TITLE_FONT_STYLE_DEFAULT = Font.PLAIN;
0121:
0122:            /**
0123:             * The default is true.
0124:             */
0125:            public static final boolean LABELS_AXIS_TITLE_BETWEEN_REST_GAP_EXISTENCE_DEFAULT = true;
0126:
0127:            /**
0128:             * The default is 3.
0129:             */
0130:            public static final int LABELS_AXIS_TITLE_BETWEEN_REST_GAP_THICKNESS_MODEL_DEFAULT = 3;
0131:
0132:            /**
0133:             * The default is true.
0134:             */
0135:            public static final boolean LABELS_AXIS_TICKS_EXISTENCE_DEFAULT = true;
0136:
0137:            /**
0138:             * The default is Dimension (3, 3).
0139:             */
0140:            public static final Dimension LABELS_AXIS_TICKS_SIZE_MODEL_DEFAULT = new Dimension(
0141:                    3, 3);
0142:
0143:            /**
0144:             * The default is Color.black.
0145:             */
0146:            public static final Color LABELS_AXIS_TICKS_COLOR_DEFAULT = Color.black;
0147:
0148:            /**
0149:             * The default is false.
0150:             */
0151:            public static final boolean LABELS_AXIS_TICKS_OUTLINE_EXISTENCE_DEFAULT = false;
0152:
0153:            /**
0154:             * The default is Color.black.
0155:             */
0156:            public static final Color LABELS_AXIS_TICKS_OUTLINE_COLOR_DEFAULT = Color.black;
0157:
0158:            /**
0159:             * The default is 10.
0160:             */
0161:            public static final int LABELS_AXIS_LABELS_FONT_POINT_MODEL_DEFAULT = 10;
0162:
0163:            /**
0164:             * The default is "SansSerif".
0165:             */
0166:            public static final String LABELS_AXIS_LABELS_FONT_NAME_DEFAULT = "SansSerif";
0167:
0168:            /**
0169:             * The default is Color.black.
0170:             */
0171:            public static final Color LABELS_AXIS_LABELS_FONT_COLOR_DEFAULT = Color.black;
0172:
0173:            /**
0174:             * The default is Font.PLAIN.
0175:             */
0176:            public static final int LABELS_AXIS_LABELS_FONT_STYLE_DEFAULT = Font.PLAIN;
0177:
0178:            /**
0179:             * The default is true.
0180:             */
0181:            public static final boolean LABELS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_EXISTENCE_DEFAULT = true;
0182:
0183:            /**
0184:             * The default is 3.
0185:             */
0186:            public static final int LABELS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_THICKNESS_MODEL_DEFAULT = 3;
0187:
0188:            /**
0189:             * The default is true.
0190:             */
0191:            public static final boolean LABELS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_EXISTENCE_DEFAULT = true;
0192:
0193:            /**
0194:             * The default is 3.
0195:             */
0196:            public static final int LABELS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_THICKNESS_MODEL_DEFAULT = 3;
0197:
0198:            /**
0199:             * The default is true.
0200:             */
0201:            public static final boolean NUMBERS_AXIS_TITLE_EXISTENCE_DEFAULT = true;
0202:
0203:            /**
0204:             * The default is "".
0205:             */
0206:            public static final String NUMBERS_AXIS_TITLE_TEXT_DEFAULT = "";
0207:
0208:            /**
0209:             * The default is 11.
0210:             */
0211:            public static final int NUMBERS_AXIS_TITLE_FONT_POINT_MODEL_DEFAULT = 11;
0212:
0213:            /**
0214:             * The default is "SansSerif".
0215:             */
0216:            public static final String NUMBERS_AXIS_TITLE_FONT_NAME_DEFAULT = "SansSerif";
0217:
0218:            /**
0219:             * The default is Color.black.
0220:             */
0221:            public static final Color NUMBERS_AXIS_TITLE_FONT_COLOR_DEFAULT = Color.black;
0222:
0223:            /**
0224:             * The default is Font.PLAIN.
0225:             */
0226:            public static final int NUMBERS_AXIS_TITLE_FONT_STYLE_DEFAULT = Font.PLAIN;
0227:
0228:            /**
0229:             * The default is true.
0230:             */
0231:            public static final boolean NUMBERS_AXIS_TITLE_BETWEEN_REST_GAP_EXISTENCE_DEFAULT = true;
0232:
0233:            /**
0234:             * The default is 3.
0235:             */
0236:            public static final int NUMBERS_AXIS_TITLE_BETWEEN_REST_GAP_THICKNESS_MODEL_DEFAULT = 3;
0237:
0238:            /**
0239:             * The default is true.
0240:             */
0241:            public static final boolean NUMBERS_AXIS_TICKS_EXISTENCE_DEFAULT = true;
0242:
0243:            /**
0244:             * The default is Dimension (3, 3).
0245:             */
0246:            public static final Dimension NUMBERS_AXIS_TICKS_SIZE_MODEL_DEFAULT = new Dimension(
0247:                    3, 3);
0248:
0249:            /**
0250:             * The default is Color.black.
0251:             */
0252:            public static final Color NUMBERS_AXIS_TICKS_COLOR_DEFAULT = Color.black;
0253:
0254:            /**
0255:             * The default is false.
0256:             */
0257:            public static final boolean NUMBERS_AXIS_TICKS_OUTLINE_EXISTENCE_DEFAULT = false;
0258:
0259:            /**
0260:             * The default is Color.black.
0261:             */
0262:            public static final Color NUMBERS_AXIS_TICKS_OUTLINE_COLOR_DEFAULT = Color.black;
0263:
0264:            /**
0265:             * The default is 10.
0266:             */
0267:            public static final int NUMBERS_AXIS_LABELS_FONT_POINT_MODEL_DEFAULT = 10;
0268:
0269:            /**
0270:             * The default is "SansSerif".
0271:             */
0272:            public static final String NUMBERS_AXIS_LABELS_FONT_NAME_DEFAULT = "SansSerif";
0273:
0274:            /**
0275:             * The default is Color.black.
0276:             */
0277:            public static final Color NUMBERS_AXIS_LABELS_FONT_COLOR_DEFAULT = Color.black;
0278:
0279:            /**
0280:             * The default is Font.PLAIN.
0281:             */
0282:            public static final int NUMBERS_AXIS_LABELS_FONT_STYLE_DEFAULT = Font.PLAIN;
0283:
0284:            /**
0285:             * The default is true.
0286:             */
0287:            public static final boolean NUMBERS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_EXISTENCE_DEFAULT = true;
0288:
0289:            /**
0290:             * The default is 3.
0291:             */
0292:            public static final int NUMBERS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_THICKNESS_MODEL_DEFAULT = 3;
0293:
0294:            /**
0295:             * The default is true.
0296:             */
0297:            public static final boolean NUMBERS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_EXISTENCE_DEFAULT = true;
0298:
0299:            /**
0300:             * The default is 3.
0301:             */
0302:            public static final int NUMBERS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_THICKNESS_MODEL_DEFAULT = 3;
0303:
0304:            /**
0305:             * The default is false.
0306:             */
0307:            public static final boolean GRAPH_COMPONENTS_COLORING_BY_CAT_DEFAULT = false;
0308:
0309:            /**
0310:             * The default is null.
0311:             */
0312:            public static final MultiColorsProperties GRAPH_COMPONENTS_COLORS_BY_CAT_DEFAULT = null;
0313:
0314:            private boolean chartDatasetCustomizeGreatestValue;
0315:            private float chartDatasetCustomGreatestValue;
0316:            private boolean chartDatasetCustomizeLeastValue;
0317:            private float chartDatasetCustomLeastValue;
0318:            private float chartGraphableToAvailableRatio;
0319:
0320:            private boolean labelsAxisExistence;
0321:            private int labelsAxisTicksAlignment;
0322:            private String[] labelsAxisLabelsTexts;
0323:            private boolean labelsAxisTitleExistence;
0324:            private String labelsAxisTitleText;
0325:            private int labelsAxisTitleFontPointModel;
0326:            private String labelsAxisTitleFontName;
0327:            private Color labelsAxisTitleFontColor;
0328:            private int labelsAxisTitleFontStyle;
0329:            private boolean labelsAxisTitleBetweenRestGapExistence;
0330:            private int labelsAxisTitleBetweenRestGapThicknessModel;
0331:            private boolean labelsAxisTicksExistence;
0332:            private Dimension labelsAxisTicksSizeModel;
0333:            private Color labelsAxisTicksColor;
0334:            private boolean labelsAxisTicksOutlineExistence;
0335:            private Color labelsAxisTicksOutlineColor;
0336:            private int labelsAxisLabelsFontPointModel;
0337:            private String labelsAxisLabelsFontName;
0338:            private Color labelsAxisLabelsFontColor;
0339:            private int labelsAxisLabelsFontStyle;
0340:            private boolean labelsAxisBetweenLabelsOrTicksGapExistence;
0341:            private int labelsAxisBetweenLabelsOrTicksGapThicknessModel;
0342:            private boolean labelsAxisBetweenLabelsAndTicksGapExistence;
0343:            private int labelsAxisBetweenLabelsAndTicksGapThicknessModel;
0344:
0345:            private int numbersAxisNumLabels;
0346:            private boolean numbersAxisTitleExistence;
0347:            private String numbersAxisTitleText;
0348:            private int numbersAxisTitleFontPointModel;
0349:            private String numbersAxisTitleFontName;
0350:            private Color numbersAxisTitleFontColor;
0351:            private int numbersAxisTitleFontStyle;
0352:            private boolean numbersAxisTitleBetweenRestGapExistence;
0353:            private int numbersAxisTitleBetweenRestGapThicknessModel;
0354:            private boolean numbersAxisTicksExistence;
0355:            private Dimension numbersAxisTicksSizeModel;
0356:            private Color numbersAxisTicksColor;
0357:            private boolean numbersAxisTicksOutlineExistence;
0358:            private Color numbersAxisTicksOutlineColor;
0359:            private int numbersAxisLabelsFontPointModel;
0360:            private String numbersAxisLabelsFontName;
0361:            private Color numbersAxisLabelsFontColor;
0362:            private int numbersAxisLabelsFontStyle;
0363:            private boolean numbersAxisBetweenLabelsOrTicksGapExistence;
0364:            private int numbersAxisBetweenLabelsOrTicksGapThicknessModel;
0365:            private boolean numbersAxisBetweenLabelsAndTicksGapExistence;
0366:            private int numbersAxisBetweenLabelsAndTicksGapThicknessModel;
0367:
0368:            private boolean graphComponentsColoringByCat;
0369:            private MultiColorsProperties graphComponentsColorsByCat;
0370:
0371:            private boolean needsUpdate = true;
0372:            private final Vector needsUpdateVector = new Vector(5, 5);
0373:            private final Vector graphChart2DVector = new Vector(5, 5);
0374:
0375:            /**
0376:             * Creates a GraphChart2DProperties object with the documented default values.
0377:             */
0378:            public GraphChart2DProperties() {
0379:
0380:                needsUpdate = true;
0381:                setGraphChart2DPropertiesToDefaults();
0382:            }
0383:
0384:            /**
0385:             * Creates a GraphChart2DProperties object with property values copied from another object.
0386:             * The copying is a deep copy.
0387:             * @param graphChart2DProps The properties to copy.
0388:             */
0389:            public GraphChart2DProperties(
0390:                    GraphChart2DProperties graphChart2DProps) {
0391:
0392:                needsUpdate = true;
0393:                setGraphChart2DProperties(graphChart2DProps);
0394:            }
0395:
0396:            /**
0397:             * Sets all properties to their default values.
0398:             */
0399:            public final void setGraphChart2DPropertiesToDefaults() {
0400:
0401:                needsUpdate = true;
0402:                setChartDatasetCustomizeGreatestValue(CHART_DATASET_CUSTOMIZE_GREATEST_VALUE_DEFAULT);
0403:                setChartDatasetCustomGreatestValue(CHART_DATASET_CUSTOM_GREATEST_VALUE_DEFAULT);
0404:                setChartDatasetCustomizeLeastValue(CHART_DATASET_CUSTOMIZE_LEAST_VALUE_DEFAULT);
0405:                setChartDatasetCustomLeastValue(CHART_DATASET_CUSTOM_LEAST_VALUE_DEFAULT);
0406:                setChartGraphableToAvailableRatio(CHART_GRAPHABLE_TO_AVAILABLE_RATIO_DEFAULT);
0407:                setNumbersAxisNumLabels(NUMBERS_AXIS_NUM_LABELS_DEFAULT);
0408:                setLabelsAxisExistence(LABELS_AXIS_EXISTENCE_DEFAULT);
0409:                setLabelsAxisTicksAlignment(LABELS_AXIS_TICKS_ALIGNMENT_DEFAULT);
0410:                setLabelsAxisLabelsTexts(LABELS_AXIS_LABELS_TEXTS_DEFAULT);
0411:                setLabelsAxisTitleExistence(LABELS_AXIS_TITLE_EXISTENCE_DEFAULT);
0412:                setLabelsAxisTitleText(LABELS_AXIS_TITLE_TEXT_DEFAULT);
0413:                setLabelsAxisTitleFontPointModel(LABELS_AXIS_TITLE_FONT_POINT_MODEL_DEFAULT);
0414:                setLabelsAxisTitleFontName(LABELS_AXIS_TITLE_FONT_NAME_DEFAULT);
0415:                setLabelsAxisTitleFontColor(LABELS_AXIS_TITLE_FONT_COLOR_DEFAULT);
0416:                setLabelsAxisTitleFontStyle(LABELS_AXIS_TITLE_FONT_STYLE_DEFAULT);
0417:                setLabelsAxisTitleBetweenRestGapExistence(LABELS_AXIS_TITLE_BETWEEN_REST_GAP_EXISTENCE_DEFAULT);
0418:                setLabelsAxisTitleBetweenRestGapThicknessModel(LABELS_AXIS_TITLE_BETWEEN_REST_GAP_THICKNESS_MODEL_DEFAULT);
0419:                setLabelsAxisTicksExistence(LABELS_AXIS_TICKS_EXISTENCE_DEFAULT);
0420:                setLabelsAxisTicksSizeModel(LABELS_AXIS_TICKS_SIZE_MODEL_DEFAULT);
0421:                setLabelsAxisTicksColor(LABELS_AXIS_TICKS_COLOR_DEFAULT);
0422:                setLabelsAxisTicksOutlineExistence(LABELS_AXIS_TICKS_OUTLINE_EXISTENCE_DEFAULT);
0423:                setLabelsAxisTicksOutlineColor(LABELS_AXIS_TICKS_COLOR_DEFAULT);
0424:                setLabelsAxisLabelsFontPointModel(LABELS_AXIS_LABELS_FONT_POINT_MODEL_DEFAULT);
0425:                setLabelsAxisLabelsFontName(LABELS_AXIS_LABELS_FONT_NAME_DEFAULT);
0426:                setLabelsAxisLabelsFontColor(LABELS_AXIS_LABELS_FONT_COLOR_DEFAULT);
0427:                setLabelsAxisLabelsFontStyle(LABELS_AXIS_LABELS_FONT_STYLE_DEFAULT);
0428:                setLabelsAxisBetweenLabelsOrTicksGapExistence(LABELS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_EXISTENCE_DEFAULT);
0429:                setLabelsAxisBetweenLabelsOrTicksGapThicknessModel(LABELS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_THICKNESS_MODEL_DEFAULT);
0430:                setLabelsAxisBetweenLabelsAndTicksGapExistence(LABELS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_EXISTENCE_DEFAULT);
0431:                setLabelsAxisBetweenLabelsAndTicksGapThicknessModel(LABELS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_THICKNESS_MODEL_DEFAULT);
0432:                setNumbersAxisTitleExistence(NUMBERS_AXIS_TITLE_EXISTENCE_DEFAULT);
0433:                setNumbersAxisTitleText(NUMBERS_AXIS_TITLE_TEXT_DEFAULT);
0434:                setNumbersAxisTitleFontPointModel(NUMBERS_AXIS_TITLE_FONT_POINT_MODEL_DEFAULT);
0435:                setNumbersAxisTitleFontName(NUMBERS_AXIS_TITLE_FONT_NAME_DEFAULT);
0436:                setNumbersAxisTitleFontColor(NUMBERS_AXIS_TITLE_FONT_COLOR_DEFAULT);
0437:                setNumbersAxisTitleFontStyle(NUMBERS_AXIS_TITLE_FONT_STYLE_DEFAULT);
0438:                setNumbersAxisTitleBetweenRestGapExistence(NUMBERS_AXIS_TITLE_BETWEEN_REST_GAP_EXISTENCE_DEFAULT);
0439:                setNumbersAxisTitleBetweenRestGapThicknessModel(NUMBERS_AXIS_TITLE_BETWEEN_REST_GAP_THICKNESS_MODEL_DEFAULT);
0440:                setNumbersAxisTicksExistence(NUMBERS_AXIS_TICKS_EXISTENCE_DEFAULT);
0441:                setNumbersAxisTicksSizeModel(NUMBERS_AXIS_TICKS_SIZE_MODEL_DEFAULT);
0442:                setNumbersAxisTicksColor(NUMBERS_AXIS_TICKS_COLOR_DEFAULT);
0443:                setNumbersAxisTicksOutlineExistence(NUMBERS_AXIS_TICKS_OUTLINE_EXISTENCE_DEFAULT);
0444:                setNumbersAxisTicksOutlineColor(NUMBERS_AXIS_TICKS_COLOR_DEFAULT);
0445:                setNumbersAxisLabelsFontPointModel(NUMBERS_AXIS_LABELS_FONT_POINT_MODEL_DEFAULT);
0446:                setNumbersAxisLabelsFontName(NUMBERS_AXIS_LABELS_FONT_NAME_DEFAULT);
0447:                setNumbersAxisLabelsFontColor(NUMBERS_AXIS_LABELS_FONT_COLOR_DEFAULT);
0448:                setNumbersAxisLabelsFontStyle(NUMBERS_AXIS_LABELS_FONT_STYLE_DEFAULT);
0449:                setNumbersAxisBetweenLabelsOrTicksGapExistence(NUMBERS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_EXISTENCE_DEFAULT);
0450:                setNumbersAxisBetweenLabelsOrTicksGapThicknessModel(NUMBERS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_THICKNESS_MODEL_DEFAULT);
0451:                setNumbersAxisBetweenLabelsAndTicksGapExistence(NUMBERS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_EXISTENCE_DEFAULT);
0452:                setNumbersAxisBetweenLabelsAndTicksGapThicknessModel(NUMBERS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_THICKNESS_MODEL_DEFAULT);
0453:                setGraphComponentsColoringByCat(GRAPH_COMPONENTS_COLORING_BY_CAT_DEFAULT);
0454:            }
0455:
0456:            /**
0457:             * Sets all properties to be the values of another GraphChart2DProperties object.
0458:             * The copying is a deep copy.
0459:             * @param graphChart2DProps The GraphChart2DProperties to copy.
0460:             */
0461:            public final void setGraphChart2DProperties(
0462:                    GraphChart2DProperties graphChart2DProps) {
0463:
0464:                needsUpdate = true;
0465:                setChartDatasetCustomizeGreatestValue(graphChart2DProps
0466:                        .getChartDatasetCustomizeGreatestValue());
0467:                setChartDatasetCustomGreatestValue(graphChart2DProps
0468:                        .getChartDatasetCustomGreatestValue());
0469:                setChartDatasetCustomizeLeastValue(graphChart2DProps
0470:                        .getChartDatasetCustomizeLeastValue());
0471:                setChartDatasetCustomLeastValue(graphChart2DProps
0472:                        .getChartDatasetCustomLeastValue());
0473:                setChartGraphableToAvailableRatio(graphChart2DProps
0474:                        .getChartGraphableToAvailableRatio());
0475:                setNumbersAxisNumLabels(graphChart2DProps
0476:                        .getNumbersAxisNumLabels());
0477:                setLabelsAxisExistence(graphChart2DProps
0478:                        .getLabelsAxisExistence());
0479:                setLabelsAxisTicksAlignment(graphChart2DProps
0480:                        .getLabelsAxisTicksAlignment());
0481:                String[] labelsTexts = graphChart2DProps
0482:                        .getLabelsAxisLabelsTexts();
0483:                String[] copiedLabelsTexts = new String[labelsTexts.length];
0484:                for (int i = 0; i < labelsTexts.length; ++i)
0485:                    copiedLabelsTexts[i] = labelsTexts[i];
0486:                setLabelsAxisLabelsTexts(copiedLabelsTexts);
0487:                setLabelsAxisTitleExistence(graphChart2DProps
0488:                        .getLabelsAxisTitleExistence());
0489:                setLabelsAxisTitleText(graphChart2DProps
0490:                        .getLabelsAxisTitleText());
0491:                setLabelsAxisTitleFontPointModel(graphChart2DProps
0492:                        .getLabelsAxisTitleFontPointModel());
0493:                setLabelsAxisTitleFontName(graphChart2DProps
0494:                        .getLabelsAxisTitleFontName());
0495:                setLabelsAxisTitleFontColor(graphChart2DProps
0496:                        .getLabelsAxisTitleFontColor());
0497:                setLabelsAxisTitleFontStyle(graphChart2DProps
0498:                        .getLabelsAxisTitleFontStyle());
0499:                setLabelsAxisTitleBetweenRestGapExistence(graphChart2DProps
0500:                        .getLabelsAxisTitleBetweenRestGapExistence());
0501:                setLabelsAxisTitleBetweenRestGapThicknessModel(graphChart2DProps
0502:                        .getLabelsAxisTitleBetweenRestGapThicknessModel());
0503:                setLabelsAxisTicksExistence(graphChart2DProps
0504:                        .getLabelsAxisTicksExistence());
0505:                setLabelsAxisTicksSizeModel(new Dimension(graphChart2DProps
0506:                        .getLabelsAxisTicksSizeModel()));
0507:                setLabelsAxisTicksColor(graphChart2DProps
0508:                        .getLabelsAxisTicksColor());
0509:                setLabelsAxisTicksOutlineExistence(graphChart2DProps
0510:                        .getLabelsAxisTicksOutlineExistence());
0511:                setLabelsAxisTicksOutlineColor(graphChart2DProps
0512:                        .getLabelsAxisTicksOutlineColor());
0513:                setLabelsAxisLabelsFontPointModel(graphChart2DProps
0514:                        .getLabelsAxisLabelsFontPointModel());
0515:                setLabelsAxisLabelsFontName(graphChart2DProps
0516:                        .getLabelsAxisLabelsFontName());
0517:                setLabelsAxisLabelsFontColor(graphChart2DProps
0518:                        .getLabelsAxisLabelsFontColor());
0519:                setLabelsAxisLabelsFontStyle(graphChart2DProps
0520:                        .getLabelsAxisLabelsFontStyle());
0521:                setLabelsAxisBetweenLabelsOrTicksGapExistence(graphChart2DProps
0522:                        .getLabelsAxisBetweenLabelsOrTicksGapExistence());
0523:                setLabelsAxisBetweenLabelsOrTicksGapThicknessModel(graphChart2DProps
0524:                        .getLabelsAxisBetweenLabelsOrTicksGapThicknessModel());
0525:                setLabelsAxisBetweenLabelsAndTicksGapExistence(graphChart2DProps
0526:                        .getLabelsAxisBetweenLabelsAndTicksGapExistence());
0527:                setLabelsAxisBetweenLabelsAndTicksGapThicknessModel(graphChart2DProps
0528:                        .getLabelsAxisBetweenLabelsAndTicksGapThicknessModel());
0529:                setNumbersAxisTitleExistence(graphChart2DProps
0530:                        .getNumbersAxisTitleExistence());
0531:                setNumbersAxisTitleText(graphChart2DProps
0532:                        .getNumbersAxisTitleText());
0533:                setNumbersAxisTitleFontPointModel(graphChart2DProps
0534:                        .getNumbersAxisTitleFontPointModel());
0535:                setNumbersAxisTitleFontName(graphChart2DProps
0536:                        .getNumbersAxisTitleFontName());
0537:                setNumbersAxisTitleFontColor(graphChart2DProps
0538:                        .getNumbersAxisTitleFontColor());
0539:                setNumbersAxisTitleFontStyle(graphChart2DProps
0540:                        .getNumbersAxisTitleFontStyle());
0541:                setNumbersAxisTitleBetweenRestGapExistence(graphChart2DProps
0542:                        .getNumbersAxisTitleBetweenRestGapExistence());
0543:                setNumbersAxisTitleBetweenRestGapThicknessModel(graphChart2DProps
0544:                        .getNumbersAxisTitleBetweenRestGapThicknessModel());
0545:                setNumbersAxisTicksExistence(graphChart2DProps
0546:                        .getNumbersAxisTicksExistence());
0547:                setNumbersAxisTicksSizeModel(new Dimension(graphChart2DProps
0548:                        .getNumbersAxisTicksSizeModel()));
0549:                setNumbersAxisTicksColor(graphChart2DProps
0550:                        .getNumbersAxisTicksColor());
0551:                setNumbersAxisTicksOutlineExistence(graphChart2DProps
0552:                        .getNumbersAxisTicksOutlineExistence());
0553:                setNumbersAxisTicksOutlineColor(graphChart2DProps
0554:                        .getNumbersAxisTicksOutlineColor());
0555:                setNumbersAxisLabelsFontPointModel(graphChart2DProps
0556:                        .getNumbersAxisLabelsFontPointModel());
0557:                setNumbersAxisLabelsFontName(graphChart2DProps
0558:                        .getNumbersAxisLabelsFontName());
0559:                setNumbersAxisLabelsFontColor(graphChart2DProps
0560:                        .getNumbersAxisLabelsFontColor());
0561:                setNumbersAxisLabelsFontStyle(graphChart2DProps
0562:                        .getNumbersAxisLabelsFontStyle());
0563:                setNumbersAxisBetweenLabelsOrTicksGapExistence(graphChart2DProps
0564:                        .getNumbersAxisBetweenLabelsOrTicksGapExistence());
0565:                setNumbersAxisBetweenLabelsOrTicksGapThicknessModel(graphChart2DProps
0566:                        .getNumbersAxisBetweenLabelsOrTicksGapThicknessModel());
0567:                setNumbersAxisBetweenLabelsAndTicksGapExistence(graphChart2DProps
0568:                        .getNumbersAxisBetweenLabelsAndTicksGapExistence());
0569:                setNumbersAxisBetweenLabelsAndTicksGapThicknessModel(graphChart2DProps
0570:                        .getNumbersAxisBetweenLabelsAndTicksGapThicknessModel());
0571:                setGraphComponentsColoringByCat(graphChart2DProps
0572:                        .getGraphComponentsColoringByCat());
0573:            }
0574:
0575:            /**
0576:             * Sets whether the true greatest value in the data sets will be
0577:             * substituted by the custom value.
0578:             * This effects the range of the labels of the numbers axis.
0579:             * @param customize If true, the greatest value of the data will be
0580:             * customized.
0581:             */
0582:            public final void setChartDatasetCustomizeGreatestValue(
0583:                    boolean customize) {
0584:
0585:                needsUpdate = true;
0586:                chartDatasetCustomizeGreatestValue = customize;
0587:            }
0588:
0589:            /**
0590:             * Sets the custom greatest value of the data sets.  This value must be
0591:             * greater than or equal to the true greatest value of the data sets for it
0592:             * to be used.
0593:             * This effects the scale of the labels of the numbers axis.
0594:             * @param value The custom greatest value of the data sets.
0595:             */
0596:            public final void setChartDatasetCustomGreatestValue(float value) {
0597:
0598:                needsUpdate = true;
0599:                chartDatasetCustomGreatestValue = value;
0600:            }
0601:
0602:            /**
0603:             * Sets whether the true least value in the data sets will be
0604:             * substituted by the custom value.
0605:             * This effects the range of the labels of the numbers axis.
0606:             * @param customize If true, the least value of the data will be
0607:             * customized.
0608:             */
0609:            public final void setChartDatasetCustomizeLeastValue(
0610:                    boolean customize) {
0611:
0612:                needsUpdate = true;
0613:                chartDatasetCustomizeLeastValue = customize;
0614:            }
0615:
0616:            /**
0617:             * Sets the custom least value of the data sets.  This value must be
0618:             * less than or equal to the true least value of the data sets for it
0619:             * to be used.
0620:             * This effects the scale of the labels of the numbers axis.
0621:             * @param value The custom least value of the data sets.
0622:             */
0623:            public final void setChartDatasetCustomLeastValue(float value) {
0624:
0625:                needsUpdate = true;
0626:                chartDatasetCustomLeastValue = value;
0627:            }
0628:
0629:            /**
0630:             * Sets how much of the chart's graph is used by the graph's components.
0631:             * This value must be: 0f <= value <= 1f.
0632:             * This effects the scale of the labels of the numbers axis.
0633:             * @param ratio The ratio of usable to available of the graph.
0634:             */
0635:            public final void setChartGraphableToAvailableRatio(float ratio) {
0636:
0637:                needsUpdate = true;
0638:                chartGraphableToAvailableRatio = ratio;
0639:            }
0640:
0641:            /**
0642:             * Sets the existence of the labels axis.  If existence is false, then the labels axis won't
0643:             * be painted and the axis' texts won't need to be set.
0644:             * @param existence If true, then exists.
0645:             */
0646:            public final void setLabelsAxisExistence(boolean existence) {
0647:
0648:                needsUpdate = true;
0649:                labelsAxisExistence = existence;
0650:            }
0651:
0652:            /**
0653:             * Sets the placement of the ticks on the labels axis.  The ticks may
0654:             * be either between the labels axis labels (ie for bar charts) or centered
0655:             * on each labels axis label (ie for other charts).
0656:             * The possible values are BETWEEN and CENTERED.
0657:             * @param alignment The alignment of the labels axis ticks.
0658:             */
0659:            public final void setLabelsAxisTicksAlignment(int alignment) {
0660:
0661:                needsUpdate = true;
0662:                labelsAxisTicksAlignment = alignment;
0663:            }
0664:
0665:            /**
0666:             * Sets the text of each labels axis label.  This determines how many
0667:             * categories the data in the data sets are split into.
0668:             * @param texts The texts of the labels axis labels.
0669:             */
0670:            public final void setLabelsAxisLabelsTexts(String[] texts) {
0671:
0672:                needsUpdate = true;
0673:                labelsAxisLabelsTexts = texts;
0674:            }
0675:
0676:            /**
0677:             * Sets whether the title of the labels axis exists.
0678:             * @param existence If true, the title exists.
0679:             */
0680:            public final void setLabelsAxisTitleExistence(boolean existence) {
0681:
0682:                needsUpdate = true;
0683:                labelsAxisTitleExistence = existence;
0684:            }
0685:
0686:            /**
0687:             * Sets the text of the title of the labels axis.
0688:             * @param text The title of the labels axis.
0689:             */
0690:            public final void setLabelsAxisTitleText(String text) {
0691:
0692:                needsUpdate = true;
0693:                labelsAxisTitleText = text;
0694:            }
0695:
0696:            /**
0697:             * Sets the font point of the labels axis title for the chart's model
0698:             * size.
0699:             * @param point The model font point of the labels axis title.
0700:             */
0701:            public final void setLabelsAxisTitleFontPointModel(int point) {
0702:
0703:                needsUpdate = true;
0704:                labelsAxisTitleFontPointModel = point;
0705:            }
0706:
0707:            /**
0708:             * Sets the name of the font of the labels axis title.
0709:             * Accepts standard font names.
0710:             * @param name The name of the font of the labels axis title.
0711:             */
0712:            public final void setLabelsAxisTitleFontName(String name) {
0713:
0714:                needsUpdate = true;
0715:                labelsAxisTitleFontName = name;
0716:            }
0717:
0718:            /**
0719:             * Sets the color of the font of the labels axis title.
0720:             * @param color The color of the font of the labels axis title.
0721:             */
0722:            public final void setLabelsAxisTitleFontColor(Color color) {
0723:
0724:                needsUpdate = true;
0725:                labelsAxisTitleFontColor = color;
0726:            }
0727:
0728:            /**
0729:             * Sets the style of teh font of the labels axis title.
0730:             * Accepts standard values for font styles.
0731:             * @param style The style of the font of the labels axis title.
0732:             */
0733:            public final void setLabelsAxisTitleFontStyle(int style) {
0734:
0735:                needsUpdate = true;
0736:                labelsAxisTitleFontStyle = style;
0737:            }
0738:
0739:            /**
0740:             * Sets whether the gap above the labels axis title exists.
0741:             * @param existence If true, the gap exists.
0742:             */
0743:            public final void setLabelsAxisTitleBetweenRestGapExistence(
0744:                    boolean existence) {
0745:
0746:                needsUpdate = true;
0747:                labelsAxisTitleBetweenRestGapExistence = existence;
0748:            }
0749:
0750:            /**
0751:             * Sets the thickness of the gap above the labels axis title for the
0752:             * chart's model size.
0753:             * @param thickness The model thickness of the gap.
0754:             */
0755:            public final void setLabelsAxisTitleBetweenRestGapThicknessModel(
0756:                    int thickness) {
0757:
0758:                needsUpdate = true;
0759:                labelsAxisTitleBetweenRestGapThicknessModel = thickness;
0760:            }
0761:
0762:            /**
0763:             * Sets whether there exists ticks along the labels axis.
0764:             * @param existence If true, then they exist.
0765:             */
0766:            public final void setLabelsAxisTicksExistence(boolean existence) {
0767:
0768:                needsUpdate = true;
0769:                labelsAxisTicksExistence = existence;
0770:            }
0771:
0772:            /**
0773:             * Sets the size of the labels axis ticks for the chart's model size.
0774:             * @param size The model size of the labels axis ticks.
0775:             */
0776:            public final void setLabelsAxisTicksSizeModel(Dimension size) {
0777:
0778:                needsUpdate = true;
0779:                labelsAxisTicksSizeModel = size;
0780:            }
0781:
0782:            /**
0783:             * Sets the color of the labels axis ticks.
0784:             * @param color The color of the labels axis ticks.
0785:             */
0786:            public final void setLabelsAxisTicksColor(Color color) {
0787:
0788:                needsUpdate = true;
0789:                labelsAxisTicksColor = color;
0790:            }
0791:
0792:            /**
0793:             * Sets whether a thin line outlines the labels axis ticks.
0794:             * @param existence If true, then a thin outline exists.
0795:             */
0796:            public final void setLabelsAxisTicksOutlineExistence(
0797:                    boolean existence) {
0798:
0799:                needsUpdate = true;
0800:                labelsAxisTicksOutlineExistence = existence;
0801:            }
0802:
0803:            /**
0804:             * Sets the color of the thin line that outlines the labels axis ticks.
0805:             * @param color The color of the line that outlines the labels axis ticks.
0806:             */
0807:            public final void setLabelsAxisTicksOutlineColor(Color color) {
0808:
0809:                needsUpdate = true;
0810:                labelsAxisTicksOutlineColor = color;
0811:            }
0812:
0813:            /**
0814:             * Sets the point of the font of the labels axis labels for the chart's
0815:             * model size.
0816:             * @param point The model font point of the labels axis labels.
0817:             */
0818:            public final void setLabelsAxisLabelsFontPointModel(int point) {
0819:
0820:                needsUpdate = true;
0821:                labelsAxisLabelsFontPointModel = point;
0822:            }
0823:
0824:            /**
0825:             * Sets the name of the font of the labels of the labels axis.
0826:             * Accepts standard font names.
0827:             * @param name The name of the font.
0828:             */
0829:            public final void setLabelsAxisLabelsFontName(String name) {
0830:
0831:                needsUpdate = true;
0832:                labelsAxisLabelsFontName = name;
0833:            }
0834:
0835:            /**
0836:             * Sets the color of the font of the labels of the labels axis.
0837:             * @param color The color of the font.
0838:             */
0839:            public final void setLabelsAxisLabelsFontColor(Color color) {
0840:
0841:                needsUpdate = true;
0842:                labelsAxisLabelsFontColor = color;
0843:            }
0844:
0845:            /**
0846:             * Sets the style of the font of the labels axis labels.
0847:             * Accepts standard font styles.
0848:             * @param style The style of the font.
0849:             */
0850:            public final void setLabelsAxisLabelsFontStyle(int style) {
0851:
0852:                needsUpdate = true;
0853:                labelsAxisLabelsFontStyle = style;
0854:            }
0855:
0856:            /**
0857:             * Sets whether a gap between the labels or ticks exists, across.
0858:             * The gap will be applied to whichever are naturally closer.
0859:             * @param existence If true, the gap exists.
0860:             */
0861:            public final void setLabelsAxisBetweenLabelsOrTicksGapExistence(
0862:                    boolean existence) {
0863:
0864:                needsUpdate = true;
0865:                labelsAxisBetweenLabelsOrTicksGapExistence = existence;
0866:            }
0867:
0868:            /**
0869:             * Sets the thickness of the gap between the labels or ticks,
0870:             * across, for the chart's model size.  The gap will be applied to
0871:             * whichever are naturally closer.
0872:             * @param thicknss The model thickness of the gap.
0873:             */
0874:            public final void setLabelsAxisBetweenLabelsOrTicksGapThicknessModel(
0875:                    int thickness) {
0876:
0877:                needsUpdate = true;
0878:                labelsAxisBetweenLabelsOrTicksGapThicknessModel = thickness;
0879:            }
0880:
0881:            /**
0882:             * Sets whether a gap between the labels and ticks exists, between.
0883:             * @param existence If true, the gap exists.
0884:             */
0885:            public final void setLabelsAxisBetweenLabelsAndTicksGapExistence(
0886:                    boolean existence) {
0887:
0888:                needsUpdate = true;
0889:                labelsAxisBetweenLabelsAndTicksGapExistence = existence;
0890:            }
0891:
0892:            /**
0893:             * Sets the thickness of the gap between the labels and ticks,
0894:             * between, for the chart's model size.
0895:             * @param thickness The model thickness of the gap.
0896:             */
0897:            public final void setLabelsAxisBetweenLabelsAndTicksGapThicknessModel(
0898:                    int thickness) {
0899:
0900:                needsUpdate = true;
0901:                labelsAxisBetweenLabelsAndTicksGapThicknessModel = thickness;
0902:            }
0903:
0904:            /**
0905:             * Sets whether the title of the numbers axis exists.
0906:             * @param existence If true, the title exists.
0907:             */
0908:            public final void setNumbersAxisTitleExistence(boolean existence) {
0909:
0910:                needsUpdate = true;
0911:                numbersAxisTitleExistence = existence;
0912:            }
0913:
0914:            /**
0915:             * Sets the text of the title of the numbers axis.
0916:             * @param text The title of the numbers axis.
0917:             */
0918:            public final void setNumbersAxisTitleText(String text) {
0919:
0920:                needsUpdate = true;
0921:                numbersAxisTitleText = text;
0922:            }
0923:
0924:            /**
0925:             * Sets the font point of the numbers axis title for the chart's model
0926:             * size.
0927:             * @param point The model font point of the numbers axis title.
0928:             */
0929:            public final void setNumbersAxisTitleFontPointModel(int point) {
0930:
0931:                needsUpdate = true;
0932:                numbersAxisTitleFontPointModel = point;
0933:            }
0934:
0935:            /**
0936:             * Sets the name of the font of the numbers axis title.
0937:             * Accepts standard font names.
0938:             * @param name The name of the font of the numbers axis title.
0939:             */
0940:            public final void setNumbersAxisTitleFontName(String name) {
0941:
0942:                needsUpdate = true;
0943:                numbersAxisTitleFontName = name;
0944:            }
0945:
0946:            /**
0947:             * Sets the color of the font of the numbers axis title.
0948:             * @param color The color of the font of the numbers axis title.
0949:             */
0950:            public final void setNumbersAxisTitleFontColor(Color color) {
0951:
0952:                needsUpdate = true;
0953:                numbersAxisTitleFontColor = color;
0954:            }
0955:
0956:            /**
0957:             * Sets the style of teh font of the numbers axis title.
0958:             * Accepts standard values for font styles.
0959:             * @param style The style of the font of the numbers axis title.
0960:             */
0961:            public final void setNumbersAxisTitleFontStyle(int style) {
0962:
0963:                needsUpdate = true;
0964:                numbersAxisTitleFontStyle = style;
0965:            }
0966:
0967:            /**
0968:             * Sets whether the gap right of the numbers axis title exists.
0969:             * @param existence If true, the gap exists.
0970:             */
0971:            public final void setNumbersAxisTitleBetweenRestGapExistence(
0972:                    boolean existence) {
0973:
0974:                needsUpdate = true;
0975:                numbersAxisTitleBetweenRestGapExistence = existence;
0976:            }
0977:
0978:            /**
0979:             * Sets the thickness of the gap right of the numbers axis title for the
0980:             * chart's model size.
0981:             * @param thickness The model thickness of the gap.
0982:             */
0983:            public final void setNumbersAxisTitleBetweenRestGapThicknessModel(
0984:                    int thickness) {
0985:
0986:                needsUpdate = true;
0987:                numbersAxisTitleBetweenRestGapThicknessModel = thickness;
0988:            }
0989:
0990:            /**
0991:             * Sets whether there exists ticks along the numbers axis.
0992:             * @param existence If true, then they exist.
0993:             */
0994:            public final void setNumbersAxisTicksExistence(boolean existence) {
0995:
0996:                needsUpdate = true;
0997:                numbersAxisTicksExistence = existence;
0998:            }
0999:
1000:            /**
1001:             * Sets the size of the numbers axis ticks for the chart's model size.
1002:             * @param size The model size of the numbers axis ticks.
1003:             */
1004:            public final void setNumbersAxisTicksSizeModel(Dimension size) {
1005:
1006:                needsUpdate = true;
1007:                numbersAxisTicksSizeModel = size;
1008:            }
1009:
1010:            /**
1011:             * Sets the color of the numbers axis ticks.
1012:             * @param color The color of the numbers axis ticks.
1013:             */
1014:            public final void setNumbersAxisTicksColor(Color color) {
1015:
1016:                needsUpdate = true;
1017:                numbersAxisTicksColor = color;
1018:            }
1019:
1020:            /**
1021:             * Sets whether a thin line outlines the numbers axis ticks.
1022:             * @param existence If true, then a thin outline exists.
1023:             */
1024:            public final void setNumbersAxisTicksOutlineExistence(
1025:                    boolean existence) {
1026:
1027:                needsUpdate = true;
1028:                numbersAxisTicksOutlineExistence = existence;
1029:            }
1030:
1031:            /**
1032:             * Sets the color of the thin line that outlines the numbers axis ticks.
1033:             * @param color The color of the line that outliens the numbers axis ticks.
1034:             */
1035:            public final void setNumbersAxisTicksOutlineColor(Color color) {
1036:
1037:                needsUpdate = true;
1038:                numbersAxisTicksOutlineColor = color;
1039:            }
1040:
1041:            /**
1042:             * Sets the number of labels in the numbers axis.
1043:             * @param num The number of labels in the numbers axis.
1044:             */
1045:            public final void setNumbersAxisNumLabels(int num) {
1046:
1047:                needsUpdate = true;
1048:                numbersAxisNumLabels = num;
1049:            }
1050:
1051:            /**
1052:             * Sets the point of the font of the numbers axis labels for the chart's
1053:             * model size.
1054:             * @param point The model font point of the numbers axis labels.
1055:             */
1056:            public final void setNumbersAxisLabelsFontPointModel(int point) {
1057:
1058:                needsUpdate = true;
1059:                numbersAxisLabelsFontPointModel = point;
1060:            }
1061:
1062:            /**
1063:             * Sets the name of the font of the labels of the numbers axis.
1064:             * Accepts standard font names.
1065:             * @param name The name of the font.
1066:             */
1067:            public final void setNumbersAxisLabelsFontName(String name) {
1068:
1069:                needsUpdate = true;
1070:                numbersAxisLabelsFontName = name;
1071:            }
1072:
1073:            /**
1074:             * Sets the color of the font of the labels of the numbers axis.
1075:             * @param color The color of the font.
1076:             */
1077:            public final void setNumbersAxisLabelsFontColor(Color color) {
1078:
1079:                needsUpdate = true;
1080:                numbersAxisLabelsFontColor = color;
1081:            }
1082:
1083:            /**
1084:             * Sets the style of the font of the numbers axis labels.
1085:             * Accepts standard font styles.
1086:             * @param style The style of the font.
1087:             */
1088:            public final void setNumbersAxisLabelsFontStyle(int style) {
1089:
1090:                needsUpdate = true;
1091:                numbersAxisLabelsFontStyle = style;
1092:            }
1093:
1094:            /**
1095:             * Sets whether a gap between the labels or ticks exists, vertically.
1096:             * The gap will be applied to whichever are naturally closer.
1097:             * @param existence If true, the gap exists.
1098:             */
1099:            public final void setNumbersAxisBetweenLabelsOrTicksGapExistence(
1100:                    boolean existence) {
1101:
1102:                needsUpdate = true;
1103:                numbersAxisBetweenLabelsOrTicksGapExistence = existence;
1104:            }
1105:
1106:            /**
1107:             * Sets the thickness of the gap between the labels or ticks,
1108:             * vertically, for the chart's model size.  The gap will be applied to
1109:             * whichever are naturally closer.
1110:             * @param thicknss The model thickness of the gap.
1111:             */
1112:            public final void setNumbersAxisBetweenLabelsOrTicksGapThicknessModel(
1113:                    int thickness) {
1114:
1115:                needsUpdate = true;
1116:                numbersAxisBetweenLabelsOrTicksGapThicknessModel = thickness;
1117:            }
1118:
1119:            /**
1120:             * Sets whether a gap between the labels and ticks exists,
1121:             * horizontally.
1122:             * @param existence If true, the gap exists.
1123:             */
1124:            public final void setNumbersAxisBetweenLabelsAndTicksGapExistence(
1125:                    boolean existence) {
1126:
1127:                needsUpdate = true;
1128:                numbersAxisBetweenLabelsAndTicksGapExistence = existence;
1129:            }
1130:
1131:            /**
1132:             * Sets the thickness of the gap between the labels and ticks,
1133:             * horizontally, for the chart's model size.
1134:             * @param thickness The model thickness of the gap.
1135:             */
1136:            public final void setNumbersAxisBetweenLabelsAndTicksGapThicknessModel(
1137:                    int thickness) {
1138:
1139:                needsUpdate = true;
1140:                numbersAxisBetweenLabelsAndTicksGapThicknessModel = thickness;
1141:            }
1142:
1143:            /**
1144:             * Sets whether the graph components have different colors across sets (or across cats).
1145:             * @param b If true, then colors across sets.
1146:             */
1147:            public final void setGraphComponentsColoringByCat(boolean b) {
1148:
1149:                needsUpdate = true;
1150:                graphComponentsColoringByCat = b;
1151:            }
1152:
1153:            /**
1154:             * Sets the color properties for the colors by cat coloring.
1155:             * @param props The properties of the colors by cat coloring.
1156:             */
1157:            public final void setGraphComponentsColorsByCat(
1158:                    MultiColorsProperties props) {
1159:
1160:                needsUpdate = true;
1161:                for (int i = 0; i < graphChart2DVector.size(); ++i) {
1162:
1163:                    if (graphComponentsColorsByCat != null) {
1164:                        graphComponentsColorsByCat
1165:                                .removeObject2D((GraphChart2D) graphChart2DVector
1166:                                        .get(i));
1167:                    }
1168:                    if (props != null)
1169:                        props.addObject2D((GraphChart2D) graphChart2DVector
1170:                                .get(i));
1171:                }
1172:                graphComponentsColorsByCat = props;
1173:            }
1174:
1175:            /**
1176:             * Gets whether the true greatest value in the data sets will be
1177:             * substituted by the custom value.
1178:             * This effects the range of the labels of the numbers axis.
1179:             * @return boolean If true, the greatest value of the data will be
1180:             * customized.
1181:             */
1182:            public final boolean getChartDatasetCustomizeGreatestValue() {
1183:                return chartDatasetCustomizeGreatestValue;
1184:            }
1185:
1186:            /**
1187:             * Gets the custom greatest value of the data sets.  This value must be
1188:             * greater than or equal to the true greatest value of the data sets for it
1189:             * to be used.
1190:             * This effects the scale of the labels of the numbers axis.
1191:             * @return float The custom greatest value of the data sets.
1192:             */
1193:            public final float getChartDatasetCustomGreatestValue() {
1194:                return chartDatasetCustomGreatestValue;
1195:            }
1196:
1197:            /**
1198:             * Gets whether the true least value in the data sets will be
1199:             * substituted by the custom value.
1200:             * This effects the range of the labels of the numbers axis.
1201:             * @return boolean If true, the least value of the data will be
1202:             * customized.
1203:             */
1204:            public final boolean getChartDatasetCustomizeLeastValue() {
1205:                return chartDatasetCustomizeLeastValue;
1206:            }
1207:
1208:            /**
1209:             * Gets the custom least value of the data sets.  This value must be
1210:             * less than or equal to the true least value of the data sets for it
1211:             * to be used.
1212:             * This effects the scale of the labels of the numbers axis.
1213:             * @return float The custom least value of the data sets.
1214:             */
1215:            public final float getChartDatasetCustomLeastValue() {
1216:                return chartDatasetCustomLeastValue;
1217:            }
1218:
1219:            /**
1220:             * Gets how much of the chart's graph is used by the graph's components.
1221:             * This value must be: 0f <= value <= 1f.
1222:             * This effects the scale of the labels of the numbers axis.
1223:             * @return float The ratio of usable to available of the graph.
1224:             */
1225:            public float getChartGraphableToAvailableRatio() {
1226:                return chartGraphableToAvailableRatio;
1227:            }
1228:
1229:            /**
1230:             * Gets the existence of the labels axis.  If existence is false, then the labels axis won't
1231:             * be painted and the axis' texts won't need to be set.
1232:             * @return If true, then exists.
1233:             */
1234:            public final boolean getLabelsAxisExistence() {
1235:                return labelsAxisExistence;
1236:            }
1237:
1238:            /**
1239:             * Gets the placement of the ticks on the labels axis.  The ticks may
1240:             * be either between the labels axis labels (ie for bar charts) or centered
1241:             * on each labels axis label (ie for other charts).
1242:             * The possible values are BETWEEN and CENTERED.
1243:             * @return int The alignment of the labels axis ticks.
1244:             */
1245:            public final int getLabelsAxisTicksAlignment() {
1246:                return labelsAxisTicksAlignment;
1247:            }
1248:
1249:            /**
1250:             * Gets the text of each labels axis label.  This determines how many
1251:             * categories the data in the data sets are split into.
1252:             * @return String[] The texts of the labels axis labels.
1253:             */
1254:            public final String[] getLabelsAxisLabelsTexts() {
1255:                return labelsAxisLabelsTexts;
1256:            }
1257:
1258:            /**
1259:             * Gets whether the title of the labels axis exists.
1260:             * @return boolean If true, the title exists.
1261:             */
1262:            public final boolean getLabelsAxisTitleExistence() {
1263:                return labelsAxisTitleExistence;
1264:            }
1265:
1266:            /**
1267:             * Gets the text of the title of the labels axis.
1268:             * @return String The title of the labels axis.
1269:             */
1270:            public final String getLabelsAxisTitleText() {
1271:                return labelsAxisTitleText;
1272:            }
1273:
1274:            /**
1275:             * Gets the font point of the labels axis title for the chart's model size.
1276:             * @return int The model font point of the labels axis title.
1277:             */
1278:            public final int getLabelsAxisTitleFontPointModel() {
1279:                return labelsAxisTitleFontPointModel;
1280:            }
1281:
1282:            /**
1283:             * Gets the name of the font of the labels axis title.
1284:             * Accepts standard font names.
1285:             * @return String The name of the font of the labels axis title.
1286:             */
1287:            public final String getLabelsAxisTitleFontName() {
1288:                return labelsAxisTitleFontName;
1289:            }
1290:
1291:            /**
1292:             * Gets the color of the font of the labels axis title.
1293:             * @return Color The color of the font of the labels axis title.
1294:             */
1295:            public final Color getLabelsAxisTitleFontColor() {
1296:                return labelsAxisTitleFontColor;
1297:            }
1298:
1299:            /**
1300:             * Gets the style of teh font of the labels axis title.
1301:             * Accepts standard values for font styles.
1302:             * @return int The style of the font of the labels axis title.
1303:             */
1304:            public final int getLabelsAxisTitleFontStyle() {
1305:                return labelsAxisTitleFontStyle;
1306:            }
1307:
1308:            /**
1309:             * Gets whether the gap above the labels axis title exists.
1310:             * @return boolean If true, the gap exists.
1311:             */
1312:            public final boolean getLabelsAxisTitleBetweenRestGapExistence() {
1313:                return labelsAxisTitleBetweenRestGapExistence;
1314:            }
1315:
1316:            /**
1317:             * Gets the thickness of the gap above the labels axis title for the
1318:             * chart's model size.
1319:             * @return int The model thickness of the gap.
1320:             */
1321:            public final int getLabelsAxisTitleBetweenRestGapThicknessModel() {
1322:                return labelsAxisTitleBetweenRestGapThicknessModel;
1323:            }
1324:
1325:            /**
1326:             * Gets whether there exists ticks along the numbers axis.
1327:             * @return If true, then they exist.
1328:             */
1329:            public final boolean getNumbersAxisTicksExistence() {
1330:                return numbersAxisTicksExistence;
1331:            }
1332:
1333:            /**
1334:             * Gets whether there exists ticks along the labels axis.
1335:             * @return If true, then they exist.
1336:             */
1337:            public final boolean getLabelsAxisTicksExistence() {
1338:                return labelsAxisTicksExistence;
1339:            }
1340:
1341:            /**
1342:             * Gets the size of the labels axis ticks for the chart's model size.
1343:             * @return Dimension The model size of the labels axis ticks.
1344:             */
1345:            public final Dimension getLabelsAxisTicksSizeModel() {
1346:                return labelsAxisTicksSizeModel;
1347:            }
1348:
1349:            /**
1350:             * Gets the color of the labels axis ticks.
1351:             * @return Color The color of the labels axis ticks.
1352:             */
1353:            public final Color getLabelsAxisTicksColor() {
1354:                return labelsAxisTicksColor;
1355:            }
1356:
1357:            /**
1358:             * Gets whether a thin line outlines the labels axis ticks.
1359:             * @return boolean If true, then a thin outline exists.
1360:             */
1361:            public final boolean getLabelsAxisTicksOutlineExistence() {
1362:                return labelsAxisTicksOutlineExistence;
1363:            }
1364:
1365:            /**
1366:             * Gets the color of the thin line that outlines the labels axis ticks.
1367:             * @return Color The color of the line that outliens the labels axis ticks.
1368:             */
1369:            public final Color getLabelsAxisTicksOutlineColor() {
1370:                return labelsAxisTicksOutlineColor;
1371:            }
1372:
1373:            /**
1374:             * Gets the point of the font of the labels axis labels for the chart's
1375:             * model size.
1376:             * @return int The model font point of the labels axis labels.
1377:             */
1378:            public final int getLabelsAxisLabelsFontPointModel() {
1379:                return labelsAxisLabelsFontPointModel;
1380:            }
1381:
1382:            /**
1383:             * Gets the name of the font of the labels of the labels axis.
1384:             * Accepts standard font names.
1385:             * @return String The name of the font.
1386:             */
1387:            public final String getLabelsAxisLabelsFontName() {
1388:                return labelsAxisLabelsFontName;
1389:            }
1390:
1391:            /**
1392:             * Gets the color of the font of the labels of the labels axis.
1393:             * @return Color The color of the font.
1394:             */
1395:            public final Color getLabelsAxisLabelsFontColor() {
1396:                return labelsAxisLabelsFontColor;
1397:            }
1398:
1399:            /**
1400:             * Gets the style of the font of the labels axis labels.
1401:             * Accepts standard font styles.
1402:             * @return int The style of the font.
1403:             */
1404:            public final int getLabelsAxisLabelsFontStyle() {
1405:                return labelsAxisLabelsFontStyle;
1406:            }
1407:
1408:            /**
1409:             * Gets whether a gap between the labels or ticks exists, horizontally.
1410:             * The gap will be applied to whichever are naturally closer.
1411:             * @return boolean If true, the gap exists.
1412:             */
1413:            public final boolean getLabelsAxisBetweenLabelsOrTicksGapExistence() {
1414:                return labelsAxisBetweenLabelsOrTicksGapExistence;
1415:            }
1416:
1417:            /**
1418:             * Gets the thickness of the gap between the labels or ticks,
1419:             * horizontally, for the chart's model size.  The gap will be applied to
1420:             * whichever are naturally closer.
1421:             * @return int The model thickness of the gap.
1422:             */
1423:            public final int getLabelsAxisBetweenLabelsOrTicksGapThicknessModel() {
1424:                return labelsAxisBetweenLabelsOrTicksGapThicknessModel;
1425:            }
1426:
1427:            /**
1428:             * Gets whether a gap between the labels and ticks exists, vertically.
1429:             * @return boolean If true, the gap exists.
1430:             */
1431:            public final boolean getLabelsAxisBetweenLabelsAndTicksGapExistence() {
1432:                return labelsAxisBetweenLabelsAndTicksGapExistence;
1433:            }
1434:
1435:            /**
1436:             * Gets the thickness of the gap between the labels and ticks,
1437:             * vertically, for the chart's model size.
1438:             * @return int The model thickness of the gap.
1439:             */
1440:            public final int getLabelsAxisBetweenLabelsAndTicksGapThicknessModel() {
1441:                return labelsAxisBetweenLabelsAndTicksGapThicknessModel;
1442:            }
1443:
1444:            /**
1445:             * Gets whether the title of the numbers axis exists.
1446:             * @return boolean If true, the title exists.
1447:             */
1448:            public final boolean getNumbersAxisTitleExistence() {
1449:                return numbersAxisTitleExistence;
1450:            }
1451:
1452:            /**
1453:             * Gets the text of the title of the numbers axis.
1454:             * @return String The title of the numbers axis.
1455:             */
1456:            public final String getNumbersAxisTitleText() {
1457:                return numbersAxisTitleText;
1458:            }
1459:
1460:            /**
1461:             * Gets the font point of the numbers axis title for the chart's model
1462:             * size.
1463:             * @return int The model font point of the numbers axis title.
1464:             */
1465:            public final int getNumbersAxisTitleFontPointModel() {
1466:                return numbersAxisTitleFontPointModel;
1467:            }
1468:
1469:            /**
1470:             * Gets the name of the font of the numbers axis title.
1471:             * Accepts standard font names.
1472:             * @return String The name of the font of the numbers axis title.
1473:             */
1474:            public final String getNumbersAxisTitleFontName() {
1475:                return numbersAxisTitleFontName;
1476:            }
1477:
1478:            /**
1479:             * Gets the color of the font of the numbers axis title.
1480:             * @return Color The color of the font of the numbers axis title.
1481:             */
1482:            public final Color getNumbersAxisTitleFontColor() {
1483:                return numbersAxisTitleFontColor;
1484:            }
1485:
1486:            /**
1487:             * Gets the style of teh font of the numbers axis title.
1488:             * Accepts standard values for font styles.
1489:             * @return int The style of the font of the numbers axis title.
1490:             */
1491:            public final int getNumbersAxisTitleFontStyle() {
1492:                return numbersAxisTitleFontStyle;
1493:            }
1494:
1495:            /**
1496:             * Gets whether the gap right of the numbers axis title exists.
1497:             * @return boolean If true, the gap exists.
1498:             */
1499:            public final boolean getNumbersAxisTitleBetweenRestGapExistence() {
1500:                return numbersAxisTitleBetweenRestGapExistence;
1501:            }
1502:
1503:            /**
1504:             * Gets the thickness of the gap right of the numbers axis title for the
1505:             * chart's model size.
1506:             * @return int The model thickness of the gap.
1507:             */
1508:            public final int getNumbersAxisTitleBetweenRestGapThicknessModel() {
1509:                return numbersAxisTitleBetweenRestGapThicknessModel;
1510:            }
1511:
1512:            /**
1513:             * Gets the size of the numbers axis ticks for the chart's model size.
1514:             * @return Dimension The model size of the numbers axis ticks.
1515:             */
1516:            public final Dimension getNumbersAxisTicksSizeModel() {
1517:                return numbersAxisTicksSizeModel;
1518:            }
1519:
1520:            /**
1521:             * Gets the color of the numbers axis ticks.
1522:             * @return Color The color of the numbers axis ticks.
1523:             */
1524:            public final Color getNumbersAxisTicksColor() {
1525:                return numbersAxisTicksColor;
1526:            }
1527:
1528:            /**
1529:             * Gets whether a thin line outlines the numbers axis ticks.
1530:             * @return boolean If true, then a thin outline exists.
1531:             */
1532:            public final boolean getNumbersAxisTicksOutlineExistence() {
1533:                return numbersAxisTicksOutlineExistence;
1534:            }
1535:
1536:            /**
1537:             * Gets the color of the thin line that outlines the numbers axis ticks.
1538:             * @return Color The color of the thin line that outliens the numbers axis
1539:             * ticks.
1540:             */
1541:            public final Color getNumbersAxisTicksOutlineColor() {
1542:                return numbersAxisTicksOutlineColor;
1543:            }
1544:
1545:            /**
1546:             * Gets the number of labels in the numbers axis.
1547:             * @return int The number of labels in the numbers axis.
1548:             */
1549:            public final int getNumbersAxisNumLabels() {
1550:                return numbersAxisNumLabels;
1551:            }
1552:
1553:            /**
1554:             * Gets the point of the font of the numbers axis labels for the chart's
1555:             * model size.
1556:             * @return int The model font point of the numbers axis labels.
1557:             */
1558:            public final int getNumbersAxisLabelsFontPointModel() {
1559:                return numbersAxisLabelsFontPointModel;
1560:            }
1561:
1562:            /**
1563:             * Gets the name of the font of the labels of the numbers axis.
1564:             * Accepts standard font names.
1565:             * @return String The name of the font.
1566:             */
1567:            public final String getNumbersAxisLabelsFontName() {
1568:                return numbersAxisLabelsFontName;
1569:            }
1570:
1571:            /**
1572:             * Gets the color of the font of the labels of the numbers axis.
1573:             * @return Color The color of the font.
1574:             */
1575:            public final Color getNumbersAxisLabelsFontColor() {
1576:                return numbersAxisLabelsFontColor;
1577:            }
1578:
1579:            /**
1580:             * Gets the style of the font of the numbers axis labels.
1581:             * Accepts standard font styles.
1582:             * @return int The style of the font.
1583:             */
1584:            public final int getNumbersAxisLabelsFontStyle() {
1585:                return numbersAxisLabelsFontStyle;
1586:            }
1587:
1588:            /**
1589:             * Gets whether a gap between the labels or ticks exists, vertically.
1590:             * The gap will be applied to whichever are naturally closer.
1591:             * @return boolean If true, the gap exists.
1592:             */
1593:            public final boolean getNumbersAxisBetweenLabelsOrTicksGapExistence() {
1594:                return numbersAxisBetweenLabelsOrTicksGapExistence;
1595:            }
1596:
1597:            /**
1598:             * Gets the thickness of the gap between the labels or ticks,
1599:             * vertically, for the chart's model size.  The gap will be applied to
1600:             * whichever are naturally closer.
1601:             * @return int The model thickness of the gap.
1602:             */
1603:            public final int getNumbersAxisBetweenLabelsOrTicksGapThicknessModel() {
1604:                return numbersAxisBetweenLabelsOrTicksGapThicknessModel;
1605:            }
1606:
1607:            /**
1608:             * Gets whether a gap between the labels and ticks exists,
1609:             * horizontally.
1610:             * @return boolean If true, the gap exists.
1611:             */
1612:            public final boolean getNumbersAxisBetweenLabelsAndTicksGapExistence() {
1613:                return numbersAxisBetweenLabelsAndTicksGapExistence;
1614:            }
1615:
1616:            /**
1617:             * Gets the thickness of the gap between the labels and ticks,
1618:             * horizontally, for the chart's model size.
1619:             * @return int The model thickness of the gap.
1620:             */
1621:            public final int getNumbersAxisBetweenLabelsAndTicksGapThicknessModel() {
1622:                return numbersAxisBetweenLabelsAndTicksGapThicknessModel;
1623:            }
1624:
1625:            /**
1626:             * Gets whether the graph components have different colors across sets (or across cats).
1627:             * @return If true, then colors across sets.
1628:             */
1629:            public final boolean getGraphComponentsColoringByCat() {
1630:                return graphComponentsColoringByCat;
1631:            }
1632:
1633:            /**
1634:             * Sets the color properties for the colors by cat coloring.
1635:             * @return The properties of the colors by cat coloring.
1636:             */
1637:            public final MultiColorsProperties getGraphComponentsColorsByCat() {
1638:                return graphComponentsColorsByCat;
1639:            }
1640:
1641:            /**
1642:             * Gets whether this object needs to be updated with new properties.
1643:             * @param graphChart2D The object that may need to be updated.
1644:             * @return If true then needs update.
1645:             */
1646:            final boolean getGraphChart2DNeedsUpdate(GraphChart2D graphChart2D) {
1647:
1648:                if (needsUpdate)
1649:                    return true;
1650:
1651:                if (graphComponentsColoringByCat
1652:                        && graphComponentsColorsByCat
1653:                                .getObject2DNeedsUpdate(graphChart2D))
1654:                    return true;
1655:                int index = -1;
1656:
1657:                if ((index = graphChart2DVector.indexOf(graphChart2D)) != -1) {
1658:                    return ((Boolean) needsUpdateVector.get(index))
1659:                            .booleanValue();
1660:                }
1661:                return false;
1662:            }
1663:
1664:            /**
1665:             * Adds a GraphChart2D to the set of objects using these properties.
1666:             * @param graphChart2D The object to add.
1667:             */
1668:            final void addGraphChart2D(GraphChart2D graphChart2D) {
1669:
1670:                if (!graphChart2DVector.contains(graphChart2D)) {
1671:                    if (graphComponentsColorsByCat != null)
1672:                        graphComponentsColorsByCat.addObject2D(graphChart2D);
1673:                    graphChart2DVector.add(graphChart2D);
1674:                    needsUpdateVector.add(new Boolean(true));
1675:                }
1676:            }
1677:
1678:            /**
1679:             * Removes a GraphChart2D from the set of objects using these properties.
1680:             * @param graphChart2D The object to remove.
1681:             */
1682:            final void removeGraphChart2D(GraphChart2D graphChart2D) {
1683:
1684:                int index = -1;
1685:                if ((index = graphChart2DVector.indexOf(graphChart2D)) != -1) {
1686:                    if (graphComponentsColorsByCat != null) {
1687:                        graphComponentsColorsByCat.removeObject2D(graphChart2D);
1688:                    }
1689:                    graphChart2DVector.remove(index);
1690:                    needsUpdateVector.remove(index);
1691:                }
1692:            }
1693:
1694:            /**
1695:             * Validates the properties of this object.
1696:             * If debug is true then prints a messages indicating whether each property is valid.
1697:             * Returns true if all the properties were valid and false otherwise.
1698:             * @param debug If true then will print status messages.
1699:             * @return If true then valid.
1700:             */
1701:            final boolean validate(boolean debug) {
1702:
1703:                if (debug)
1704:                    System.out.println("Validating GraphChart2DProperties");
1705:
1706:                boolean valid = true;
1707:
1708:                if (chartGraphableToAvailableRatio < 0f
1709:                        || chartGraphableToAvailableRatio > 1f) {
1710:                    valid = false;
1711:                    if (debug)
1712:                        System.out
1713:                                .println("Problem with ChartGraphableToAvailableRatio");
1714:                }
1715:                if (numbersAxisNumLabels < 2) {
1716:                    valid = false;
1717:                    if (debug)
1718:                        System.out.println("NumbersAxisNumLabels < 2");
1719:                }
1720:                if (labelsAxisTicksAlignment != BETWEEN
1721:                        && labelsAxisTicksAlignment != CENTERED) {
1722:                    valid = false;
1723:                    if (debug)
1724:                        System.out
1725:                                .println("Problem with LabelsAxisTicksAlignment");
1726:                }
1727:                if (labelsAxisLabelsTexts == null) {
1728:                    valid = false;
1729:                    if (debug)
1730:                        System.out.println("LabelsAxisLabelsTexts == null");
1731:                }
1732:                if (labelsAxisTitleText == null) {
1733:                    valid = false;
1734:                    if (debug)
1735:                        System.out.println("LabelsAxisTitleText == null");
1736:                }
1737:                if (labelsAxisTitleFontPointModel < 0) {
1738:                    valid = false;
1739:                    if (debug)
1740:                        System.out.println("LabelsAxisTitleFontPointModel < 0");
1741:                }
1742:                if (labelsAxisTitleFontName == null
1743:                        || !isFontNameExists(labelsAxisTitleFontName)) {
1744:                    valid = false;
1745:                    if (debug)
1746:                        System.out
1747:                                .println("Problem with LabelsAxisTitleFontName");
1748:                }
1749:                if (labelsAxisTitleFontColor == null) {
1750:                    valid = false;
1751:                    if (debug)
1752:                        System.out.println("LabelsAxisTitleFontColor == null");
1753:                }
1754:                if (labelsAxisTitleFontStyle != Font.PLAIN
1755:                        && labelsAxisTitleFontStyle != Font.ITALIC
1756:                        && labelsAxisTitleFontStyle != Font.BOLD
1757:                        && labelsAxisTitleFontStyle != (Font.ITALIC | Font.BOLD)) {
1758:                    valid = false;
1759:                    if (debug)
1760:                        System.out
1761:                                .println("Problem with LabelsAxisTitleFontStyle");
1762:                }
1763:                if (labelsAxisTitleBetweenRestGapThicknessModel < 0) {
1764:                    valid = false;
1765:                    if (debug)
1766:                        System.out
1767:                                .println("LabelsAxisTitleBetweenRestGapThicknessModel < 0");
1768:                }
1769:                if (labelsAxisTicksSizeModel == null
1770:                        || labelsAxisTicksSizeModel.width < 0
1771:                        || labelsAxisTicksSizeModel.height < 0) {
1772:                    valid = false;
1773:                    if (debug)
1774:                        System.out
1775:                                .println("Problem with LabelsAxisTicksSizeModel");
1776:                }
1777:                if (labelsAxisTicksColor == null) {
1778:                    valid = false;
1779:                    if (debug)
1780:                        System.out.println("LabelsAxisTicksColor == null");
1781:                }
1782:                if (labelsAxisTicksOutlineColor == null) {
1783:                    valid = false;
1784:                    if (debug)
1785:                        System.out
1786:                                .println("LabelsAxisTicksOutlineColor == null");
1787:                }
1788:                if (labelsAxisLabelsFontPointModel < 0) {
1789:                    valid = false;
1790:                    if (debug)
1791:                        System.out
1792:                                .println("LabelsAxisLabelsFontPointModel < 0");
1793:                }
1794:                if (labelsAxisLabelsFontName == null
1795:                        || !isFontNameExists(labelsAxisLabelsFontName)) {
1796:                    valid = false;
1797:                    if (debug)
1798:                        System.out
1799:                                .println("Problem with LabelsAxisLabelsFontName");
1800:                }
1801:                if (labelsAxisLabelsFontColor == null) {
1802:                    valid = false;
1803:                    if (debug)
1804:                        System.out.println("LabelsAxisLabelsFontColor == null");
1805:                }
1806:                if (labelsAxisLabelsFontStyle != Font.PLAIN
1807:                        && labelsAxisLabelsFontStyle != Font.ITALIC
1808:                        && labelsAxisLabelsFontStyle != Font.BOLD
1809:                        && labelsAxisLabelsFontStyle != (Font.ITALIC | Font.BOLD)) {
1810:                    valid = false;
1811:                    if (debug)
1812:                        System.out
1813:                                .println("Problem with LabelsAxisLabelsFontStyle");
1814:                }
1815:                if (labelsAxisBetweenLabelsOrTicksGapThicknessModel < 0) {
1816:                    valid = false;
1817:                    if (debug)
1818:                        System.out
1819:                                .println("LabelsAxisBetweenLabelsOrTicksGapThicknessModel < 0");
1820:                }
1821:                if (labelsAxisBetweenLabelsAndTicksGapThicknessModel < 0) {
1822:                    valid = false;
1823:                    if (debug)
1824:                        System.out
1825:                                .println("LabelsAxisBetweenLabelsAndTicksGapThicknessModel < 0");
1826:                }
1827:                if (numbersAxisTitleText == null) {
1828:                    valid = false;
1829:                    if (debug)
1830:                        System.out.println("NumbersAxisTitleText == null");
1831:                }
1832:                if (numbersAxisTitleFontPointModel < 0) {
1833:                    valid = false;
1834:                    if (debug)
1835:                        System.out
1836:                                .println("NumbersAxisTitleFontPointModel < 0");
1837:                }
1838:                if (numbersAxisTitleFontName == null
1839:                        || !isFontNameExists(numbersAxisTitleFontName)) {
1840:                    valid = false;
1841:                    if (debug)
1842:                        System.out
1843:                                .println("Problem with NumbersAxisTitleFontName");
1844:                }
1845:                if (numbersAxisTitleFontColor == null) {
1846:                    valid = false;
1847:                    if (debug)
1848:                        System.out.println("NumbersAxisTitleFontColor == null");
1849:                }
1850:                if (numbersAxisTitleFontStyle != Font.PLAIN
1851:                        && numbersAxisTitleFontStyle != Font.ITALIC
1852:                        && numbersAxisTitleFontStyle != Font.BOLD
1853:                        && numbersAxisTitleFontStyle != (Font.ITALIC | Font.BOLD)) {
1854:                    valid = false;
1855:                    if (debug)
1856:                        System.out
1857:                                .println("Problem with NumbersAxisTitleFontStyle");
1858:                }
1859:                if (numbersAxisTitleBetweenRestGapThicknessModel < 0) {
1860:                    valid = false;
1861:                    if (debug)
1862:                        System.out
1863:                                .println("NumbersAxisTitleBetweenRestGapThicknessModel < 0");
1864:                }
1865:                if (numbersAxisTicksSizeModel == null
1866:                        || numbersAxisTicksSizeModel.width < 0
1867:                        || numbersAxisTicksSizeModel.height < 0) {
1868:                    valid = false;
1869:                    if (debug)
1870:                        System.out
1871:                                .println("Problem with NumbersAxisTicksSizeModel");
1872:                }
1873:                if (numbersAxisTicksColor == null) {
1874:                    valid = false;
1875:                    if (debug)
1876:                        System.out.println("NumbersAxisTicksColor == null");
1877:                }
1878:                if (numbersAxisTicksOutlineColor == null) {
1879:                    valid = false;
1880:                    if (debug)
1881:                        System.out
1882:                                .println("NumbersAxisTicksOutlineColor == null");
1883:                }
1884:                if (numbersAxisLabelsFontPointModel < 0) {
1885:                    valid = false;
1886:                    if (debug)
1887:                        System.out
1888:                                .println("NumbersAxisLabelsFontPointModel < 0");
1889:                }
1890:                if (numbersAxisLabelsFontName == null
1891:                        || !isFontNameExists(numbersAxisLabelsFontName)) {
1892:                    valid = false;
1893:                    if (debug)
1894:                        System.out
1895:                                .println("Problem with NumbersAxisLabelsFontName");
1896:                }
1897:                if (numbersAxisLabelsFontColor == null) {
1898:                    valid = false;
1899:                    if (debug)
1900:                        System.out
1901:                                .println("NumbersAxisLabelsFontColor == null");
1902:                }
1903:                if (numbersAxisLabelsFontStyle != Font.PLAIN
1904:                        && numbersAxisLabelsFontStyle != Font.ITALIC
1905:                        && numbersAxisLabelsFontStyle != Font.BOLD
1906:                        && numbersAxisLabelsFontStyle != (Font.ITALIC | Font.BOLD)) {
1907:                    valid = false;
1908:                    if (debug)
1909:                        System.out
1910:                                .println("Problem with NumbersAxisLabelsFontStyle");
1911:                }
1912:                if (numbersAxisBetweenLabelsOrTicksGapThicknessModel < 0) {
1913:                    valid = false;
1914:                    if (debug)
1915:                        System.out
1916:                                .println("NumbersAxisBetweenLabelsOrTicksGapThicknessModel < 0");
1917:                }
1918:                if (numbersAxisBetweenLabelsAndTicksGapThicknessModel < 0) {
1919:                    valid = false;
1920:                    if (debug)
1921:                        System.out
1922:                                .println("NumbersAxisBetweenLabelsAndTicksGapThicknessModel < 0");
1923:                }
1924:                if (numbersAxisBetweenLabelsAndTicksGapThicknessModel < 0) {
1925:                    valid = false;
1926:                    if (debug)
1927:                        System.out
1928:                                .println("NumbersAxisBetweenLabelsAndTicksGapThicknessModel < 0");
1929:                }
1930:                if (graphComponentsColoringByCat) {
1931:
1932:                    if (graphComponentsColorsByCat == null) {
1933:                        valid = false;
1934:                        if (debug)
1935:                            System.out
1936:                                    .println("GraphComponentsColorsByCat == null");
1937:                    } else if (!graphComponentsColorsByCat.validate(debug))
1938:                        valid = false;
1939:                }
1940:
1941:                if (debug) {
1942:                    if (valid)
1943:                        System.out.println("GraphChart2DProperties was valid");
1944:                    else
1945:                        System.out
1946:                                .println("GraphChart2DProperties was invalid");
1947:                }
1948:
1949:                return valid;
1950:            }
1951:
1952:            /**
1953:             * Updates the properties of this GraphChart2D.
1954:             * @param graphChart2D The GraphChart2D to update.
1955:             */
1956:            final void updateGraphChart2D(GraphChart2D graphChart2D) {
1957:
1958:                if (getGraphChart2DNeedsUpdate(graphChart2D)) {
1959:
1960:                    if (needsUpdate) {
1961:                        for (int i = 0; i < needsUpdateVector.size(); ++i) {
1962:                            needsUpdateVector.set(i, new Boolean(true));
1963:                        }
1964:                        needsUpdate = false;
1965:                    }
1966:
1967:                    if (graphComponentsColorsByCat != null) {
1968:                        graphComponentsColorsByCat.updateObject2D(graphChart2D);
1969:                    }
1970:
1971:                    int index = -1;
1972:                    if ((index = graphChart2DVector.indexOf(graphChart2D)) != -1) {
1973:                        needsUpdateVector.set(index, new Boolean(false));
1974:                    }
1975:                }
1976:            }
1977:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.