| 1 28 package net.sf.jasperreports.engine.xml; 29 30 import java.awt.Color ; 31 import java.util.HashMap ; 32 import java.util.Map ; 33 34 import net.sf.jasperreports.charts.JRChartAxis; 35 import net.sf.jasperreports.charts.JRMeterPlot; 36 import net.sf.jasperreports.charts.JRThermometerPlot; 37 import net.sf.jasperreports.crosstabs.JRCellContents; 38 import net.sf.jasperreports.crosstabs.JRCrosstabMeasure; 39 import net.sf.jasperreports.crosstabs.fill.calculation.BucketDefinition; 40 import net.sf.jasperreports.engine.JRAlignment; 41 import net.sf.jasperreports.engine.JRBreak; 42 import net.sf.jasperreports.engine.JRChart; 43 import net.sf.jasperreports.engine.JRElement; 44 import net.sf.jasperreports.engine.JRExpression; 45 import net.sf.jasperreports.engine.JRGraphicElement; 46 import net.sf.jasperreports.engine.JRHyperlink; 47 import net.sf.jasperreports.engine.JRHyperlinkHelper; 48 import net.sf.jasperreports.engine.JRImage; 49 import net.sf.jasperreports.engine.JRLine; 50 import net.sf.jasperreports.engine.JRPrintText; 51 import net.sf.jasperreports.engine.JRReport; 52 import net.sf.jasperreports.engine.JRSortField; 53 import net.sf.jasperreports.engine.JRTextElement; 54 import net.sf.jasperreports.engine.JRVariable; 55 56 import org.jfree.chart.plot.PlotOrientation; 57 import org.jfree.chart.renderer.xy.XYBubbleRenderer; 58 import org.jfree.data.time.Day; 59 import org.jfree.data.time.Hour; 60 import org.jfree.data.time.Millisecond; 61 import org.jfree.data.time.Minute; 62 import org.jfree.data.time.Month; 63 import org.jfree.data.time.Quarter; 64 import org.jfree.data.time.Second; 65 import org.jfree.data.time.Week; 66 import org.jfree.data.time.Year; 67 68 69 70 74 public class JRXmlConstants 75 { 76 77 78 81 private static final String POSITION_TYPE_FLOAT = "Float"; 82 private static final String POSITION_TYPE_FIX_RELATIVE_TO_TOP = "FixRelativeToTop"; 83 private static final String POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM = "FixRelativeToBottom"; 84 85 private static Map positionTypeMap = null; 86 87 public static Map getPositionTypeMap() 88 { 89 if (positionTypeMap == null) 90 { 91 positionTypeMap = new HashMap (6); 92 positionTypeMap.put(POSITION_TYPE_FLOAT, new Byte (JRElement.POSITION_TYPE_FLOAT)); 93 positionTypeMap.put(POSITION_TYPE_FIX_RELATIVE_TO_TOP, new Byte (JRElement.POSITION_TYPE_FIX_RELATIVE_TO_TOP)); 94 positionTypeMap.put(POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM, new Byte (JRElement.POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM)); 95 positionTypeMap.put(new Byte (JRElement.POSITION_TYPE_FLOAT), POSITION_TYPE_FLOAT); 96 positionTypeMap.put(new Byte (JRElement.POSITION_TYPE_FIX_RELATIVE_TO_TOP), POSITION_TYPE_FIX_RELATIVE_TO_TOP); 97 positionTypeMap.put(new Byte (JRElement.POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM), POSITION_TYPE_FIX_RELATIVE_TO_BOTTOM); 98 } 99 100 return positionTypeMap; 101 } 102 103 106 private static final String MODE_OPAQUE = "Opaque"; 107 private static final String MODE_TRANSPARENT = "Transparent"; 108 109 private static Map modeMap = null; 110 111 public static Map getModeMap() 112 { 113 if (modeMap == null) 114 { 115 modeMap = new HashMap (4); 116 modeMap.put(MODE_OPAQUE, new Byte (JRElement.MODE_OPAQUE)); 117 modeMap.put(MODE_TRANSPARENT, new Byte (JRElement.MODE_TRANSPARENT)); 118 modeMap.put(new Byte (JRElement.MODE_OPAQUE), MODE_OPAQUE); 119 modeMap.put(new Byte (JRElement.MODE_TRANSPARENT), MODE_TRANSPARENT); 120 } 121 122 return modeMap; 123 } 124 125 128 private static final String COLOR_BLACK = "black"; 129 private static final String COLOR_BLUE = "blue"; 130 private static final String COLOR_CYAN = "cyan"; 131 private static final String COLOR_DARK_GRAY = "darkGray"; 132 private static final String COLOR_GRAY = "gray"; 133 private static final String COLOR_GREEN = "green"; 134 private static final String COLOR_LIGHT_GRAY = "lightGray"; 135 private static final String COLOR_MAGENTA = "magenta"; 136 private static final String COLOR_ORANGE = "orange"; 137 private static final String COLOR_PINK = "pink"; 138 private static final String COLOR_RED = "red"; 139 private static final String COLOR_YELLOW = "yellow"; 140 private static final String COLOR_WHITE = "white"; 141 142 private static Map colorMap = null; 143 144 public static Map getColorMap() 145 { 146 if (colorMap == null) 147 { 148 colorMap = new HashMap (26); 149 colorMap.put(COLOR_BLACK, Color.black); 150 colorMap.put(COLOR_BLUE, Color.blue); 151 colorMap.put(COLOR_CYAN, Color.cyan); 152 colorMap.put(COLOR_DARK_GRAY, Color.darkGray); 153 colorMap.put(COLOR_GRAY, Color.gray); 154 colorMap.put(COLOR_GREEN, Color.green); 155 colorMap.put(COLOR_LIGHT_GRAY, Color.lightGray); 156 colorMap.put(COLOR_MAGENTA, Color.magenta); 157 colorMap.put(COLOR_ORANGE, Color.orange); 158 colorMap.put(COLOR_PINK, Color.pink); 159 colorMap.put(COLOR_RED, Color.red); 160 colorMap.put(COLOR_YELLOW, Color.yellow); 161 colorMap.put(COLOR_WHITE, Color.white); 162 colorMap.put(Color.black, COLOR_BLACK); 163 colorMap.put(Color.blue, COLOR_BLUE); 164 colorMap.put(Color.cyan, COLOR_CYAN); 165 colorMap.put(Color.darkGray, COLOR_DARK_GRAY); 166 colorMap.put(Color.gray, COLOR_GRAY); 167 colorMap.put(Color.green, COLOR_GREEN); 168 colorMap.put(Color.lightGray, COLOR_LIGHT_GRAY); 169 colorMap.put(Color.magenta, COLOR_MAGENTA); 170 colorMap.put(Color.orange, COLOR_ORANGE); 171 colorMap.put(Color.pink, COLOR_PINK); 172 colorMap.put(Color.red, COLOR_RED); 173 colorMap.put(Color.yellow, COLOR_YELLOW); 174 colorMap.put(Color.white, COLOR_WHITE); 175 } 176 177 return colorMap; 178 } 179 180 183 private static final String HORIZONTAL_ALIGN_LEFT = "Left"; 184 private static final String HORIZONTAL_ALIGN_CENTER = "Center"; 185 private static final String HORIZONTAL_ALIGN_RIGHT = "Right"; 186 private static final String HORIZONTAL_ALIGN_JUSTIFIED = "Justified"; 187 188 private static Map horizontalAlignMap = null; 189 190 public static Map getHorizontalAlignMap() 191 { 192 if (horizontalAlignMap == null) 193 { 194 horizontalAlignMap = new HashMap (8); 195 horizontalAlignMap.put(HORIZONTAL_ALIGN_LEFT, new Byte (JRAlignment.HORIZONTAL_ALIGN_LEFT)); 196 horizontalAlignMap.put(HORIZONTAL_ALIGN_CENTER, new Byte (JRAlignment.HORIZONTAL_ALIGN_CENTER)); 197 horizontalAlignMap.put(HORIZONTAL_ALIGN_RIGHT, new Byte (JRAlignment.HORIZONTAL_ALIGN_RIGHT)); 198 horizontalAlignMap.put(HORIZONTAL_ALIGN_JUSTIFIED, new Byte (JRAlignment.HORIZONTAL_ALIGN_JUSTIFIED)); 199 horizontalAlignMap.put(new Byte (JRAlignment.HORIZONTAL_ALIGN_LEFT), HORIZONTAL_ALIGN_LEFT); 200 horizontalAlignMap.put(new Byte (JRAlignment.HORIZONTAL_ALIGN_CENTER), HORIZONTAL_ALIGN_CENTER); 201 horizontalAlignMap.put(new Byte (JRAlignment.HORIZONTAL_ALIGN_RIGHT), HORIZONTAL_ALIGN_RIGHT); 202 horizontalAlignMap.put(new Byte (JRAlignment.HORIZONTAL_ALIGN_JUSTIFIED), HORIZONTAL_ALIGN_JUSTIFIED); 203 } 204 205 return horizontalAlignMap; 206 } 207 208 211 public static Map getTextAlignMap() 212 { 213 return getHorizontalAlignMap(); 214 } 215 216 219 private static final String VERTICAL_ALIGN_TOP = "Top"; 220 private static final String VERTICAL_ALIGN_MIDDLE = "Middle"; 221 private static final String VERTICAL_ALIGN_BOTTOM = "Bottom"; 222 223 private static Map verticalAlignMap = null; 224 225 public static Map getVerticalAlignMap() 226 { 227 if (verticalAlignMap == null) 228 { 229 verticalAlignMap = new HashMap (6); 230 verticalAlignMap.put(VERTICAL_ALIGN_TOP, new Byte (JRAlignment.VERTICAL_ALIGN_TOP)); 231 verticalAlignMap.put(VERTICAL_ALIGN_MIDDLE, new Byte (JRAlignment.VERTICAL_ALIGN_MIDDLE)); 232 verticalAlignMap.put(VERTICAL_ALIGN_BOTTOM, new Byte (JRAlignment.VERTICAL_ALIGN_BOTTOM)); 233 verticalAlignMap.put(new Byte (JRAlignment.VERTICAL_ALIGN_TOP), VERTICAL_ALIGN_TOP); 234 verticalAlignMap.put(new Byte (JRAlignment.VERTICAL_ALIGN_MIDDLE), VERTICAL_ALIGN_MIDDLE); 235 verticalAlignMap.put(new Byte (JRAlignment.VERTICAL_ALIGN_BOTTOM), VERTICAL_ALIGN_BOTTOM); 236 } 237 238 return verticalAlignMap; 239 } 240 241 244 private static final String ROTATION_NONE = "None"; 245 private static final String ROTATION_LEFT = "Left"; 246 private static final String ROTATION_RIGHT = "Right"; 247 private static final String ROTATION_UPSIDE_DOWN = "UpsideDown"; 248 249 private static Map rotationMap = null; 250 251 public static Map getRotationMap() 252 { 253 if (rotationMap == null) 254 { 255 rotationMap = new HashMap (6); 256 rotationMap.put(ROTATION_NONE, new Byte (JRTextElement.ROTATION_NONE)); 257 rotationMap.put(ROTATION_LEFT, new Byte (JRTextElement.ROTATION_LEFT)); 258 rotationMap.put(ROTATION_RIGHT, new Byte (JRTextElement.ROTATION_RIGHT)); 259 rotationMap.put(ROTATION_UPSIDE_DOWN, new Byte (JRTextElement.ROTATION_UPSIDE_DOWN)); 260 rotationMap.put(new Byte (JRTextElement.ROTATION_NONE), ROTATION_NONE); 261 rotationMap.put(new Byte (JRTextElement.ROTATION_LEFT), ROTATION_LEFT); 262 rotationMap.put(new Byte (JRTextElement.ROTATION_RIGHT), ROTATION_RIGHT); 263 rotationMap.put(new Byte (JRTextElement.ROTATION_UPSIDE_DOWN), ROTATION_UPSIDE_DOWN); 264 } 265 266 return rotationMap; 267 } 268 269 272 private static final String BREAK_TYPE_PAGE = "Page"; 273 private static final String BREAK_TYPE_COLUMN = "Column"; 274 275 private static Map breakTypeMap = null; 276 277 public static Map getBreakTypeMap() 278 { 279 if (breakTypeMap == null) 280 { 281 breakTypeMap = new HashMap (4); 282 breakTypeMap.put(BREAK_TYPE_PAGE, new Byte (JRBreak.TYPE_PAGE)); 283 breakTypeMap.put(BREAK_TYPE_COLUMN, new Byte (JRPrintText.RUN_DIRECTION_RTL)); 284 breakTypeMap.put(new Byte (JRBreak.TYPE_PAGE), BREAK_TYPE_PAGE); 285 breakTypeMap.put(new Byte (JRBreak.TYPE_COLUMN), BREAK_TYPE_COLUMN); 286 } 287 288 return breakTypeMap; 289 } 290 291 294 private static final String RUN_DIRECTION_LTR = "LTR"; 295 private static final String RUN_DIRECTION_RTL = "RTL"; 296 297 private static Map runDirectionMap = null; 298 299 public static Map getRunDirectionMap() 300 { 301 if (runDirectionMap == null) 302 { 303 runDirectionMap = new HashMap (4); 304 runDirectionMap.put(RUN_DIRECTION_LTR, new Byte (JRPrintText.RUN_DIRECTION_LTR)); 305 runDirectionMap.put(RUN_DIRECTION_RTL, new Byte (JRPrintText.RUN_DIRECTION_RTL)); 306 runDirectionMap.put(new Byte (JRPrintText.RUN_DIRECTION_LTR), RUN_DIRECTION_LTR); 307 runDirectionMap.put(new Byte (JRPrintText.RUN_DIRECTION_RTL), RUN_DIRECTION_RTL); 308 } 309 310 return runDirectionMap; 311 } 312 313 316 private static final String LINE_SPACING_SINGLE = "Single"; 317 private static final String LINE_SPACING_1_1_2 = "1_1_2"; 318 private static final String LINE_SPACING_DOUBLE = "Double"; 319 320 private static Map lineSpacingMap = null; 321 322 public static Map getLineSpacingMap() 323 { 324 if (lineSpacingMap == null) 325 { 326 lineSpacingMap = new HashMap (6); 327 lineSpacingMap.put(LINE_SPACING_SINGLE, new Byte (JRTextElement.LINE_SPACING_SINGLE)); 328 lineSpacingMap.put(LINE_SPACING_1_1_2, new Byte (JRTextElement.LINE_SPACING_1_1_2)); 329 lineSpacingMap.put(LINE_SPACING_DOUBLE, new Byte (JRTextElement.LINE_SPACING_DOUBLE)); 330 lineSpacingMap.put(new Byte (JRTextElement.LINE_SPACING_SINGLE), LINE_SPACING_SINGLE); 331 lineSpacingMap.put(new Byte (JRTextElement.LINE_SPACING_1_1_2), LINE_SPACING_1_1_2); 332 lineSpacingMap.put(new Byte (JRTextElement.LINE_SPACING_DOUBLE), LINE_SPACING_DOUBLE); 333 } 334 335 return lineSpacingMap; 336 } 337 338 341 private static final String DIRECTION_TOP_DOWN = "TopDown"; 342 private static final String DIRECTION_BOTTOM_UP = "BottomUp"; 343 344 private static Map directionMap = null; 345 346 public static Map getDirectionMap() 347 { 348 if (directionMap == null) 349 { 350 directionMap = new HashMap (4); 351 directionMap.put(DIRECTION_TOP_DOWN, new Byte (JRLine.DIRECTION_TOP_DOWN)); 352 directionMap.put(DIRECTION_BOTTOM_UP, new Byte (JRLine.DIRECTION_BOTTOM_UP)); 353 directionMap.put(new Byte (JRLine.DIRECTION_TOP_DOWN), DIRECTION_TOP_DOWN); 354 directionMap.put(new Byte (JRLine.DIRECTION_BOTTOM_UP), DIRECTION_BOTTOM_UP); 355 } 356 357 return directionMap; 358 } 359 360 363 private static final String SCALE_IMAGE_CLIP = "Clip"; 364 private static final String SCALE_IMAGE_FILL_FRAME = "FillFrame"; 365 private static final String SCALE_IMAGE_RETAIN_SHAPE = "RetainShape"; 366 367 private static Map scaleImageMap = null; 368 369 public static Map getScaleImageMap() 370 { 371 if (scaleImageMap == null) 372 { 373 scaleImageMap = new HashMap (6); 374 scaleImageMap.put(SCALE_IMAGE_CLIP, new Byte (JRImage.SCALE_IMAGE_CLIP)); 375 scaleImageMap.put(SCALE_IMAGE_FILL_FRAME, new Byte (JRImage.SCALE_IMAGE_FILL_FRAME)); 376 scaleImageMap.put(SCALE_IMAGE_RETAIN_SHAPE, new Byte (JRImage.SCALE_IMAGE_RETAIN_SHAPE)); 377 scaleImageMap.put(new Byte (JRImage.SCALE_IMAGE_CLIP), SCALE_IMAGE_CLIP); 378 scaleImageMap.put(new Byte (JRImage.SCALE_IMAGE_FILL_FRAME), SCALE_IMAGE_FILL_FRAME); 379 scaleImageMap.put(new Byte (JRImage.SCALE_IMAGE_RETAIN_SHAPE), SCALE_IMAGE_RETAIN_SHAPE); 380 } 381 382 return scaleImageMap; 383 } 384 385 388 private static final String ON_ERROR_TYPE_ERROR = "Error"; 389 private static final String ON_ERROR_TYPE_BLANK = "Blank"; 390 private static final String ON_ERROR_TYPE_ICON = "Icon"; 391 392 private static Map onErrorTypeMap = null; 393 394 public static Map getOnErrorTypeMap() 395 { 396 if (onErrorTypeMap == null) 397 { 398 onErrorTypeMap = new HashMap (6); 399 onErrorTypeMap.put(ON_ERROR_TYPE_ERROR, new Byte (JRImage.ON_ERROR_TYPE_ERROR)); 400 onErrorTypeMap.put(ON_ERROR_TYPE_BLANK, new Byte (JRImage.ON_ERROR_TYPE_BLANK)); 401 onErrorTypeMap.put(ON_ERROR_TYPE_ICON, new Byte (JRImage.ON_ERROR_TYPE_ICON)); 402 onErrorTypeMap.put(new Byte (JRImage.ON_ERROR_TYPE_ERROR), ON_ERROR_TYPE_ERROR); 403 onErrorTypeMap.put(new Byte (JRImage.ON_ERROR_TYPE_BLANK), ON_ERROR_TYPE_BLANK); 404 onErrorTypeMap.put(new Byte (JRImage.ON_ERROR_TYPE_ICON), ON_ERROR_TYPE_ICON); 405 } 406 407 return onErrorTypeMap; 408 } 409 410 413 private static final String STRETCH_TYPE_NO_STRETCH = "NoStretch"; 414 private static final String STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT = "RelativeToTallestObject"; 415 private static final String STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT = "RelativeToBandHeight"; 416 417 private static Map stretchTypeMap = null; 418 419 public static Map getStretchTypeMap() 420 { 421 if (stretchTypeMap == null) 422 { 423 stretchTypeMap = new HashMap (6); 424 stretchTypeMap.put(STRETCH_TYPE_NO_STRETCH, new Byte (JRElement.STRETCH_TYPE_NO_STRETCH)); 425 stretchTypeMap.put(STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT, new Byte (JRElement.STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT)); 426 stretchTypeMap.put(STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT, new Byte (JRElement.STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT)); 427 stretchTypeMap.put(new Byte (JRElement.STRETCH_TYPE_NO_STRETCH), STRETCH_TYPE_NO_STRETCH); 428 stretchTypeMap.put(new Byte (JRElement.STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT), STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT); 429 stretchTypeMap.put(new Byte (JRElement.STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT), STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT); 430 } 431 432 return stretchTypeMap; 433 } 434 435 438 private static final String PEN_NONE = "None"; 439 private static final String PEN_THIN = "Thin"; 440 private static final String PEN_1_POINT = "1Point"; 441 private static final String PEN_2_POINT = "2Point"; 442 private static final String PEN_4_POINT = "4Point"; 443 private static final String PEN_DOTTED = "Dotted"; 444 445 private static Map penMap = null; 446 447 public static Map getPenMap() 448 { 449 if (penMap == null) 450 { 451 penMap = new HashMap (10); 452 penMap.put(PEN_NONE, new Byte (JRGraphicElement.PEN_NONE)); 453 penMap.put(PEN_THIN, new Byte (JRGraphicElement.PEN_THIN)); 454 penMap.put(PEN_1_POINT, new Byte (JRGraphicElement.PEN_1_POINT)); 455 penMap.put(PEN_2_POINT, new Byte (JRGraphicElement.PEN_2_POINT)); 456 penMap.put(PEN_4_POINT, new Byte (JRGraphicElement.PEN_4_POINT)); 457 penMap.put(PEN_DOTTED, new Byte (JRGraphicElement.PEN_DOTTED)); 458 penMap.put(new Byte (JRGraphicElement.PEN_NONE), PEN_NONE); 459 penMap.put(new Byte (JRGraphicElement.PEN_THIN), PEN_THIN); 460 penMap.put(new Byte (JRGraphicElement.PEN_1_POINT), PEN_1_POINT); 461 penMap.put(new Byte (JRGraphicElement.PEN_2_POINT), PEN_2_POINT); 462 penMap.put(new Byte (JRGraphicElement.PEN_4_POINT), PEN_4_POINT); 463 penMap.put(new Byte (JRGraphicElement.PEN_DOTTED), PEN_DOTTED); 464 } 465 466 return penMap; 467 } 468 469 472 private static final String FILL_SOLID = "Solid"; 473 474 private static Map fillMap = null; 475 476 public static Map getFillMap() 477 { 478 if (fillMap == null) 479 { 480 fillMap = new HashMap (2); 481 fillMap.put(FILL_SOLID, new Byte (JRGraphicElement.FILL_SOLID)); 482 fillMap.put(new Byte (JRGraphicElement.FILL_SOLID), FILL_SOLID); 483 } 484 485 return fillMap; 486 } 487 488 491 private static final String RESET_TYPE_NONE = "None"; 492 private static final String RESET_TYPE_REPORT = "Report"; 493 private static final String RESET_TYPE_PAGE = "Page"; 494 private static final String RESET_TYPE_COLUMN = "Column"; 495 private static final String RESET_TYPE_GROUP = "Group"; 496 497 private static Map resetTypeMap = null; 498 499 public static Map getResetTypeMap() 500 { 501 if (resetTypeMap == null) 502 { 503 resetTypeMap = new HashMap (10); 504 resetTypeMap.put(RESET_TYPE_NONE, new Byte (JRVariable.RESET_TYPE_NONE)); 505 resetTypeMap.put(RESET_TYPE_REPORT, new Byte (JRVariable.RESET_TYPE_REPORT)); 506 resetTypeMap.put(RESET_TYPE_PAGE, new Byte (JRVariable.RESET_TYPE_PAGE)); 507 resetTypeMap.put(RESET_TYPE_COLUMN, new Byte (JRVariable.RESET_TYPE_COLUMN)); 508 resetTypeMap.put(RESET_TYPE_GROUP, new Byte (JRVariable.RESET_TYPE_GROUP)); 509 resetTypeMap.put(new Byte (JRVariable.RESET_TYPE_NONE), RESET_TYPE_NONE); 510 resetTypeMap.put(new Byte (JRVariable.RESET_TYPE_REPORT), RESET_TYPE_REPORT); 511 resetTypeMap.put(new Byte (JRVariable.RESET_TYPE_PAGE), RESET_TYPE_PAGE); 512 resetTypeMap.put(new Byte (JRVariable.RESET_TYPE_COLUMN), RESET_TYPE_COLUMN); 513 resetTypeMap.put(new Byte (JRVariable.RESET_TYPE_GROUP), RESET_TYPE_GROUP); 514 } 515 516 return resetTypeMap; 517 } 518 519 522 private static final String CALCULATION_NOTHING = "Nothing"; 523 private static final String CALCULATION_COUNT = "Count"; 524 private static final String CALCULATION_SUM = "Sum"; 525 private static final String CALCULATION_AVERAGE = "Average"; 526 private static final String CALCULATION_LOWEST = "Lowest"; 527 private static final String CALCULATION_HIGHEST = "Highest"; 528 private static final String CALCULATION_STANDARD_DEVIATION = "StandardDeviation"; 529 private static final String CALCULATION_VARIANCE = "Variance"; 530 private static final String CALCULATION_SYSTEM = "System"; 531 private static final String CALCULATION_FIRST = "First"; 532 private static final String CALCULATION_DISTINCT_COUNT = "DistinctCount"; 533 534 private static Map calculationMap = null; 535 536 public static Map getCalculationMap() 537 { 538 if (calculationMap == null) 539 { 540 calculationMap = new HashMap (18); 541 calculationMap.put(CALCULATION_NOTHING, new Byte (JRVariable.CALCULATION_NOTHING)); 542 calculationMap.put(CALCULATION_COUNT, new Byte (JRVariable.CALCULATION_COUNT)); 543 calculationMap.put(CALCULATION_SUM, new Byte (JRVariable.CALCULATION_SUM)); 544 calculationMap.put(CALCULATION_AVERAGE, new Byte (JRVariable.CALCULATION_AVERAGE)); 545 calculationMap.put(CALCULATION_LOWEST, new Byte (JRVariable.CALCULATION_LOWEST)); 546 calculationMap.put(CALCULATION_HIGHEST, new Byte (JRVariable.CALCULATION_HIGHEST)); 547 calculationMap.put(CALCULATION_STANDARD_DEVIATION, new Byte (JRVariable.CALCULATION_STANDARD_DEVIATION)); 548 calculationMap.put(CALCULATION_VARIANCE, new Byte (JRVariable.CALCULATION_VARIANCE)); 549 calculationMap.put(CALCULATION_SYSTEM, new Byte (JRVariable.CALCULATION_SYSTEM)); 550 calculationMap.put(CALCULATION_FIRST, new Byte (JRVariable.CALCULATION_FIRST)); 551 calculationMap.put(CALCULATION_DISTINCT_COUNT, new Byte (JRVariable.CALCULATION_DISTINCT_COUNT)); 552 calculationMap.put(new Byte (JRVariable.CALCULATION_NOTHING), CALCULATION_NOTHING); 553 calculationMap.put(new Byte (JRVariable.CALCULATION_COUNT), CALCULATION_COUNT); 554 calculationMap.put(new Byte (JRVariable.CALCULATION_SUM), CALCULATION_SUM); 555 calculationMap.put(new Byte (JRVariable.CALCULATION_AVERAGE), CALCULATION_AVERAGE); 556 calculationMap.put(new Byte (JRVariable.CALCULATION_LOWEST), CALCULATION_LOWEST); 557 calculationMap.put(new Byte (JRVariable.CALCULATION_HIGHEST), CALCULATION_HIGHEST); 558 calculationMap.put(new Byte (JRVariable.CALCULATION_STANDARD_DEVIATION), CALCULATION_STANDARD_DEVIATION); 559 calculationMap.put(new Byte (JRVariable.CALCULATION_VARIANCE), CALCULATION_VARIANCE); 560 calculationMap.put(new Byte (JRVariable.CALCULATION_SYSTEM), CALCULATION_SYSTEM); 561 calculationMap.put(new Byte (JRVariable.CALCULATION_FIRST), CALCULATION_FIRST); 562 calculationMap.put(new Byte (JRVariable.CALCULATION_DISTINCT_COUNT), CALCULATION_DISTINCT_COUNT); 563 } 564 565 return calculationMap; 566 } 567 568 571 private static final String PRINT_ORDER_VERTICAL = "Vertical"; 572 private static final String PRINT_ORDER_HORIZONTAL = "Horizontal"; 573 574 private static Map printOrderMap = null; 575 576 public static Map getPrintOrderMap() 577 { 578 if (printOrderMap == null) 579 { 580 printOrderMap = new HashMap (4); 581 printOrderMap.put(PRINT_ORDER_VERTICAL, new Byte (JRReport.PRINT_ORDER_VERTICAL)); 582 printOrderMap.put(PRINT_ORDER_HORIZONTAL, new Byte (JRReport.PRINT_ORDER_HORIZONTAL)); 583 printOrderMap.put(new Byte (JRReport.PRINT_ORDER_VERTICAL), PRINT_ORDER_VERTICAL); 584 printOrderMap.put(new Byte (JRReport.PRINT_ORDER_HORIZONTAL), PRINT_ORDER_HORIZONTAL); 585 } 586 587 return printOrderMap; 588 } 589 590 593 private static final String ORIENTATION_PORTRAIT = "Portrait"; 594 private static final String  |