1 22 23 24 package net.sourceforge.chart2d; 25 26 27 import java.awt.Color ; 28 import java.awt.Dimension ; 29 import java.awt.Font ; 30 import java.util.Vector ; 31 32 33 38 public final class GraphChart2DProperties extends Properties { 39 40 41 45 public static final int CENTERED = 0; 46 47 51 public static final int BETWEEN = 1; 52 53 56 public static final boolean CHART_DATASET_CUSTOMIZE_GREATEST_VALUE_DEFAULT = false; 57 58 61 public static final float CHART_DATASET_CUSTOM_GREATEST_VALUE_DEFAULT = 0; 62 63 66 public static final boolean CHART_DATASET_CUSTOMIZE_LEAST_VALUE_DEFAULT = false; 67 68 71 public static final float CHART_DATASET_CUSTOM_LEAST_VALUE_DEFAULT = 0; 72 73 76 public static final float CHART_GRAPHABLE_TO_AVAILABLE_RATIO_DEFAULT = 1f; 77 78 81 public static final int NUMBERS_AXIS_NUM_LABELS_DEFAULT = 7; 82 83 84 87 public static final boolean LABELS_AXIS_EXISTENCE_DEFAULT = true; 88 89 90 93 public static final int LABELS_AXIS_TICKS_ALIGNMENT_DEFAULT = BETWEEN; 94 95 98 public static final String [] LABELS_AXIS_LABELS_TEXTS_DEFAULT = new String [0]; 99 100 103 public static final boolean LABELS_AXIS_TITLE_EXISTENCE_DEFAULT = true; 104 105 108 public static final String LABELS_AXIS_TITLE_TEXT_DEFAULT = ""; 109 110 113 public static final int LABELS_AXIS_TITLE_FONT_POINT_MODEL_DEFAULT = 11; 114 115 118 public static final String LABELS_AXIS_TITLE_FONT_NAME_DEFAULT = "SansSerif"; 119 120 123 public static final Color LABELS_AXIS_TITLE_FONT_COLOR_DEFAULT = Color.black; 124 125 128 public static final int LABELS_AXIS_TITLE_FONT_STYLE_DEFAULT = Font.PLAIN; 129 130 133 public static final boolean LABELS_AXIS_TITLE_BETWEEN_REST_GAP_EXISTENCE_DEFAULT = true; 134 135 138 public static final int LABELS_AXIS_TITLE_BETWEEN_REST_GAP_THICKNESS_MODEL_DEFAULT = 3; 139 140 143 public static final boolean LABELS_AXIS_TICKS_EXISTENCE_DEFAULT = true; 144 145 148 public static final Dimension LABELS_AXIS_TICKS_SIZE_MODEL_DEFAULT = new Dimension (3, 3); 149 150 153 public static final Color LABELS_AXIS_TICKS_COLOR_DEFAULT = Color.black; 154 155 158 public static final boolean LABELS_AXIS_TICKS_OUTLINE_EXISTENCE_DEFAULT = false; 159 160 163 public static final Color LABELS_AXIS_TICKS_OUTLINE_COLOR_DEFAULT = Color.black; 164 165 168 public static final int LABELS_AXIS_LABELS_FONT_POINT_MODEL_DEFAULT = 10; 169 170 173 public static final String LABELS_AXIS_LABELS_FONT_NAME_DEFAULT = "SansSerif"; 174 175 178 public static final Color LABELS_AXIS_LABELS_FONT_COLOR_DEFAULT = Color.black; 179 180 183 public static final int LABELS_AXIS_LABELS_FONT_STYLE_DEFAULT = Font.PLAIN; 184 185 188 public static final boolean LABELS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_EXISTENCE_DEFAULT = true; 189 190 193 public static final int LABELS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_THICKNESS_MODEL_DEFAULT = 3; 194 195 198 public static final boolean LABELS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_EXISTENCE_DEFAULT = true; 199 200 203 public static final int LABELS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_THICKNESS_MODEL_DEFAULT = 3; 204 205 208 public static final boolean NUMBERS_AXIS_TITLE_EXISTENCE_DEFAULT = true; 209 210 213 public static final String NUMBERS_AXIS_TITLE_TEXT_DEFAULT = ""; 214 215 218 public static final int NUMBERS_AXIS_TITLE_FONT_POINT_MODEL_DEFAULT = 11; 219 220 223 public static final String NUMBERS_AXIS_TITLE_FONT_NAME_DEFAULT = "SansSerif"; 224 225 228 public static final Color NUMBERS_AXIS_TITLE_FONT_COLOR_DEFAULT = Color.black; 229 230 233 public static final int NUMBERS_AXIS_TITLE_FONT_STYLE_DEFAULT = Font.PLAIN; 234 235 238 public static final boolean NUMBERS_AXIS_TITLE_BETWEEN_REST_GAP_EXISTENCE_DEFAULT = true; 239 240 243 public static final int NUMBERS_AXIS_TITLE_BETWEEN_REST_GAP_THICKNESS_MODEL_DEFAULT = 3; 244 245 248 public static final boolean NUMBERS_AXIS_TICKS_EXISTENCE_DEFAULT = true; 249 250 253 public static final Dimension NUMBERS_AXIS_TICKS_SIZE_MODEL_DEFAULT = new Dimension (3, 3); 254 255 258 public static final Color NUMBERS_AXIS_TICKS_COLOR_DEFAULT = Color.black; 259 260 263 public static final boolean NUMBERS_AXIS_TICKS_OUTLINE_EXISTENCE_DEFAULT = false; 264 265 268 public static final Color NUMBERS_AXIS_TICKS_OUTLINE_COLOR_DEFAULT = Color.black; 269 270 273 public static final int NUMBERS_AXIS_LABELS_FONT_POINT_MODEL_DEFAULT = 10; 274 275 278 public static final String NUMBERS_AXIS_LABELS_FONT_NAME_DEFAULT = "SansSerif"; 279 280 283 public static final Color NUMBERS_AXIS_LABELS_FONT_COLOR_DEFAULT = Color.black; 284 285 288 public static final int NUMBERS_AXIS_LABELS_FONT_STYLE_DEFAULT = Font.PLAIN; 289 290 293 public static final boolean NUMBERS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_EXISTENCE_DEFAULT = true; 294 295 298 public static final int NUMBERS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_THICKNESS_MODEL_DEFAULT = 3; 299 300 303 public static final boolean NUMBERS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_EXISTENCE_DEFAULT = true; 304 305 308 public static final int NUMBERS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_THICKNESS_MODEL_DEFAULT = 3; 309 310 313 public static final boolean GRAPH_COMPONENTS_COLORING_BY_CAT_DEFAULT = false; 314 315 318 public static final MultiColorsProperties GRAPH_COMPONENTS_COLORS_BY_CAT_DEFAULT = null; 319 320 321 private boolean chartDatasetCustomizeGreatestValue; 322 private float chartDatasetCustomGreatestValue; 323 private boolean chartDatasetCustomizeLeastValue; 324 private float chartDatasetCustomLeastValue; 325 private float chartGraphableToAvailableRatio; 326 327 private boolean labelsAxisExistence; 328 private int labelsAxisTicksAlignment; 329 private String [] labelsAxisLabelsTexts; 330 private boolean labelsAxisTitleExistence; 331 private String labelsAxisTitleText; 332 private int labelsAxisTitleFontPointModel; 333 private String labelsAxisTitleFontName; 334 private Color labelsAxisTitleFontColor; 335 private int labelsAxisTitleFontStyle; 336 private boolean labelsAxisTitleBetweenRestGapExistence; 337 private int labelsAxisTitleBetweenRestGapThicknessModel; 338 private boolean labelsAxisTicksExistence; 339 private Dimension labelsAxisTicksSizeModel; 340 private Color labelsAxisTicksColor; 341 private boolean labelsAxisTicksOutlineExistence; 342 private Color labelsAxisTicksOutlineColor; 343 private int labelsAxisLabelsFontPointModel; 344 private String labelsAxisLabelsFontName; 345 private Color labelsAxisLabelsFontColor; 346 private int labelsAxisLabelsFontStyle; 347 private boolean labelsAxisBetweenLabelsOrTicksGapExistence; 348 private int labelsAxisBetweenLabelsOrTicksGapThicknessModel; 349 private boolean labelsAxisBetweenLabelsAndTicksGapExistence; 350 private int labelsAxisBetweenLabelsAndTicksGapThicknessModel; 351 352 private int numbersAxisNumLabels; 353 private boolean numbersAxisTitleExistence; 354 private String numbersAxisTitleText; 355 private int numbersAxisTitleFontPointModel; 356 private String numbersAxisTitleFontName; 357 private Color numbersAxisTitleFontColor; 358 private int numbersAxisTitleFontStyle; 359 private boolean numbersAxisTitleBetweenRestGapExistence; 360 private int numbersAxisTitleBetweenRestGapThicknessModel; 361 private boolean numbersAxisTicksExistence; 362 private Dimension numbersAxisTicksSizeModel; 363 private Color numbersAxisTicksColor; 364 private boolean numbersAxisTicksOutlineExistence; 365 private Color numbersAxisTicksOutlineColor; 366 private int numbersAxisLabelsFontPointModel; 367 private String numbersAxisLabelsFontName; 368 private Color numbersAxisLabelsFontColor; 369 private int numbersAxisLabelsFontStyle; 370 private boolean numbersAxisBetweenLabelsOrTicksGapExistence; 371 private int numbersAxisBetweenLabelsOrTicksGapThicknessModel; 372 private boolean numbersAxisBetweenLabelsAndTicksGapExistence; 373 private int numbersAxisBetweenLabelsAndTicksGapThicknessModel; 374 375 private boolean graphComponentsColoringByCat; 376 private MultiColorsProperties graphComponentsColorsByCat; 377 378 private boolean needsUpdate = true; 379 private final Vector needsUpdateVector = new Vector (5, 5); 380 private final Vector graphChart2DVector = new Vector (5, 5); 381 382 383 386 public GraphChart2DProperties() { 387 388 needsUpdate = true; 389 setGraphChart2DPropertiesToDefaults(); 390 } 391 392 393 398 public GraphChart2DProperties (GraphChart2DProperties graphChart2DProps) { 399 400 needsUpdate = true; 401 setGraphChart2DProperties (graphChart2DProps); 402 } 403 404 405 408 public final void setGraphChart2DPropertiesToDefaults() { 409 410 needsUpdate = true; 411 setChartDatasetCustomizeGreatestValue (CHART_DATASET_CUSTOMIZE_GREATEST_VALUE_DEFAULT); 412 setChartDatasetCustomGreatestValue (CHART_DATASET_CUSTOM_GREATEST_VALUE_DEFAULT); 413 setChartDatasetCustomizeLeastValue (CHART_DATASET_CUSTOMIZE_LEAST_VALUE_DEFAULT); 414 setChartDatasetCustomLeastValue (CHART_DATASET_CUSTOM_LEAST_VALUE_DEFAULT); 415 setChartGraphableToAvailableRatio (CHART_GRAPHABLE_TO_AVAILABLE_RATIO_DEFAULT); 416 setNumbersAxisNumLabels (NUMBERS_AXIS_NUM_LABELS_DEFAULT); 417 setLabelsAxisExistence (LABELS_AXIS_EXISTENCE_DEFAULT); 418 setLabelsAxisTicksAlignment (LABELS_AXIS_TICKS_ALIGNMENT_DEFAULT); 419 setLabelsAxisLabelsTexts (LABELS_AXIS_LABELS_TEXTS_DEFAULT); 420 setLabelsAxisTitleExistence (LABELS_AXIS_TITLE_EXISTENCE_DEFAULT); 421 setLabelsAxisTitleText (LABELS_AXIS_TITLE_TEXT_DEFAULT); 422 setLabelsAxisTitleFontPointModel (LABELS_AXIS_TITLE_FONT_POINT_MODEL_DEFAULT); 423 setLabelsAxisTitleFontName (LABELS_AXIS_TITLE_FONT_NAME_DEFAULT); 424 setLabelsAxisTitleFontColor (LABELS_AXIS_TITLE_FONT_COLOR_DEFAULT); 425 setLabelsAxisTitleFontStyle (LABELS_AXIS_TITLE_FONT_STYLE_DEFAULT); 426 setLabelsAxisTitleBetweenRestGapExistence ( 427 LABELS_AXIS_TITLE_BETWEEN_REST_GAP_EXISTENCE_DEFAULT); 428 setLabelsAxisTitleBetweenRestGapThicknessModel ( 429 LABELS_AXIS_TITLE_BETWEEN_REST_GAP_THICKNESS_MODEL_DEFAULT); 430 setLabelsAxisTicksExistence (LABELS_AXIS_TICKS_EXISTENCE_DEFAULT); 431 setLabelsAxisTicksSizeModel (LABELS_AXIS_TICKS_SIZE_MODEL_DEFAULT); 432 setLabelsAxisTicksColor (LABELS_AXIS_TICKS_COLOR_DEFAULT); 433 setLabelsAxisTicksOutlineExistence (LABELS_AXIS_TICKS_OUTLINE_EXISTENCE_DEFAULT); 434 setLabelsAxisTicksOutlineColor (LABELS_AXIS_TICKS_COLOR_DEFAULT); 435 setLabelsAxisLabelsFontPointModel (LABELS_AXIS_LABELS_FONT_POINT_MODEL_DEFAULT); 436 setLabelsAxisLabelsFontName (LABELS_AXIS_LABELS_FONT_NAME_DEFAULT); 437 setLabelsAxisLabelsFontColor (LABELS_AXIS_LABELS_FONT_COLOR_DEFAULT); 438 setLabelsAxisLabelsFontStyle (LABELS_AXIS_LABELS_FONT_STYLE_DEFAULT); 439 setLabelsAxisBetweenLabelsOrTicksGapExistence ( 440 LABELS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_EXISTENCE_DEFAULT); 441 setLabelsAxisBetweenLabelsOrTicksGapThicknessModel ( 442 LABELS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_THICKNESS_MODEL_DEFAULT); 443 setLabelsAxisBetweenLabelsAndTicksGapExistence ( 444 LABELS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_EXISTENCE_DEFAULT); 445 setLabelsAxisBetweenLabelsAndTicksGapThicknessModel ( 446 LABELS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_THICKNESS_MODEL_DEFAULT); 447 setNumbersAxisTitleExistence (NUMBERS_AXIS_TITLE_EXISTENCE_DEFAULT); 448 setNumbersAxisTitleText (NUMBERS_AXIS_TITLE_TEXT_DEFAULT); 449 setNumbersAxisTitleFontPointModel (NUMBERS_AXIS_TITLE_FONT_POINT_MODEL_DEFAULT); 450 setNumbersAxisTitleFontName (NUMBERS_AXIS_TITLE_FONT_NAME_DEFAULT); 451 setNumbersAxisTitleFontColor (NUMBERS_AXIS_TITLE_FONT_COLOR_DEFAULT); 452 setNumbersAxisTitleFontStyle (NUMBERS_AXIS_TITLE_FONT_STYLE_DEFAULT); 453 setNumbersAxisTitleBetweenRestGapExistence ( 454 NUMBERS_AXIS_TITLE_BETWEEN_REST_GAP_EXISTENCE_DEFAULT); 455 setNumbersAxisTitleBetweenRestGapThicknessModel ( 456 NUMBERS_AXIS_TITLE_BETWEEN_REST_GAP_THICKNESS_MODEL_DEFAULT); 457 setNumbersAxisTicksExistence (NUMBERS_AXIS_TICKS_EXISTENCE_DEFAULT); 458 setNumbersAxisTicksSizeModel (NUMBERS_AXIS_TICKS_SIZE_MODEL_DEFAULT); 459 setNumbersAxisTicksColor (NUMBERS_AXIS_TICKS_COLOR_DEFAULT); 460 setNumbersAxisTicksOutlineExistence (NUMBERS_AXIS_TICKS_OUTLINE_EXISTENCE_DEFAULT); 461 setNumbersAxisTicksOutlineColor (NUMBERS_AXIS_TICKS_COLOR_DEFAULT); 462 setNumbersAxisLabelsFontPointModel (NUMBERS_AXIS_LABELS_FONT_POINT_MODEL_DEFAULT); 463 setNumbersAxisLabelsFontName (NUMBERS_AXIS_LABELS_FONT_NAME_DEFAULT); 464 setNumbersAxisLabelsFontColor (NUMBERS_AXIS_LABELS_FONT_COLOR_DEFAULT); 465 setNumbersAxisLabelsFontStyle (NUMBERS_AXIS_LABELS_FONT_STYLE_DEFAULT); 466 setNumbersAxisBetweenLabelsOrTicksGapExistence ( 467 NUMBERS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_EXISTENCE_DEFAULT); 468 setNumbersAxisBetweenLabelsOrTicksGapThicknessModel ( 469 NUMBERS_AXIS_BETWEEN_LABELS_OR_TICKS_GAP_THICKNESS_MODEL_DEFAULT); 470 setNumbersAxisBetweenLabelsAndTicksGapExistence ( 471 NUMBERS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_EXISTENCE_DEFAULT); 472 setNumbersAxisBetweenLabelsAndTicksGapThicknessModel ( 473 NUMBERS_AXIS_BETWEEN_LABELS_AND_TICKS_GAP_THICKNESS_MODEL_DEFAULT); 474 setGraphComponentsColoringByCat (GRAPH_COMPONENTS_COLORING_BY_CAT_DEFAULT); 475 } 476 477 478 483 public final void setGraphChart2DProperties (GraphChart2DProperties graphChart2DProps) { 484 485 needsUpdate = true; 486 setChartDatasetCustomizeGreatestValue ( 487 graphChart2DProps.getChartDatasetCustomizeGreatestValue()); 488 setChartDatasetCustomGreatestValue (graphChart2DProps.getChartDatasetCustomGreatestValue()); 489 setChartDatasetCustomizeLeastValue (graphChart2DProps.getChartDatasetCustomizeLeastValue()); 490 setChartDatasetCustomLeastValue (graphChart2DProps.getChartDatasetCustomLeastValue()); 491 setChartGraphableToAvailableRatio (graphChart2DProps.getChartGraphableToAvailableRatio()); 492 setNumbersAxisNumLabels (graphChart2DProps.getNumbersAxisNumLabels()); 493 setLabelsAxisExistence (graphChart2DProps.getLabelsAxisExistence()); 494 setLabelsAxisTicksAlignment (graphChart2DProps.getLabelsAxisTicksAlignment()); 495 String [] labelsTexts = graphChart2DProps.getLabelsAxisLabelsTexts(); 496 String [] copiedLabelsTexts = new String [labelsTexts.length]; 497 for (int i = 0; i < labelsTexts.length; ++i) copiedLabelsTexts[i] = labelsTexts[i]; 498 setLabelsAxisLabelsTexts (copiedLabelsTexts); 499 setLabelsAxisTitleExistence (graphChart2DProps.getLabelsAxisTitleExistence()); 500 setLabelsAxisTitleText (graphChart2DProps.getLabelsAxisTitleText()); 501 setLabelsAxisTitleFontPointModel (graphChart2DProps.getLabelsAxisTitleFontPointModel()); 502 setLabelsAxisTitleFontName (graphChart2DProps.getLabelsAxisTitleFontName()); 503 setLabelsAxisTitleFontColor (graphChart2DProps.getLabelsAxisTitleFontColor()); 504 setLabelsAxisTitleFontStyle (graphChart2DProps.getLabelsAxisTitleFontStyle()); 505 setLabelsAxisTitleBetweenRestGapExistence ( 506 graphChart2DProps.getLabelsAxisTitleBetweenRestGapExistence()); 507 setLabelsAxisTitleBetweenRestGapThicknessModel ( 508 graphChart2DProps.getLabelsAxisTitleBetweenRestGapThicknessModel()); 509 setLabelsAxisTicksExistence (graphChart2DProps.getLabelsAxisTicksExistence()); 510 setLabelsAxisTicksSizeModel (new Dimension (graphChart2DProps.getLabelsAxisTicksSizeModel())); 511 setLabelsAxisTicksColor (graphChart2DProps.getLabelsAxisTicksColor()); 512 setLabelsAxisTicksOutlineExistence (graphChart2DProps.getLabelsAxisTicksOutlineExistence()); 513 setLabelsAxisTicksOutlineColor (graphChart2DProps.getLabelsAxisTicksOutlineColor()); 514 setLabelsAxisLabelsFontPointModel (graphChart2DProps.getLabelsAxisLabelsFontPointModel()); 515 setLabelsAxisLabelsFontName (graphChart2DProps.getLabelsAxisLabelsFontName()); 516 setLabelsAxisLabelsFontColor (graphChart2DProps.getLabelsAxisLabelsFontColor()); 517 setLabelsAxisLabelsFontStyle (graphChart2DProps.getLabelsAxisLabelsFontStyle()); 518 setLabelsAxisBetweenLabelsOrTicksGapExistence ( 519 graphChart2DProps.getLabelsAxisBetweenLabelsOrTicksGapExistence()); 520 setLabelsAxisBetweenLabelsOrTicksGapThicknessModel ( 521 graphChart2DProps.getLabelsAxisBetweenLabelsOrTicksGapThicknessModel()); 522 setLabelsAxisBetweenLabelsAndTicksGapExistence ( 523 graphChart2DProps.getLabelsAxisBetweenLabelsAndTicksGapExistence()); 524 setLabelsAxisBetweenLabelsAndTicksGapThicknessModel ( 525 graphChart2DProps.getLabelsAxisBetweenLabelsAndTicksGapThicknessModel()); 526 setNumbersAxisTitleExistence (graphChart2DProps.getNumbersAxisTitleExistence()); 527 setNumbersAxisTitleText (graphChart2DProps.getNumbersAxisTitleText()); 528 setNumbersAxisTitleFontPointModel (graphChart2DProps.getNumbersAxisTitleFontPointModel()); 529 setNumbersAxisTitleFontName (graphChart2DProps.getNumbersAxisTitleFontName()); 530 setNumbersAxisTitleFontColor (graphChart2DProps.getNumbersAxisTitleFontColor()); 531 setNumbersAxisTitleFontStyle (graphChart2DProps.getNumbersAxisTitleFontStyle()); 532 setNumbersAxisTitleBetweenRestGapExistence ( 533 graphChart2DProps.getNumbersAxisTitleBetweenRestGapExistence()); 534 setNumbersAxisTitleBetweenRestGapThicknessModel ( 535 graphChart2DProps.getNumbersAxisTitleBetweenRestGapThicknessModel()); 536 setNumbersAxisTicksExistence (graphChart2DProps.getNumbersAxisTicksExistence()); 537 setNumbersAxisTicksSizeModel (new Dimension (graphChart2DProps.getNumbersAxisTicksSizeModel())); 538 setNumbersAxisTicksColor (graphChart2DProps.getNumbersAxisTicksColor()); 539 setNumbersAxisTicksOutlineExistence (graphChart2DProps.getNumbersAxisTicksOutlineExistence()); 540 setNumbersAxisTicksOutlineColor (graphChart2DProps.getNumbersAxisTicksOutlineColor()); 541 setNumbersAxisLabelsFontPointModel (graphChart2DProps.getNumbersAxisLabelsFontPointModel()); 542 setNumbersAxisLabelsFontName (graphChart2DProps.getNumbersAxisLabelsFontName()); 543 setNumbersAxisLabelsFontColor (graphChart2DProps.getNumbersAxisLabelsFontColor()); 544 setNumbersAxisLabelsFontStyle (graphChart2DProps.getNumbersAxisLabelsFontStyle()); 545 setNumbersAxisBetweenLabelsOrTicksGapExistence ( 546 graphChart2DProps.getNumbersAxisBetweenLabelsOrTicksGapExistence()); 547 setNumbersAxisBetweenLabelsOrTicksGapThicknessModel ( 548 graphChart2DProps.getNumbersAxisBetweenLabelsOrTicksGapThicknessModel()); 549 setNumbersAxisBetweenLabelsAndTicksGapExistence ( 550 graphChart2DProps.getNumbersAxisBetweenLabelsAndTicksGapExistence()); 551 setNumbersAxisBetweenLabelsAndTicksGapThicknessModel ( 552 graphChart2DProps.getNumbersAxisBetweenLabelsAndTicksGapThicknessModel()); 553 setGraphComponentsColoringByCat (graphChart2DProps.getGraphComponentsColoringByCat()); 554 } 555 556 557 564 public final void setChartDatasetCustomizeGreatestValue (boolean customize) { 565 566 needsUpdate = true; 567 chartDatasetCustomizeGreatestValue = customize; 568 } 569 570 571 578 public final void setChartDatasetCustomGreatestValue (float value) { 579 580 needsUpdate = true; 581 chartDatasetCustomGreatestValue = value; 582 } 583 584 585 592 public final void setChartDatasetCustomizeLeastValue (boolean customize) { 593 594 needsUpdate = true; 595 chartDatasetCustomizeLeastValue = customize; 596 } 597 598 599 606 public final void setChartDatasetCustomLeastValue (float value) { 607 608 needsUpdate = true; 609 chartDatasetCustomLeastValue = value; 610 } 611 612 613 619 public final void setChartGraphableToAvailableRatio (float ratio) { 620 621 needsUpdate = true; 622 chartGraphableToAvailableRatio = ratio; 623 } 624 625 626 631 public final void setLabelsAxisExistence (boolean existence) { 632 633 needsUpdate = true; 634 labelsAxisExistence = existence; 635 } 636 637 638 645 public final void setLabelsAxisTicksAlignment (int alignment) { 646 647 needsUpdate = true; 648 labelsAxisTicksAlignment = alignment; 649 } 650 651 652 657 public final void setLabelsAxisLabelsTexts (String [] texts) { 658 659 needsUpdate = true; 660 labelsAxisLabelsTexts = texts; 661 } 662 663 664 668 public final void setLabelsAxisTitleExistence (boolean existence) { 669 670 needsUpdate = true; 671 labelsAxisTitleExistence = existence; 672 } 673 674 675 679 public final void setLabelsAxisTitleText (String text) { 680 681 needsUpdate = true; 682 labelsAxisTitleText = text; 683 } 684 685 686 691 public final void setLabelsAxisTitleFontPointModel (int point) { 692 693 needsUpdate = true; 694 labelsAxisTitleFontPointModel = point; 695 } 696 697 698 703 public final void setLabelsAxisTitleFontName (String name) { 704 705 needsUpdate = true; 706 labelsAxisTitleFontName = name; 707 } 708 709 710 714 public final void setLabelsAxisTitleFontColor (Color color) { 715 716 needsUpdate = true; 717 labelsAxisTitleFontColor = color; 718 } 719 720 721 726 public final void setLabelsAxisTitleFontStyle (int style) { 727 728 needsUpdate = true; 729 labelsAxisTitleFontStyle = style; 730 } 731 732 733 737 public final void setLabelsAxisTitleBetweenRestGapExistence (boolean existence) { 738 739 needsUpdate = true; 740 labelsAxisTitleBetweenRestGapExistence = existence; 741 } 742 743 744 749 public final void setLabelsAxisTitleBetweenRestGapThicknessModel (int thickness) { 750 751 needsUpdate = true; 752 labelsAxisTitleBetweenRestGapThicknessModel = thickness; 753 } 754 755 756 760 public final void setLabelsAxisTicksExistence (boolean existence) { 761 762 needsUpdate = true; 763 labelsAxisTicksExistence = existence; 764 } 765 766 767 771 public final void setLabelsAxisTicksSizeModel (Dimension size) { 772 773 needsUpdate = true; 774 labelsAxisTicksSizeModel = size; 775 } 776 777 778 782 public final void setLabelsAxisTicksColor (Color color) { 783 784 needsUpdate = true; 785 labelsAxisTicksColor = color; 786 } 787 788 789 793 public final void setLabelsAxisTicksOutlineExistence (boolean existence) { 794 795 needsUpdate = true; 796 labelsAxisTicksOutlineExistence = existence; 797 } 798 799 800 804 public final void setLabelsAxisTicksOutlineColor (Color color) { 805 806 needsUpdate = true; 807 labelsAxisTicksOutlineColor = color; 808 } 809 810 811 816 public final void setLabelsAxisLabelsFontPointModel (int point) { 817 818 needsUpdate = true; 819 labelsAxisLabelsFontPointModel = point; 820 } 821 822 823 828 public final void setLabelsAxisLabelsFontName (String name) { 829 830 needsUpdate = true; 831 labelsAxisLabelsFontName = name; 832 } 833 834 835 839 public final void setLabelsAxisLabelsFontColor (Color color) { 840 841 needsUpdate = true; 842 labelsAxisLabelsFontColor = color; 843 } 844 845 846 851 public final void setLabelsAxisLabelsFontStyle (int style) { 852 853 needsUpdate = true; 854 labelsAxisLabelsFontStyle = style; 855 } 856 857 858 863 public final void setLabelsAxisBetweenLabelsOrTicksGapExistence (boolean existence) { 864 865 needsUpdate = true; 866 labelsAxisBetweenLabelsOrTicksGapExistence = existence; 867 } 868 869 870 876 public final void setLabelsAxisBetweenLabelsOrTicksGapThicknessModel (int thickness) { 877 878 needsUpdate = true; 879 labelsAxisBetweenLabelsOrTicksGapThicknessModel = thickness; 880 } 881 882 883 887 public final void setLabelsAxisBetweenLabelsAndTicksGapExistence (boolean existence) { 888 889 needsUpdate = true; 890 labelsAxisBetweenLabelsAndTicksGapExistence = existence; 891 } 892 893 894 899 public final void setLabelsAxisBetweenLabelsAndTicksGapThicknessModel (int thickness) { 900 901 needsUpdate = true; 902 labelsAxisBetweenLabelsAndTicksGapThicknessModel = thickness; 903 } 904 905 906 910 public final void setNumbersAxisTitleExistence (boolean existence) { 911 912 needsUpdate = true; 913 numbersAxisTitleExistence = existence; 914 } 915 916 917 921 public final void setNumbersAxisTitleText (String text) { 922 923 needsUpdate = true; 924 numbersAxisTitleText = text; 925 } 926 927 928 933 public final void setNumbersAxisTitleFontPointModel (int point) { 934 935 needsUpdate = true; 936 numbersAxisTitleFontPointModel = point; 937 } 938 939 940 945 public final void setNumbersAxisTitleFontName (String name) { 946 947 needsUpdate = true; 948 numbersAxisTitleFontName = name; 949 } 950 951 952 956 public final void setNumbersAxisTitleFontColor (Color color) { 957 958 needsUpdate = true; 959 numbersAxisTitleFontColor = color; 960 } 961 962 963 968 public final void setNumbersAxisTitleFontStyle (int style) { 969 970 needsUpdate = true; 971 numbersAxisTitleFontStyle = style; 972 } 973 974 975 979 public final void setNumbersAxisTitleBetweenRestGapExistence (boolean existence) { 980 981 needsUpdate = true; 982 numbersAxisTitleBetweenRestGapExistence = existence; 983 } 984 985 986 991 public final void setNumbersAxisTitleBetweenRestGapThicknessModel (int thickness) { 992 993 needsUpdate = true; 994 numbersAxisTitleBetweenRestGapThicknessModel = thickness; 995 } 996 997 998 1002 public final void setNumbersAxisTicksExistence (boolean existence) { 1003 1004 needsUpdate = true; 1005 numbersAxisTicksExistence = existence; 1006 } 1007 1008 1009 1013 public final void setNumbersAxisTicksSizeModel (Dimension size) { 1014 1015 needsUpdate = true; 1016 numbersAxisTicksSizeModel = size; 1017 } 1018 1019 1020 1024 public final void setNumbersAxisTicksColor (Color color) { 1025 1026 needsUpdate = true; 1027 numbersAxisTicksColor = color; 1028 } 1029 1030 1031 1035 public final void setNumbersAxisTicksOutlineExistence (boolean existence) { 1036 1037 needsUpdate = true; 1038 numbersAxisTicksOutlineExistence = existence; 1039 } 1040 1041 1042 1046 public final void setNumbersAxisTicksOutlineColor (Color color) { 1047 1048 needsUpdate = true; 1049 numbersAxisTicksOutlineColor = color; 1050 } 1051 1052 1053 1057 public final void setNumbersAxisNumLabels (int num) { 1058 1059 needsUpdate = true; 1060 numbersAxisNumLabels = num; 1061 } 1062 1063 1064 1069 public final void setNumbersAxisLabelsFontPointModel (int point) { 1070 1071 needsUpdate = true; 1072 numbersAxisLabelsFontPointModel = point; 1073 } 1074 1075 1076 1081 public final void setNumbersAxisLabelsFontName (String name) { 1082 1083 needsUpdate = true; 1084 numbersAxisLabelsFontName = name; 1085 } 1086 1087 1088 1092 public final void setNumbersAxisLabelsFontColor (Color color) { 1093 1094 needsUpdate = true; 1095 numbersAxisLabelsFontColor = color; 1096 } 1097 1098 1099 1104 public final void setNumbersAxisLabelsFontStyle (int style) { 1105 1106 needsUpdate = true; 1107 numbersAxisLabelsFontStyle = style; 1108 } 1109 1110 1111 1116 public final void setNumbersAxisBetweenLabelsOrTicksGapExistence (boolean existence) { 1117 1118 needsUpdate = true; 1119 numbersAxisBetweenLabelsOrTicksGapExistence = existence; 1120 } 1121 1122 1123 1129 public final void setNumbersAxisBetweenLabelsOrTicksGapThicknessModel (int thickness) { 1130 1131 needsUpdate = true; 1132 numbersAxisBetweenLabelsOrTicksGapThicknessModel = thickness; 1133 } 1134 1135 1136 1141 public final void setNumbersAxisBetweenLabelsAndTicksGapExistence (boolean existence) { 1142 1143 needsUpdate = true; 1144 numbersAxisBetweenLabelsAndTicksGapExistence = existence; 1145 } 1146 1147 1148 1153 public final void setNumbersAxisBetweenLabelsAndTicksGapThicknessModel (int thickness) { 1154 1155 needsUpdate = true; 1156 numbersAxisBetweenLabelsAndTicksGapThicknessModel = thickness; 1157 } 1158 1159 1160 1164 public final void setGraphComponentsColoringByCat (boolean b) { 1165 1166 needsUpdate = true; 1167 graphComponentsColoringByCat = b; 1168 } 1169 1170 1171 1175 public final void setGraphComponentsColorsByCat (MultiColorsProperties props) { 1176 1177 needsUpdate = true; 1178 for (int i = 0; i < graphChart2DVector.size(); ++i) { 1179 1180 if (graphComponentsColorsByCat != null) { 1181 graphComponentsColorsByCat.removeObject2D ((GraphChart2D)graphChart2DVector.get (i)); 1182 } 1183 if (props != null) props.addObject2D ((GraphChart2D)graphChart2DVector.get (i)); 1184 } 1185 graphComponentsColorsByCat = props; 1186 } 1187 1188 1189 1196 public final boolean getChartDatasetCustomizeGreatestValue() { 1197 return chartDatasetCustomizeGreatestValue; 1198 } 1199 1200 1201 1208 public final float getChartDatasetCustomGreatestValue() { 1209 return chartDatasetCustomGreatestValue; 1210 } 1211 1212 1213 1220 public final boolean getChartDatasetCustomizeLeastValue() { 1221 return chartDatasetCustomizeLeastValue; 1222 } 1223 1224 1225 1232 public final float getChartDatasetCustomLeastValue() { 1233 return chartDatasetCustomLeastValue; 1234 } 1235 1236 1237 1243 public float getChartGraphableToAvailableRatio() { 1244 return chartGraphableToAvailableRatio; 1245 } 1246 1247 1248 1253 public final boolean getLabelsAxisExistence() { 1254 return labelsAxisExistence; 1255 } 1256 1257 1258 1265 public final int getLabelsAxisTicksAlignment() { 1266 return labelsAxisTicksAlignment; 1267 } 1268 1269 1270 1275 public final String [] getLabelsAxisLabelsTexts() { 1276 return labelsAxisLabelsTexts; 1277 } 1278 1279 1280 1284 public final boolean getLabelsAxisTitleExistence() { 1285 return labelsAxisTitleExistence; 1286 } 1287 1288 1289 1293 public final String getLabelsAxisTitleText() { 1294 return labelsAxisTitleText; 1295 } 1296 1297 1298 1302 public final int getLabelsAxisTitleFontPointModel() { 1303 return labelsAxisTitleFontPointModel; 1304 } 1305 1306 1307 1312 public final String getLabelsAxisTitleFontName() { 1313 return labelsAxisTitleFontName; 1314 } 1315 1316 1317 1321 public final Color getLabelsAxisTitleFontColor() { 1322 return labelsAxisTitleFontColor; 1323 } 1324 1325 1326 1331 public final int getLabelsAxisTitleFontStyle() { 1332 return labelsAxisTitleFontStyle; 1333 } 1334 1335 1336 1340 public final boolean getLabelsAxisTitleBetweenRestGapExistence() { 1341 return labelsAxisTitleBetweenRestGapExistence; 1342 } 1343 1344 1345 1350 public final int getLabelsAxisTitleBetweenRestGapThicknessModel() { 1351 return labelsAxisTitleBetweenRestGapThicknessModel; 1352 } 1353 1354 1355 1359 public final boolean getNumbersAxisTicksExistence() { 1360 return numbersAxisTicksExistence; 1361 } 1362 1363 1364 1368 public final boolean getLabelsAxisTicksExistence() { 1369 return labelsAxisTicksExistence; 1370 } 1371 1372 1373 1377 public final Dimension getLabelsAxisTicksSizeModel() { 1378 return labelsAxisTicksSizeModel; 1379 } 1380 1381 1382 1386 public final Color getLabelsAxisTicksColor() { 1387 return labelsAxisTicksColor; 1388 } 1389 1390 1391 1395 public final boolean getLabelsAxisTicksOutlineExistence() { 1396 return labelsAxisTicksOutlineExistence; 1397 } 1398 1399 1400 1404 public final Color getLabelsAxisTicksOutlineColor() { 1405 return labelsAxisTicksOutlineColor; 1406 } 1407 1408 1409 1414 public final int getLabelsAxisLabelsFontPointModel() { 1415 return labelsAxisLabelsFontPointModel; 1416 } 1417 1418 1419 1424 public final String getLabelsAxisLabelsFontName() { 1425 return labelsAxisLabelsFontName; 1426 } 1427 1428 1429 1433 public final Color getLabelsAxisLabelsFontColor() { 1434 return labelsAxisLabelsFontColor; 1435 } 1436 1437 1438 1443 public final int getLabelsAxisLabelsFontStyle() { 1444 return labelsAxisLabelsFontStyle; 1445 } 1446 1447 1448 1453 public final boolean getLabelsAxisBetweenLabelsOrTicksGapExistence() { 1454 return labelsAxisBetweenLabelsOrTicksGapExistence; 1455 } 1456 1457 1458 1464 public final int getLabelsAxisBetweenLabelsOrTicksGapThicknessModel() { 1465 return labelsAxisBetweenLabelsOrTicksGapThicknessModel; 1466 } 1467 1468 1469 1473 public final boolean getLabelsAxisBetweenLabelsAndTicksGapExistence() { 1474 return labelsAxisBetweenLabelsAndTicksGapExistence; 1475 } 1476 1477 1478 1483 public final int getLabelsAxisBetweenLabelsAndTicksGapThicknessModel() { 1484 return labelsAxisBetweenLabelsAndTicksGapThicknessModel; 1485 } 1486 1487 1488 1492 public final boolean getNumbersAxisTitleExistence() { 1493 return numbersAxisTitleExistence; 1494 } 1495 1496 1497 1501 public final String getNumbersAxisTitleText() { 1502 return numbersAxisTitleText; 1503 } 1504 1505 1506 1511 public final int getNumbersAxisTitleFontPointModel() { 1512 return numbersAxisTitleFontPointModel; 1513 } 1514 1515 1516 1521 public final String getNumbersAxisTitleFontName() { 1522 return numbersAxisTitleFontName; 1523 } 1524 1525 1526 1530 public final Color getNumbersAxisTitleFontColor() { 1531 return numbersAxisTitleFontColor; 1532 } 1533 1534 1535 1540 public final int getNumbersAxisTitleFontStyle() { 1541 return numbersAxisTitleFontStyle; 1542 } 1543 1544 1545 1549 public final boolean getNumbersAxisTitleBetweenRestGapExistence() { 1550 return numbersAxisTitleBetweenRestGapExistence; 1551 } 1552 1553 1554 1559 public final int getNumbersAxisTitleBetweenRestGapThicknessModel() { 1560 return numbersAxisTitleBetweenRestGapThicknessModel; 1561 } 1562 1563 1564 1568 public final Dimension getNumbersAxisTicksSizeModel() { 1569 return numbersAxisTicksSizeModel; 1570 } 1571 1572 1573 1577 public final Color getNumbersAxisTicksColor() { 1578 return numbersAxisTicksColor; 1579 } 1580 1581 1582 1586 public final boolean getNumbersAxisTicksOutlineExistence() { 1587 return numbersAxisTicksOutlineExistence; 1588 } 1589 1590 1591 1596 public final Color getNumbersAxisTicksOutlineColor() { 1597 return numbersAxisTicksOutlineColor; 1598 } 1599 1600 1601 1605 public final int getNumbersAxisNumLabels() { 1606 return numbersAxisNumLabels; 1607 } 1608 1609 1610 1615 public final int getNumbersAxisLabelsFontPointModel() { 1616 return numbersAxisLabelsFontPointModel; 1617 } 1618 1619 1620 1625 public final String getNumbersAxisLabelsFontName() { 1626 return numbersAxisLabelsFontName; 1627 } 1628 1629 1630 1634 public final Color getNumbersAxisLabelsFontColor() { 1635 return numbersAxisLabelsFontColor; 1636 } 1637 1638 1639 1644 public final int getNumbersAxisLabelsFontStyle() { 1645 return numbersAxisLabelsFontStyle; 1646 } 1647 1648 1649 1654 public final boolean getNumbersAxisBetweenLabelsOrTicksGapExistence() { 1655 return numbersAxisBetweenLabelsOrTicksGapExistence; 1656 } 1657 1658 1659 1665 public final int getNumbersAxisBetweenLabelsOrTicksGapThicknessModel() { 1666 return numbersAxisBetweenLabelsOrTicksGapThicknessModel; 1667 } 1668 1669 1670 1675 public final boolean getNumbersAxisBetweenLabelsAndTicksGapExistence() { 1676 return numbersAxisBetweenLabelsAndTicksGapExistence; 1677 } 1678 1679 1680 1685 public final int getNumbersAxisBetweenLabelsAndTicksGapThicknessModel() { 1686 return numbersAxisBetweenLabelsAndTicksGapThicknessModel; 1687 } 1688 1689 1690 1694 public final boolean getGraphComponentsColoringByCat() { 1695 return graphComponentsColoringByCat; 1696 } 1697 1698 1699 1703 public final MultiColorsProperties getGraphComponentsColorsByCat() { 1704 return graphComponentsColorsByCat; 1705 } 1706 1707 1708 1713 final boolean getGraphChart2DNeedsUpdate (GraphChart2D graphChart2D) { 1714 1715 if (needsUpdate) return true; 1716 1717 if (graphComponentsColoringByCat && 1718 graphComponentsColorsByCat.getObject2DNeedsUpdate (graphChart2D)) return true; 1719 int index = -1; 1720 1721 if ((index = graphChart2DVector.indexOf (graphChart2D)) != -1) { 1722 return ((Boolean )needsUpdateVector.get (index)).booleanValue(); 1723 } 1724 return false; 1725 } 1726 1727 1728 1732 final void addGraphChart2D (GraphChart2D graphChart2D) { 1733 1734 if (!graphChart2DVector.contains (graphChart2D)) { 1735 if (graphComponentsColorsByCat != null) graphComponentsColorsByCat.addObject2D (graphChart2D); 1736 graphChart2DVector.add (graphChart2D); 1737 needsUpdateVector.add (new Boolean (true)); 1738 } 1739 } 1740 1741 1742 1746 final void removeGraphChart2D (GraphChart2D graphChart2D) { 1747 1748 int index = -1; 1749 if ((index = graphChart2DVector.indexOf (graphChart2D)) != -1) { 1750 if (graphComponentsColorsByCat != null) { 1751 graphComponentsColorsByCat.removeObject2D (graphChart2D); 1752 } 1753 graphChart2DVector.remove (index); 1754 needsUpdateVector.remove (index); 1755 } 1756 } 1757 1758 1759 1766 final boolean validate (boolean debug) { 1767 1768 if (debug) System.out.println ("Validating GraphChart2DProperties"); 1769 1770 boolean valid = true; 1771 1772 if (chartGraphableToAvailableRatio < 0f || chartGraphableToAvailableRatio > 1f) { 1773 valid = false; 1774 if (debug) System.out.println ("Problem with ChartGraphableToAvailableRatio"); 1775 } 1776 if (numbersAxisNumLabels < 2) { 1777 valid = false; 1778 if (debug) System.out.println ("NumbersAxisNumLabels < 2"); 1779 } 1780 if (labelsAxisTicksAlignment != BETWEEN && labelsAxisTicksAlignment != CENTERED) { 1781 valid = false; 1782 if (debug) System.out.println ("Problem with LabelsAxisTicksAlignment"); 1783 } 1784 if (labelsAxisLabelsTexts == null) { 1785 valid = false; 1786 if (debug) System.out.println ("LabelsAxisLabelsTexts == null"); 1787 } 1788 if (labelsAxisTitleText == null) { 1789 valid = false; 1790 if (debug) System.out.println ("LabelsAxisTitleText == null"); 1791 } 1792 if (labelsAxisTitleFontPointModel < 0) { 1793 valid = false; 1794 if (debug) System.out.println ("LabelsAxisTitleFontPointModel < 0"); 1795 } 1796 if (labelsAxisTitleFontName == null || !isFontNameExists (labelsAxisTitleFontName)) { 1797 valid = false; 1798 if (debug) System.out.println ("Problem with LabelsAxisTitleFontName"); 1799 } 1800 if (labelsAxisTitleFontColor == null) { 1801 valid = false; 1802 if (debug) System.out.println ("LabelsAxisTitleFontColor == null"); 1803 } 1804 if (labelsAxisTitleFontStyle != Font.PLAIN && 1805 labelsAxisTitleFontStyle != Font.ITALIC && 1806 labelsAxisTitleFontStyle != Font.BOLD && 1807 labelsAxisTitleFontStyle != (Font.ITALIC|Font.BOLD)) { 1808 valid = false; 1809 if (debug) System.out.println ("Problem with LabelsAxisTitleFontStyle"); 1810 } 1811 if (labelsAxisTitleBetweenRestGapThicknessModel < 0) { 1812 valid = false; 1813 if (debug) System.out.println ("LabelsAxisTitleBetweenRestGapThicknessModel < 0"); 1814 } 1815 if (labelsAxisTicksSizeModel == null || 1816 labelsAxisTicksSizeModel.width < 0 || labelsAxisTicksSizeModel.height < 0) { 1817 valid = false; 1818 if (debug) System.out.println ("Problem with LabelsAxisTicksSizeModel"); 1819 } 1820 if (labelsAxisTicksColor == null) { 1821 valid = false; 1822 if (debug) System.out.println ("LabelsAxisTicksColor == null"); 1823 } 1824 if (labelsAxisTicksOutlineColor == null) { 1825 valid = false; 1826 if (debug) System.out.println ("LabelsAxisTicksOutlineColor == null"); 1827 } 1828 if (labelsAxisLabelsFontPointModel < 0) { 1829 valid = false; 1830 if (debug) System.out.println ("LabelsAxisLabelsFontPointModel < 0"); 1831 } 1832 if (labelsAxisLabelsFontName == null || !isFontNameExists (labelsAxisLabelsFontName)) { 1833 valid = false; 1834 if (debug) System.out.println ("Problem with LabelsAxisLabelsFontName"); 1835 } 1836 if (labelsAxisLabelsFontColor == null) { 1837 valid = false; 1838 if (debug) System.out.println ("LabelsAxisLabelsFontColor == null"); 1839 } 1840 if (labelsAxisLabelsFontStyle != Font.PLAIN && 1841 labelsAxisLabelsFontStyle != Font.ITALIC && 1842 labelsAxisLabelsFontStyle != Font.BOLD && 1843 labelsAxisLabelsFontStyle != (Font.ITALIC|Font.BOLD)) { 1844 valid = false; 1845 if (debug) System.out.println ("Problem with LabelsAxisLabelsFontStyle"); 1846 } 1847 if (labelsAxisBetweenLabelsOrTicksGapThicknessModel < 0) { 1848 valid = false; 1849 if (debug) System.out.println ("LabelsAxisBetweenLabelsOrTicksGapThicknessModel < 0"); 1850 } 1851 if (labelsAxisBetweenLabelsAndTicksGapThicknessModel < 0) { 1852 valid = false; 1853 if (debug) System.out.println ("LabelsAxisBetweenLabelsAndTicksGapThicknessModel < 0"); 1854 } 1855 if (numbersAxisTitleText == null) { 1856 valid = false; 1857 if (debug) System.out.println ("NumbersAxisTitleText == null"); 1858 } 1859 if (numbersAxisTitleFontPointModel < 0) { 1860 valid = false; 1861 if (debug) System.out.println ("NumbersAxisTitleFontPointModel < 0"); 1862 } 1863 if (numbersAxisTitleFontName == null || !isFontNameExists (numbersAxisTitleFontName)) { 1864 valid = false; 1865 if (debug) System.out.println ("Problem with NumbersAxisTitleFontName"); 1866 } 1867 if (numbersAxisTitleFontColor == null) { 1868 valid = false; 1869 if (debug) System.out.println ("NumbersAxisTitleFontColor == null"); 1870 } 1871 if (numbersAxisTitleFontStyle != Font.PLAIN && 1872 numbersAxisTitleFontStyle != Font.ITALIC && 1873 numbersAxisTitleFontStyle != Font.BOLD && 1874 numbersAxisTitleFontStyle != (Font.ITALIC|Font.BOLD)) { 1875 valid = false; 1876 if (debug) System.out.println ("Problem with NumbersAxisTitleFontStyle"); 1877 } 1878 if (numbersAxisTitleBetweenRestGapThicknessModel < 0) { 1879 valid = false; 1880 if (debug) System.out.println ("NumbersAxisTitleBetweenRestGapThicknessModel < 0"); 1881 } 1882 if (numbersAxisTicksSizeModel == null || 1883 numbersAxisTicksSizeModel.width < 0 || numbersAxisTicksSizeModel.height < 0) { 1884 valid = false; 1885 if (debug) System.out.println ("Problem with NumbersAxisTicksSizeModel"); 1886 } 1887 if (numbersAxisTicksColor == null) { 1888 valid = false; 1889 if (debug) System.out.println ("NumbersAxisTicksColor == null"); 1890 } 1891 if (numbersAxisTicksOutlineColor == null) { 1892 valid = false; 1893 if (debug) System.out.println ("NumbersAxisTicksOutlineColor == null"); 1894 } 1895 if (numbersAxisLabelsFontPointModel < 0) { 1896 valid = false; 1897 if (debug) System.out.println ("NumbersAxisLabelsFontPointModel < 0"); 1898 } 1899 if (numbersAxisLabelsFontName == null || !isFontNameExists (numbersAxisLabelsFontName)) { 1900 valid = false; 1901 if (debug) System.out.println ("Problem with NumbersAxisLabelsFontName"); 1902 } 1903 if (numbersAxisLabelsFontColor == null) { 1904 valid = false; 1905 if (debug) System.out.println ("NumbersAxisLabelsFontColor == null"); 1906 } 1907 if (numbersAxisLabelsFontStyle != Font.PLAIN && 1908 numbersAxisLabelsFontStyle != Font.ITALIC && 1909 numbersAxisLabelsFontStyle != Font.BOLD && 1910 numbersAxisLabelsFontStyle != (Font.ITALIC|Font.BOLD)) { 1911 valid = false; 1912 if (debug) System.out.println ("Problem with NumbersAxisLabelsFontStyle"); 1913 } 1914 if (numbersAxisBetweenLabelsOrTicksGapThicknessModel < 0) { 1915 valid = false; 1916 if (debug) System.out.println ("NumbersAxisBetweenLabelsOrTicksGapThicknessModel < 0"); 1917 } 1918 if (numbersAxisBetweenLabelsAndTicksGapThicknessModel < 0) { 1919 valid = false; 1920 if (debug) System.out.println ("NumbersAxisBetweenLabelsAndTicksGapThicknessModel < 0"); 1921 } 1922 if (numbersAxisBetweenLabelsAndTicksGapThicknessModel < 0) { 1923 valid = false; 1924 if (debug) System.out.println ("NumbersAxisBetweenLabelsAndTicksGapThicknessModel < 0"); 1925 } 1926 if (graphComponentsColoringByCat) { 1927 1928 if (graphComponentsColorsByCat == null) { 1929 valid = false; 1930 if (debug) System.out.println ("GraphComponentsColorsByCat == null"); 1931 } 1932 else if (!graphComponentsColorsByCat.validate (debug)) valid = false; 1933 } 1934 1935 if (debug) { 1936 if (valid) System.out.println ("GraphChart2DProperties was valid"); 1937 else System.out.println ("GraphChart2DProperties was invalid"); 1938 } 1939 1940 return valid; 1941 } 1942 1943 1944 1948 final void updateGraphChart2D (GraphChart2D graphChart2D) { 1949 1950 if (getGraphChart2DNeedsUpdate (graphChart2D)) { 1951 1952 if (needsUpdate) { 1953 for (int i = 0; i < needsUpdateVector.size(); ++i) { 1954 needsUpdateVector.set (i, new Boolean (true)); 1955 } 1956 needsUpdate = false; 1957 } 1958 1959 if (graphComponentsColorsByCat != null) { 1960 graphComponentsColorsByCat.updateObject2D (graphChart2D); 1961 } 1962 1963 int index = -1; 1964 if ((index = graphChart2DVector.indexOf (graphChart2D)) != -1) { 1965 needsUpdateVector.set (index, new Boolean (false)); 1966 } 1967 } 1968 } 1969} | Popular Tags |